{"openapi":"3.1.2","info":{"title":"Mervio","version":"1.0.0","description":"The Mervio REST API for ERP, warehouse and accounting integrations: products, stock per location, orders, shipments, customers, discounts, B2B price lists and webhooks. Guides: https://mervio.lt/developers"},"servers":[{"url":"https://api.mervio.lt/v1"}],"security":[{"http":[]}],"paths":{"/customer-groups":{"get":{"operationId":"v1.customer-groups.index","summary":"List customer groups","tags":["B2B","B2b"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerGroup"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"v1.customer-groups.store","summary":"Create a customer group","tags":["B2B","B2b"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"price_list_id":{"type":["integer","null"]},"discount_percent":{"type":["number","null"]},"payment_terms_days":{"type":["integer","null"]},"min_order_amount":{"type":["string","number","null"]},"is_default":{"type":"boolean"}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/customer-groups/{customerGroup}":{"get":{"operationId":"v1.customer-groups.show","summary":"Get a customer group","tags":["B2B","B2b"],"parameters":[{"name":"customerGroup","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"v1.customer-groups.update","description":"Send the whole group (name required), like the admin form.","summary":"Update a customer group","tags":["B2B","B2b"],"parameters":[{"name":"customerGroup","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag you read: 409 edit_conflict when the resource changed since.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"price_list_id":{"type":["integer","null"]},"discount_percent":{"type":["number","null"]},"payment_terms_days":{"type":["integer","null"]},"min_order_amount":{"type":["string","number","null"]},"is_default":{"type":"boolean"}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerGroup"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/price-lists":{"get":{"operationId":"v1.price-lists.index","summary":"List price lists","tags":["B2B","B2b"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PriceList"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"v1.price-lists.store","summary":"Create a price list","tags":["B2B","B2b"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"prices_include_tax":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled"]}},"required":["name","prices_include_tax","status"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/price-lists/{priceList}":{"get":{"operationId":"v1.price-lists.show","description":"With all its prices: [{variant_id, sku, min_qty, price}].","summary":"Get a price list","tags":["B2B","B2b"],"parameters":[{"name":"priceList","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/price-lists/{priceList}/prices":{"put":{"operationId":"v1.price-lists.prices","description":"The whole list: [{variant_id or sku, min_qty (default 1), price}]. Prices not sent are\nremoved. Up to 100 rows (Pro: 1000) per request; with replace: false the rows are added\nor changed and the rest stay, so a bigger list goes in several requests.","summary":"Replace a price list's prices","tags":["B2B","B2b"],"parameters":[{"name":"priceList","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceList"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"prices":{"type":"array","items":{"type":"object","properties":{"variant_id":{"type":"string"},"sku":{"type":"string"},"min_qty":{"type":"number"},"price":{"type":["string","number"]}},"required":["price"]}},"replace":{"type":"boolean","description":"Default true: prices not sent are removed."}},"required":["prices"]}}}}}},"/brands":{"get":{"operationId":"v1.brands.index","summary":"List brands","tags":["Brands","Brand"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Brand"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"v1.brands.store","description":"logo_url: a public image URL, downloaded now.","summary":"Create a brand","tags":["Brands","Brand"],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string","description":"URL part after /brands/ (a-z, 0-9, hyphens). Made from the name when empty."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Language code => HTML."},"seo":{"type":"object","description":"Per language: {\"lt\": {\"title\": \"…\", \"description\": \"…\"}}."},"logo_url":{"type":["string","null"],"description":"Logo to download; null removes the current one."}}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/brands/{brand}":{"get":{"operationId":"v1.brands.show","summary":"Get a brand","tags":["Brands","Brand"],"parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"v1.brands.update","summary":"Update a brand","tags":["Brands","Brand"],"parameters":[{"name":"brand","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag you read: 409 edit_conflict when the resource changed since.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brand"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"handle":{"type":"string","description":"URL part after /brands/ (a-z, 0-9, hyphens). Made from the name when empty."},"description":{"type":"object","additionalProperties":{"type":"string"},"description":"Language code => HTML."},"seo":{"type":"object","description":"Per language: {\"lt\": {\"title\": \"…\", \"description\": \"…\"}}."},"logo_url":{"type":["string","null"],"description":"Logo to download; null removes the current one."}}}}}}}},"/collections":{"get":{"operationId":"v1.collections.index","summary":"List collections","tags":["Collections","Collection"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Collection"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"v1.collections.store","description":"type manual (products added with the product's collection_ids) or smart (rules).","summary":"Create a collection","tags":["Collections","Collection"],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"object","description":"Title by language code; the default language is required."},"description":{"type":"object","description":"HTML description by language code."},"handle":{"type":"string"},"parent_id":{"type":["integer","null"],"description":"Parent collection for a tree (subcategory)."},"type":{"type":"string","enum":["manual","smart"]},"sort_order":{"type":"string","enum":["manual","best_selling","price_asc","price_desc","created_desc","created_asc","title_asc","title_desc","discount_desc"]},"rules":{"type":"array","description":"Smart collection rules (all must match). Fields and operators: brand (eq, neq); tag (eq, neq); product_type (eq, neq); title (contains); price (gt, lt).","items":{"type":"object","properties":{"field":{"type":"string","enum":["brand","tag","product_type","title","price"]},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number"],"description":"Text to compare, or price in cents for \"price\"."}},"required":["field","op","value"]}},"published_locales":{"type":"array","items":{"type":"string"}},"position":{"type":"integer"},"seo":{"type":"object","description":"Per language: {\"lt\": {\"title\": \"…\", \"description\": \"…\"}}."}},"required":["title"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/collections/{collection}":{"get":{"operationId":"v1.collections.show","description":"With its first 100 products in collection order.","summary":"Get a collection","tags":["Collections","Collection"],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"v1.collections.update","description":"Send only the fields to change; rules replace the whole list.","summary":"Update a collection","tags":["Collections","Collection"],"parameters":[{"name":"collection","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag you read: 409 edit_conflict when the resource changed since.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"object","description":"Title by language code; the default language is required."},"description":{"type":"object","description":"HTML description by language code."},"handle":{"type":"string"},"parent_id":{"type":["integer","null"],"description":"Parent collection for a tree (subcategory)."},"type":{"type":"string","enum":["manual","smart"]},"sort_order":{"type":"string","enum":["manual","best_selling","price_asc","price_desc","created_desc","created_asc","title_asc","title_desc","discount_desc"]},"rules":{"type":"array","description":"Smart collection rules (all must match). Fields and operators: brand (eq, neq); tag (eq, neq); product_type (eq, neq); title (contains); price (gt, lt).","items":{"type":"object","properties":{"field":{"type":"string","enum":["brand","tag","product_type","title","price"]},"op":{"type":"string","enum":["eq","neq","contains","gt","lt"]},"value":{"type":["string","number"],"description":"Text to compare, or price in cents for \"price\"."}},"required":["field","op","value"]}},"published_locales":{"type":"array","items":{"type":"string"}},"position":{"type":"integer"},"seo":{"type":"object","description":"Per language: {\"lt\": {\"title\": \"…\", \"description\": \"…\"}}."}}}}}}}},"/customers":{"get":{"operationId":"v1.customers.index","description":"Filter by email, customer_group_id or external_id; sync with updated_since.","summary":"List customers","tags":["Customers","Customer"],"parameters":[{"name":"email","in":"query","schema":{"type":["string","null"],"maxLength":255}},{"name":"customer_group_id","in":"query","schema":{"type":["integer","null"]}},{"name":"external_id","in":"query","schema":{"type":["string","null"],"maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"v1.customers.store","description":"A buyer known to the ERP before they order. accepts_marketing cannot be set: consent is\ngiven by the buyer themselves.","summary":"Create a customer","tags":["Customers","Customer"],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"phone":{"type":["string","null"]},"company_name":{"type":["string","null"]},"registration_number":{"type":["string","null"]},"vat_code":{"type":["string","null"]},"notes":{"type":["string","null"],"description":"Internal notes, not shown to the customer."},"accepts_marketing":{"type":"boolean","enum":[false]},"customer_group_id":{"type":["integer","null"],"description":"B2B customer group (its price list, discount and payment terms); null = the default group."},"payment_terms_days":{"type":["integer","null"],"description":"May pay by invoice within this many days (1–365); null = the group's terms."},"credit_limit":{"type":["number","null"],"description":"Most unpaid invoice orders may add up to, in EUR; null = no limit."},"email":{"type":"string"},"locale":{"type":"string"},"buyer_type":{"type":"string","enum":["person","company","individual_activity"]},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your own id (ERP code); null removes it."}},"required":["email"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/customers/{customer}":{"get":{"operationId":"v1.customers.show","description":"By id or e-mail, with addresses and the latest orders.","summary":"Get a customer","tags":["Customers","Customer"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"v1.customers.update","description":"Name, phone, company details, notes, B2B group, payment terms, credit limit and\nexternal_id. accepts_marketing: false records the buyer's withdrawal.","summary":"Update a customer","tags":["Customers","Customer"],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag you read: 409 edit_conflict when the resource changed since.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"phone":{"type":["string","null"]},"company_name":{"type":["string","null"]},"registration_number":{"type":["string","null"]},"vat_code":{"type":["string","null"]},"notes":{"type":["string","null"],"description":"Internal notes, not shown to the customer."},"accepts_marketing":{"type":"boolean","enum":[false]},"customer_group_id":{"type":["integer","null"],"description":"B2B customer group (its price list, discount and payment terms); null = the default group."},"payment_terms_days":{"type":["integer","null"],"description":"May pay by invoice within this many days (1–365); null = the group's terms."},"credit_limit":{"type":["number","null"],"description":"Most unpaid invoice orders may add up to, in EUR; null = no limit."},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your own id (ERP code); null removes it."}}}}}}}},"/discounts":{"get":{"operationId":"v1.discounts.index","summary":"List discounts","tags":["Discounts","Discount"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Discount"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"v1.discounts.store","description":"A coupon (kind code, with code) or an automatic discount (kind automatic, with title):\npercentage, fixed amount, free shipping or buy X get Y, for the order, collections or\nproducts.","summary":"Create a discount","tags":["Discounts","Discount"],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["code","automatic"]},"code":{"type":"string","description":"Coupon code (letters, digits, - and _), only for kind \"code\"."},"title":{"type":"string","description":"Shown in the cart; required for automatic discounts."},"value_type":{"type":"string","enum":["percentage","fixed_amount","free_shipping","buy_x_get_y"]},"value":{"type":["string","number","null"],"description":"Percent (e.g. 15) or amount (e.g. \"5.00\"); not used for free_shipping; for buy_x_get_y the percent off the \"get\" items (100 = free)."},"buy_qty":{"type":["integer","null"],"description":"buy_x_get_y: items paid in full per set (2 in \"2+1\")."},"get_qty":{"type":["integer","null"],"description":"buy_x_get_y: discounted items per set (1 in \"2+1\")."},"max_per_order":{"type":["integer","null"],"description":"buy_x_get_y: how many sets per order; empty = no limit."},"get_applies_to":{"type":["string","null"],"enum":["collections","products",null],"description":"buy_x_get_y \"buy A get B\": the discounted items come from these collections or products (get_applies_to_ids); empty = the same items as applies_to."},"get_applies_to_ids":{"type":"array","items":{"type":["string","integer"]},"description":"Collection ids or product ids of the \"get\" group."},"auto_add_gift":{"type":"boolean","description":"Put the gift into the cart by itself; only when the \"get\" group is exactly one product."},"applies_to":{"type":"string","enum":["all","collections","products"]},"applies_to_ids":{"type":"array","items":{"type":["string","integer"]},"description":"Collection ids (applies_to collections) or product ids (applies_to products)."},"min_subtotal":{"type":["string","number","null"],"description":"Minimum cart amount."},"min_qty":{"type":["number","null"]},"usage_limit":{"type":["integer","null"],"description":"Total uses allowed."},"once_per_customer":{"type":"boolean"},"combines":{"type":"boolean","description":"May combine with other order discounts."},"enabled":{"type":"boolean"},"starts_at":{"type":["string","null"],"description":"Shop timezone, e.g. \"2026-11-27T00:00\"."},"ends_at":{"type":["string","null"]}},"required":["kind","value_type"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/discounts/{discount}":{"get":{"operationId":"v1.discounts.show","summary":"Get a discount","tags":["Discounts","Discount"],"parameters":[{"name":"discount","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"v1.discounts.update","summary":"Update a discount","tags":["Discounts","Discount"],"parameters":[{"name":"discount","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag you read: 409 edit_conflict when the resource changed since.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Discount"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"Coupon code (letters, digits, - and _), only for kind \"code\"."},"title":{"type":"string","description":"Shown in the cart; required for automatic discounts."},"value_type":{"type":"string","enum":["percentage","fixed_amount","free_shipping","buy_x_get_y"]},"value":{"type":["string","number","null"],"description":"Percent (e.g. 15) or amount (e.g. \"5.00\"); not used for free_shipping; for buy_x_get_y the percent off the \"get\" items (100 = free)."},"buy_qty":{"type":["integer","null"],"description":"buy_x_get_y: items paid in full per set (2 in \"2+1\")."},"get_qty":{"type":["integer","null"],"description":"buy_x_get_y: discounted items per set (1 in \"2+1\")."},"max_per_order":{"type":["integer","null"],"description":"buy_x_get_y: how many sets per order; empty = no limit."},"get_applies_to":{"type":["string","null"],"enum":["collections","products",null],"description":"buy_x_get_y \"buy A get B\": the discounted items come from these collections or products (get_applies_to_ids); empty = the same items as applies_to."},"get_applies_to_ids":{"type":"array","items":{"type":["string","integer"]},"description":"Collection ids or product ids of the \"get\" group."},"auto_add_gift":{"type":"boolean","description":"Put the gift into the cart by itself; only when the \"get\" group is exactly one product."},"applies_to":{"type":"string","enum":["all","collections","products"]},"applies_to_ids":{"type":"array","items":{"type":["string","integer"]},"description":"Collection ids (applies_to collections) or product ids (applies_to products)."},"min_subtotal":{"type":["string","number","null"],"description":"Minimum cart amount."},"min_qty":{"type":["number","null"]},"usage_limit":{"type":["integer","null"],"description":"Total uses allowed."},"once_per_customer":{"type":"boolean"},"combines":{"type":"boolean","description":"May combine with other order discounts."},"enabled":{"type":"boolean"},"starts_at":{"type":["string","null"],"description":"Shop timezone, e.g. \"2026-11-27T00:00\"."},"ends_at":{"type":["string","null"]}}}}}}}},"/inventory":{"get":{"operationId":"v1.inventory.index","description":"One row per variant and location: on hand, reserved by unpaid orders, available. Filter\nby location_id, variant_id or sku; sync with updated_since.","summary":"List stock levels","tags":["Inventory"],"parameters":[{"name":"location_id","in":"query","schema":{"type":["integer","null"]}},{"name":"variant_id","in":"query","schema":{"type":["string","null"],"maxLength":26}},{"name":"sku","in":"query","schema":{"type":["string","null"],"maxLength":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InventoryLevel"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/inventory/set":{"post":{"operationId":"v1.inventory.set","description":"The absolute on-hand quantity of one variant at one location.","summary":"Set stock","tags":["Inventory"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryLevel"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variant_id":{"type":"string"},"sku":{"type":"string"},"location_id":{"type":"integer","description":"Default location when left out."},"on_hand":{"type":"number","minimum":0},"reason":{"type":"string","enum":["manual","import","sync","refund"]}},"required":["on_hand"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/inventory/adjust":{"post":{"operationId":"v1.inventory.adjust","description":"Add (delta > 0) or remove (delta < 0) units at one location, e.g. goods received or a\nstock-take difference. Never below 0.","summary":"Adjust stock","tags":["Inventory"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryLevel"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"variant_id":{"type":"string"},"sku":{"type":"string"},"location_id":{"type":"integer","description":"Default location when left out."},"delta":{"type":"number"},"reason":{"type":"string","enum":["manual","import","sync","refund"]}},"required":["delta"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/inventory/bulk":{"post":{"operationId":"v1.inventory.bulk","description":"Up to 100 rows (Pro: 1000) of {id or sku, location_id, on_hand}. Rows that do not match\none variant come back under failed; the rest are saved. Counts as one request, so an ERP\ncan send 50 000 levels in a few minutes.","summary":"Set stock in bulk","tags":["Inventory"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"object","properties":{"variant_id":{"type":"string"},"sku":{"type":"string"},"location_id":{"type":"integer","description":"Default location when left out."},"on_hand":{"type":"number","minimum":0}},"required":["on_hand"]}},"reason":{"type":"string","enum":["manual","import","sync","refund"]}},"required":["items"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/locations":{"get":{"operationId":"v1.locations.index","summary":"List locations","tags":["Inventory","Location"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Location"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/locations/{location}":{"get":{"operationId":"v1.locations.show","summary":"Get a location","tags":["Inventory","Location"],"parameters":[{"name":"location","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Location"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders":{"get":{"operationId":"v1.orders.index","description":"Filter by status, financial_status, fulfillment_status, customer_id, number or\nexternal_id; sync with updated_since (sort updated_at) or created_since.","summary":"List orders","tags":["Orders","Order"],"parameters":[{"name":"status","in":"query","schema":{"anyOf":[{"$ref":"#/components/schemas/OrderStatus"},{"type":"null"}]}},{"name":"financial_status","in":"query","schema":{"anyOf":[{"$ref":"#/components/schemas/FinancialStatus"},{"type":"null"}]}},{"name":"fulfillment_status","in":"query","schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentStatus"},{"type":"null"}]}},{"name":"customer_id","in":"query","schema":{"type":["string","null"],"maxLength":26}},{"name":"number","in":"query","schema":{"type":["integer","null"]}},{"name":"external_id","in":"query","schema":{"type":["string","null"],"maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"v1.orders.store","description":"A phone, B2B or ERP order, as \"Naujas užsakymas\" in the admin: lines by variant_id (or\nfree lines), buyer, addresses, shipping (none, rate or custom), payment method. The\nbuyer gets the confirmation e-mail unless notify is false; reserve_stock false leaves\nthe stock as it is (the ERP already took it). Use an Idempotency-Key.","summary":"Create an order","tags":["Orders","Order"],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"phone":{"type":["string","null"]},"locale":{"type":["string","null"]},"buyer_type":{"type":"string","enum":["person","company","individual_activity"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"company_name":{"type":["string","null"]},"registration_number":{"type":["string","null"]},"vat_code":{"type":["string","null"]},"shipping_address":{"type":["object","null"]},"billing_address":{"type":["object","null"]},"lines":{"type":"array","items":{"type":"object","properties":{"variant_id":{"type":"string"},"quantity":{"type":"number"},"unit_price":{"type":["string","number","null"],"description":"Gross; the catalog price when left out."},"custom":{"type":"boolean","description":"A free line with title, unit_price and tax_rate_id instead of a variant."},"title":{"type":"string"}},"required":["quantity"]}},"discount":{"type":["object","null"],"properties":{"type":{"type":"string","enum":["percentage","fixed_amount"]},"value":{"type":"number"},"title":{"type":"string"}}},"shipping":{"type":"string","enum":["none","rate","custom"]},"shipping_rate_id":{"type":["integer","null"]},"pickup_point_id":{"type":["string","null"]},"shipping_title":{"type":["string","null"]},"shipping_price":{"type":["string","number","null"]},"payment_method":{"type":["string","null"],"description":"e.g. bank_transfer, cod."},"mark_paid":{"type":"boolean"},"notify":{"type":"boolean","description":"Send the confirmation e-mail (default true)."},"reserve_stock":{"type":"boolean","description":"Take the stock (default true); false when the ERP already did."},"note":{"type":["string","null"]},"internal_note":{"type":["string","null"]},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your own id (ERP code); null removes it."}},"required":["email","buyer_type","lines","shipping"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/orders/{order}":{"get":{"operationId":"v1.orders.show","description":"By id or number. Lines (with ids for partial shipments), totals, discounts, shipments\nand the latest events.","summary":"Get an order","tags":["Orders","Order"],"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"v1.orders.update","description":"external_id, and the buyer's details as in the admin's \"Edit details\": email, phone,\ncompany_name, registration_number, billing_address, shipping_address (send the whole\nobject). Totals and lines do not change here.","summary":"Update an order","tags":["Orders","Order"],"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag you read: 409 edit_conflict when the resource changed since.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"external_id":{"type":["string","null"],"maxLength":255,"description":"Your own id (ERP code); null removes it."},"email":{"type":"string"},"phone":{"type":["string","null"]},"company_name":{"type":["string","null"]},"registration_number":{"type":["string","null"]},"billing_address":{"type":["object","null"]},"shipping_address":{"type":["object","null"]}}}}}}}},"/orders/{order}/notes":{"post":{"operationId":"v1.orders.notes","description":"To the order's timeline; the buyer does not see it.","summary":"Add an internal note","tags":["Orders","Order"],"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"integer"},"note_id":{"type":"integer"}},"required":["number","note_id"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","maxLength":2000}},"required":["body"]}}}}}},"/orders/{order}/mark-paid":{"post":{"operationId":"v1.orders.mark-paid","description":"A bank transfer or cash on delivery order, like the admin button: issues the invoice and\nsends the \"paid\" e-mail when those are on.","summary":"Mark paid","tags":["Orders","Order"],"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{order}/cancel":{"post":{"operationId":"v1.orders.cancel","description":"An order not yet shipped. restock returns the items to stock; refund records a refund of\nwhat was paid (the money goes back in the bank or provider). The buyer gets the\n\"cancelled\" e-mail.","summary":"Cancel","tags":["Orders","Order"],"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","maxLength":500},"restock":{"type":"boolean","description":"Return the items to stock."},"refund":{"type":"boolean","description":"Record a refund of the paid amount."}}}}}}}},"/orders/{order}/refunds":{"get":{"operationId":"v1.orders.refunds","summary":"List refunds","tags":["Orders","Order"],"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}}},"required":["data"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{order}/invoice":{"get":{"operationId":"v1.orders.invoice","description":"The order's invoice and credit notes, each with a link to its PDF. 404 until an invoice\nis issued.","summary":"Get the invoice","tags":["Orders","Order"],"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}},"required":["data"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/orders/{order}/shipments":{"get":{"operationId":"v1.orders.shipments.index","summary":"List an order's shipments","tags":["Orders","Shipment"],"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Shipment"}}},"required":["data"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"v1.orders.shipments.store","description":"Without lines everything not yet shipped goes; lines [{order_item_id or sku, quantity}]\nship part of the order. With shipped: true (default) it is marked shipped at once with\ntracking_number (and tracking_url) and the buyer is told unless notify is false;\nshipped: false leaves it waiting for packing.","summary":"Ship an order","tags":["Orders","Shipment"],"parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"order_item_id":{"type":"integer"},"sku":{"type":"string"},"quantity":{"type":"number"}},"required":["quantity"]}},"carrier":{"type":["string","null"]},"service":{"type":["string","null"],"enum":["courier","terminal","pickup",null]},"tracking_number":{"type":["string","null"]},"tracking_url":{"type":["string","null"]},"shipped":{"type":"boolean","description":"Mark shipped at once (default true)."},"notify":{"type":"boolean"}}}}}}}},"/shipments/{shipment}/delivered":{"post":{"operationId":"v1.shipments.delivered","description":"When the carrier's tracking does not do it by itself.","summary":"Mark delivered","tags":["Orders","Shipment"],"parameters":[{"name":"shipment","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/products":{"get":{"operationId":"v1.products.index","description":"Every product with its variants, images and attributes, in the same shape as GET\n/products/{id}. Filter by status, collection, brand, handle, SKU, barcode or external_id;\npage with limit and next_cursor; sync with updated_since (sort updated_at).","summary":"List products","tags":["Products","Product"],"parameters":[{"name":"status","in":"query","schema":{"anyOf":[{"$ref":"#/components/schemas/ProductStatus"},{"type":"null"}]}},{"name":"collection_id","in":"query","schema":{"type":["integer","null"]}},{"name":"brand_id","in":"query","schema":{"type":["integer","null"]}},{"name":"handle","in":"query","schema":{"type":["string","null"],"maxLength":255}},{"name":"sku","in":"query","schema":{"type":["string","null"],"maxLength":100}},{"name":"barcode","in":"query","schema":{"type":["string","null"],"maxLength":100}},{"name":"external_id","in":"query","schema":{"type":["string","null"],"maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"v1.products.store","description":"With at least one variant. Status defaults to draft; an active product needs a price\nabove 0. images: public image URLs, downloaded in the background. The plan's product\nlimit applies.","summary":"Create a product","tags":["Products","Product"],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"Product title; the default language is required. Keyed by language code, e.g. {\"lt\": \"…\", \"en\": \"…\"}."},"description":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"HTML description. Keyed by language code, e.g. {\"lt\": \"…\", \"en\": \"…\"}."},"short_description":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"Short HTML description. Keyed by language code, e.g. {\"lt\": \"…\", \"en\": \"…\"}."},"handle":{"type":"string","description":"URL handle (a-z, 0-9, dashes). Generated from the title when empty."},"status":{"type":"string","enum":["draft","active","archived"]},"purchase_mode":{"type":"string","enum":["online","pickup_only","on_request","display_only"],"description":"online (default), pickup_only, on_request (price on request), display_only."},"brand_id":{"type":["integer","null"]},"product_type":{"type":["string","null"]},"google_product_category":{"type":["string","null"],"description":"Google product taxonomy ID or full English path, e.g. \"2441\" or \"Health & Beauty > Personal Care > Hair Care > Shampoo & Conditioner\". Used by the product feeds."},"tags":{"type":"array","items":{"type":"string"},"maxItems":50},"published_locales":{"type":"array","items":{"type":"string"},"description":"Languages the product is shown in; empty = all."},"age_restricted":{"type":"boolean","description":"18+ product (alcohol, tobacco…)."},"is_featured":{"type":"boolean"},"seo":{"type":"object","description":"Per language: {\"lt\": {\"title\": \"…\", \"description\": \"…\"}}."},"collection_ids":{"type":"array","items":{"type":"integer"},"description":"Manual collections the product belongs to (replaces the list)."},"attributes":{"type":"array","description":"Attribute values (replaces the list): [{\"attribute_id\": 3, \"values\": [\"Medvilnė\"]}].","items":{"type":"object","properties":{"attribute_id":{"type":"integer"},"values":{"type":"array","items":{"type":["string","number","boolean"]}}},"required":["attribute_id"]}},"options":{"type":"array","maxItems":3,"description":"Variant options, e.g. [{\"name\": {\"lt\": \"Dydis\"}, \"values\": [\"S\", \"M\", \"L\"]}]. Values in the default language.","items":{"type":"object","properties":{"name":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"Option name. Keyed by language code, e.g. {\"lt\": \"…\", \"en\": \"…\"}."},"values":{"type":"array","items":{"type":"string"}}},"required":["name","values"]}},"variants":{"type":"array","minItems":1,"maxItems":250,"description":"All variants (replaces the list; variants left out are deleted). Keep \"id\" to update an existing variant.","items":{"type":"object","properties":{"id":{"type":"string","description":"Existing variant id; omit for a new variant."},"sku":{"type":["string","null"]},"barcode":{"type":["string","null"],"description":"EAN/GTIN."},"option_values":{"type":"array","items":{"type":"string"},"description":"One value per option, in option order."},"price":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"compare_at_price":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"cost":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"deposit":{"type":["string","number","null"],"description":"Packaging deposit per unit in euros (bottle, can), charged on top of the price at 0 % VAT when the deposits module is active; null or 0 removes it, omit to keep it."},"weight_grams":{"type":["integer","null"]},"track_inventory":{"type":"boolean"},"allow_backorder":{"type":"boolean"},"on_hand":{"type":["number","null"],"description":"Stock quantity; omit to keep the current stock."},"max_qty":{"type":["number","null"],"description":"Most units one order may hold (e.g. 1 for a sale item); null removes the limit, omit to keep it."}},"required":["price"]}},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your own id (ERP code); null removes it."},"images":{"type":"array","maxItems":50,"description":"Public image URLs in order (downloaded in the background); replaces the URL images.","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":["string","null"]}},"required":["url"]}}},"required":["title","variants"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/products/{product}":{"get":{"operationId":"v1.products.show","description":"By id (public id) or handle.","summary":"Get a product","tags":["Products","Product"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"v1.products.update","description":"Send only the fields to change. Translations merge per language; variants, options,\ncollection_ids, attributes and images replace the whole list when sent (keep variant\nids). Archive with status \"archived\": products are never deleted. Send If-Match with\nthe ETag you read to refuse overwriting someone else's change.","summary":"Update a product","tags":["Products","Product"],"parameters":[{"name":"product","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag you read: 409 edit_conflict when the resource changed since.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"Product title; the default language is required. Keyed by language code, e.g. {\"lt\": \"…\", \"en\": \"…\"}."},"description":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"HTML description. Keyed by language code, e.g. {\"lt\": \"…\", \"en\": \"…\"}."},"short_description":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"Short HTML description. Keyed by language code, e.g. {\"lt\": \"…\", \"en\": \"…\"}."},"handle":{"type":"string","description":"URL handle (a-z, 0-9, dashes). Generated from the title when empty."},"status":{"type":"string","enum":["draft","active","archived"]},"purchase_mode":{"type":"string","enum":["online","pickup_only","on_request","display_only"],"description":"online (default), pickup_only, on_request (price on request), display_only."},"brand_id":{"type":["integer","null"]},"product_type":{"type":["string","null"]},"google_product_category":{"type":["string","null"],"description":"Google product taxonomy ID or full English path, e.g. \"2441\" or \"Health & Beauty > Personal Care > Hair Care > Shampoo & Conditioner\". Used by the product feeds."},"tags":{"type":"array","items":{"type":"string"},"maxItems":50},"published_locales":{"type":"array","items":{"type":"string"},"description":"Languages the product is shown in; empty = all."},"age_restricted":{"type":"boolean","description":"18+ product (alcohol, tobacco…)."},"is_featured":{"type":"boolean"},"seo":{"type":"object","description":"Per language: {\"lt\": {\"title\": \"…\", \"description\": \"…\"}}."},"collection_ids":{"type":"array","items":{"type":"integer"},"description":"Manual collections the product belongs to (replaces the list)."},"attributes":{"type":"array","description":"Attribute values (replaces the list): [{\"attribute_id\": 3, \"values\": [\"Medvilnė\"]}].","items":{"type":"object","properties":{"attribute_id":{"type":"integer"},"values":{"type":"array","items":{"type":["string","number","boolean"]}}},"required":["attribute_id"]}},"options":{"type":"array","maxItems":3,"description":"Variant options, e.g. [{\"name\": {\"lt\": \"Dydis\"}, \"values\": [\"S\", \"M\", \"L\"]}]. Values in the default language.","items":{"type":"object","properties":{"name":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"Option name. Keyed by language code, e.g. {\"lt\": \"…\", \"en\": \"…\"}."},"values":{"type":"array","items":{"type":"string"}}},"required":["name","values"]}},"variants":{"type":"array","minItems":1,"maxItems":250,"description":"All variants (replaces the list; variants left out are deleted). Keep \"id\" to update an existing variant.","items":{"type":"object","properties":{"id":{"type":"string","description":"Existing variant id; omit for a new variant."},"sku":{"type":["string","null"]},"barcode":{"type":["string","null"],"description":"EAN/GTIN."},"option_values":{"type":"array","items":{"type":"string"},"description":"One value per option, in option order."},"price":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"compare_at_price":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"cost":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"deposit":{"type":["string","number","null"],"description":"Packaging deposit per unit in euros (bottle, can), charged on top of the price at 0 % VAT when the deposits module is active; null or 0 removes it, omit to keep it."},"weight_grams":{"type":["integer","null"]},"track_inventory":{"type":"boolean"},"allow_backorder":{"type":"boolean"},"on_hand":{"type":["number","null"],"description":"Stock quantity; omit to keep the current stock."},"max_qty":{"type":["number","null"],"description":"Most units one order may hold (e.g. 1 for a sale item); null removes the limit, omit to keep it."}},"required":["price"]}},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your own id (ERP code); null removes it."},"images":{"type":"array","maxItems":50,"description":"Public image URLs in order (downloaded in the background); replaces the URL images.","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":["string","null"]}},"required":["url"]}},"documents":{"type":"array","description":"Product page documents in order, max 20. PDF, Office, ZIP, images; up to 50 MB each.","items":{"type":"object","properties":{"url":{"type":"string","description":"Public http(s) URL of the file, or the url of a current document to keep it."},"title":{"type":"string","description":"Title in the shop's default language; the file name when empty."}},"required":["url"]}}},"required":[]}}}}}},"/shop":{"get":{"operationId":"v1.shop","description":"The token's shop: languages, currency, plan, this plan's API limits, the modules that are\non, and the token itself (name, scopes, expiry). Needs no scope.","summary":"The shop","tags":["Shop"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shop"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/variants":{"get":{"operationId":"v1.variants.index","description":"Filter by sku, barcode, product_id or external_id. Each variant has its stock per\nlocation.","summary":"List variants","tags":["Variants","Variant"],"parameters":[{"name":"sku","in":"query","schema":{"type":["string","null"],"maxLength":100}},{"name":"barcode","in":"query","schema":{"type":["string","null"],"maxLength":100}},{"name":"product_id","in":"query","schema":{"type":["string","null"],"maxLength":26}},{"name":"external_id","in":"query","schema":{"type":["string","null"],"maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Variant"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/variants/bulk":{"post":{"operationId":"v1.variants.bulk","description":"Up to 100 rows (Pro: 1000) found by id or sku: prices, compare-at prices, cost, weight,\nstock tracking. Rows of one product are saved together; a product whose rows do not\nvalidate is left as it was and its rows come back under failed. Counts as one request.","summary":"Update many variants","tags":["Variants","Variant"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkResult"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"object","properties":{"id":{"type":"string"},"sku":{"type":["string","null"]},"barcode":{"type":["string","null"],"description":"EAN/GTIN."},"price":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"compare_at_price":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"cost":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"deposit":{"type":["string","number","null"],"description":"Packaging deposit per unit in euros (bottle, can), charged on top of the price at 0 % VAT when the deposits module is active; null or 0 removes it, omit to keep it."},"weight_grams":{"type":["integer","null"]},"track_inventory":{"type":"boolean"},"allow_backorder":{"type":"boolean"},"max_qty":{"type":["number","null"],"description":"Most units one order may hold (e.g. 1 for a sale item); null removes the limit, omit to keep it."}}}}},"required":["items"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/variants/{variant}":{"get":{"operationId":"v1.variants.show","summary":"Get a variant","tags":["Variants","Variant"],"parameters":[{"name":"variant","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"v1.variants.update","description":"Price, compare-at price, cost, SKU, barcode, weight, stock tracking, max per order and\nexternal_id. Saved through the product, with the admin's validation.","summary":"Update a variant","tags":["Variants","Variant"],"parameters":[{"name":"variant","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag you read: 409 edit_conflict when the resource changed since.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":["string","null"]},"barcode":{"type":["string","null"],"description":"EAN/GTIN."},"price":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"compare_at_price":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"cost":{"type":["string","number","null"],"description":"Decimal amount, VAT included, e.g. \"19.99\"."},"deposit":{"type":["string","number","null"],"description":"Packaging deposit per unit in euros (bottle, can), charged on top of the price at 0 % VAT when the deposits module is active; null or 0 removes it, omit to keep it."},"weight_grams":{"type":["integer","null"]},"track_inventory":{"type":"boolean"},"allow_backorder":{"type":"boolean"},"max_qty":{"type":["number","null"],"description":"Most units one order may hold (e.g. 1 for a sale item); null removes the limit, omit to keep it."},"external_id":{"type":["string","null"],"maxLength":255,"description":"Your own id (ERP code); null removes it."}}}}}}}},"/webhooks":{"get":{"operationId":"v1.webhooks.index","summary":"List webhook endpoints","tags":["Webhooks","Webhook"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"v1.webhooks.store","description":"url: a public https URL (no redirects followed). events: types from the event catalog,\nor [\"*\"] for all. The answer holds the whsec_ secret; store it, it is shown again only\nafter a rotation. Customer events and buyer contacts in order events need customers:read.","summary":"Create a webhook endpoint","tags":["Webhooks","Webhook"],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public https URL."},"events":{"type":"array","items":{"type":"string","enum":["*","order.created","order.paid","order.updated","order.cancelled","order.refunded","shipment.created","shipment.ready_for_pickup","shipment.delivered","product.created","product.updated","product.archived","inventory.updated","customer.created","customer.updated"]}},"description":{"type":["string","null"]},"enabled":{"type":"boolean"}},"required":["url","events"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}]}},"/webhooks/{webhook}":{"get":{"operationId":"v1.webhooks.show","summary":"Get a webhook endpoint","tags":["Webhooks","Webhook"],"parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"v1.webhooks.update","description":"url, events, description, enabled. Turning a failing endpoint back on resets its failure\ncount; redeliver what it missed with POST /webhook-deliveries/{id}/redeliver.","summary":"Update a webhook endpoint","tags":["Webhooks","Webhook"],"parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"}},{"name":"If-Match","in":"header","required":false,"description":"The ETag you read: 409 edit_conflict when the resource changed since.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"Public https URL."},"events":{"type":"array","items":{"type":"string","enum":["*","order.created","order.paid","order.updated","order.cancelled","order.refunded","shipment.created","shipment.ready_for_pickup","shipment.delivered","product.created","product.updated","product.archived","inventory.updated","customer.created","customer.updated"]}},"description":{"type":["string","null"]},"enabled":{"type":"boolean"}}}}}}},"delete":{"operationId":"v1.webhooks.destroy","summary":"Delete a webhook endpoint","tags":["Webhooks","Webhook"],"parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Deleted."},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhooks/{webhook}/test":{"post":{"operationId":"v1.webhooks.test","description":"A webhook.test event to this endpoint only; see it in /webhook-deliveries.","summary":"Send a test event","tags":["Webhooks","Webhook"],"parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"event_id":{"type":"string","minLength":26,"maxLength":26},"type":{"type":"string"}},"required":["event_id","type"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhooks/{webhook}/rotate-secret":{"post":{"operationId":"v1.webhooks.rotate-secret","description":"The new secret signs at once; for 24 hours the old one signs too (two v1 signatures),\nso the receiver can switch over.","summary":"Rotate the signing secret","tags":["Webhooks","Webhook"],"parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-deliveries":{"get":{"operationId":"v1.webhook-deliveries.index","description":"The last 30 days, newest first by default (sort=-id). Filter by webhook_id, status\n(pending, succeeded, failed) or event_type.","summary":"List deliveries","tags":["Webhooks","Webhook"],"parameters":[{"name":"webhook_id","in":"query","schema":{"type":["string","null"],"maxLength":26}},{"name":"status","in":"query","schema":{"type":["string","null"],"enum":["pending","succeeded","failed",null]}},{"name":"event_type","in":"query","schema":{"type":["string","null"],"maxLength":64}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"]}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-deliveries/{delivery}":{"get":{"operationId":"v1.webhook-deliveries.show","description":"With the payload sent and the first 2 KB of the receiver's answer.","summary":"Get a delivery","tags":["Webhooks","Webhook"],"parameters":[{"name":"delivery","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/webhook-deliveries/{delivery}/redeliver":{"post":{"operationId":"v1.webhook-deliveries.redeliver","description":"One more attempt now, also for a failed delivery (same webhook-id, so the receiver can\ndeduplicate).","summary":"Redeliver","tags":["Webhooks","Webhook"],"parameters":[{"name":"delivery","in":"path","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeat the request with the same key within 24 h to get the first answer again.","schema":{"type":"string","maxLength":255}}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"401":{"description":"No or invalid token.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Missing scope, plan or module.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found in this shop.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Conflict: changed since you read it (edit_conflict), or not possible in this state (invalid_state).","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid fields.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited; see Retry-After.","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"securitySchemes":{"http":{"type":"http","description":"An API key from Settings → API and integrations: Authorization: Bearer mrv_…","scheme":"bearer","bearerFormat":"mrv_"}},"schemas":{"FinancialStatus":{"type":"string","enum":["pending","authorized","paid","partially_refunded","refunded","voided"],"title":"FinancialStatus"},"FulfillmentStatus":{"type":"string","enum":["unfulfilled","partial","fulfilled"],"title":"FulfillmentStatus"},"OrderStatus":{"type":"string","enum":["open","cancelled","archived"],"title":"OrderStatus"},"ProductStatus":{"type":"string","enum":["draft","active","archived"],"title":"ProductStatus"},"SaveCustomerGroup":{"type":"object","description":"Creates or changes a B2B customer group (docs/kainynai.md): its price list, discount,\npay-by-invoice terms and checkout minimum; at most one default group. Used by the admin's\n\"Klientų grupės\" and the REST API.","properties":{"name":{"type":"string","maxLength":100},"price_list_id":{"type":["integer","null"]},"discount_percent":{"type":["number","null"],"minimum":0,"maximum":100},"payment_terms_days":{"type":["integer","null"],"minimum":1,"maximum":365},"min_order_amount":{"type":["number","null"],"minimum":0,"maximum":1000000},"is_default":{"type":"boolean"}},"required":["name"],"title":"SaveCustomerGroup"},"SavePriceList":{"type":"object","description":"Creates or changes a price list's name, VAT mode and status (docs/kainynai.md); its prices\nare saved by PriceListImport. Used by the admin's \"Kainynai\" and the REST API.","properties":{"name":{"type":"string","maxLength":100},"prices_include_tax":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled"]}},"required":["name","prices_include_tax","status"],"title":"SavePriceList"},"Problem":{"type":"object","properties":{"type":{"type":"string","format":"uri"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string","description":"Stable machine code: validation_failed, missing_scope, plan_required, not_found, edit_conflict, rate_limited…"},"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"request_id":{"type":["string","null"]}},"required":["type","title","status","detail","code"]},"Shop":{"type":"object","properties":{"id":{"type":"string","minLength":26,"maxLength":26},"name":{"type":"string"},"default_locale":{"type":"string"},"locales":{"type":"array","items":{"type":"string"}},"currency":{"type":"string"},"plan":{"type":["string","null"]},"limits":{"type":"object","properties":{"requests_per_second":{"type":"integer"},"burst":{"type":"integer"},"requests_per_day":{"type":"integer"},"bulk_rows":{"type":"integer"},"webhook_endpoints":{"type":"integer"},"page_size_max":{"type":"integer"}},"required":["requests_per_second","burst","requests_per_day","bulk_rows","webhook_endpoints"]},"modules":{"type":"array","items":{"type":"string"}},"token":{"type":"object","properties":{"name":{"type":"string"},"abilities":{"type":"array","items":{"type":"string"}}},"required":["name","abilities"]}},"required":["id","name","currency","limits","token"]},"Product":{"type":"object","properties":{"id":{"type":"string","minLength":26,"maxLength":26},"external_id":{"type":["string","null"]},"title":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"By language code, e.g. {\"lt\": \"…\", \"en\": \"…\"}."},"handle":{"type":"string"},"status":{"type":"string","enum":["draft","active","archived"]},"brand_id":{"type":["integer","null"]},"tags":{"type":["array","null"],"items":{"type":"string"}},"collection_ids":{"type":"array","items":{"type":"integer"}},"options":{"type":"array"},"variants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":26,"maxLength":26},"external_id":{"type":["string","null"]},"sku":{"type":["string","null"]},"price":{"type":["string","null"],"description":"Decimal amount with VAT, e.g. \"19.99\"."}},"required":["id","price","external_id"]}},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"alt":{"type":["string","null"]}},"required":["url"]}},"url":{"type":"string"},"created_at":{"type":["string","null"],"format":"date-time"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","external_id","title","handle","status","variants","images","updated_at"]},"InventoryLevel":{"type":"object","properties":{"variant_id":{"type":["string","null"]},"sku":{"type":["string","null"]},"location_id":{"type":"integer"},"on_hand":{"type":"number"},"reserved":{"type":"number"},"available":{"type":"number"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["variant_id","location_id","on_hand","reserved","available"]},"Variant":{"type":"object","properties":{"id":{"type":"string","minLength":26,"maxLength":26},"external_id":{"type":["string","null"]},"product_id":{"type":"string"},"sku":{"type":["string","null"]},"barcode":{"type":["string","null"]},"price":{"type":["string","null"],"description":"Decimal amount with VAT, e.g. \"19.99\"."},"compare_at_price":{"type":["string","null"],"description":"Decimal amount with VAT, e.g. \"19.99\"."},"on_hand":{"type":"number"},"available":{"type":"number"},"inventory":{"type":"array","items":{"$ref":"#/components/schemas/InventoryLevel"}},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","product_id","sku","price","on_hand","inventory"]},"Location":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"is_default":{"type":"boolean"},"pickup_enabled":{"type":"boolean"}},"required":["id","name","is_default"]},"Collection":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"By language code, e.g. {\"lt\": \"…\", \"en\": \"…\"}."},"handle":{"type":"string"},"type":{"type":"string","enum":["manual","smart"]},"rules":{"type":"array"}},"required":["id","title","handle","type"]},"Brand":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"handle":{"type":"string"},"logo_url":{"type":["string","null"]},"url":{"type":"string"}},"required":["id","name","handle"]},"OrderLine":{"type":"object","properties":{"id":{"type":"integer","description":"Line id, for partial shipments."},"variant_id":{"type":["string","null"]},"sku":{"type":["string","null"]},"title":{"type":["string","null"]},"quantity":{"type":"number"},"unit_price":{"type":["string","null"],"description":"Decimal amount with VAT, e.g. \"19.99\"."},"total":{"type":["string","null"],"description":"Decimal amount with VAT, e.g. \"19.99\"."},"unshipped_qty":{"type":"number"}},"required":["id","sku","quantity","unit_price","total"]},"Shipment":{"type":"object","properties":{"id":{"type":"string","minLength":26,"maxLength":26},"order_id":{"type":"string","minLength":26,"maxLength":26},"order_number":{"type":"integer"},"carrier":{"type":"string"},"status":{"type":"string"},"tracking_number":{"type":["string","null"]},"tracking_url":{"type":["string","null"]},"items":{"type":"array","items":{"type":"object","properties":{"order_item_id":{"type":"integer"},"quantity":{"type":"number"}},"required":["order_item_id","quantity"]}},"shipped_at":{"type":["string","null"],"format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"}},"required":["id","order_id","status","tracking_number","items"]},"Order":{"type":"object","properties":{"id":{"type":"string","minLength":26,"maxLength":26},"external_id":{"type":["string","null"]},"number":{"type":"integer"},"placed_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["open","cancelled","archived"]},"financial_status":{"type":"string"},"fulfillment_status":{"type":"string"},"email":{"type":["string","null"],"description":"null without the customers:read scope."},"phone":{"type":["string","null"],"description":"null without the customers:read scope."},"total":{"type":["string","null"],"description":"Decimal amount with VAT, e.g. \"19.99\"."},"currency":{"type":"string"},"billing_address":{"type":["object","null"]},"shipping_address":{"type":["object","null"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderLine"}},"shipments":{"type":"array"},"source":{"type":"string"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","number","status","financial_status","email","total","currency","items","updated_at"]},"Refund":{"type":"object","properties":{"id":{"type":"integer"},"amount":{"type":["string","null"],"description":"Decimal amount with VAT, e.g. \"19.99\"."},"status":{"type":"string"},"items":{"type":"array"}},"required":["id","amount","status"]},"Invoice":{"type":"object","properties":{"id":{"type":"string","minLength":26,"maxLength":26},"type":{"type":"string"},"number":{"type":"string"},"total":{"type":["string","null"],"description":"Decimal amount with VAT, e.g. \"19.99\"."},"pdf_url":{"type":"string"}},"required":["id","number","total","pdf_url"]},"Customer":{"type":"object","properties":{"id":{"type":"string","minLength":26,"maxLength":26},"external_id":{"type":["string","null"]},"email":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"buyer_type":{"type":"string"},"customer_group_id":{"type":["integer","null"]},"accepts_marketing":{"type":"boolean"},"updated_at":{"type":["string","null"],"format":"date-time"}},"required":["id","email","buyer_type","accepts_marketing"]},"Discount":{"type":"object","properties":{"id":{"type":"integer"},"kind":{"type":"string","enum":["code","automatic"]},"value_type":{"type":"string"},"enabled":{"type":"boolean"},"status":{"type":"string"}},"required":["id","kind","value_type","enabled"]},"CustomerGroup":{"type":"object","properties":{"id":{"type":"integer"},"handle":{"type":"string"},"name":{"type":["string","null"]},"price_list_id":{"type":["integer","null"]},"discount_percent":{"type":"number"}},"required":["id","handle","discount_percent"]},"PriceList":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"currency":{"type":"string"},"prices_include_tax":{"type":"boolean"},"status":{"type":"string","enum":["active","disabled"]},"prices_count":{"type":"integer"},"prices":{"type":"array","items":{"type":"object","properties":{"variant_id":{"type":["string","null"]},"min_qty":{"type":"number"},"price":{"type":["string","null"],"description":"Decimal amount with VAT, e.g. \"19.99\"."}},"required":["variant_id","min_qty","price"]}}},"required":["id","code","status"]},"Webhook":{"type":"object","properties":{"id":{"type":"string","minLength":26,"maxLength":26},"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"disabled_reason":{"type":["string","null"],"enum":["manual","failing","plan",null]},"secret":{"type":"string","description":"whsec_…, only when created or rotated."},"failing_since":{"type":["string","null"],"format":"date-time"},"success_rate_7d":{"type":["number","null"]}},"required":["id","url","events","enabled"]},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string","minLength":26,"maxLength":26},"webhook_id":{"type":"string","minLength":26,"maxLength":26},"event_id":{"type":"string","minLength":26,"maxLength":26},"event_type":{"type":"string"},"status":{"type":"string","enum":["pending","succeeded","failed"]},"attempts":{"type":"integer"},"response_status":{"type":["integer","null"]},"next_attempt_at":{"type":["string","null"],"format":"date-time"}},"required":["id","webhook_id","event_type","status","attempts"]},"BulkResult":{"type":"object","properties":{"updated":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"id":{"type":["string","null"]}},"required":["index"]}},"failed":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"code":{"type":"string","enum":["not_found","ambiguous_sku","location_not_found","validation_failed","invalid_state"]},"errors":{"type":["object","array"]}},"required":["index","code"]}}},"required":["updated","failed"]}},"responses":{"ValidationException":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Errors overview."},"errors":{"type":"object","description":"A detailed description of each field that failed validation.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["message","errors"]}}}},"ModelNotFoundException":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error overview."}},"required":["message"]}}}}}},"x-webhooks-events":{"order.created":{"description":"An order was placed (also unpaid ones, e.g. bank transfer).","scope":"orders:read"},"order.paid":{"description":"The order's payment was confirmed.","scope":"orders:read"},"order.updated":{"description":"The order changed: status, payment, fulfilment, addresses, lines.","scope":"orders:read"},"order.cancelled":{"description":"The order was cancelled.","scope":"orders:read"},"order.refunded":{"description":"Money was refunded, in part or in full.","scope":"orders:read"},"shipment.created":{"description":"A shipment left, with its tracking number.","scope":"orders:read"},"shipment.ready_for_pickup":{"description":"The parcel waits in a parcel locker or store.","scope":"orders:read"},"shipment.delivered":{"description":"The parcel was delivered.","scope":"orders:read"},"product.created":{"description":"A product was created.","scope":"catalog:read"},"product.updated":{"description":"A product or its variants changed (at most once a minute per product).","scope":"catalog:read"},"product.archived":{"description":"A product was archived.","scope":"catalog:read"},"inventory.updated":{"description":"A variant's stock changed at a location (at most once a minute per variant).","scope":"catalog:read"},"customer.created":{"description":"A customer was created.","scope":"customers:read"},"customer.updated":{"description":"A customer's details changed.","scope":"customers:read"},"webhook.test":{"description":"Sent with \"Send test\"; always delivered to that endpoint only.","scope":"webhooks:read"}}}