{"openapi": "3.1.0", "info": {"title": "Matindex webb-API", "version": "1.0.0", "description": "Katalog och privata ink\u00f6pslistor. Cookie-session + CSRF f\u00f6r skrivande anrop. Utvecklingsmilj\u00f6, ingen fri registrering."}, "paths": {"/api/v1/health": {"get": {"operationId": "webapi_api_health", "summary": "Health", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Health"}}}}}, "tags": ["System"]}}, "/api/v1/auth/csrf": {"get": {"operationId": "webapi_api_csrf", "summary": "Csrf", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Csrf"}}}}}, "tags": ["Konto"]}}, "/api/v1/auth/login": {"post": {"operationId": "webapi_api_sign_in", "summary": "Sign In", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/User"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "tags": ["Konto"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Credentials"}}}, "required": true}}}, "/api/v1/auth/logout": {"post": {"operationId": "webapi_api_sign_out", "summary": "Sign Out", "parameters": [], "responses": {"204": {"description": "No Content"}}, "tags": ["Konto"], "security": [{"SessionAuth": []}]}}, "/api/v1/me": {"get": {"operationId": "webapi_api_me", "summary": "Me", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/User"}}}}}, "tags": ["Konto"], "security": [{"SessionAuth": []}]}}, "/api/v1/auth/password": {"post": {"operationId": "webapi_api_change_password", "summary": "Change Password", "parameters": [], "responses": {"204": {"description": "No Content"}}, "tags": ["Konto"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/Password"}}}, "required": true}, "security": [{"SessionAuth": []}]}}, "/api/v1/stores": {"get": {"operationId": "webapi_api_get_stores", "summary": "Get Stores", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Stores"}}}}}, "tags": ["Katalog"]}}, "/api/v1/products": {"get": {"operationId": "webapi_api_get_products", "summary": "Get Products", "parameters": [{"in": "query", "name": "q", "schema": {"default": "", "maxLength": 100, "title": "Q", "type": "string"}, "required": false}, {"in": "query", "name": "source", "schema": {"default": "", "maxLength": 40, "pattern": "^[a-z]*$", "title": "Source", "type": "string"}, "required": false}, {"in": "query", "name": "store_id", "schema": {"default": "", "maxLength": 100, "title": "Store Id", "type": "string"}, "required": false}, {"in": "query", "name": "cursor", "schema": {"default": "", "maxLength": 1500, "title": "Cursor", "type": "string"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 24, "maximum": 50, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Products"}}}}}, "tags": ["Katalog"]}}, "/api/v1/products/{product_id}": {"get": {"operationId": "webapi_api_get_product", "summary": "Get Product", "parameters": [{"in": "path", "name": "product_id", "schema": {"title": "Product Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Product"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/Error"}}}}}, "tags": ["Katalog"]}}, "/api/v1/me/lists": {"get": {"operationId": "webapi_api_lists", "summary": "Lists", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ListOut"}, "title": "Response", "type": "array"}}}}}, "tags": ["Privata listor"], "security": [{"SessionAuth": []}]}, "post": {"operationId": "webapi_api_create_list", "summary": "Create List", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListOut"}}}}}, "tags": ["Privata listor"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListWrite"}}}, "required": true}, "security": [{"SessionAuth": []}]}}, "/api/v1/me/lists/{list_id}": {"get": {"operationId": "webapi_api_get_list", "summary": "Get List", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListDetail"}}}}}, "tags": ["Privata listor"], "security": [{"SessionAuth": []}]}, "patch": {"operationId": "webapi_api_rename_list", "summary": "Rename List", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListOut"}}}}}, "tags": ["Privata listor"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListWrite"}}}, "required": true}, "security": [{"SessionAuth": []}]}, "delete": {"operationId": "webapi_api_delete_list", "summary": "Delete List", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}}, "tags": ["Privata listor"], "security": [{"SessionAuth": []}]}}, "/api/v1/me/lists/{list_id}/items": {"post": {"operationId": "webapi_api_add_item", "summary": "Add Item", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ItemOut"}}}}}, "tags": ["Privata listor"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ItemWrite"}}}, "required": true}, "security": [{"SessionAuth": []}]}}, "/api/v1/me/lists/{list_id}/items/{item_id}": {"put": {"operationId": "webapi_api_update_item", "summary": "Update Item", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}, {"in": "path", "name": "item_id", "schema": {"format": "uuid", "title": "Item Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ItemOut"}}}}}, "tags": ["Privata listor"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ItemWrite"}}}, "required": true}, "security": [{"SessionAuth": []}]}, "delete": {"operationId": "webapi_api_delete_item", "summary": "Delete Item", "parameters": [{"in": "path", "name": "list_id", "schema": {"format": "uuid", "title": "List Id", "type": "string"}, "required": true}, {"in": "path", "name": "item_id", "schema": {"format": "uuid", "title": "Item Id", "type": "string"}, "required": true}], "responses": {"204": {"description": "No Content"}}, "tags": ["Privata listor"], "security": [{"SessionAuth": []}]}}}, "components": {"schemas": {"Health": {"properties": {"status": {"title": "Status", "type": "string"}, "release": {"title": "Release", "type": "string"}}, "required": ["status", "release"], "title": "Health", "type": "object"}, "Csrf": {"properties": {"csrf_token": {"title": "Csrf Token", "type": "string"}}, "required": ["csrf_token"], "title": "Csrf", "type": "object"}, "User": {"properties": {"username": {"title": "Username", "type": "string"}}, "required": ["username"], "title": "User", "type": "object"}, "Error": {"properties": {"code": {"title": "Code", "type": "string"}, "message": {"title": "Message", "type": "string"}}, "required": ["code", "message"], "title": "Error", "type": "object"}, "Credentials": {"additionalProperties": false, "properties": {"username": {"maxLength": 150, "minLength": 1, "title": "Username", "type": "string"}, "password": {"maxLength": 256, "minLength": 1, "title": "Password", "type": "string"}}, "required": ["username", "password"], "title": "Credentials", "type": "object"}, "Password": {"additionalProperties": false, "properties": {"current_password": {"maxLength": 256, "minLength": 1, "title": "Current Password", "type": "string"}, "new_password": {"maxLength": 256, "minLength": 12, "title": "New Password", "type": "string"}}, "required": ["current_password", "new_password"], "title": "Password", "type": "object"}, "Store": {"properties": {"source": {"title": "Source", "type": "string"}, "store_id": {"title": "Store Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "scope": {"title": "Scope", "type": "string"}, "products": {"title": "Products", "type": "integer"}}, "required": ["source", "store_id", "name", "scope", "products"], "title": "Store", "type": "object"}, "Stores": {"properties": {"items": {"items": {"$ref": "#/components/schemas/Store"}, "title": "Items", "type": "array"}}, "required": ["items"], "title": "Stores", "type": "object"}, "Filters": {"additionalProperties": false, "properties": {"q": {"default": "", "maxLength": 100, "title": "Q", "type": "string"}, "source": {"default": "", "maxLength": 40, "pattern": "^[a-z]*$", "title": "Source", "type": "string"}, "store_id": {"default": "", "maxLength": 100, "title": "Store Id", "type": "string"}, "cursor": {"default": "", "maxLength": 1500, "title": "Cursor", "type": "string"}, "limit": {"default": 24, "maximum": 50, "minimum": 1, "title": "Limit", "type": "integer"}}, "title": "Filters", "type": "object"}, "Price": {"properties": {"amount": {"title": "Amount", "type": "string"}, "currency": {"title": "Currency", "type": "string"}, "comparison_amount": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Comparison Amount"}, "comparison_unit": {"title": "Comparison Unit", "type": "string"}, "package": {"title": "Package", "type": "string"}, "sales_unit": {"title": "Sales Unit", "type": "string"}, "deposit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Deposit"}, "first_observed_at": {"format": "date-time", "title": "First Observed At", "type": "string"}, "last_observed_at": {"format": "date-time", "title": "Last Observed At", "type": "string"}, "kind": {"title": "Kind", "type": "string"}}, "required": ["amount", "currency", "comparison_amount", "comparison_unit", "package", "sales_unit", "deposit", "first_observed_at", "last_observed_at", "kind"], "title": "Price", "type": "object"}, "Product": {"properties": {"id": {"title": "Id", "type": "string"}, "source": {"title": "Source", "type": "string"}, "store_id": {"title": "Store Id", "type": "string"}, "retailer_product_id": {"title": "Retailer Product Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "brand": {"title": "Brand", "type": "string"}, "package": {"title": "Package", "type": "string"}, "sales_unit": {"title": "Sales Unit", "type": "string"}, "item_observed_at": {"title": "Item Observed At", "type": "string"}, "price": {"anyOf": [{"$ref": "#/components/schemas/Price"}, {"type": "null"}]}}, "required": ["id", "source", "store_id", "retailer_product_id", "name", "brand", "package", "sales_unit", "item_observed_at", "price"], "title": "Product", "type": "object"}, "Products": {"properties": {"items": {"items": {"$ref": "#/components/schemas/Product"}, "title": "Items", "type": "array"}, "next_cursor": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next Cursor"}}, "required": ["items", "next_cursor"], "title": "Products", "type": "object"}, "ListOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "name", "created_at", "updated_at"], "title": "ListOut", "type": "object"}, "ListWrite": {"additionalProperties": false, "properties": {"name": {"maxLength": 120, "minLength": 1, "title": "Name", "type": "string"}}, "required": ["name"], "title": "ListWrite", "type": "object"}, "ItemOut": {"additionalProperties": false, "properties": {"label": {"maxLength": 200, "minLength": 1, "title": "Label", "type": "string"}, "quantity": {"default": 1, "maximum": 999, "minimum": 1, "title": "Quantity", "type": "integer"}, "checked": {"default": false, "title": "Checked", "type": "boolean"}, "id": {"format": "uuid", "title": "Id", "type": "string"}}, "required": ["label", "id"], "title": "ItemOut", "type": "object"}, "ListDetail": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "items": {"items": {"$ref": "#/components/schemas/ItemOut"}, "title": "Items", "type": "array"}}, "required": ["id", "name", "created_at", "updated_at", "items"], "title": "ListDetail", "type": "object"}, "ItemWrite": {"additionalProperties": false, "properties": {"label": {"maxLength": 200, "minLength": 1, "title": "Label", "type": "string"}, "quantity": {"default": 1, "maximum": 999, "minimum": 1, "title": "Quantity", "type": "integer"}, "checked": {"default": false, "title": "Checked", "type": "boolean"}}, "required": ["label"], "title": "ItemWrite", "type": "object"}}, "securitySchemes": {"SessionAuth": {"type": "apiKey", "in": "cookie", "name": "matindex_web_session"}}}, "servers": []}