{"components":{"parameters":{"Cursor":{"in":"query","name":"cursor","required":false,"schema":{"type":"string"}},"DryRun":{"description":"Run the same validations and domain code, roll back, and return `{dry_run: true, diff, warnings}`.","in":"query","name":"dry_run","required":false,"schema":{"type":"boolean"}},"Fields":{"description":"Comma list of keys; `variants.stock` / `variants.prices` / `media` opt into extras.","in":"query","name":"fields","required":false,"schema":{"type":"string"}},"Force":{"description":"Skip the If-Match check. Needs scope `products:admin`.","in":"query","name":"force","required":false,"schema":{"type":"boolean"}},"IdempotencyKey":{"description":"Required on POST/PUT/PATCH; responses are replayed for 24 h.","in":"header","name":"Idempotency-Key","required":true,"schema":{"maxLength":255,"type":"string"}},"IfMatch":{"description":"`\"<version>\"` from the last ETag; a mismatch is 412.","in":"header","name":"If-Match","required":false,"schema":{"type":"string"}},"Limit":{"in":"query","name":"limit","required":false,"schema":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},"Sort":{"description":"Page order: `created` (default) or `updated` (by updated_at; implied by updated_after).","in":"query","name":"sort","required":false,"schema":{"enum":["created","updated"],"type":"string"}},"UpdatedAfter":{"description":"Only rows changed after this time. Pages then follow updated_at (oldest change first), so the next poll resumes with the cursor or with the last row's updated_at.","in":"query","name":"updated_after","required":false,"schema":{"format":"date-time","type":"string"}},"VersionHeader":{"description":"Override the key's pinned version with a newer supported one.","in":"header","name":"OpenB2B-Version","required":false,"schema":{"enum":["2026-11-01"],"type":"string"}}},"responses":{"Problem":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"RFC 9457 problem"}},"schemas":{"Queued":{"properties":{"queued":{"type":"boolean"}},"required":["queued"],"type":"object"},"PurchaseOrderCreate":{"properties":{"lines":{"items":{"properties":{"quantity":{"minimum":1,"type":"integer"},"variant_id":{"type":"string"}},"required":["variant_id","quantity"],"type":"object"},"type":"array"},"supplier_id":{"type":"string"}},"required":["supplier_id","lines"],"type":"object"},"ReturnReject":{"properties":{"code":{"type":"string"},"reason":{"maxLength":1000,"minLength":1,"type":"string"},"write_to_channel":{"type":"boolean"}},"required":["code","reason"],"type":"object"},"ReturnReceive":{"properties":{"lines":{"items":{"properties":{"condition":{"enum":["resellable","damaged","missing"],"type":"string"},"line_id":{"type":"string"},"location_id":{"type":"string"},"quantity_received":{"minimum":0,"type":"integer"}},"required":["line_id","quantity_received","condition"],"type":"object"},"type":"array"},"over_receive":{"type":"boolean"}},"required":["lines"],"type":"object"},"CategoryNode":{"description":"A category with its children, recursively (the tree read).","properties":{"children":{"items":{"$ref":"#/components/schemas/CategoryNode"},"type":"array"},"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"integer"}},"required":["children","id","name","parent_id","position"],"type":"object"},"ComplianceObjectCreate":{"properties":{"connection_id":{"type":"string"},"kind":{"enum":["responsible_person","responsible_producer"],"type":"string"},"name":{"type":"string"},"party":{"properties":{"address":{"properties":{"city":{"type":"string"},"country_code":{"type":"string"},"postal_code":{"type":"string"},"street":{"type":"string"}},"required":["country_code","street","postal_code","city"],"type":"object"},"contact":{"properties":{"email":{"type":"string"},"form_url":{"type":"string"},"phone":{"type":"string"}},"type":"object"},"name":{"type":"string"}},"required":["name","address","contact"],"type":"object"}},"required":["connection_id","kind","name","party"],"type":"object"},"CatalogBatch":{"example":{"items":[{"brand":"Acme","category_path":["Fermentacja","Pojemniki"],"key":"FERM-30","media":[{"url":"https://cdn.example.com/ferm-30.jpg"}],"name":"Pojemnik fermentacyjny 30 l","variants":[{"content":{"en-GB":{"title":"30 l fermenter with tap"},"pl-PL":{"title":"Pojemnik 30 l z kranikiem"}},"identifiers":{"gtin":"5900000000017"},"prices":[{"amount":"49.90","price_list_key":"HURT-PLN"},{"amount":"44.90","min_qty":10,"price_list_key":"HURT-PLN"}],"sku":"FERM-30-KRAN","stock":[{"as_of":"2026-11-03T06:00:00Z","location_code":"MAG-1","on_hand":120}],"vat_rate":"23","weight_g":1200}]}]},"properties":{"items":{"items":{"properties":{"brand":{"type":["string","null"]},"category":{"type":["string","null"]},"category_id":{"type":["string","null"]},"category_path":{"items":{"type":"string"},"type":"array"},"custom_fields":{"additionalProperties":true,"description":"Custom field values by key (a merge patch: null removes). Validated against /custom-fields.","type":"object"},"description":{"type":["string","null"]},"key":{"maxLength":255,"minLength":1,"type":"string"},"manufacturer_code":{"type":["string","null"]},"media":{"items":{"properties":{"alt":{"type":["string","null"]},"url":{"minLength":1,"type":"string"},"variant_id":{"type":["string","null"]}},"required":["url"],"type":"object"},"type":"array"},"mode":{"description":"How lists in this body combine with the stored ones: `merge` by key (default) or `replace`.","enum":["merge","replace"],"type":"string"},"name":{"minLength":1,"type":"string"},"starred":{"type":"boolean"},"status":{"enum":["draft","active","archived"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"variants":{"items":{"properties":{"archived":{"type":"boolean"},"attributes":{"additionalProperties":true,"description":"free-form variant attributes; null removes a key","type":"object"},"bundle_type":{"type":["string","null"]},"components":{"items":{"properties":{"allocation_weight":{"type":["number","string","null"]},"quantity":{"type":"integer"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["quantity"],"type":"object"},"type":["array","null"]},"content":{"additionalProperties":{"properties":{"bullets":{"items":{"type":"string"},"type":["array","null"]},"description_html":{"type":["string","null"]},"parameters":{"additionalProperties":true,"type":["object","null"]},"title":{"type":["string","null"]}},"type":"object"},"description":"Translations of this variant: locale (e.g. `pl-PL`, `en-GB`) => content fields (general scope).","properties":{},"type":"object"},"dims":{"properties":{"height_mm":{"minimum":0,"type":["integer","null"]},"length_mm":{"minimum":0,"type":["integer","null"]},"width_mm":{"minimum":0,"type":["integer","null"]}},"type":"object"},"identifiers":{"properties":{"brand_code":{"type":["string","null"]},"external":{"additionalProperties":true,"description":"connector id => external id; null removes a key","type":"object"},"gtin":{"type":["string","null"]},"mpn":{"type":["string","null"]},"sku":{"type":"string"}},"type":"object"},"moq":{"minimum":1,"type":"integer"},"name":{"type":"string"},"order_multiple":{"minimum":1,"type":"integer"},"prices":{"items":{"properties":{"amount":{"description":"Decimal (prefer a string); null removes the tier.","type":["number","string","null"]},"max_qty":{"minimum":1,"type":["integer","null"]},"min_qty":{"minimum":1,"type":"integer"},"price_list_id":{"type":"string"},"price_list_key":{"minLength":1,"type":"string"},"valid_from":{"description":"ISO 8601 date or timestamp. Without it the tier is the list's standing price; with it a dated price (e.g. a promotion) preferred inside its window.","type":["string","null"]},"valid_to":{"description":"ISO 8601 date or timestamp (exclusive).","type":["string","null"]}},"required":["amount"],"type":"object"},"type":"array"},"sku":{"minLength":1,"type":"string"},"stock":{"items":{"properties":{"as_of":{"description":"When the ERP counted it; an older report than the last applied one is ignored (stale).","format":"date-time","type":"string"},"bins":{"description":"Where in the warehouse the item lies (shelf/bin labels, e.g. A-01-03); replaces the previous ones. Omit to keep them.","items":{"type":"string"},"type":"array"},"location_code":{"description":"the seller's warehouse code","minLength":1,"type":"string"},"location_id":{"type":"string"},"on_hand":{"minimum":0,"type":"integer"}},"required":["on_hand"],"type":"object"},"type":"array"},"track_stock":{"type":"boolean"},"unit":{"type":"string"},"vat_rate":{"type":["number","string","null"]},"weight_g":{"minimum":0,"type":["integer","null"]}},"required":["sku"],"type":"object"},"type":"array"}},"required":["key"],"type":"object"},"maxItems":500,"minItems":1,"type":"array"}},"required":["items"],"type":"object"},"CustomFieldCreate":{"properties":{"entity":{"enum":["order","product"],"type":"string"},"key":{"pattern":"^[a-z][a-z0-9_]{0,62}$","type":"string"},"label":{"minLength":1,"type":"string"},"options":{"items":{"type":"string"},"type":"array"},"position":{"minimum":0,"type":"integer"},"type":{"enum":["text","number","boolean","date","select","file"],"type":"string"}},"required":["entity","key","label","type"],"type":"object"},"Domain":{"properties":{"checked_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"display_name":{"type":"string"},"grace_ends_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"lost_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"mail_error":{"type":"string"},"name":{"type":"string"},"ownership_proof":{"enum":["txt","provider"],"type":"string"},"ownership_record":{"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"type":"object"},"requested_uses":{"items":{"type":"string"},"type":"array"},"shop_hosts":{"items":{"$ref":"#/components/schemas/ShopHost"},"type":"array"},"shop_pages_error":{"type":"string"},"state":{"enum":["pending","verified","lost"],"type":"string"},"uses":{"properties":{"mail":{"enum":["off","waiting_dns","active","error"],"type":"string"},"shop_pages":{"enum":["off","waiting_dns","active","error"],"type":"string"}},"required":["mail","shop_pages"],"type":"object"},"verified_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["checked_at","display_name","grace_ends_at","id","lost_at","name","ownership_proof","ownership_record","requested_uses","shop_hosts","state","uses","verified_at"],"type":"object"},"SupplierItemsCostSourceResult":{"properties":{"data":{"properties":{"changed":{"type":"integer"},"skipped":{"items":{"properties":{"reason":{"enum":["not_in_catalogue","inactive","no_price","currency_mismatch","cost_entry_failed","already_preferred","not_preferred","update_failed"],"type":"string"},"sku":{"type":"string"}},"required":["reason","sku"],"type":"object"},"type":"array"}},"required":["changed","skipped"],"type":"object"}},"required":["data"],"type":"object"},"OrderCreate":{"properties":{"billing_address":{"additionalProperties":true,"description":"Address: line1, line2, city, postal_code, country, name, phone…","type":"object"},"buyer":{"properties":{"company":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"nip":{"type":"string"},"phone":{"type":"string"},"tax_ids":{"items":{"additionalProperties":true,"description":"{scheme, value, country} (scheme e.g. PL_NIP, EU_VAT)","type":"object"},"type":"array"}},"type":"object"},"buyer_account_id":{"type":"string"},"currency":{"pattern":"^[A-Za-z]{3}$","type":"string"},"invoice_requested":{"type":"boolean"},"lines":{"items":{"properties":{"quantity":{"minimum":1,"type":"integer"},"sku":{"type":"string"},"unit_price":{"description":"Decimal; prefer a string.","type":["number","string"]}},"required":["sku","quantity"],"type":"object"},"type":"array"},"note":{"type":"string"},"payment_status":{"enum":["unpaid","paid","partially_paid","refunded","cod"],"type":"string"},"shipping_address":{"additionalProperties":true,"description":"Address: line1, line2, city, postal_code, country, name, phone…","type":"object"},"source_label":{"type":"string"},"status_id":{"type":"string"}},"required":["currency","lines"],"type":"object"},"Return":{"properties":{"refunded_gross":{"type":"string"},"return_waybill":{"anyOf":[{},{"type":"null"}]},"requested_at":{"type":"string"},"channel_raw_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string"},"order_id":{"type":"string"},"resolution":{"anyOf":[{"type":"string"},{"type":"null"}]},"stock_document_ids":{"items":{"type":"string"},"type":"array"},"external_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string"},"external_ref":{"anyOf":[{},{"type":"null"}]},"refund_due_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"refunds":{"items":{"properties":{"amount":{"type":"string"},"components":{"additionalProperties":true,"type":"object"},"created_at":{"type":"string"},"currency":{"type":"string"},"id":{"type":"string"},"method":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"paid_on":{"type":"string"},"possible_duplicate_of":{"anyOf":[{},{"type":"null"}]},"reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string"},"void_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"voided_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["amount","components","created_at","currency","id","method","note","paid_on","possible_duplicate_of","reference","source","void_reason","voided_at"],"type":"object"},"type":"array"},"channel_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"updated_at":{"type":"string"},"channel_commission":{"type":"string"},"id":{"type":"string"},"internal_note":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"type":"string"},"expected_refund_gross":{"type":"string"},"currency":{"type":"string"},"attention":{"items":{"type":"string"},"type":"array"},"rejection":{"anyOf":[{"properties":{"code":{"type":"string"},"reason":{"type":"string"},"written_to_channel_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["code","reason","written_to_channel_at"],"type":"object"},{"type":"null"}]},"legal_basis":{"type":"string"},"lines":{"items":{"properties":{"condition":{"type":"string"},"disposition":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"order_line_id":{"type":"string"},"quantity":{"type":"integer"},"quantity_accepted":{"anyOf":[{"type":"integer"},{"type":"null"}]},"quantity_received":{"anyOf":[{"type":"integer"},{"type":"null"}]},"reason_code":{"type":"string"},"reason_text":{"anyOf":[{"type":"string"},{"type":"null"}]},"receipt_parts":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"serial_numbers":{"items":{},"type":"array"},"sku":{"type":"string"},"stock_location_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"tax_rate":{"anyOf":[{},{"type":"null"}]},"unit_gross":{"type":"string"},"unit_net":{"anyOf":[{},{"type":"null"}]}},"required":["condition","disposition","id","name","order_line_id","quantity","quantity_accepted","quantity_received","reason_code","reason_text","receipt_parts","serial_numbers","sku","stock_location_id","tax_rate","unit_gross","unit_net"],"type":"object"},"type":"array"},"rejected_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"return_shipping_payer":{"type":"string"},"response_due_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"correction_invoice_ids":{"items":{},"type":"array"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"warnings":{"items":{"type":"string"},"type":"array"},"received_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"buyer_note":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer"}},"required":["attention","buyer_note","cancelled_at","channel_commission","channel_raw_status","channel_status","completed_at","connection_id","correction_invoice_ids","created_at","currency","expected_refund_gross","external_number","external_ref","id","internal_note","kind","legal_basis","number","order_id","received_at","refund_due_at","refunded_gross","rejected_at","rejection","requested_at","resolution","response_due_at","return_shipping_payer","return_waybill","source","status","stock_document_ids","updated_at","version","warnings"],"type":"object"},"RuleDraft":{"properties":{"text":{"maxLength":1000,"minLength":3,"type":"string"}},"required":["text"],"type":"object"},"OrderPatch":{"properties":{"add_tags":{"items":{"type":"string"},"type":"array"},"billing_address":{"additionalProperties":true,"description":"Address: line1, line2, city, postal_code, country, name, phone…","type":"object"},"buyer":{"properties":{"company":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"nip":{"type":"string"},"phone":{"type":"string"},"tax_ids":{"items":{"additionalProperties":true,"description":"{scheme, value, country} (scheme e.g. PL_NIP, EU_VAT)","type":"object"},"type":"array"}},"type":"object"},"custom_fields":{"additionalProperties":true,"description":"Custom field values by key (a merge patch: null removes). Validated against /custom-fields.","type":"object"},"invoice_requested":{"type":"boolean"},"lines":{"items":{"properties":{"line_id":{"type":"string"},"name":{"type":"string"},"op":{"enum":["set_quantity","set_price","add","remove"],"type":"string"},"quantity":{"minimum":1,"type":"integer"},"sku":{"type":"string"},"unit_price":{"description":"Decimal; prefer a string.","type":["number","string"]}},"required":["op"],"type":"object"},"type":"array"},"payment_status":{"description":"Manual orders only; a channel order's payment is owned by the channel.","enum":["unpaid","paid","partially_paid","refunded","cod","unknown"],"type":"string"},"remove_tags":{"items":{"type":"string"},"type":"array"},"shipping_address":{"additionalProperties":true,"description":"Address: line1, line2, city, postal_code, country, name, phone…","type":"object"},"source_label":{"type":["string","null"]}},"type":"object"},"Webhook":{"properties":{"active":{"type":"boolean"},"api_version":{"type":"string"},"created_at":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"disabled_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"failure_count":{"type":"integer"},"id":{"type":"string"},"secret":{"type":"string"},"types":{"items":{"type":"string"},"type":"array"},"url":{"type":"string"}},"required":["active","api_version","created_at","description","disabled_at","failure_count","id","types","url"],"type":"object"},"PriceEntry":{"properties":{"amount":{"type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"max_qty":{"anyOf":[{"type":"integer"},{"type":"null"}]},"min_qty":{"type":"integer"},"price_list":{"anyOf":[{"type":"string"},{"type":"null"}]},"price_list_id":{"type":"string"},"valid_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"valid_to":{"anyOf":[{"type":"string"},{"type":"null"}]},"variant_id":{"type":"string"},"version":{"type":"integer"}},"required":["amount","currency","id","max_qty","min_qty","price_list","price_list_id","valid_from","valid_to","variant_id","version"],"type":"object"},"OrderStatusCreate":{"properties":{"affects_stock_on_cancel":{"type":"boolean"},"buyer_name":{"maxLength":120,"type":["string","null"]},"canonical":{"enum":["received","accepted","ready_to_ship","shipped","delivered","cancelled","returned"],"type":"string"},"colour":{"enum":["zinc","sky","emerald","amber","indigo","teal","rose"],"type":"string"},"group_id":{"type":["string","null"]},"key":{"maxLength":40,"type":"string"},"name":{"maxLength":80,"minLength":1,"type":"string"},"position":{"minimum":0,"type":"integer"},"short_name":{"maxLength":40,"type":["string","null"]}},"required":["name","canonical"],"type":"object"},"StockDocumentWrite":{"properties":{"kind":{"enum":["receipt","issue","transfer","adjustment"],"type":"string"},"lines":{"items":{"properties":{"quantity":{"type":"integer"},"sku":{"type":"string"},"unit_cost":{"type":["number","string","null"]},"variant_id":{"type":"string"}},"required":["quantity"],"type":"object"},"type":"array"},"location_id":{"type":"string"},"note":{"type":["string","null"]},"target_location_id":{"type":["string","null"]}},"required":["kind","lines"],"type":"object"},"NetworkImport":{"properties":{"skus":{"items":{"type":"string"},"type":"array"}},"required":["skus"],"type":"object"},"OrderStatusGroup":{"description":"A group of order statuses. Lists are `{data: [...]}`.","properties":{"id":{"type":"string"},"name":{"type":"string"},"position":{"type":"integer"}},"required":["id","name","position"],"type":"object"},"ListingUpdate":{"properties":{"ai_images":{"items":{"type":"string"},"type":"array"},"compliance":{"properties":{"implied_warranty_id":{"type":["string","null"]},"responsible_person_id":{"type":["string","null"]},"responsible_producer_id":{"type":["string","null"]},"return_policy_id":{"type":["string","null"]},"safety_information":{"type":["string","null"]},"warranty_id":{"type":["string","null"]}},"type":"object"},"delivery":{"properties":{"handling_time":{"type":["string","null"]},"shipping_rate_id":{"type":["string","null"]},"ships_from":{"description":"Where the goods ship from, shown to buyers; replaces the whole address, `null` returns to the channel account's default.","properties":{"city":{"type":"string"},"country_code":{"type":"string"},"post_code":{"type":"string"},"province":{"type":"string"}},"type":["object","null"]}},"type":"object"},"description_html":{"type":"string"},"external_extra":{"additionalProperties":true,"description":"connector-specific passthrough","type":"object"},"images":{"items":{"type":"string"},"type":"array"},"parameters":{"items":{"properties":{"id":{"type":"string"},"range":{"properties":{"from":{"type":"string"},"to":{"type":"string"}},"required":["from","to"],"type":"object"},"value_ids":{"items":{"type":"string"},"type":"array"},"values":{"items":{"type":"string"},"type":"array"}},"required":["id"],"type":"object"},"type":"array"},"title":{"minLength":1,"type":"string"},"unit":{"description":"What one piece of the offer's quantity is; the quantity itself is not changed.","enum":["unit","pair","set"],"type":"string"}},"type":"object"},"ShipmentBulkResult":{"properties":{"batch_id":{"type":"string"},"created":{"type":"integer"},"failed":{"type":"integer"},"results":{"items":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"order_id":{"type":"string"},"shipment_id":{"type":"string"},"status":{"type":"string"}},"required":["order_id"],"type":"object"},"type":"array"},"skipped":{"type":"integer"}},"required":["batch_id","created","failed","results","skipped"],"type":"object"},"ReturnComplete":{"properties":{"resolution":{"enum":["refund","replace","repair","price_reduction","none"],"type":"string"}},"type":"object"},"CatalogSettings":{"example":{"default_locale":"pl-PL","locales":["pl-PL","en-GB"]},"properties":{"default_locale":{"pattern":"^[a-z]{2,3}(-[A-Z]{2})?$","type":"string"},"locales":{"items":{"pattern":"^[a-z]{2,3}(-[A-Z]{2})?$","type":"string"},"type":"array"}},"type":"object"},"ProductCreate":{"properties":{"brand":{"type":["string","null"]},"category":{"type":["string","null"]},"category_id":{"type":["string","null"]},"category_path":{"items":{"type":"string"},"type":"array"},"custom_fields":{"additionalProperties":true,"description":"Custom field values by key (a merge patch: null removes). Validated against /custom-fields.","type":"object"},"description":{"type":["string","null"]},"key":{"maxLength":255,"minLength":1,"type":"string"},"manufacturer_code":{"type":["string","null"]},"media":{"items":{"properties":{"alt":{"type":["string","null"]},"url":{"minLength":1,"type":"string"},"variant_id":{"type":["string","null"]}},"required":["url"],"type":"object"},"type":"array"},"mode":{"description":"How lists in this body combine with the stored ones: `merge` by key (default) or `replace`.","enum":["merge","replace"],"type":"string"},"name":{"minLength":1,"type":"string"},"starred":{"type":"boolean"},"status":{"enum":["draft","active","archived"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"variants":{"items":{"properties":{"archived":{"type":"boolean"},"attributes":{"additionalProperties":true,"description":"free-form variant attributes; null removes a key","type":"object"},"bundle_type":{"type":["string","null"]},"components":{"items":{"properties":{"allocation_weight":{"type":["number","string","null"]},"quantity":{"type":"integer"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["quantity"],"type":"object"},"type":["array","null"]},"dims":{"properties":{"height_mm":{"minimum":0,"type":["integer","null"]},"length_mm":{"minimum":0,"type":["integer","null"]},"width_mm":{"minimum":0,"type":["integer","null"]}},"type":"object"},"identifiers":{"properties":{"brand_code":{"type":["string","null"]},"external":{"additionalProperties":true,"description":"connector id => external id; null removes a key","type":"object"},"gtin":{"type":["string","null"]},"mpn":{"type":["string","null"]},"sku":{"type":"string"}},"type":"object"},"moq":{"minimum":1,"type":"integer"},"name":{"type":"string"},"order_multiple":{"minimum":1,"type":"integer"},"sku":{"minLength":1,"type":"string"},"track_stock":{"type":"boolean"},"unit":{"type":"string"},"vat_rate":{"type":["number","string","null"]},"weight_g":{"minimum":0,"type":["integer","null"]}},"required":["sku"],"type":"object"},"type":"array"}},"required":["name"],"type":"object"},"PriceListCopyResult":{"properties":{"copied":{"type":"integer"},"failed":{"type":"integer"}},"required":["copied","failed"],"type":"object"},"BankImportResult":{"properties":{"applied":{"type":"integer"},"duplicates":{"type":"integer"},"matched":{"type":"integer"},"new":{"type":"integer"},"statement_id":{"type":"string"}},"required":["applied","duplicates","matched","new","statement_id"],"type":"object"},"MediaPost":{"properties":{"alt":{"type":["string","null"]},"media":{"items":{"properties":{"alt":{"type":["string","null"]},"url":{"minLength":1,"type":"string"},"variant_id":{"type":["string","null"]}},"required":["url"],"type":"object"},"type":"array"},"mode":{"description":"How lists in this body combine with the stored ones: `merge` by key (default) or `replace`.","enum":["merge","replace"],"type":"string"},"url":{"minLength":1,"type":"string"},"variant_id":{"type":["string","null"]}},"type":"object"},"PriceEntryWrite":{"properties":{"amount":{"description":"Decimal; prefer a string.","type":["number","string"]},"max_qty":{"minimum":1,"type":["integer","null"]},"min_qty":{"minimum":1,"type":"integer"}},"required":["amount"],"type":"object"},"MediaWriteResult":{"properties":{"created":{},"data":{"items":{"$ref":"#/components/schemas/Media"},"type":"array"}},"required":["data"],"type":"object"},"Order":{"description":"An order. `lines` comes with `GET /orders/{id}` and with `fields=lines`; `notes`, `stock`, `allocations` and `timeline` only when asked for in `fields`; `warnings` only on a write that produced some. With `fields=` only the listed keys plus `id` and `revision` are returned.","properties":{"parent_order_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"billing_address":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"allocations":{"items":{"$ref":"#/components/schemas/OrderAllocation"},"type":"array"},"shipping":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"paid_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"source":{"type":"string"},"price_basis":{"description":"How the order's prices were agreed. `gross`: unit gross × quantity (marketplaces, consumer shops; also every order without a stated basis). `net`: a B2B shop priced net — `total_amount` is computed \"od netto\": per VAT rate, VAT = round(Σ round(unit net × quantity, 2) × rate, 2), gross = net + VAT; the lines carry `unit_price_net` and `tax_rate`, so Σ `unit_price` × `quantity` may differ from `total_amount` by a few hundredths.","enum":["gross","net"],"type":"string"},"status_changed_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"timeline":{"items":{"$ref":"#/components/schemas/OrderTimelineEntry"},"type":"array"},"conflicts":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"ready_for_processing_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"buyer":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"status":{"properties":{"canonical":{"enum":["received","accepted","ready_to_ship","shipped","delivered","cancelled","returned"],"type":"string"},"id":{"oneOf":[{"type":"string"},{"type":"null"}]},"key":{"oneOf":[{"type":"string"},{"type":"null"}]},"name":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["canonical","id","key","name"],"type":"object"},"locked_fields":{"items":{"type":"string"},"type":"array"},"updated_at":{"type":"string"},"external_status":{"oneOf":[{"type":"string"},{"type":"null"}]},"channel":{"oneOf":[{"description":"The connector id of the order's sales channel (`pro.openb2b.connector.<name>` for first-party connectors); null for orders not from a channel. Stable: use it where Base.com gave `order_source`.","type":"string"},{"type":"null"}]},"id":{"type":"string"},"cancel_reason":{"oneOf":[{"type":"string"},{"type":"null"}]},"number":{"oneOf":[{"type":"string"},{"type":"null"}]},"payments":{"items":{"$ref":"#/components/schemas/OrderPayment"},"type":"array"},"channel_total_amount":{"oneOf":[{"type":"string"},{"type":"null"}]},"currency":{"oneOf":[{"type":"string"},{"type":"null"}]},"source_label":{"oneOf":[{"type":"string"},{"type":"null"}]},"tags":{"items":{"type":"string"},"type":"array"},"paid_amount":{"oneOf":[{"type":"string"},{"type":"null"}]},"invoice_requested":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"external_order_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"lines":{"items":{"$ref":"#/components/schemas/OrderLine"},"type":"array"},"payment":{"properties":{"cash_on_delivery":{"type":"boolean"},"external_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"method":{"oneOf":[{"type":"string"},{"type":"null"}]},"provider":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["cash_on_delivery","external_id","method","provider"],"type":"object"},"merged_into_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"cancel_initiator":{"oneOf":[{"type":"string"},{"type":"null"}]},"warnings":{"items":{"type":["string","object"]},"type":"array"},"fulfillment_channel":{"enum":["seller","marketplace"],"type":"string"},"stock":{"items":{"properties":{"line_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"location_id":{"type":"string"},"quantity":{"type":"integer"},"shortfall":{"type":"boolean"},"supplier_item_id":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["line_id","location_id","quantity","shortfall","supplier_item_id"],"type":"object"},"type":"array"},"market":{"oneOf":[{"type":"string"},{"type":"null"}]},"revision":{"type":"integer"},"placed_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"payment_status":{"type":"string"},"custom_fields":{"additionalProperties":true,"type":"object"},"total_amount":{"oneOf":[{"type":"string"},{"type":"null"}]},"connection_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"notes":{"items":{"$ref":"#/components/schemas/OrderNote"},"type":"array"},"shipping_address":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"buyer_note":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["billing_address","buyer","buyer_note","cancel_initiator","cancel_reason","channel","channel_total_amount","conflicts","connection_id","created_at","currency","custom_fields","external_order_id","external_status","fulfillment_channel","id","invoice_requested","locked_fields","market","merged_into_id","number","paid_amount","paid_at","parent_order_id","payment","payment_status","placed_at","price_basis","ready_for_processing_at","revision","shipping","shipping_address","source","source_label","status","status_changed_at","tags","total_amount","updated_at"],"type":"object"},"OrderNoteCreate":{"properties":{"body":{"maxLength":5000,"minLength":1,"type":"string"}},"required":["body"],"type":"object"},"ChannelMedia":{"properties":{"connection_id":{"type":"string"},"errors":{"items":{},"type":"array"},"gallery":{"items":{"properties":{"image_id":{"type":"string"},"url":{"type":"string"}},"required":["image_id","url"],"type":"object"},"type":"array"},"overrides":{"items":{"properties":{"image_id":{"type":"string"},"mode":{"type":"string"},"position":{"type":"integer"}},"required":["image_id","mode","position"],"type":"object"},"type":"array"},"product_id":{"type":"string"},"rules_known":{"type":"boolean"},"version":{"type":"integer"}},"required":["connection_id","errors","gallery","overrides","product_id","rules_known","version"],"type":"object"},"CategoryCreate":{"properties":{"name":{"minLength":1,"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer"}},"required":["name"],"type":"object"},"EventPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Event"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","has_more","next_cursor"],"type":"object"},"StockSettingsView":{"properties":{"settled_orders":{"type":"integer"},"stock_out_at":{"enum":["accepted","ready_to_ship","shipped"],"type":"string"}},"required":["stock_out_at"],"type":"object"},"Location":{"description":"A warehouse: own (stock kept here) or a supplier's (kept by its feed).","properties":{"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"code":{"type":"string"},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"default":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"kind":{"enum":["own","supplier"],"type":"string"},"lead_time_days":{"anyOf":[{"type":"integer"},{"type":"null"}]},"name":{"type":"string"},"post_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"province":{"anyOf":[{"type":"string"},{"type":"null"}]},"stock_edition":{"enum":["full","api"],"type":"string"}},"required":["address","city","code","country","default","description","id","kind","lead_time_days","name","post_code","province","stock_edition"],"type":"object"},"CustomFieldPatch":{"properties":{"archived":{"type":"boolean"},"label":{"minLength":1,"type":"string"},"options":{"items":{"type":"string"},"type":"array"},"position":{"minimum":0,"type":"integer"}},"type":"object"},"MediaReplace":{"properties":{"url":{"minLength":1,"type":"string"}},"required":["url"],"type":"object"},"Ping":{"properties":{"key_prefix":{"type":"string"},"scopes":{"items":{"type":"string"},"type":"array"},"tenant":{"type":"string"},"version":{"type":"string"}},"required":["tenant","key_prefix","version","scopes"],"type":"object"},"Listing":{"properties":{"quantity_observed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"pending_operation":{"anyOf":[{"type":"string"},{"type":"null"}]},"ean":{"anyOf":[{"type":"string"},{"type":"null"}]},"price_pushed":{"anyOf":[{},{"type":"null"}]},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"update":{"properties":{"draft_id":{"type":"string"},"revision":{"type":"integer"},"status":{"type":"string"}},"required":["draft_id","revision","status"],"type":"object"},"external_type":{"type":"string"},"content":{"properties":{"ai_images":{"items":{},"type":"array"},"compliance":{"additionalProperties":true,"type":"object"},"delivery":{"properties":{"handling_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipping_rate_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"ships_from":{"properties":{"city":{"type":"string"},"country_code":{"type":"string"},"post_code":{"type":"string"},"province":{"type":"string"}},"required":[],"type":"object"}},"required":[],"type":"object"},"description_html":{"type":"string"},"external_extra":{"additionalProperties":true,"type":"object"},"images":{"items":{"type":"string"},"type":"array"},"parameters":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"title":{"type":"string"},"unit":{"enum":["unit","pair","set"],"type":"string"}},"required":["compliance","delivery","description_html","images","parameters","title"],"type":"object"},"exposures":{"items":{},"type":"array"},"needs_reconcile":{"type":"boolean"},"status":{"type":"string"},"updated_at":{"type":"string"},"export_status":{"type":"string"},"id":{"type":"string"},"last_push_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"price_note":{"anyOf":[{"type":"string"},{"type":"null"}]},"image_warning":{"anyOf":[{"properties":{"detected_at":{"type":"string"},"extra":{"items":{"type":"string"},"type":"array"},"missing":{"items":{"type":"string"},"type":"array"},"reordered":{"type":"boolean"}},"required":["detected_at","extra","missing","reordered"],"type":"object"},{"type":"null"}]},"price_hold_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"type":"string"},"price_pushed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}]},"price":{"anyOf":[{"type":"string"},{"type":"null"}]},"external_id":{"type":"string"},"image_results":{"items":{"properties":{"channel_url":{"type":"string"},"index":{"type":"integer"},"reason":{"type":"string"},"source_url":{"type":"string"},"status":{"type":"string"}},"required":["index","source_url","status"],"type":"object"},"type":"array"},"variant_id":{"type":"string"},"price_held":{"anyOf":[{"type":"string"},{"type":"null"}]},"market":{"type":"string"},"price_calculated":{"anyOf":[{"type":"string"},{"type":"null"}]},"stock_writable":{"type":"boolean"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"connection_id":{"type":"string"},"match_source":{"type":"string"},"created_at":{"type":"string"},"version":{"type":"integer"}},"required":["connection_id","created_at","currency","ean","export_status","exposures","external_id","external_type","id","image_results","image_warning","last_push_error","market","match_source","needs_reconcile","pending_operation","price","price_calculated","price_held","price_hold_reason","price_note","price_pushed","price_pushed_at","quantity","quantity_observed_at","sku","status","stock_writable","title","updated_at","variant_id","version"],"type":"object"},"RuleVersionList":{"properties":{"data":{"items":{"properties":{"by":{"additionalProperties":true,"type":"object"},"created_at":{"type":"string"},"definition":{"additionalProperties":true,"type":"object"},"kind":{"type":"string"},"restored_from":{"anyOf":[{"type":"integer"},{"type":"null"}]},"version":{"type":"integer"}},"required":["by","created_at","definition","kind","restored_from","version"],"type":"object"},"type":"array"}},"required":["data"],"type":"object"},"NotificationTemplateWrite":{"properties":{"ascii_only":{"type":"boolean"},"body":{"type":"string"},"channel":{"enum":["email","sms"],"type":"string"},"enabled":{"type":"boolean"},"language":{"type":"string"},"name":{"type":"string"},"subject":{"type":["string","null"]}},"type":"object"},"ShipmentPlan":{"description":"The `?dry_run=true` answer of createShipment: the exact request, the trace and the guards. Nothing is bought.","properties":{"diff":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"dry_run":{"const":true},"plan":{"properties":{"carrier":{"anyOf":[{"type":"string"},{"type":"null"}]},"catalogue_stale":{"type":"boolean"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"guards":{"properties":{"blocked_by":{"additionalProperties":true,"type":"object"},"ok":{"type":"boolean"}},"required":["ok"],"type":"object"},"label_source":{"type":"string"},"lines":{"items":{"properties":{"line_id":{"type":"string"},"quantity":{"type":"integer"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["line_id","quantity","sku"],"type":"object"},"type":"array"},"order_id":{"type":"string"},"preset":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"string"},{"type":"null"}]},"price_note":{"type":"string"},"request":{"additionalProperties":true,"type":"object"},"service_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"trace":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["carrier","catalogue_stale","connection_id","errors","guards","label_source","lines","order_id","preset","price","price_note","request","service_id","trace","warnings"],"type":"object"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["diff","dry_run","plan","warnings"],"type":"object"},"ShipmentBulkPlan":{"properties":{"counts":{"properties":{"blocked":{"type":"integer"},"ready":{"type":"integer"},"warnings":{"type":"integer"}},"required":["blocked","ready","warnings"],"type":"object"},"orders":{"items":{"properties":{"blocked_by":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"cod":{"anyOf":[{},{"type":"null"}]},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"order_id":{"type":"string"},"parcels":{"type":"integer"},"point":{"anyOf":[{"type":"string"},{"type":"null"}]},"preset":{"anyOf":[{"type":"string"},{"type":"null"}]},"service_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["ready","blocked","errors"],"type":"string"},"warnings":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["blocked_by","cod","errors","order_id","parcels","point","preset","service_id","status","warnings"],"type":"object"},"type":"array"},"plan_id":{"type":"string"}},"required":["counts","orders","plan_id"],"type":"object"},"ShopHostWrite":{"properties":{"connection_id":{"type":"string"},"host":{"type":"string"}},"required":["connection_id"],"type":"object"},"PriceListUsedIn":{"example":{"used_in":[{"connection_id":"0190a3c2-7d5e-7c11-9a55-3f0e2b1c4d5e","scope":"connection"}]},"properties":{"used_in":{"items":{"properties":{"buyer_account_id":{"type":"string"},"connection_id":{"type":"string"},"customer_group_id":{"type":"string"},"market":{"type":["string","null"]},"scope":{"enum":["company","connection","customer_group","buyer"],"type":"string"}},"required":["scope"],"type":"object"},"type":"array"}},"required":["used_in"],"type":"object"},"DryRun":{"additionalProperties":true,"description":"Plan-style dry runs (shipments, invoices, returns) add a `plan` object to this envelope.","properties":{"diff":{"items":{"properties":{"from":{},"path":{"description":"e.g. `variants[SKU-1].weight_g`","type":"string"},"to":{}},"required":["path"],"type":"object"},"type":"array"},"dry_run":{"const":true},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["dry_run","diff","warnings"],"type":"object"},"ProductWrite":{"properties":{"brand":{"type":["string","null"]},"category":{"type":["string","null"]},"category_id":{"type":["string","null"]},"category_path":{"items":{"type":"string"},"type":"array"},"custom_fields":{"additionalProperties":true,"description":"Custom field values by key (a merge patch: null removes). Validated against /custom-fields.","type":"object"},"description":{"type":["string","null"]},"key":{"maxLength":255,"minLength":1,"type":"string"},"manufacturer_code":{"type":["string","null"]},"media":{"items":{"properties":{"alt":{"type":["string","null"]},"url":{"minLength":1,"type":"string"},"variant_id":{"type":["string","null"]}},"required":["url"],"type":"object"},"type":"array"},"mode":{"description":"How lists in this body combine with the stored ones: `merge` by key (default) or `replace`.","enum":["merge","replace"],"type":"string"},"name":{"minLength":1,"type":"string"},"starred":{"type":"boolean"},"status":{"enum":["draft","active","archived"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"variants":{"items":{"properties":{"archived":{"type":"boolean"},"attributes":{"additionalProperties":true,"description":"free-form variant attributes; null removes a key","type":"object"},"bundle_type":{"type":["string","null"]},"components":{"items":{"properties":{"allocation_weight":{"type":["number","string","null"]},"quantity":{"type":"integer"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["quantity"],"type":"object"},"type":["array","null"]},"dims":{"properties":{"height_mm":{"minimum":0,"type":["integer","null"]},"length_mm":{"minimum":0,"type":["integer","null"]},"width_mm":{"minimum":0,"type":["integer","null"]}},"type":"object"},"identifiers":{"properties":{"brand_code":{"type":["string","null"]},"external":{"additionalProperties":true,"description":"connector id => external id; null removes a key","type":"object"},"gtin":{"type":["string","null"]},"mpn":{"type":["string","null"]},"sku":{"type":"string"}},"type":"object"},"moq":{"minimum":1,"type":"integer"},"name":{"type":"string"},"order_multiple":{"minimum":1,"type":"integer"},"sku":{"minLength":1,"type":"string"},"track_stock":{"type":"boolean"},"unit":{"type":"string"},"vat_rate":{"type":["number","string","null"]},"weight_g":{"minimum":0,"type":["integer","null"]}},"required":["sku"],"type":"object"},"type":"array"}},"type":"object"},"OrderStatusOrder":{"properties":{"ids":{"items":{"type":"string"},"type":"array"}},"required":["ids"],"type":"object"},"PartnerAnswerResult":{"properties":{"lines":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"status":{"type":"string"}},"required":["lines","status"],"type":"object"},"ShopHost":{"properties":{"active_since":{"anyOf":[{"type":"string"},{"type":"null"}]},"checked_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"cname_record":{"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"type":"object"},"connection_id":{"type":"string"},"error_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"host":{"type":"string"},"id":{"type":"string"},"state":{"enum":["waiting_dns","issuing","active","error","suspended","removed"],"type":"string"}},"required":["active_since","checked_at","cname_record","connection_id","error_reason","host","id","state"],"type":"object"},"CatalogSettingsView":{"properties":{"default_locale":{"type":"string"},"locales":{"items":{"type":"string"},"type":"array"}},"required":["default_locale","locales"],"type":"object"},"RulePreview":{"properties":{"days":{"type":"integer"},"dry_run":{"type":"boolean"},"evaluated":{"type":"integer"},"items":{"items":{"properties":{"at":{"type":"string"},"event_id":{"type":"string"},"matched":{"type":"boolean"},"plan":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"additionalProperties":true,"type":"object"},"subject_id":{"type":"string"},"trace":{"additionalProperties":true,"type":"object"}},"required":["at","event_id","matched","plan","reason","subject","subject_id","trace"],"type":"object"},"type":"array"},"matched":{"type":"integer"},"would_change":{"type":"integer"}},"required":["days","dry_run","evaluated","items","matched","would_change"],"type":"object"},"ShipmentExternal":{"properties":{"carrier":{"type":"string"},"lines":{"items":{"properties":{"line_id":{"type":"string"},"quantity":{"minimum":1,"type":"integer"}},"required":["line_id","quantity"],"type":"object"},"type":"array"},"push_to_channel":{"type":"boolean"},"service_name":{"type":"string"},"shipped_at":{"type":"string"},"source_connection_id":{"type":"string"},"tracking_number":{"type":"string"},"tracking_url":{"type":"string"}},"required":["carrier","tracking_number"],"type":"object"},"ReturnCorrection":{"properties":{"parent_invoice_id":{"description":"Which invoice to correct when the order has several.","type":"string"},"reason":{"type":"string"},"send_to_buyer":{"type":"boolean"}},"type":"object"},"ReturnRefund":{"properties":{"amount":{"description":"Decimal; prefer a string.","type":["number","string"]},"components":{"properties":{"deduction":{"description":"Decimal; prefer a string.","type":["number","string"]},"goods":{"description":"Decimal; prefer a string.","type":["number","string"]},"other":{"description":"Decimal; prefer a string.","type":["number","string"]},"shipping":{"description":"Decimal; prefer a string.","type":["number","string"]}},"type":"object"},"confirm":{"type":"boolean"},"currency":{"type":"string"},"method":{"description":"`allegro_payments` is a deprecated alias, stored and returned as `marketplace_payment`.","enum":["original_payment","marketplace_payment","bank_transfer","cash","store_credit","other","allegro_payments"],"type":"string"},"note":{"type":"string"},"paid_on":{"type":"string"},"reference":{"type":"string"}},"required":["amount"],"type":"object"},"OrderPayment":{"description":"One entry of an order's payment ledger. `amount` is signed (a refund is negative); a voided entry counts in no sum. `external_payment_id` is the marketplace's own payment id, byte for byte.","properties":{"amount":{"type":"string"},"comment":{"oneOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"created_by":{"additionalProperties":true,"type":"object"},"currency":{"oneOf":[{"type":"string"},{"type":"null"}]},"external_payment_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"kind":{"enum":["payment","refund","adjustment"],"type":"string"},"method":{"oneOf":[{"type":"string"},{"type":"null"}]},"occurred_at":{"type":"string"},"provider":{"oneOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["channel","manual","api","return","gateway"],"type":"string"},"voided_at":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["amount","comment","created_at","created_by","currency","external_payment_id","id","kind","method","occurred_at","provider","source","voided_at"],"type":"object"},"Customer":{"properties":{"buyer_account_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel_ids":{"items":{"type":"string"},"type":"array"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"first_order_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"kind":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_billing_address":{"additionalProperties":true,"type":"object"},"last_order_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_shipping_address":{"additionalProperties":true,"type":"object"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"orders":{"items":{"properties":{"currency":{"type":"string"},"id":{"type":"string"},"number":{"anyOf":[{"type":"string"},{"type":"null"}]},"placed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"total_amount":{"type":"string"}},"required":["currency","id","number","placed_at","status","total_amount"],"type":"object"},"type":"array"},"orders_count":{"type":"integer"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"tags":{"items":{"type":"string"},"type":"array"},"tax_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"totals":{"additionalProperties":{"type":"string"},"type":"object"}},"required":["buyer_account_id","channel_ids","company_name","display_name","email","first_order_at","id","kind","last_billing_address","last_order_at","last_shipping_address","note","orders_count","phone","tags","tax_id","totals"],"type":"object"},"VariantWrite":{"properties":{"archived":{"type":"boolean"},"attributes":{"additionalProperties":true,"description":"free-form variant attributes; null removes a key","type":"object"},"bundle_type":{"type":["string","null"]},"components":{"items":{"properties":{"allocation_weight":{"type":["number","string","null"]},"quantity":{"type":"integer"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["quantity"],"type":"object"},"type":["array","null"]},"dims":{"properties":{"height_mm":{"minimum":0,"type":["integer","null"]},"length_mm":{"minimum":0,"type":["integer","null"]},"width_mm":{"minimum":0,"type":["integer","null"]}},"type":"object"},"identifiers":{"properties":{"brand_code":{"type":["string","null"]},"external":{"additionalProperties":true,"description":"connector id => external id; null removes a key","type":"object"},"gtin":{"type":["string","null"]},"mpn":{"type":["string","null"]},"sku":{"type":"string"}},"type":"object"},"mode":{"description":"How lists in this body combine with the stored ones: `merge` by key (default) or `replace`.","enum":["merge","replace"],"type":"string"},"moq":{"minimum":1,"type":"integer"},"name":{"type":"string"},"order_multiple":{"minimum":1,"type":"integer"},"product_id":{"type":"string"},"product_key":{"type":"string"},"product_name":{"type":"string"},"sku":{"minLength":1,"type":"string"},"track_stock":{"type":"boolean"},"unit":{"type":"string"},"vat_rate":{"type":["number","string","null"]},"weight_g":{"minimum":0,"type":["integer","null"]}},"type":"object"},"SupplierItemsCostSource":{"additionalProperties":false,"properties":{"ids":{"items":{"type":"string"},"type":"array"},"use":{"type":"boolean"}},"required":["ids","use"],"type":"object"},"ReturnCreate":{"properties":{"accept":{"type":"boolean"},"buyer_note":{"type":"string"},"confirm":{"description":"Confirms creating a complaint (or channel return) for an order Core does not hold as shipped.","type":"boolean"},"internal_note":{"type":"string"},"kind":{"enum":["withdrawal","complaint"],"type":"string"},"legal_basis":{"enum":["consumer_withdrawal","goodwill","contractual_b2b","nonconformity","channel_policy"],"type":"string"},"lines":{"items":{"properties":{"line_id":{"type":"string"},"quantity":{"minimum":1,"type":"integer"},"reason_code":{"enum":["changed_mind","too_large","too_small","not_as_expected","ordered_by_mistake","late_delivery","wrong_item","incomplete","damaged_in_transit","defective","not_as_described","counterfeit","other"],"type":"string"},"reason_text":{"type":"string"},"serial_numbers":{"items":{"type":"string"},"type":"array"}},"required":["line_id","quantity"],"type":"object"},"type":"array"},"requested_at":{"type":"string"},"resolution":{"enum":["refund","replace","repair","price_reduction","none"],"type":"string"},"return_shipping_payer":{"enum":["buyer","seller","unknown"],"type":"string"}},"required":["lines"],"type":"object"},"OrderStatusPatch":{"properties":{"affects_stock_on_cancel":{"type":"boolean"},"buyer_name":{"maxLength":120,"type":["string","null"]},"canonical":{"type":"string"},"colour":{"enum":["zinc","sky","emerald","amber","indigo","teal","rose"],"type":"string"},"group_id":{"type":["string","null"]},"key":{"type":"string"},"name":{"maxLength":80,"minLength":1,"type":"string"},"position":{"minimum":0,"type":"integer"},"short_name":{"maxLength":40,"type":["string","null"]}},"type":"object"},"StockSettings":{"properties":{"stock_out_at":{"description":"The order status from which its reservations become sales (stock leaves the warehouse); default shipped.","enum":["accepted","ready_to_ship","shipped"],"type":"string"}},"required":["stock_out_at"],"type":"object"},"OrderMerge":{"properties":{"force_address":{"type":"boolean"},"source_ids":{"items":{"type":"string"},"type":"array"},"target_id":{"type":"string"}},"required":["target_id","source_ids"],"type":"object"},"ReturnPlan":{"description":"The `?dry_run=true` answer of createReturn. Nothing is persisted.","properties":{"diff":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"dry_run":{"const":true},"plan":{"properties":{"currency":{"type":"string"},"expected_refund_gross":{"type":"string"},"kind":{"type":"string"},"legal_basis":{"type":"string"},"lines":{"items":{"properties":{"line_id":{"type":"string"},"quantity":{"type":"integer"},"reason_code":{"type":"string"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}]},"unit_gross":{"type":"string"}},"required":["line_id","quantity","reason_code","sku","unit_gross"],"type":"object"},"type":"array"},"order_id":{"type":"string"},"refund_due_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_due_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["currency","expected_refund_gross","kind","legal_basis","lines","order_id","refund_due_at","response_due_at","warnings"],"type":"object"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["diff","dry_run","plan","warnings"],"type":"object"},"PartnerAnswer":{"properties":{"decision":{"enum":["confirm","reject"],"type":"string"},"quantities":{"additionalProperties":true,"description":"supplier SKU => confirmed pieces (confirm only)","type":"object"},"reason":{"type":["string","null"]}},"required":["decision"],"type":"object"},"MediaRestore":{"properties":{"version":{"minimum":1,"type":"integer"}},"required":["version"],"type":"object"},"OrderPaymentCreate":{"properties":{"amount":{"description":"Decimal; prefer a string.","type":["number","string"]},"comment":{"maxLength":1000,"type":"string"},"currency":{"type":"string"},"external_payment_id":{"maxLength":200,"minLength":1,"type":"string"},"kind":{"enum":["payment","refund","adjustment"],"type":"string"},"method":{"type":"string"},"occurred_at":{"type":"string"},"provider":{"type":"string"}},"required":["amount"],"type":"object"},"VariantComponents":{"properties":{"bundle_type":{"type":["string","null"]},"components":{"items":{"properties":{"allocation_weight":{"type":["number","string","null"]},"quantity":{"type":"integer"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["quantity"],"type":"object"},"type":["array","null"]}},"required":["components"],"type":"object"},"PurchaseOrder":{"properties":{"answered_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"invoices":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"kind":{"enum":["stock","dropship"],"type":"string"},"lines":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"number":{"anyOf":[{"type":"string"},{"type":"null"}]},"partner_order_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"placed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"received_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"reject_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"relay_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"sales_order_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"shipments":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"status":{"type":"string"},"supplier_id":{"type":"string"}},"required":["answered_at","currency","id","invoices","kind","lines","number","partner_order_number","placed_at","received_at","reject_reason","relay_error","sales_order_id","shipments","status","supplier_id"],"type":"object"},"InvoiceReconcile":{"properties":{"action":{"enum":["link","confirm_absent","recreate"],"type":"string"},"confirmed":{"type":"boolean"},"external_id":{"type":"string"},"external_type":{"type":"string"},"reference":{"type":"string"}},"required":["action"],"type":"object"},"Loose":{"additionalProperties":true,"description":"Free-form result, described in the operation; its shape varies by design.","type":"object"},"ContentWrite":{"properties":{"bullets":{"items":{"type":"string"},"type":["array","null"]},"description_html":{"type":["string","null"]},"parameters":{"additionalProperties":true,"type":["object","null"]},"title":{"type":["string","null"]}},"type":"object"},"OrderStatusGroupPatch":{"properties":{"name":{"maxLength":80,"minLength":1,"type":"string"},"position":{"minimum":0,"type":"integer"}},"type":"object"},"StockDocument":{"description":"A stock document (PZ / WZ / MM / KOR) with lines, number and status.","properties":{"actor":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"created_at":{"type":"string"},"id":{"type":"string"},"kind":{"enum":["receipt","issue","transfer","adjustment"],"type":"string"},"lines":{"items":{"properties":{"quantity":{"type":"integer"},"supplier_item_id":{"type":"string"},"unit_cost":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["quantity","supplier_item_id","unit_cost"],"type":"object"},"type":"array"},"location_id":{"type":"string"},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"number":{"anyOf":[{"type":"string"},{"type":"null"}]},"posted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["draft","posted"],"type":"string"},"target_location_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["actor","created_at","id","kind","lines","location_id","note","number","posted_at","status","target_location_id"],"type":"object"},"RuleCatalog":{"properties":{"actions":{"items":{"properties":{"available":{"type":"boolean"},"emits":{"items":{"type":"string"},"type":"array"},"key":{"type":"string"},"label":{"type":"string"},"legal_document":{"type":"boolean"},"params":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"reason":{"type":"string"},"spends_money":{"type":"boolean"},"subjects":{},"writes":{"items":{"type":"string"},"type":"array"}},"required":["available","emits","key","label","legal_document","params","spends_money","subjects","writes"],"type":"object"},"type":"array"},"fields":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"object"},"limits":{"properties":{"backfill_limit":{"type":"integer"},"max_actions":{"type":"integer"},"max_depth":{"type":"integer"},"max_retries":{"type":"integer"},"max_wait_days":{"type":"integer"},"max_waits":{"type":"integer"},"rate_limit_per_minute":{"type":"integer"},"retry_backoff_seconds":{"items":{"type":"integer"},"type":"array"},"run_retention_days":{"type":"integer"}},"required":["backfill_limit","max_actions","max_depth","max_retries","max_wait_days","max_waits","rate_limit_per_minute","retry_backoff_seconds","run_retention_days"],"type":"object"},"line_fields":{"items":{"properties":{"label":{"type":"string"},"ops":{"items":{"type":"string"},"type":"array"},"path":{"type":"string"},"type":{"type":"string"}},"required":["label","ops","path","type"],"type":"object"},"type":"array"},"paths":{"items":{"type":"string"},"type":"array"},"templates":{"items":{"properties":{"blockers":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"group":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"note":{"type":"string"},"questions":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"spends_money":{"type":"boolean"},"trigger":{"type":"string"}},"required":["blockers","group","key","name","note","questions","spends_money","trigger"],"type":"object"},"type":"array"},"triggers":{"items":{"properties":{"available":{"type":"boolean"},"key":{"type":"string"},"label":{"type":"string"},"reason":{"type":"string"},"subject":{"type":"string"}},"required":["available","key","label","subject"],"type":"object"},"type":"array"}},"required":["actions","fields","limits","line_fields","paths","templates","triggers"],"type":"object"},"PriceListCopy":{"example":{"price_list_key":"ACME-RON","steps":[{"op":"percent","params":{"pct":"10"}}]},"properties":{"fx":{"additionalProperties":true,"description":"{mode: fixed, rate} or {mode: daily, source: nbp, buffer_pct}; null when not needed","type":"object"},"price_list_id":{"type":"string"},"price_list_key":{"type":"string"},"steps":{"items":{"properties":{"op":{"enum":["percent","fixed_delta","multiplier","markup_on_cost","floor_margin","round"],"type":"string"},"params":{"additionalProperties":true,"description":"pct | amount | factor | mode, step","type":"object"},"selector":{"additionalProperties":true,"description":"category_id | brand | tag | sku_ids | base_gt | base_lte","type":"object"}},"required":["op"],"type":"object"},"type":"array"}},"type":"object"},"StockLevels":{"example":{"levels":[{"as_of":"2026-11-03T09:15:00Z","location_code":"MAG-1","on_hand":117,"sku":"FERM-30-KRAN"}]},"properties":{"levels":{"items":{"properties":{"as_of":{"description":"When the ERP counted it; an older report than the last applied one is ignored (stale).","format":"date-time","type":"string"},"bins":{"description":"Where in the warehouse the item lies (shelf/bin labels, e.g. A-01-03); replaces the previous ones. Omit to keep them.","items":{"type":"string"},"type":"array"},"location_code":{"description":"the seller's warehouse code","minLength":1,"type":"string"},"location_id":{"type":"string"},"on_hand":{"minimum":0,"type":"integer"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["on_hand"],"type":"object"},"maxItems":1000,"minItems":1,"type":"array"}},"required":["levels"],"type":"object"},"PriceEvaluation":{"description":"Pricing.evaluate result with its trace.","properties":{"compare_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"evaluated_at":{"type":"string"},"gross":{"anyOf":[{"type":"string"},{"type":"null"}]},"net":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"type":"string"},"source":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"tax_basis":{"anyOf":[{"type":"string"},{"type":"null"}]},"trace":{"items":{"properties":{"data":{},"input":{},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"output":{},"param":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"stage":{"type":"string"}},"required":["data","input","note","output","param","scope","stage"],"type":"object"},"type":"array"},"variant_id":{"type":"string"}},"required":["compare_at","currency","evaluated_at","gross","net","price","sku","source","tax_basis","trace","variant_id"],"type":"object"},"Event":{"description":"A public event: id (the DomainEvent id), type, occurred_at, data, api_version and causation_id when known. Types: bundle.availability.changed, bundle.updated, channel.order_rejected, content.updated, image.check_failed, import_job.completed, import_job.failed, invoice.attached, invoice.corrected, invoice.failed, invoice.issued, invoice.ksef_status_changed, invoice.rejected, listing.ended, listing.error, listing.exposure_changed, listing.published, listing.updated, order.cancelled, order.conflict, order.created, order.merged, order.paid, order.payment_changed, order.payment_recorded, order.ready_for_processing, order.split, order.status_changed, order.updated, price.changed, product.archived, product.created, product.updated, return.accepted, return.cancelled, return.completed, return.created, return.received, return.refund_recorded, return.rejected, rule.run.failed, rule.webhook, shipment.cancelled, shipment.created, shipment.delivered, shipment.exception, shipment.failed, shipment.label_ready, shipment.returned, shipment.status_changed, stock.changed, supplier.feed.completed, variant.created, variant.updated. bundle.availability.changed carries variant_id, sku, available, unlimited, previous_available, limited_by; webhooks also send ping.","properties":{"api_version":{"type":"string"},"causation_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"data":{"additionalProperties":true,"type":"object"},"id":{"type":"string"},"occurred_at":{"type":"string"},"type":{"enum":["bundle.availability.changed","bundle.updated","channel.order_rejected","content.updated","image.check_failed","import_job.completed","import_job.failed","invoice.attached","invoice.corrected","invoice.failed","invoice.issued","invoice.ksef_status_changed","invoice.rejected","listing.ended","listing.error","listing.exposure_changed","listing.published","listing.updated","order.cancelled","order.conflict","order.created","order.merged","order.paid","order.payment_changed","order.payment_recorded","order.ready_for_processing","order.split","order.status_changed","order.updated","price.changed","product.archived","product.created","product.updated","return.accepted","return.cancelled","return.completed","return.created","return.received","return.refund_recorded","return.rejected","rule.run.failed","rule.webhook","shipment.cancelled","shipment.created","shipment.delivered","shipment.exception","shipment.failed","shipment.label_ready","shipment.returned","shipment.status_changed","stock.changed","supplier.feed.completed","variant.created","variant.updated"],"type":"string"}},"required":["id","type","occurred_at","data","api_version"],"type":"object"},"NotificationLayout":{"properties":{"color":{"type":"string"},"connector_instance_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"footer":{"anyOf":[{"type":"string"},{"type":"null"}]},"header":{"anyOf":[{"type":"string"},{"type":"null"}]},"show_logo":{"type":"boolean"}},"required":["color","connector_instance_id","footer","header","show_logo"],"type":"object"},"BankTransaction":{"properties":{"amount":{"type":"string"},"applications":{"items":{"properties":{"amount":{"type":"string"},"order_id":{"type":"string"},"payment_id":{"type":"string"}},"required":["amount","order_id","payment_id"],"type":"object"},"type":"array"},"applied_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"bank_reference":{"anyOf":[{"type":"string"},{"type":"null"}]},"booked_on":{"type":"string"},"counterparty_account":{"anyOf":[{"type":"string"},{"type":"null"}]},"counterparty_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"type":"string"},"id":{"type":"string"},"match":{"anyOf":[{"enum":["exact","partial","suggested"],"type":"string"},{"type":"null"}]},"match_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"sales_order_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"statement_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["new","matched","applied","ignored"],"type":"string"},"title":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["amount","applications","applied_at","bank_reference","booked_on","counterparty_account","counterparty_name","currency","id","match","match_reason","sales_order_id","statement_id","status","title"],"type":"object"},"DomainWrite":{"properties":{"name":{"type":"string"},"uses":{"items":{"enum":["mail"],"type":"string"},"type":"array"}},"required":["name"],"type":"object"},"Product":{"properties":{"brand":{"type":["string","null"]},"category":{"type":["string","null"]},"category_id":{"type":["string","null"]},"category_path":{"items":{"type":"string"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"custom_fields":{"additionalProperties":true,"type":"object"},"description":{"type":["string","null"]},"id":{"format":"uuid","type":"string"},"key":{"type":["string","null"]},"manufacturer_code":{"type":["string","null"]},"media":{"description":"only with `fields=media`","items":{"type":"object"},"type":"array"},"name":{"type":"string"},"starred":{"type":"boolean"},"status":{"enum":["draft","active","archived"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"},"variants":{"items":{"$ref":"#/components/schemas/Variant"},"type":"array"},"version":{"type":"integer"}},"type":"object"},"SupplierItem":{"properties":{"active":{"type":"boolean"},"cost_source":{"enum":["this_supplier","other","none"],"type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"in_catalogue":{"type":"boolean"},"last_seen_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"list_net_price":{"anyOf":[{"type":"string"},{"type":"null"}]},"min_order_qty":{"type":"integer"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"net_price":{"anyOf":[{"type":"string"},{"type":"null"}]},"order_multiple":{"type":"integer"},"pack_size":{"type":"integer"},"previous_net_price":{"anyOf":[{"type":"string"},{"type":"null"}]},"price_changed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"priced_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"stock_as_of":{"anyOf":[{"type":"string"},{"type":"null"}]},"stock_band":{"anyOf":[{"type":"string"},{"type":"null"}]},"stock_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}]},"stock_vanished":{"type":"boolean"},"stocked_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplier_gtin":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplier_item_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"supplier_sku":{"type":"string"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"vat_rate":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["active","cost_source","currency","id","in_catalogue","last_seen_at","list_net_price","min_order_qty","name","net_price","order_multiple","pack_size","previous_net_price","price_changed_at","priced_at","stock_as_of","stock_band","stock_quantity","stock_vanished","stocked_at","supplier_gtin","supplier_item_id","supplier_sku","unit","vat_rate"],"type":"object"},"PriceListCalculation":{"example":{"from":"list","fx":{"buffer_pct":"2","mode":"daily","source":"nbp"},"price_list_key":"ACME-EUR","steps":[{"op":"percent","params":{"pct":"10"}},{"op":"round","params":{"mode":"end_99"}}]},"properties":{"from":{"enum":["entered","list","cost"],"type":"string"},"fx":{"additionalProperties":true,"description":"{mode: fixed, rate} or {mode: daily, source: nbp, buffer_pct}; null when not needed","type":"object"},"price_list_id":{"type":"string"},"price_list_key":{"type":"string"},"steps":{"items":{"properties":{"op":{"enum":["percent","fixed_delta","multiplier","markup_on_cost","floor_margin","round"],"type":"string"},"params":{"additionalProperties":true,"description":"pct | amount | factor | mode, step","type":"object"},"selector":{"additionalProperties":true,"description":"category_id | brand | tag | sku_ids | base_gt | base_lte","type":"object"}},"required":["op"],"type":"object"},"type":"array"}},"required":["from"],"type":"object"},"MailDomainWrite":{"properties":{"name":{"type":"string"}},"required":["name"],"type":"object"},"NetworkLink":{"properties":{"decided_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"dropship_open":{"type":"boolean"},"id":{"type":"string"},"partner":{"properties":{"contact_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"tenant_id":{"type":"string"}},"required":["tenant_id"],"type":"object"},"requested_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"enum":["supplier","reseller"],"type":"string"},"status":{"type":"string"},"via":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["decided_at","dropship_open","id","partner","requested_at","revoked_at","role","status","via"],"type":"object"},"CustomField":{"description":"A custom field definition. Values live in `custom_fields` of orders and products: text, number, boolean, date (YYYY-MM-DD), select (one of options) or file {upload_id, filename, content_type, url} (staged with POST /uploads; not published to marketplaces).","properties":{"archived":{"type":"boolean"},"created_at":{"type":"string"},"entity":{"enum":["order","product"],"type":"string"},"id":{"type":"string"},"key":{"type":"string"},"label":{"type":"string"},"options":{"oneOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"position":{"type":"integer"},"type":{"enum":["text","number","boolean","date","select","file"],"type":"string"},"updated_at":{"type":"string"}},"required":["archived","created_at","entity","id","key","label","options","position","type","updated_at"],"type":"object"},"MailDomain":{"properties":{"checked_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"checks":{"additionalProperties":{"type":"boolean"},"type":"object"},"dns_records":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"domain":{"type":"string"},"id":{"type":"string"},"ownership_record":{"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}},"required":["name","type","value"],"type":"object"},"ready":{"type":"boolean"},"status":{"enum":["pending","verified","failed"],"type":"string"},"verified_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["checked_at","checks","dns_records","domain","id","ready","status","verified_at"],"type":"object"},"ListingImages":{"properties":{"channel_images":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"channel_images_observed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"gallery":{"items":{"type":"string"},"type":"array"},"gallery_changed":{"type":"boolean"},"images":{"items":{"properties":{"channel_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"},"url":{"type":"string"}},"required":["channel_url","reason","state","url"],"type":"object"},"type":"array"},"listing_id":{"type":"string"},"warning":{"anyOf":[{"properties":{"detected_at":{"type":"string"},"extra":{"items":{"type":"string"},"type":"array"},"missing":{"items":{"type":"string"},"type":"array"},"reordered":{"type":"boolean"}},"required":["detected_at","extra","missing","reordered"],"type":"object"},{"type":"null"}]}},"required":["channel_images","channel_images_observed_at","gallery","gallery_changed","images","listing_id","warning"],"type":"object"},"Conversation":{"properties":{"awaiting":{"type":"string"},"buyer_login":{"anyOf":[{"type":"string"},{"type":"null"}]},"channel_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"connection_id":{"type":"string"},"decision_due_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"external_order_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"kind":{"type":"string"},"last_message_at":{"type":"string"},"messages":{"items":{"properties":{"attachments":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"author_login":{"anyOf":[{"type":"string"},{"type":"null"}]},"author_role":{"type":"string"},"delivery":{"type":"string"},"id":{"type":"string"},"sent_at":{"type":"string"},"text":{"type":"string"}},"required":["attachments","author_login","author_role","delivery","id","sent_at","text"],"type":"object"},"type":"array"},"messages_truncated":{"type":"boolean"},"opened_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"order_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"read":{"type":"boolean"},"reference_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"reply_due_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"text_removed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"}},"required":["awaiting","buyer_login","channel_status","connection_id","decision_due_at","external_order_id","id","kind","last_message_at","opened_at","order_id","read","reference_number","reply_due_at","status","subject","text_removed_at","updated_at"],"type":"object"},"SupplierWrite":{"properties":{"active":{"type":"boolean"},"columns":{"additionalProperties":true,"description":"CSV / generic XML: {sku, name, price, stock, ean, ...} => column or XPath","type":"object"},"currency":{"type":"string"},"feed_auth":{"additionalProperties":true,"description":"write-only, stored encrypted: {type: basic|bearer|query, ...} (see ImportProfileWrite)","type":"object"},"feed_url":{"type":["string","null"]},"format":{"enum":["ceneo_xml","iof","csv","generic_xml"],"type":"string"},"lead_time_days":{"minimum":0,"type":"integer"},"margin_rules":{"items":{"properties":{"markup_pct":{"type":["string","number"]},"multiplier":{"type":["string","number"]},"up_to":{"description":"Upper bound of the cost band (inclusive); null = open last tier.","type":["string","number","null"]}},"type":"object"},"type":"array"},"name":{"minLength":1,"type":"string"},"record_path":{"type":["string","null"]},"require_confirmation":{"type":"boolean"},"schedule":{"type":["string","null"]},"vanish_policy":{"enum":["ignore","zero_stock","archive","flag"],"type":"string"}},"type":"object"},"Problem":{"properties":{"code":{"type":"string"},"detail":{"type":"string"},"errors":{"items":{"additionalProperties":true,"description":"Domain errors add context keys (`parameter`, `guard`, `reason`, `shipment_id`, `invoice_id`, ...).","properties":{"attribute":{"type":"string"},"channel":{"type":"string"},"code":{"type":"string"},"locale":{"type":"string"},"message":{"type":"string"},"path":{"description":"JSON pointer, e.g. /variants/0/sku","type":"string"},"severity":{"enum":["error","warning"],"type":"string"}},"required":["code","message","severity"],"type":"object"},"type":"array"},"instance":{"type":"string"},"request_id":{"type":["string","null"]},"status":{"type":"integer"},"title":{"type":"string"},"type":{"format":"uri","type":"string"}},"required":["type","title","status","code"],"type":"object"},"ReturnAccept":{"properties":{"lines":{"items":{"properties":{"line_id":{"type":"string"},"quantity_accepted":{"minimum":0,"type":"integer"}},"required":["line_id","quantity_accepted"],"type":"object"},"type":"array"}},"type":"object"},"CatalogBatchResult":{"properties":{"dry_run":{"type":"boolean"},"results":{"items":{"properties":{"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"id":{"type":"string"},"index":{"type":"integer"},"key":{"type":"string"},"skipped":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"status":{"type":"string"}},"required":["index","key","status"],"type":"object"},"type":"array"},"summary":{"properties":{"created":{"type":"integer"},"error":{"type":"integer"},"unchanged":{"type":"integer"},"updated":{"type":"integer"}},"required":["created","error","unchanged","updated"],"type":"object"}},"required":["dry_run","results","summary"],"type":"object"},"ReportList":{"properties":{"data":{"items":{"properties":{"available":{"type":"boolean"},"columns":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"description":{"type":"string"},"id":{"type":"string"},"label_en":{"type":"string"},"label_pl":{"type":"string"},"needs_margin":{"type":"boolean"},"path":{"type":"string"}},"required":["available","columns","description","id","label_en","label_pl","needs_margin","path"],"type":"object"},"type":"array"},"filters":{"properties":{"basis":{"type":"string"},"cohort":{"type":"string"},"connector_instance_id":{"type":"string"},"convert_to_pln":{"type":"string"},"currency":{"type":"string"},"from":{"type":"string"},"group_by":{"type":"string"},"include_test":{"type":"string"},"market":{"type":"string"},"slow_days":{"type":"string"},"source":{"type":"string"},"to":{"type":"string"},"top_by":{"type":"string"}},"required":["basis","cohort","connector_instance_id","convert_to_pln","currency","from","group_by","include_test","market","slow_days","source","to","top_by"],"type":"object"}},"required":["data","filters"],"type":"object"},"ComplianceObject":{"anyOf":[{"properties":{"id":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","name","summary"],"type":"object"},{"$ref":"#/components/schemas/DryRun"}]},"PriceEvaluate":{"properties":{"buyer_account_id":{"type":["string","null"]},"connection_id":{"type":["string","null"]},"market":{"type":["string","null"]},"quantity":{"minimum":1,"type":"integer"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"type":"object"},"CustomerPatch":{"properties":{"note":{"type":["string","null"]},"tags":{"items":{"type":"string"},"type":"array"}},"type":"object"},"VariantPrices":{"properties":{"data":{"items":{"properties":{"amount":{"type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"max_qty":{"anyOf":[{"type":"integer"},{"type":"null"}]},"min_qty":{"type":"integer"},"price_list":{"anyOf":[{"type":"string"},{"type":"null"}]},"price_list_id":{"type":"string"},"valid_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"valid_to":{"anyOf":[{"type":"string"},{"type":"null"}]},"variant_id":{"type":"string"},"version":{"type":"integer"}},"required":["amount","currency","id","max_qty","min_qty","price_list","price_list_id","valid_from","valid_to","variant_id","version"],"type":"object"},"type":"array"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["data","sku","variant_id"],"type":"object"},"SupplierRun":{"properties":{"dry_run":{"type":"boolean"},"force":{"type":"boolean"}},"type":"object"},"ChannelMediaReplace":{"properties":{"overrides":{"items":{"properties":{"image_id":{"type":"string"},"mode":{"enum":["inherit","replace","hide"],"type":"string"},"position":{"minimum":0,"type":"integer"}},"required":["image_id","mode"],"type":"object"},"type":"array"}},"required":["overrides"],"type":"object"},"OrderLine":{"description":"One order line; bundle lines also carry `bundle_type` and the frozen `components`.","properties":{"bundle_type":{"type":"string"},"components":{"items":{"properties":{"allocation_basis":{"type":"string"},"explodes":{"type":"boolean"},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"quantity_per_bundle":{"type":"number"},"sku":{"oneOf":[{"type":"string"},{"type":"null"}]},"tax_rate":{"oneOf":[{"type":"string"},{"type":"null"}]},"unit_share_gross":{"oneOf":[{"type":"string"},{"type":"null"}]},"variant_id":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["allocation_basis","explodes","name","quantity_per_bundle","sku","tax_rate","unit_share_gross","variant_id"],"type":"object"},"type":"array"},"currency":{"oneOf":[{"type":"string"},{"type":"null"}]},"ean":{"oneOf":[{"type":"string"},{"type":"null"}]},"edited":{"type":"boolean"},"external_line_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"listing_ref":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"matched":{"type":"boolean"},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"origin_order_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"integer"},"sku":{"oneOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"},"supplier_item_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"tax_rate":{"description":"The line's VAT rate in percent (e.g. `23`); null when unknown.","oneOf":[{"type":"string"},{"type":"null"}]},"unit_price":{"oneOf":[{"type":"string"},{"type":"null"}]},"unit_price_net":{"description":"The unit net price the line was agreed at, when the channel sent one (a net-basis order's lines always have it); null otherwise.","oneOf":[{"type":"string"},{"type":"null"}]}},"required":["id","external_line_id","listing_ref","ean","sku","name","quantity","unit_price","unit_price_net","tax_rate","currency","state","edited","supplier_item_id","matched","origin_order_id"],"type":"object"},"RuleCreate":{"properties":{"actions":{"items":{"properties":{"on_error":{"enum":["stop","continue"],"type":"string"},"params":{"additionalProperties":true,"description":"parameters of the action (see the catalog)","type":"object"},"type":{"type":"string"},"when":{"additionalProperties":true,"description":"guard in the same grammar, evaluated on the live subject before the action","type":"object"}},"required":["type"],"type":"object"},"type":"array"},"description":{"type":["string","null"]},"group":{"type":["string","null"]},"manual":{"properties":{"confirm":{"type":"boolean"},"label":{"type":"string"},"statuses":{"items":{"description":"canonical statuses the button shows for; empty = all","type":"string"},"type":"array"}},"type":"object"},"max_per_day":{"description":"daily cap on matched runs (null = none)","maximum":100000,"minimum":1,"type":["integer","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"priority":{"maximum":10000,"minimum":0,"type":"integer"},"schedule":{"properties":{"cron":{"description":"trigger `schedule` only: minute hour day month weekday, in the company's time zone, at most four firings an hour","type":"string"}},"type":"object"},"scope":{"properties":{"channels":{"items":{"type":"string"},"type":"array"},"countries":{"items":{"description":"ISO 3166-1 alpha-2 of the market's country, e.g. `RO`","type":"string"},"type":"array"},"markets":{"items":{"description":"e.g. `emag-ro`, `allegro-pl` or `emag-*`","type":"string"},"type":"array"}},"type":"object"},"stop_further_rules":{"type":"boolean"},"trigger":{"type":"string"},"when":{"additionalProperties":true,"description":"conditions in the panel filter grammar: `{all|any: [node]}`, `{not: node}`, `{path, op, value}` leaves, `{lines: any|all|none|count, where: node}`","type":"object"}},"required":["name","trigger","actions"],"type":"object"},"Variant":{"properties":{"archived":{"type":"boolean"},"attributes":{"additionalProperties":true,"type":"object"},"bundle_type":{"enum":["virtual","assembled",null],"type":["string","null"]},"components":{"description":"The recipe of a bundle: variant_id, sku, quantity, allocation_weight.","items":{"additionalProperties":true,"type":"object"},"type":"array"},"created_at":{"format":"date-time","type":"string"},"dims":{"properties":{"height_mm":{"minimum":0,"type":["integer","null"]},"length_mm":{"minimum":0,"type":["integer","null"]},"width_mm":{"minimum":0,"type":["integer","null"]}},"type":"object"},"id":{"description":"The SupplierItem id.","format":"uuid","type":"string"},"identifiers":{"properties":{"brand_code":{"type":["string","null"]},"external":{"additionalProperties":true,"description":"connector id => external id; null removes a key","type":"object"},"gtin":{"type":["string","null"]},"mpn":{"type":["string","null"]},"sku":{"type":"string"}},"type":"object"},"moq":{"type":"integer"},"name":{"type":"string"},"order_multiple":{"type":"integer"},"prices":{"description":"only with `fields=prices`","items":{"type":"object"},"type":"array"},"product_id":{"format":"uuid","type":"string"},"sku":{"type":"string"},"stock":{"description":"only with `fields=stock`","properties":{"allocated":{"type":"integer"},"atp":{"type":"integer"},"derived":{"const":true},"limited_by":{},"on_hand":{"type":"integer"},"track_stock":{"const":false},"unlimited":{"const":true}},"type":"object"},"track_stock":{"description":"False for what has no stock number: services, digital goods. Stock writes are refused (`stock_not_tracked`) and orders reserve nothing.","type":"boolean"},"unit":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"vat_rate":{"type":["string","null"]},"version":{"description":"Moves when the variant, trade item or SKU record changes.","type":"integer"},"weight_g":{"type":["integer","null"]}},"type":"object"},"ShipmentConfirm":{"properties":{"confirmed":{"type":"boolean"}},"required":["confirmed"],"type":"object"},"NotificationPreviewRequest":{"properties":{"order_id":{"type":"string"}},"required":["order_id"],"type":"object"},"CategoryPatch":{"properties":{"name":{"minLength":1,"type":"string"},"parent_id":{"type":["string","null"]},"position":{"type":"integer"}},"type":"object"},"OrderStatusGroupCreate":{"properties":{"name":{"maxLength":80,"minLength":1,"type":"string"},"position":{"minimum":0,"type":"integer"}},"required":["name"],"type":"object"},"OrderAllocation":{"description":"The part of an order one warehouse holds. Sorted default warehouse first, then by name.","properties":{"lines":{"items":{"description":"`bundle_line_id` is the virtual bundle line a component row belongs to: on a component row it equals `line_id`, otherwise null.","properties":{"bundle_line_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"line_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":"integer"},"shortfall":{"type":"boolean"},"status":{"enum":["active","consumed"],"type":"string"},"supplier_item_id":{"type":"string"}},"required":["bundle_line_id","line_id","quantity","shortfall","status","supplier_item_id"],"type":"object"},"type":"array"},"location":{"properties":{"id":{"type":"string"},"kind":{"enum":["own","supplier"],"type":"string"},"name":{"type":"string"}},"required":["id","kind","name"],"type":"object"}},"required":["lines","location"],"type":"object"},"ListingWhy":{"description":"The availability and the price evaluation of one listing, each with its trace. `price` is `{error, trace: []}` when the listing is unmatched or has no price.","properties":{"availability":{"properties":{"evaluated_at":{"type":"string"},"handling_days":{"anyOf":[{"type":"integer"},{"type":"null"}]},"locked":{"type":"boolean"},"oos_action":{"anyOf":[{"type":"string"},{"type":"null"}]},"quantity":{"type":["integer","string","null"]},"trace":{"items":{"properties":{"input":{},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"output":{},"param":{"anyOf":[{"type":"string"},{"type":"null"}]},"rule_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"stage":{"type":"integer"}},"required":["input","note","output","param","rule_id","scope","stage"],"type":"object"},"type":"array"}},"required":["evaluated_at","handling_days","locked","oos_action","quantity","trace"],"type":"object"},"listing_id":{"type":"string"},"price":{"anyOf":[{"properties":{"compare_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"evaluated_at":{"type":"string"},"gross":{"anyOf":[{"type":"string"},{"type":"null"}]},"net":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"tax_basis":{"anyOf":[{"type":"string"},{"type":"null"}]},"trace":{"items":{"properties":{"data":{},"input":{},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"output":{},"param":{"anyOf":[{"type":"string"},{"type":"null"}]},"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"stage":{"type":"string"}},"required":["data","input","note","output","param","scope","stage"],"type":"object"},"type":"array"}},"required":["compare_at","currency","evaluated_at","gross","net","price","source","tax_basis","trace"],"type":"object"},{"properties":{"error":{"type":"string"},"trace":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["error","trace"],"type":"object"}]},"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["availability","listing_id","price","variant_id"],"type":"object"},"InvoiceIssue":{"properties":{"as_consumer":{"type":"boolean"},"confirm_duplicate":{"type":"boolean"},"connection_id":{"type":"string"},"kind":{"enum":["invoice","proforma"],"type":"string"},"overrides":{"properties":{"issue_date":{"type":"string"},"ksef":{"enum":["app_default","send","skip"],"type":"string"},"notes":{"type":"string"},"sale_date":{"type":"string"},"send_to_buyer":{"type":"boolean"}},"type":"object"}},"type":"object"},"MailShopWrite":{"properties":{"sender_address_id":{"type":["string","null"]}},"required":["sender_address_id"],"type":"object"},"ShipmentLink":{"properties":{"external_id":{"type":"string"},"external_type":{"type":"string"},"reference":{"type":"string"}},"type":"object"},"PriceReview":{"properties":{"decision":{"enum":["approve","reject"],"type":"string"}},"required":["decision"],"type":"object"},"Draft":{"properties":{"blocked":{"type":"boolean"},"connection_id":{"type":"string"},"created_at":{"type":"string"},"errors":{"items":{},"type":"array"},"id":{"type":"string"},"image_results":{"items":{"properties":{"channel_url":{"type":"string"},"index":{"type":"integer"},"reason":{"type":"string"},"source_url":{"type":"string"},"status":{"type":"string"}},"required":["index","source_url","status"],"type":"object"},"type":"array"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"listing_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"market":{"type":"string"},"payload":{"additionalProperties":true,"type":"object"},"revision":{"type":"integer"},"status":{"type":"string"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"variant_id":{"type":"string"}},"required":["blocked","connection_id","created_at","errors","id","image_results","last_error","listing_id","market","payload","revision","status","template_id","updated_at","variant_id"],"type":"object"},"SupplierItemsAddResult":{"properties":{"data":{"properties":{"added":{"type":"integer"},"linked":{"type":"integer"},"skipped":{"items":{"properties":{"reason":{"enum":["already_in_catalogue","inactive","no_price","currency_mismatch","not_imported","not_linked","cost_entry_failed","sku_conflict"],"type":"string"},"sku":{"type":"string"}},"required":["reason","sku"],"type":"object"},"type":"array"}},"required":["added","linked","skipped"],"type":"object"}},"required":["data"],"type":"object"},"PriceListWrite":{"example":{"currency":"EUR","name":"Hurt EUR","tax_basis":"net"},"properties":{"currency":{"pattern":"^[A-Z]{3}$","type":"string"},"default":{"type":"boolean"},"group_kind":{"enum":["retail","wholesale","channel"],"type":"string"},"key":{"maxLength":100,"minLength":1,"type":"string"},"kind":{"enum":["base","override","promo"],"type":"string"},"name":{"minLength":1,"type":"string"},"priority":{"type":"integer"},"status":{"enum":["draft","active","archived"],"type":"string"},"tax_basis":{"enum":["net","gross"],"type":"string"}},"type":"object"},"PriceEntriesResult":{"properties":{"dry_run":{"type":"boolean"},"price_list":{"properties":{"currency":{"type":"string"},"default":{"type":"boolean"},"group_kind":{"anyOf":[{},{"type":"null"}]},"id":{"type":"string"},"key":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"priority":{"type":"integer"},"status":{"type":"string"},"tax_basis":{"type":"string"}},"required":["currency","default","group_kind","id","key","kind","name","priority","status","tax_basis"],"type":"object"},"results":{"items":{"properties":{"entry":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"index":{"type":"integer"},"sku":{"type":"string"},"status":{"type":"string"}},"required":["index","sku","status"],"type":"object"},"type":"array"},"summary":{"properties":{"error":{"type":"integer"},"removed":{"type":"integer"},"set":{"type":"integer"},"unchanged":{"type":"integer"}},"required":["error","removed","set","unchanged"],"type":"object"}},"required":["dry_run","price_list","results","summary"],"type":"object"},"ImportProfileWrite":{"properties":{"blank_policy":{"enum":["ignore","erase"],"type":"string"},"connector_id":{"type":["string","null"]},"delta_hashing":{"type":"boolean"},"entity":{"enum":["product","offer","availability"],"type":"string"},"error_policy":{"enum":["reject_all","skip_rows","skip_values"],"type":"string"},"feed_auth":{"additionalProperties":true,"description":"credentials of the feed, write-only and stored encrypted: {type: basic, username, password} | {type: bearer, token} | {type: query, param, value}","type":"object"},"feed_url":{"type":["string","null"]},"format":{"enum":["csv","xlsx","json","ndjson","ceneo_xml","iof","generic_xml"],"type":"string"},"mapping":{"additionalProperties":true,"description":"field => column/path | [alternatives] | {from, transforms: [trim|upcase|downcase|first|map|split|join|unit|concat|replace|default|category_mapping], default}","type":"object"},"match_keys":{"items":{"enum":["sku","gtin","external_id","mpn_brand"],"type":"string"},"type":"array"},"mode":{"enum":["add_update","add_only","update_only"],"type":"string"},"name":{"minLength":1,"type":"string"},"options":{"additionalProperties":true,"description":"record_path, expand, locale, default_variant_name, receipt, location_id","type":"object"},"ownership":{"additionalProperties":true,"description":"{priority: integer, allow: [field | glob | group]}; manual edits are priority 100","type":"object"},"require_confirmation":{"description":"Scheduled runs wait for confirmation instead of auto-applying.","type":"boolean"},"schedule":{"description":"Cron (`M H DoM Mon DoW`, UTC) or @hourly / @daily / @weekly / @monthly; feeds only.","type":["string","null"]},"source_kind":{"enum":["file","inline","feed","connector"],"type":"string"},"supplier_id":{"type":["string","null"]},"vanish_policy":{"enum":["ignore","zero_stock","archive","flag"],"type":"string"}},"type":"object"},"ShippingServices":{"properties":{"carrier":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"data":{"items":{"properties":{"carrier":{"type":"string"},"cod_max":{"additionalProperties":true,"type":"object"},"countries":{"items":{"type":"string"},"type":"array"},"delivery_point_types":{"items":{"type":"string"},"type":"array"},"delivery_type":{"type":"string"},"dimensions_required":{"type":"boolean"},"dropoff_methods":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"insurance_max":{"additionalProperties":true,"type":"object"},"insurance_required_with_cod":{"type":"boolean"},"label_formats":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"limits":{"additionalProperties":true,"type":"object"},"max_parcels":{"type":"integer"},"name":{"type":"string"},"parcel_templates":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"pickup_supported":{"type":"boolean"},"requires_delivery_point":{"type":"boolean"},"supports_cod":{"type":"boolean"},"supports_insurance":{"type":"boolean"}},"required":["carrier","countries","delivery_type","dimensions_required","dropoff_methods","id","insurance_max","insurance_required_with_cod","label_formats","limits","max_parcels","name","pickup_supported","requires_delivery_point","supports_cod","supports_insurance"],"type":"object"},"type":"array"},"dispatch_methods":{"items":{"type":"string"},"type":"array"},"fetched_at":{"type":"string"},"stale":{"type":"boolean"}},"required":["carrier","data","dispatch_methods","fetched_at","stale"],"type":"object"},"WebhookDelivery":{"properties":{"attempts":{"type":"integer"},"created_at":{"type":"string"},"duration_ms":{"type":"integer"},"event_id":{"type":"string"},"event_type":{"type":"string"},"id":{"type":"string"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"next_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_body_excerpt":{"type":"string"},"response_code":{"type":"integer"},"status":{"type":"string"},"webhook_id":{"type":"string"}},"required":["attempts","created_at","duration_ms","event_id","event_type","id","last_error","next_attempt_at","response_body_excerpt","response_code","status","webhook_id"],"type":"object"},"OrderStatus":{"description":"A seller order status. Lists are `{data: [...]}`.","properties":{"affects_stock_on_cancel":{"type":"boolean"},"buyer_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"canonical":{"enum":["received","accepted","ready_to_ship","shipped","delivered","cancelled","returned"],"type":"string"},"colour":{"type":"string"},"colour_hex":{"oneOf":[{"type":"string"},{"type":"null"}]},"group_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"key":{"type":"string"},"locked":{"type":"boolean"},"name":{"type":"string"},"position":{"type":"integer"},"short_name":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["affects_stock_on_cancel","buyer_name","canonical","colour","colour_hex","group_id","id","key","locked","name","position","short_name"],"type":"object"},"NetworkImportResult":{"properties":{"import_job_id":{"type":"string"},"status":{"type":"string"}},"required":["import_job_id","status"],"type":"object"},"NotificationLayoutWrite":{"properties":{"color":{"type":"string"},"footer":{"type":["string","null"]},"header":{"type":["string","null"]},"show_logo":{"type":"boolean"}},"type":"object"},"ImportJobCreate":{"properties":{"auto_confirm":{"type":"boolean"},"dry_run":{"type":"boolean"},"force":{"description":"Feeds: ignore the stored ETag / content hash and process the feed anyway.","type":"boolean"},"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"profile":{"properties":{"blank_policy":{"enum":["ignore","erase"],"type":"string"},"connector_id":{"type":["string","null"]},"delta_hashing":{"type":"boolean"},"entity":{"enum":["product","offer","availability"],"type":"string"},"error_policy":{"enum":["reject_all","skip_rows","skip_values"],"type":"string"},"feed_auth":{"additionalProperties":true,"description":"credentials of the feed, write-only and stored encrypted: {type: basic, username, password} | {type: bearer, token} | {type: query, param, value}","type":"object"},"feed_url":{"type":["string","null"]},"format":{"enum":["csv","xlsx","json","ndjson","ceneo_xml","iof","generic_xml"],"type":"string"},"mapping":{"additionalProperties":true,"description":"field => column/path | [alternatives] | {from, transforms: [trim|upcase|downcase|first|map|split|join|unit|concat|replace|default|category_mapping], default}","type":"object"},"match_keys":{"items":{"enum":["sku","gtin","external_id","mpn_brand"],"type":"string"},"type":"array"},"mode":{"enum":["add_update","add_only","update_only"],"type":"string"},"name":{"minLength":1,"type":"string"},"options":{"additionalProperties":true,"description":"record_path, expand, locale, default_variant_name, receipt, location_id","type":"object"},"ownership":{"additionalProperties":true,"description":"{priority: integer, allow: [field | glob | group]}; manual edits are priority 100","type":"object"},"require_confirmation":{"description":"Scheduled runs wait for confirmation instead of auto-applying.","type":"boolean"},"schedule":{"description":"Cron (`M H DoM Mon DoW`, UTC) or @hourly / @daily / @weekly / @monthly; feeds only.","type":["string","null"]},"source_kind":{"enum":["file","inline","feed","connector"],"type":"string"},"supplier_id":{"type":["string","null"]},"vanish_policy":{"enum":["ignore","zero_stock","archive","flag"],"type":"string"}},"type":"object"},"profile_id":{"type":"string"},"source":{"properties":{"connector_id":{"type":"string"},"content":{"type":"string"},"content_base64":{"type":"string"},"format":{"enum":["csv","xlsx","json","ndjson","ceneo_xml","iof","generic_xml"],"type":"string"},"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"kind":{"enum":["inline","file_ref","url","connector"],"type":"string"},"name":{"type":"string"},"ndjson":{"type":"string"},"upload_id":{"description":"A staged upload (`POST /uploads`) for `kind: file_ref`.","type":"string"},"url":{"type":"string"}},"required":["kind"],"type":"object"}},"type":"object"},"OrderSplit":{"properties":{"move_shipping":{"type":"boolean"},"parts":{"items":{"properties":{"line_id":{"type":"string"},"quantity":{"minimum":1,"type":"integer"}},"required":["line_id","quantity"],"type":"object"},"type":"array"}},"required":["parts"],"type":"object"},"StockLevelsResult":{"properties":{"dry_run":{"type":"boolean"},"results":{"items":{"properties":{"delta":{"type":"integer"},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"index":{"type":"integer"},"location_code":{"type":"string"},"on_hand":{"type":"integer"},"sku":{"type":"string"},"status":{"type":"string"}},"required":["index","sku","status"],"type":"object"},"type":"array"},"summary":{"properties":{"error":{"type":"integer"},"set":{"type":"integer"},"stale":{"type":"integer"},"unchanged":{"type":"integer"}},"required":["error","set","stale","unchanged"],"type":"object"}},"required":["dry_run","results","summary"],"type":"object"},"Rule":{"properties":{"actions":{"items":{"properties":{"params":{"additionalProperties":true,"type":"object"},"type":{"type":"string"},"when":{"additionalProperties":true,"type":"object"}},"required":["params","type"],"type":"object"},"type":"array"},"blockers":{"items":{"properties":{"key":{"type":"string"},"path":{"type":"string"},"reason":{"type":"string"}},"required":["key","path","reason"],"type":"object"},"type":"array"},"created_at":{"type":"string"},"created_by":{"anyOf":[{"properties":{"credential_id":{"type":"string"},"granted_by_membership_id":{"type":"string"},"key_id":{"type":"string"},"label":{"type":"string"},"on_behalf_of":{"type":"string"},"type":{"type":"string"}},"required":["credential_id","key_id","label","type"],"type":"object"},{"type":"null"}]},"created_from":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"enabled":{"type":"boolean"},"failure_streak":{"type":"integer"},"group":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"manual":{"properties":{"label":{"type":"string"}},"required":[],"type":"object"},"max_per_day":{"anyOf":[{"type":"integer"},{"type":"null"}]},"name":{"type":"string"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"pause_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"paused_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"integer"},"schedule":{"properties":{"cron":{"type":"string"}},"required":[],"type":"object"},"scope":{"properties":{"countries":{"items":{"type":"string"},"type":"array"}},"required":[],"type":"object"},"stats_7d":{"properties":{"last_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"matched":{"type":"integer"},"runs":{"type":"integer"}},"required":["last_error","matched","runs"],"type":"object"},"stop_further_rules":{"type":"boolean"},"trigger":{"type":"string"},"updated_at":{"type":"string"},"updated_by":{"anyOf":[{"properties":{"credential_id":{"type":"string"},"granted_by_membership_id":{"type":"string"},"key_id":{"type":"string"},"label":{"type":"string"},"on_behalf_of":{"type":"string"},"type":{"type":"string"}},"required":["credential_id","key_id","label","type"],"type":"object"},{"type":"null"}]},"version":{"type":"integer"},"warnings":{"items":{"properties":{"code":{"type":"string"},"detail":{"additionalProperties":true,"type":"object"},"path":{"type":"string"},"rule_id":{"type":"string"},"rule_name":{"type":"string"}},"required":["code","detail","path","rule_id","rule_name"],"type":"object"},"type":"array"},"when":{"properties":{"not":{"properties":{"any":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["any"],"type":"object"},"op":{"type":"string"},"path":{"type":"string"},"value":{"type":"string"}},"required":[],"type":"object"}},"required":["actions","blockers","created_at","created_by","created_from","description","enabled","failure_streak","group","id","manual","max_per_day","name","pause_reason","paused_at","priority","schedule","scope","stop_further_rules","trigger","updated_at","updated_by","version","when"],"type":"object"},"OrderTimelineEntry":{"properties":{"actor":{"properties":{"label":{"type":"string"},"type":{"type":"string"}},"required":["type"],"type":"object"},"at":{"type":"string"},"kind":{"enum":["event","note","stock","sync"],"type":"string"},"payload":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"title":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["actor","at","kind","payload","title"],"type":"object"},"MailAddressWrite":{"properties":{"default":{"type":"boolean"},"local_part":{"type":"string"},"name":{"type":"string"},"reply_to":{"type":["string","null"]},"sender_domain_id":{"type":"string"}},"type":"object"},"CustomerMerge":{"properties":{"source_id":{"type":"string"}},"required":["source_id"],"type":"object"},"ChannelMediaSet":{"properties":{"mode":{"enum":["inherit","replace","hide"],"type":"string"},"position":{"minimum":0,"type":"integer"}},"required":["mode"],"type":"object"},"ReturnRefundVoid":{"properties":{"reason":{"type":"string"}},"required":["reason"],"type":"object"},"Invoice":{"description":"An invoice (a legal document issued by the seller's accounting app, or registered from an ERP with registerExternalInvoice; Core never allocates a number). `GET /invoices/{id}` adds lines, tax_trace, tax_breakdown, reconcile and history. `version` is the ETag.","properties":{"order_drift":{"type":"boolean"},"net_amount":{"oneOf":[{"type":"string"},{"type":"null"}]},"pdf_available":{"type":"boolean"},"tax_trace":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"links":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"sale_date":{"oneOf":[{"type":"string"},{"type":"null"}]},"kind":{"enum":["invoice","correction","proforma"],"type":"string"},"order_id":{"type":"string"},"trigger":{"oneOf":[{"type":"string"},{"type":"null"}]},"source":{"enum":["app","external"],"type":"string"},"price_basis":{"enum":["gross","net"],"type":"string"},"ksef":{"properties":{"errors":{"items":{"properties":{"code":{"oneOf":[{"type":"string"},{"type":"null"}]},"message":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["code","message"],"type":"object"},"type":"array"},"number":{"oneOf":[{"type":"string"},{"type":"null"}]},"sent_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"verification_link":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["errors","number","sent_at","status","verification_link"],"type":"object"},"channel_attach":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"amount_mismatch":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"buyer":{"properties":{"company":{"oneOf":[{"type":"string"},{"type":"null"}]},"country":{"oneOf":[{"type":"string"},{"type":"null"}]},"kind":{"oneOf":[{"type":"string"},{"type":"null"}]},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"tax_ids":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["company","country","kind","name","tax_ids"],"type":"object"},"history":{"items":{"properties":{"at":{"type":"string"},"data":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"kind":{"type":"string"}},"required":["at","data","kind"],"type":"object"},"type":"array"},"status":{"enum":["submitting","pending","issued","rejected","failed","ambiguous","superseded"],"type":"string"},"updated_at":{"type":"string"},"id":{"type":"string"},"due_date":{"oneOf":[{"type":"string"},{"type":"null"}]},"number":{"oneOf":[{"type":"string"},{"type":"null"}]},"tax_amount":{"oneOf":[{"type":"string"},{"type":"null"}]},"currency":{"oneOf":[{"type":"string"},{"type":"null"}]},"lines":{"items":{"properties":{"kind":{"type":"string"},"name":{"oneOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"integer"},"quantity":{"type":"number"},"sku":{"oneOf":[{"type":"string"},{"type":"null"}]},"tax_rate":{"oneOf":[{"type":"string"},{"type":"null"}]},"tax_symbol":{"oneOf":[{"type":"string"},{"type":"null"}]},"unit_price_gross":{"oneOf":[{"type":"string"},{"type":"null"}]},"unit_price_net":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","name","position","quantity","sku","tax_rate","tax_symbol","unit_price_gross","unit_price_net"],"type":"object"},"type":"array"},"invoice_ref":{"oneOf":[{"properties":{"external_id":{"type":"string"},"external_type":{"type":"string"}},"required":["external_id","external_type"],"type":"object"},{"type":"null"}]},"payment":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"expected_gross":{"oneOf":[{"type":"string"},{"type":"null"}]},"reconcile":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"gross_amount":{"oneOf":[{"type":"string"},{"type":"null"}]},"warnings":{"oneOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}]},"stale":{"type":"boolean"},"last_error":{"oneOf":[{"properties":{"code":{"oneOf":[{"type":"string"},{"type":"null"}]},"message":{"oneOf":[{"type":"string"},{"type":"null"}]},"pointers":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["code","message","pointers"],"type":"object"},{"type":"null"}]},"parent_invoice_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"issue_date":{"oneOf":[{"type":"string"},{"type":"null"}]},"tax_breakdown":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"connection_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"version":{"oneOf":[{"type":["string","integer"]},{"type":"null"}]}},"required":["amount_mismatch","buyer","channel_attach","connection_id","created_at","currency","due_date","expected_gross","gross_amount","id","invoice_ref","issue_date","kind","ksef","last_error","links","net_amount","number","order_drift","order_id","parent_invoice_id","payment","pdf_available","price_basis","sale_date","source","stale","status","tax_amount","trigger","updated_at","version","warnings"],"type":"object"},"NotificationPreview":{"properties":{"html":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"type":"string"}},"required":["html","subject","text"],"type":"object"},"WebhookWrite":{"properties":{"active":{"type":"boolean"},"api_version":{"type":"string"},"description":{"type":["string","null"]},"types":{"items":{"type":"string"},"type":"array"},"url":{"maxLength":2048,"minLength":1,"type":"string"}},"type":"object"},"ShipmentBulkExecute":{"properties":{"order_ids":{"items":{"type":"string"},"type":"array"},"plan_id":{"type":"string"}},"required":["plan_id"],"type":"object"},"PriceListCreate":{"properties":{"currency":{"pattern":"^[A-Z]{3}$","type":"string"},"default":{"type":"boolean"},"group_kind":{"enum":["retail","wholesale","channel"],"type":"string"},"key":{"maxLength":100,"minLength":1,"type":"string"},"kind":{"enum":["base","override","promo"],"type":"string"},"name":{"minLength":1,"type":"string"},"priority":{"type":"integer"},"status":{"enum":["draft","active","archived"],"type":"string"},"tax_basis":{"enum":["net","gross"],"type":"string"}},"required":["name","currency"],"type":"object"},"ReturnCancel":{"properties":{"reason":{"type":"string"}},"type":"object"},"RuleTemplateInstall":{"properties":{"answers":{"additionalProperties":true,"description":"answers keyed by the template's question keys (see `questions` in GET /rules/catalog)","type":"object"}},"type":"object"},"OrderStatusChange":{"properties":{"force":{"description":"Allow a move back along the chain (e.g. shipped -> accepted). Needs scope `orders:admin`; audited.","type":"boolean"},"note":{"type":"string"},"status":{"enum":["received","accepted","ready_to_ship","shipped","delivered","cancelled","returned"],"type":"string"},"status_id":{"type":"string"}},"type":"object"},"PriceList":{"properties":{"calculation":{"anyOf":[{"properties":{"from":{"type":"string"},"fx":{"anyOf":[{"properties":{"mode":{"type":"string"},"rate":{"type":"string"}},"required":["mode","rate"],"type":"object"},{"type":"null"}]},"price_list_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"price_list_key":{"anyOf":[{"type":"string"},{"type":"null"}]},"steps":{"items":{"additionalProperties":true,"type":"object"},"type":"array"}},"required":["from","fx","price_list_id","price_list_key","steps"],"type":"object"},{"type":"null"}]},"currency":{"type":"string"},"default":{"type":"boolean"},"entries_count":{"type":"integer"},"group_kind":{"anyOf":[{},{"type":"null"}]},"id":{"type":"string"},"key":{"type":"string"},"kind":{"type":"string"},"name":{"type":"string"},"priority":{"type":"integer"},"status":{"type":"string"},"tax_basis":{"type":"string"},"used_in":{"items":{"properties":{"connection_id":{"type":"string"},"market":{"type":"string"},"scope":{"type":"string"}},"required":["scope"],"type":"object"},"type":"array"}},"required":["calculation","currency","default","entries_count","group_kind","id","key","kind","name","priority","status","tax_basis","used_in"],"type":"object"},"RuleRunLog":{"additionalProperties":true,"description":"Its shape varies by design (the trace and the actions differ per rule). One rule considering one subject for one trigger occurrence: rule_id, rule_name, rule_version, trigger, subject {type, id}, event_id, origin (event, manual, backfill), decision (matched, not_matched, out_of_scope, loop_blocked, stopped), status (running, waiting, completed, failed), reason, trace (the condition tree with each leaf's expected and actual value), actions [{index, type, outcome ok|skipped|failed|waiting, reason, detail}], depth, parent_run_id, started_by, error, resume_at.","type":"object"},"Supplier":{"properties":{"active":{"type":"boolean"},"cost_list_id":{"type":"string"},"created_at":{"type":"string"},"currency":{"type":"string"},"feed_auth_set":{"type":"boolean"},"feed_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"lead_time_days":{"type":"integer"},"location_id":{"type":"string"},"margin_rules":{"items":{"properties":{"markup_pct":{"type":"string"},"multiplier":{"type":"string"},"up_to":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["up_to"],"type":"object"},"type":"array"},"name":{"type":"string"},"next_run_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"price_list_id":{"type":"string"},"profile_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"require_confirmation":{"type":"boolean"},"schedule":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"vanish_policy":{"type":"string"}},"required":["active","cost_list_id","created_at","currency","feed_auth_set","feed_url","format","id","lead_time_days","location_id","margin_rules","name","next_run_at","price_list_id","profile_id","require_confirmation","schedule","updated_at","vanish_policy"],"type":"object"},"SupplierItemPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SupplierItem"},"type":"array"},"meta":{"properties":{"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}},"required":["limit","offset","total"],"type":"object"}},"required":["data","meta"],"type":"object"},"RuleRunRequest":{"properties":{"days":{"maximum":90,"minimum":1,"type":"integer"},"order_ids":{"items":{"type":"string"},"maxItems":500,"type":"array"}},"type":"object"},"Media":{"properties":{"ai_generated":{"type":"boolean"},"alt":{"anyOf":[{"type":"string"},{"type":"null"}]},"byte_size":{"type":"integer"},"check_error":{"anyOf":[{"type":"string"},{"type":"null"}]},"check_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"checksum":{"type":"string"},"content_type":{"type":"string"},"created_at":{"type":"string"},"file_revision":{"type":"integer"},"height":{"type":"integer"},"hosted":{"type":"boolean"},"id":{"type":"string"},"position":{"type":"integer"},"product_id":{"type":"string"},"thumbnails":{"anyOf":[{},{"type":"null"}]},"updated_at":{"type":"string"},"url":{"type":"string"},"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"version":{"type":"integer"},"width":{"type":"integer"}},"required":["ai_generated","alt","byte_size","check_error","check_status","checksum","content_type","created_at","file_revision","height","hosted","id","position","product_id","thumbnails","updated_at","url","variant_id","version","width"],"type":"object"},"MediaOrder":{"properties":{"ids":{"items":{"type":"string"},"type":"array"}},"required":["ids"],"type":"object"},"BankStatementUpload":{"properties":{"content_base64":{"type":"string"},"file_name":{"type":"string"},"format":{"enum":["camt053","mt940","csv"],"type":"string"},"mapping":{"additionalProperties":true,"description":"CSV only: header per field (date, amount, currency, counterparty, account, title, reference), skip, date_format (ymd/dmy), delimiter, currency_code","type":"object"}},"required":["file_name","content_base64"],"type":"object"},"RuleDryRun":{"properties":{"days":{"maximum":90,"minimum":1,"type":"integer"},"limit":{"maximum":500,"minimum":1,"type":"integer"}},"type":"object"},"InvoicingAttention":{"properties":{"data":{"properties":{"ambiguous":{"type":"integer"},"amount_mismatch":{"type":"integer"},"attach_failed":{"type":"integer"},"failed":{"type":"integer"},"ksef_rejected":{"type":"integer"},"order_drift":{"type":"integer"},"rejected":{"type":"integer"},"stale":{"type":"integer"}},"required":["ambiguous","amount_mismatch","attach_failed","failed","ksef_rejected","order_drift","rejected","stale"],"type":"object"}},"required":["data"],"type":"object"},"Category":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"position":{"type":"integer"}},"required":["id","name","parent_id","position"],"type":"object"},"DocumentPost":{"properties":{"allow_negative":{"type":"boolean"}},"type":"object"},"DraftCreate":{"properties":{"allow_duplicate":{"type":"boolean"},"connection_id":{"type":"string"},"sku":{"type":"string"},"template_id":{"type":["string","null"]},"variant_id":{"type":"string"}},"required":["connection_id"],"type":"object"},"CatalogItem":{"properties":{"brand":{"type":["string","null"]},"category":{"type":["string","null"]},"category_id":{"type":["string","null"]},"category_path":{"items":{"type":"string"},"type":"array"},"custom_fields":{"additionalProperties":true,"description":"Custom field values by key (a merge patch: null removes). Validated against /custom-fields.","type":"object"},"description":{"type":["string","null"]},"key":{"maxLength":255,"minLength":1,"type":"string"},"manufacturer_code":{"type":["string","null"]},"media":{"items":{"properties":{"alt":{"type":["string","null"]},"url":{"minLength":1,"type":"string"},"variant_id":{"type":["string","null"]}},"required":["url"],"type":"object"},"type":"array"},"mode":{"description":"How lists in this body combine with the stored ones: `merge` by key (default) or `replace`.","enum":["merge","replace"],"type":"string"},"name":{"minLength":1,"type":"string"},"starred":{"type":"boolean"},"status":{"enum":["draft","active","archived"],"type":"string"},"tags":{"items":{"type":"string"},"type":"array"},"variants":{"items":{"properties":{"archived":{"type":"boolean"},"attributes":{"additionalProperties":true,"description":"free-form variant attributes; null removes a key","type":"object"},"bundle_type":{"type":["string","null"]},"components":{"items":{"properties":{"allocation_weight":{"type":["number","string","null"]},"quantity":{"type":"integer"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["quantity"],"type":"object"},"type":["array","null"]},"content":{"additionalProperties":{"properties":{"bullets":{"items":{"type":"string"},"type":["array","null"]},"description_html":{"type":["string","null"]},"parameters":{"additionalProperties":true,"type":["object","null"]},"title":{"type":["string","null"]}},"type":"object"},"description":"Translations of this variant: locale (e.g. `pl-PL`, `en-GB`) => content fields (general scope).","properties":{},"type":"object"},"dims":{"properties":{"height_mm":{"minimum":0,"type":["integer","null"]},"length_mm":{"minimum":0,"type":["integer","null"]},"width_mm":{"minimum":0,"type":["integer","null"]}},"type":"object"},"identifiers":{"properties":{"brand_code":{"type":["string","null"]},"external":{"additionalProperties":true,"description":"connector id => external id; null removes a key","type":"object"},"gtin":{"type":["string","null"]},"mpn":{"type":["string","null"]},"sku":{"type":"string"}},"type":"object"},"moq":{"minimum":1,"type":"integer"},"name":{"type":"string"},"order_multiple":{"minimum":1,"type":"integer"},"prices":{"items":{"properties":{"amount":{"description":"Decimal (prefer a string); null removes the tier.","type":["number","string","null"]},"max_qty":{"minimum":1,"type":["integer","null"]},"min_qty":{"minimum":1,"type":"integer"},"price_list_id":{"type":"string"},"price_list_key":{"minLength":1,"type":"string"},"valid_from":{"description":"ISO 8601 date or timestamp. Without it the tier is the list's standing price; with it a dated price (e.g. a promotion) preferred inside its window.","type":["string","null"]},"valid_to":{"description":"ISO 8601 date or timestamp (exclusive).","type":["string","null"]}},"required":["amount"],"type":"object"},"type":"array"},"sku":{"minLength":1,"type":"string"},"stock":{"items":{"properties":{"as_of":{"description":"When the ERP counted it; an older report than the last applied one is ignored (stale).","format":"date-time","type":"string"},"bins":{"description":"Where in the warehouse the item lies (shelf/bin labels, e.g. A-01-03); replaces the previous ones. Omit to keep them.","items":{"type":"string"},"type":"array"},"location_code":{"description":"the seller's warehouse code","minLength":1,"type":"string"},"location_id":{"type":"string"},"on_hand":{"minimum":0,"type":"integer"}},"required":["on_hand"],"type":"object"},"type":"array"},"track_stock":{"type":"boolean"},"unit":{"type":"string"},"vat_rate":{"type":["number","string","null"]},"weight_g":{"minimum":0,"type":["integer","null"]}},"required":["sku"],"type":"object"},"type":"array"}},"required":["key"],"type":"object"},"InvoicePlan":{"description":"The `?dry_run=true` answer of issueInvoice: the exact request, the tax trace, warnings and blockers. Nothing is persisted and the app is not called.","properties":{"diff":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"dry_run":{"const":true},"plan":{"properties":{"blocked_by":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"expected_total":{"anyOf":[{"properties":{"amount":{"type":"string"},"currency":{"type":"string"}},"required":["amount","currency"],"type":"object"},{"type":"null"}]},"kind":{"type":"string"},"ok":{"type":"boolean"},"order_id":{"type":"string"},"order_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"request":{"additionalProperties":true,"type":"object"},"tax_trace":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"trigger":{"type":"string"},"warnings":{"items":{},"type":"array"}},"required":["blocked_by","connection_id","expected_total","kind","ok","order_id","order_number","request","tax_trace","trigger","warnings"],"type":"object"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["diff","dry_run","plan","warnings"],"type":"object"},"MediaItem":{"properties":{"alt":{"type":["string","null"]},"url":{"minLength":1,"type":"string"},"variant_id":{"type":["string","null"]}},"required":["url"],"type":"object"},"InvoiceExternal":{"properties":{"attach_to_channel":{"type":"boolean"},"corrects_number":{"type":"string"},"currency":{"type":"string"},"file_base64":{"type":"string"},"file_name":{"type":"string"},"gross_amount":{"description":"Decimal; prefer a string.","type":["number","string"]},"issue_date":{"format":"date","type":"string"},"kind":{"enum":["invoice","correction"],"type":"string"},"ksef_number":{"type":"string"},"net_amount":{"description":"Decimal; prefer a string.","type":["number","string"]},"number":{"maxLength":64,"minLength":1,"type":"string"},"parent_invoice_id":{"type":"string"},"replace":{"type":"boolean"},"sale_date":{"format":"date","type":"string"},"source_connection_id":{"type":"string"},"tax_amount":{"description":"Decimal; prefer a string.","type":["number","string"]}},"required":["number","issue_date","gross_amount","file_base64"],"type":"object"},"VariantItem":{"properties":{"archived":{"type":"boolean"},"attributes":{"additionalProperties":true,"description":"free-form variant attributes; null removes a key","type":"object"},"bundle_type":{"type":["string","null"]},"components":{"items":{"properties":{"allocation_weight":{"type":["number","string","null"]},"quantity":{"type":"integer"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["quantity"],"type":"object"},"type":["array","null"]},"dims":{"properties":{"height_mm":{"minimum":0,"type":["integer","null"]},"length_mm":{"minimum":0,"type":["integer","null"]},"width_mm":{"minimum":0,"type":["integer","null"]}},"type":"object"},"identifiers":{"properties":{"brand_code":{"type":["string","null"]},"external":{"additionalProperties":true,"description":"connector id => external id; null removes a key","type":"object"},"gtin":{"type":["string","null"]},"mpn":{"type":["string","null"]},"sku":{"type":"string"}},"type":"object"},"moq":{"minimum":1,"type":"integer"},"name":{"type":"string"},"order_multiple":{"minimum":1,"type":"integer"},"sku":{"minLength":1,"type":"string"},"track_stock":{"type":"boolean"},"unit":{"type":"string"},"vat_rate":{"type":["number","string","null"]},"weight_g":{"minimum":0,"type":["integer","null"]}},"required":["sku"],"type":"object"},"ShippingAttention":{"properties":{"data":{"properties":{"ambiguous":{"type":"integer"},"cancel_refused":{"type":"integer"},"exception":{"type":"integer"},"failed":{"type":"integer"},"held_by_cap":{"type":"integer"},"order_cancelled":{"type":"integer"},"push_failed":{"type":"integer"},"stale_pending":{"type":"integer"},"tracking_expired":{"type":"integer"},"tracking_missing":{"type":"integer"}},"required":["ambiguous","cancel_refused","exception","failed","held_by_cap","order_cancelled","push_failed","stale_pending","tracking_expired","tracking_missing"],"type":"object"}},"required":["data"],"type":"object"},"OrderNote":{"properties":{"actor":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"body":{"type":"string"},"created_at":{"type":"string"},"id":{"type":"string"},"pinned":{"type":"boolean"}},"required":["actor","body","created_at","id","pinned"],"type":"object"},"NotificationDelivery":{"properties":{"channel":{"enum":["email","sms"],"type":"string"},"customer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string"},"inserted_at":{"type":"string"},"outcome":{"anyOf":[{"enum":["delivered","bounced","complained","deferred"],"type":"string"},{"type":"null"}]},"outcome_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"recipient":{"anyOf":[{"type":"string"},{"type":"null"}]},"sales_order_id":{"type":"string"},"sender":{"anyOf":[{"type":"string"},{"type":"null"}]},"sent_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"enum":["queued","sent","failed","skipped","captured"],"type":"string"},"template_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"template_name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["channel","customer_id","id","inserted_at","outcome","outcome_at","reason","recipient","sales_order_id","sender","sent_at","source","status","template_id","template_name"],"type":"object"},"RuleWrite":{"properties":{"actions":{"items":{"properties":{"on_error":{"enum":["stop","continue"],"type":"string"},"params":{"additionalProperties":true,"description":"parameters of the action (see the catalog)","type":"object"},"type":{"type":"string"},"when":{"additionalProperties":true,"description":"guard in the same grammar, evaluated on the live subject before the action","type":"object"}},"required":["type"],"type":"object"},"type":"array"},"description":{"type":["string","null"]},"group":{"type":["string","null"]},"manual":{"properties":{"confirm":{"type":"boolean"},"label":{"type":"string"},"statuses":{"items":{"description":"canonical statuses the button shows for; empty = all","type":"string"},"type":"array"}},"type":"object"},"max_per_day":{"description":"daily cap on matched runs (null = none)","maximum":100000,"minimum":1,"type":["integer","null"]},"name":{"maxLength":120,"minLength":1,"type":"string"},"priority":{"maximum":10000,"minimum":0,"type":"integer"},"schedule":{"properties":{"cron":{"description":"trigger `schedule` only: minute hour day month weekday, in the company's time zone, at most four firings an hour","type":"string"}},"type":"object"},"scope":{"properties":{"channels":{"items":{"type":"string"},"type":"array"},"countries":{"items":{"description":"ISO 3166-1 alpha-2 of the market's country, e.g. `RO`","type":"string"},"type":"array"},"markets":{"items":{"description":"e.g. `emag-ro`, `allegro-pl` or `emag-*`","type":"string"},"type":"array"}},"type":"object"},"stop_further_rules":{"type":"boolean"},"trigger":{"type":"string"},"when":{"additionalProperties":true,"description":"conditions in the panel filter grammar: `{all|any: [node]}`, `{not: node}`, `{path, op, value}` leaves, `{lines: any|all|none|count, where: node}`","type":"object"}},"type":"object"},"ImportProfile":{"properties":{"blank_policy":{"type":"string"},"connector_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"delta_hashing":{"type":"boolean"},"entity":{"type":"string"},"error_policy":{"type":"string"},"feed_auth_set":{"type":"boolean"},"feed_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"format":{"type":"string"},"id":{"type":"string"},"last_content_hash":{"anyOf":[{},{"type":"null"}]},"mapping":{"properties":{"name":{"properties":{"from":{"type":"string"},"transforms":{"items":{"type":"string"},"type":"array"}},"required":["from","transforms"],"type":"object"},"sku":{"type":"string"}},"required":[],"type":"object"},"match_keys":{"items":{"type":"string"},"type":"array"},"mode":{"type":"string"},"name":{"type":"string"},"next_run_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"options":{"additionalProperties":true,"type":"object"},"ownership":{"additionalProperties":true,"type":"object"},"require_confirmation":{"type":"boolean"},"schedule":{"anyOf":[{},{"type":"null"}]},"source_kind":{"type":"string"},"supplier_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"vanish_policy":{"type":"string"}},"required":["blank_policy","connector_id","created_at","delta_hashing","entity","error_policy","feed_auth_set","feed_url","format","id","last_content_hash","mapping","match_keys","mode","name","next_run_at","options","ownership","require_confirmation","schedule","source_kind","supplier_id","updated_at","vanish_policy"],"type":"object"},"OrderSplitResult":{"properties":{"child":{"$ref":"#/components/schemas/Order"},"parent":{"$ref":"#/components/schemas/Order"}},"required":["child","parent"],"type":"object"},"OrderPaymentList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderPayment"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]},"summary":{"properties":{"currency":{"oneOf":[{"type":"string"},{"type":"null"}]},"net_amount":{"type":"string"},"paid_amount":{"type":"string"},"refunded_amount":{"type":"string"}},"required":["currency","net_amount","paid_amount","refunded_amount"],"type":"object"}},"required":["data","next_cursor","summary"],"type":"object"},"BankTransferApply":{"properties":{"order_ids":{"items":{"type":"string"},"type":"array"},"order_numbers":{"items":{"type":"string"},"type":"array"}},"type":"object"},"MailShop":{"properties":{"connector_instance_id":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"sender_address_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["connector_instance_id","name","sender_address_id"],"type":"object"},"LocationCreate":{"properties":{"address":{"type":["string","null"]},"city":{"type":["string","null"]},"code":{"description":"Unique per company; made from the name when omitted.","minLength":1,"type":"string"},"country":{"description":"ISO 3166-1 alpha-2, e.g. PL","type":["string","null"]},"description":{"type":["string","null"]},"lead_time_days":{"minimum":0,"type":["integer","null"]},"name":{"minLength":1,"type":"string"},"post_code":{"type":["string","null"]},"province":{"type":["string","null"]},"stock_edition":{"description":"`full`: the panel may change its stock too; `api`: only the API and imports (an ERP's own warehouse).","enum":["full","api"],"type":"string"}},"required":["name"],"type":"object"},"LocationList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Location"},"type":"array"}},"required":["data"],"type":"object"},"Upload":{"properties":{"content_type":{"type":"string"},"expires_at":{"type":"string"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}]},"sha256":{"type":"string"},"size":{"type":"integer"},"upload_id":{"type":"string"}},"required":["content_type","expires_at","filename","sha256","size","upload_id"],"type":"object"},"SharedProduct":{"properties":{"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"ean":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"price":{"anyOf":[{"type":"string"},{"type":"null"}]},"sku":{"type":"string"},"stock":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["currency","description","ean","name","price","sku","stock"],"type":"object"},"DropshipCreate":{"properties":{"supplier_id":{"type":"string"}},"required":["supplier_id"],"type":"object"},"ShipmentCreate":{"properties":{"carrier_options":{"additionalProperties":true,"type":"object"},"cod":{"description":"\"auto\" | \"none\" | {amount}","type":["string","object"]},"confirm_cod_override":{"type":"boolean"},"confirm_duplicate":{"type":"boolean"},"connection_id":{"type":"string"},"delivery_point":{"properties":{"carrier":{"type":"string"},"id":{"type":"string"}},"required":["id"],"type":"object"},"insurance":{"properties":{"amount":{"type":"string"}},"required":["amount"],"type":"object"},"label":{"properties":{"format":{"enum":["pdf","zpl","epl"],"type":"string"},"size":{"enum":["a4","a6","carrier_default"],"type":"string"}},"type":"object"},"lines":{"items":{"properties":{"line_id":{"type":"string"},"quantity":{"minimum":1,"type":"integer"}},"required":["line_id","quantity"],"type":"object"},"type":"array"},"parcels":{"items":{"properties":{"dimensions_mm":{"properties":{"height":{"minimum":1,"type":"integer"},"length":{"minimum":1,"type":"integer"},"width":{"minimum":1,"type":"integer"}},"type":"object"},"key":{"type":"string"},"non_standard":{"type":"boolean"},"parcel_template_id":{"type":"string"},"template":{"type":"string"},"text_on_label":{"type":"string"},"weight_g":{"minimum":1,"type":"integer"}},"type":"object"},"type":"array"},"preset":{"type":"string"},"reference_text":{"maxLength":100,"type":"string"},"sender_profile_id":{"type":"string"},"service_id":{"type":"string"}},"type":"object"},"Returnable":{"properties":{"data":{"items":{"properties":{"currency":{"type":"string"},"in_returns":{"type":"integer"},"line_id":{"type":"string"},"matched":{"type":"boolean"},"name":{"type":"string"},"ordered":{"type":"integer"},"returnable":{"type":"integer"},"sku":{"type":"string"},"unit_gross":{"type":"string"}},"required":["currency","in_returns","line_id","matched","name","ordered","returnable","sku","unit_gross"],"type":"object"},"type":"array"},"next_cursor":{"anyOf":[{},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"},"MediaPatch":{"properties":{"alt":{"type":["string","null"]},"variant_id":{"type":["string","null"]}},"type":"object"},"StockMovement":{"properties":{"from_location_id":{"type":"string"},"kind":{"enum":["receipt","adjustment","transfer"],"type":"string"},"location_id":{"type":"string"},"quantity":{"description":"Signed for `adjustment`, positive otherwise.","type":"integer"},"reason":{"minLength":1,"type":"string"},"sku":{"type":"string"},"to_location_id":{"type":"string"},"variant_id":{"type":"string"}},"required":["kind","quantity","reason"],"type":"object"},"PriceListPrices":{"properties":{"data":{"items":{"properties":{"currency":{"type":"string"},"origin":{"type":"string"},"price":{"type":"string"},"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["currency","origin","price","sku","variant_id"],"type":"object"},"type":"array"},"next_after":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_after"],"type":"object"},"OrderResolveConflict":{"properties":{"take":{"enum":["channel","mine"],"type":"string"}},"required":["take"],"type":"object"},"ImportItem":{"properties":{"data":{"items":{"properties":{"changes":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"erases":{"items":{},"type":"array"},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"key":{"type":"string"},"line":{"type":"integer"},"match":{"anyOf":[{},{"type":"null"}]},"outcome":{"type":"string"},"predicted":{"type":"string"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"skipped_fields":{"items":{},"type":"array"},"variant_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["changes","erases","errors","key","line","match","outcome","predicted","reason","skipped_fields","variant_id"],"type":"object"},"type":"array"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"},"LocationPatch":{"properties":{"address":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"description":"ISO 3166-1 alpha-2, e.g. PL","type":["string","null"]},"description":{"type":["string","null"]},"lead_time_days":{"minimum":0,"type":["integer","null"]},"name":{"minLength":1,"type":"string"},"post_code":{"type":["string","null"]},"province":{"type":["string","null"]},"stock_edition":{"description":"`full`: the panel may change its stock too; `api`: only the API and imports (an ERP's own warehouse).","enum":["full","api"],"type":"string"}},"type":"object"},"Shipment":{"description":"A shipment. `GET /shipments/{id}` (and every write) adds receiver, sender, trace (\"Dlaczego?\") and reconcile. `version` is the ETag.","properties":{"fulfillment_error":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"label_source":{"enum":["carrier_account","marketplace","external"],"type":"string"},"disposition":{"enum":["active","abandoned"],"type":"string"},"cancellable":{"oneOf":[{"type":"boolean"},{"type":"null"}]},"tracking_numbers":{"items":{"type":"string"},"type":"array"},"insurance":{"oneOf":[{"properties":{"amount":{"type":"string"}},"required":["amount"],"type":"object"},{"type":"null"}]},"label_available":{"type":"boolean"},"order_id":{"type":"string"},"handed_over_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"created_by":{"additionalProperties":true,"type":"object"},"parcels":{"items":{"properties":{"delivered_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"key":{"oneOf":[{"type":"string"},{"type":"null"}]},"template":{"oneOf":[{"type":"string"},{"type":"null"}]},"tracking_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"tracking_status":{"type":"string"},"weight_g":{"oneOf":[{"type":"integer"},{"type":"null"}]}},"required":["delivered_at","key","template","tracking_number","tracking_status","weight_g"],"type":"object"},"type":"array"},"trace":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"status":{"enum":["submitting","pending","created","cancelling","cancelled","failed","ambiguous"],"type":"string"},"carrier":{"oneOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"id":{"type":"string"},"fulfillment_pushed_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"cod":{"oneOf":[{"properties":{"amount":{"type":"string"},"currency":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["amount","currency"],"type":"object"},{"type":"null"}]},"sender":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"price":{"oneOf":[{"properties":{"amount":{"type":"string"},"currency":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["amount","currency"],"type":"object"},{"type":"null"}]},"shipment_ref":{"oneOf":[{"properties":{"external_id":{"type":"string"},"external_type":{"type":"string"}},"required":["external_id","external_type"],"type":"object"},{"type":"null"}]},"receiver":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"cancel_refused_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"service_preset_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"label_printed_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"raw_status":{"oneOf":[{"type":"string"},{"type":"null"}]},"partial":{"type":"boolean"},"lines":{"items":{"properties":{"line_id":{"type":"string"},"quantity":{"type":"integer"}},"required":["line_id","quantity"],"type":"object"},"type":"array"},"external":{"oneOf":[{"properties":{"push_to_channel":{"type":"boolean"},"service_name":{"oneOf":[{"type":"string"},{"type":"null"}]},"tracking_url":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["push_to_channel","service_name","tracking_url"],"type":"object"},{"type":"null"}]},"delivery_point":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"reconcile":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"tracking_status":{"type":"string"},"stale":{"type":"boolean"},"last_error":{"oneOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"service_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"delivered_at":{"oneOf":[{"type":"string"},{"type":"null"}]},"tracking_number":{"oneOf":[{"type":"string"},{"type":"null"}]},"connection_id":{"oneOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"version":{"type":"integer"},"batch_id":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["batch_id","cancel_refused_at","cancellable","carrier","cod","connection_id","created_at","created_by","delivered_at","delivery_point","disposition","external","fulfillment_error","fulfillment_pushed_at","handed_over_at","id","insurance","label_available","label_printed_at","label_source","last_error","lines","order_id","parcels","partial","price","raw_status","service_id","service_preset_id","shipment_ref","stale","status","tracking_number","tracking_numbers","tracking_status","updated_at","version"],"type":"object"},"NotificationSend":{"properties":{"template_id":{"type":"string"}},"required":["template_id"],"type":"object"},"MailAddress":{"properties":{"default":{"type":"boolean"},"email":{"type":"string"},"id":{"type":"string"},"local_part":{"type":"string"},"name":{"type":"string"},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}]},"sender_domain_id":{"type":"string"}},"required":["default","email","id","local_part","name","reply_to","sender_domain_id"],"type":"object"},"NotificationTemplate":{"properties":{"ascii_only":{"type":"boolean"},"body":{"type":"string"},"channel":{"enum":["email","sms"],"type":"string"},"enabled":{"type":"boolean"},"id":{"type":"string"},"key":{"anyOf":[{"type":"string"},{"type":"null"}]},"language":{"type":"string"},"name":{"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ascii_only","body","channel","enabled","id","key","language","name","subject"],"type":"object"},"CustomerPage":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Customer"},"type":"array"},"has_more":{"type":"boolean"},"page":{"type":"integer"}},"required":["data","has_more","page"],"type":"object"},"StockView":{"description":"Totals and `levels` cover own warehouses; `supplier_levels` lists suppliers' warehouses (their feeds), which count for a channel that has them among its stock sources.","properties":{"allocated":{"type":"integer"},"atp":{"type":"integer"},"derived":{"type":"boolean"},"levels":{"items":{},"type":"array"},"limited_by":{"properties":{"sku":{"type":"string"},"variant_id":{"type":"string"}},"required":["sku","variant_id"],"type":"object"},"listings":{"items":{},"type":"array"},"on_hand":{"type":"integer"},"sku":{"type":"string"},"supplier_levels":{"items":{"properties":{"lead_time_days":{"anyOf":[{"type":"integer"},{"type":"null"}]},"location":{"type":"string"},"location_id":{"type":"string"},"name":{"type":"string"},"on_hand":{"type":"integer"}},"required":["lead_time_days","location","location_id","name","on_hand"],"type":"object"},"type":"array"},"track_stock":{"type":"boolean"},"unsellable":{"type":"integer"},"variant_id":{"type":"string"}},"required":["allocated","levels","listings","on_hand","sku","unsellable","variant_id"],"type":"object"},"PriceEntries":{"example":{"entries":[{"amount":"49.90","sku":"FERM-30-KRAN"},{"amount":"44.90","min_qty":10,"sku":"FERM-30-KRAN"},{"amount":"39.90","sku":"FERM-30-KRAN","valid_from":"2026-12-01","valid_to":"2026-12-24"}]},"properties":{"entries":{"items":{"properties":{"amount":{"description":"Decimal (prefer a string); null removes the tier.","type":["number","string","null"]},"max_qty":{"minimum":1,"type":["integer","null"]},"min_qty":{"minimum":1,"type":"integer"},"sku":{"type":"string"},"valid_from":{"description":"ISO 8601 date or timestamp. Without it the tier is the list's standing price; with it a dated price (e.g. a promotion) preferred inside its window.","type":["string","null"]},"valid_to":{"description":"ISO 8601 date or timestamp (exclusive).","type":["string","null"]},"variant_id":{"type":"string"}},"required":["amount"],"type":"object"},"maxItems":2000,"minItems":1,"type":"array"}},"required":["entries"],"type":"object"},"Report":{"properties":{"columns":{"items":{"properties":{"key":{"type":"string"},"label_en":{"type":"string"},"label_pl":{"type":"string"},"type":{"type":"string"}},"required":["key","label_en","label_pl","type"],"type":"object"},"type":"array"},"filters":{"properties":{"basis":{"type":"string"},"cohort":{"type":"string"},"connector_instance_id":{"items":{},"type":"array"},"convert_to_pln":{"type":"boolean"},"currency":{"items":{},"type":"array"},"from":{"type":"string"},"group_by":{"type":"string"},"include_test":{"type":"boolean"},"market":{"items":{},"type":"array"},"slow_days":{"type":"integer"},"source":{"items":{},"type":"array"},"to":{"type":"string"},"top_by":{"type":"string"}},"required":["basis","cohort","connector_instance_id","convert_to_pln","currency","from","group_by","include_test","market","slow_days","source","to","top_by"],"type":"object"},"meta":{"properties":{"as_of":{"type":"string"},"cohort":{"type":"string"},"cost_day_assumed":{"type":"boolean"},"cost_fx_missing":{"type":"integer"},"definition":{"type":"string"},"excluded_returns":{"additionalProperties":true,"type":"object"},"fx":{"anyOf":[{},{"type":"null"}]},"imported_as_shipped":{"type":"integer"},"items_without_cost":{"type":"integer"},"negative_stock":{"type":"integer"},"sku_hidden":{"type":"integer"},"slow_days":{"type":"integer"},"tax_unknown_lines":{"type":"integer"},"today":{"type":"string"},"top":{"type":"integer"},"truncated":{"type":"boolean"},"voided_excluded":{"type":"integer"}},"required":[],"type":"object"},"report":{"type":"string"},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"totals":{"items":{"properties":{"returned_units":{"type":"integer"},"shipping":{"type":"string"},"other":{"type":"string"},"net_revenue":{"type":"string"},"unshipped_over_48h":{"type":"integer"},"margin_pct":{"type":"string"},"orders_rate_pct":{"type":"string"},"orders":{"type":"integer"},"units_rate_pct":{"type":"string"},"tax_unknown_lines":{"type":"integer"},"refunds":{"type":"integer"},"mean_h":{"anyOf":[{},{"type":"null"}]},"shipped_orders":{"type":"integer"},"p90_h":{"anyOf":[{},{"type":"null"}]},"margin_amount":{"type":"string"},"returns":{"type":"integer"},"channel":{"anyOf":[{},{"type":"null"}]},"median_h":{"anyOf":[{},{"type":"null"}]},"avg_order_value":{"type":"string"},"coverage_pct":{"type":"string"},"products":{"type":"integer"},"currency":{"type":"string"},"gross_revenue":{"type":"string"},"shipped_units":{"type":"integer"},"cost":{"type":"string"},"pct_within_48h":{"anyOf":[{},{"type":"null"}]},"lines":{"type":"integer"},"goods":{"type":"string"},"pct_within_24h":{"anyOf":[{},{"type":"null"}]},"units":{"type":"integer"},"returned_net":{"type":"string"},"covered_revenue":{"type":"string"},"imported_as_shipped":{"type":"integer"},"returned_gross":{"type":"string"},"market":{"anyOf":[{},{"type":"null"}]},"deduction":{"type":"string"},"amount":{"type":"string"},"returned_orders":{"type":"integer"}},"required":[],"type":"object"},"type":"array"},"truncated":{"type":"boolean"}},"required":["columns","filters","meta","report","rows","totals","truncated"],"type":"object"},"Content":{"description":"A ProductContent row at one locale and scope, with the resolved fallback chain (`resolved`: per field the value and the scope it came from). `exists: false` when nothing is stored at that scope (no `updated_by` / `updated_at` then).","properties":{"bullets":{"items":{},"type":"array"},"description_html":{"anyOf":[{"type":"string"},{"type":"null"}]},"exists":{"type":"boolean"},"locale":{"type":"string"},"parameters":{"additionalProperties":true,"type":"object"},"resolved":{"additionalProperties":{"properties":{"scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"value":{}},"required":["scope","value"],"type":"object"},"type":"object"},"scope":{"properties":{"kind":{"type":"string"},"value":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","value"],"type":"object"},"source":{"anyOf":[{"type":"string"},{"type":"null"}]},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"updated_by":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}]},"version":{"anyOf":[{"type":"integer"},{"type":"null"}]}},"required":["bullets","description_html","exists","locale","parameters","resolved","scope","source","title","version"],"type":"object"},"LineComponentShares":{"properties":{"shares":{"items":{"properties":{"unit_share_gross":{"type":["string","number"]},"variant_id":{"type":"string"}},"required":["variant_id","unit_share_gross"],"type":"object"},"type":"array"}},"required":["shares"],"type":"object"},"ShipmentBulk":{"properties":{"cod":{"enum":["auto","none"],"type":"string"},"order_ids":{"items":{"type":"string"},"type":"array"},"preset":{"type":"string"}},"required":["order_ids"],"type":"object"},"ShippingPoints":{"properties":{"data":{"items":{"properties":{"address":{"additionalProperties":true,"type":"object"},"available_24_7":{"type":"boolean"},"carrier":{"type":"string"},"cod_available":{"type":"boolean"},"functions":{"items":{"type":"string"},"type":"array"},"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"types":{"items":{"type":"string"},"type":"array"}},"required":["address","available_24_7","carrier","cod_available","functions","id","name","status","types"],"type":"object"},"type":"array"},"next_cursor":{"anyOf":[{},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"},"ImportJob":{"properties":{"auto_confirm":{"type":"boolean"},"confirmed_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"confirmed_by":{"anyOf":[{"properties":{"credential_id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["label","type"],"type":"object"},{"type":"null"}]},"counts":{"properties":{"created":{"type":"integer"},"pending":{"type":"integer"},"planned":{"type":"integer"},"rejected":{"type":"integer"},"skipped":{"type":"integer"},"skipped_ownership":{"type":"integer"},"total":{"type":"integer"},"unchanged":{"type":"integer"},"updated":{"type":"integer"},"vanished":{"type":"integer"},"would_erase":{"type":"integer"}},"required":[],"type":"object"},"created_at":{"type":"string"},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"dry_run":{"type":"boolean"},"failure":{"anyOf":[{"type":"string"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"has_errors":{"type":"boolean"},"id":{"type":"string"},"preview":{"properties":{"counts":{"properties":{"created":{"type":"integer"},"pending":{"type":"integer"},"rejected":{"type":"integer"},"skipped":{"type":"integer"},"skipped_ownership":{"type":"integer"},"total":{"type":"integer"},"unchanged":{"type":"integer"},"updated":{"type":"integer"},"vanished":{"type":"integer"},"would_erase":{"type":"integer"}},"required":["created","pending","rejected","skipped","skipped_ownership","total","unchanged","updated","vanished","would_erase"],"type":"object"},"sample":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"summary":{"type":"string"}},"required":[],"type":"object"},"profile_id":{"type":"string"},"source":{"properties":{"bytes":{"type":"integer"},"connector_instance_id":{"type":"string"},"content_hash":{"type":"string"},"etag":{"anyOf":[{},{"type":"null"}]},"format":{"type":"string"},"input_format":{"type":"string"},"kind":{"type":"string"},"last_modified":{"anyOf":[{},{"type":"null"}]},"name":{"type":"string"},"purpose":{"type":"string"},"upload_id":{"type":"string"},"url":{"type":"string"}},"required":["format","kind"],"type":"object"},"started_by":{"properties":{"credential_id":{"type":"string"},"label":{"type":"string"},"type":{"type":"string"}},"required":["credential_id","label","type"],"type":"object"},"status":{"type":"string"}},"required":["auto_confirm","confirmed_at","confirmed_by","counts","created_at","document_id","dry_run","failure","finished_at","has_errors","id","preview","profile_id","source","started_by","status"],"type":"object"},"SupplierItemsAdd":{"additionalProperties":false,"properties":{"ids":{"items":{"type":"string"},"type":"array"}},"required":["ids"],"type":"object"}},"securitySchemes":{"bearerAuth":{"description":"API key (ob2b_...). Scopes: products:read, products:write, offers:read, offers:write, inventory:read, inventory:write, orders:read, orders:write, prices:read, prices:write, imports:read, imports:write, webhooks:read, webhooks:write, stock:read, stock:write, listings:read, listings:write, events:read, events:write, rules:read, rules:write, shipments:read, shipments:write, print:read, print:write, invoices:read, invoices:write, returns:read, returns:write, network:read, network:write, purchase_orders:read, purchase_orders:write, customers:read, customers:write, notifications:read, notifications:write, bank:read, bank:write, mail:read, mail:write, products:admin, orders:admin, reports:read, reports:margin, conversations:read","scheme":"bearer","type":"http"}}},"info":{"description":"Product & imports API. Versioned by date; pin per key, override with the OpenB2B-Version header.","title":"OpenB2B API","version":"2026-11-01"},"openapi":"3.1.0","paths":{"/shipments/{id}":{"get":{"operationId":"getShipment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Shipment"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One shipment with receiver, sender and the resolution trace. `ETag` is the shipment version.","x-required-scope":"shipments:read"}},"/suppliers":{"get":{"operationId":"listSuppliers","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Supplier"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Wholesalers with their feed profile, location and lists.","x-required-scope":"imports:read"},"post":{"operationId":"createSupplier","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Supplier"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Supplier"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create a wholesaler: its feed profile, a `supplier` stock location with the lead time, a cost price list and a derived price list carrying the margin rules.","x-required-scope":"imports:write"}},"/shipments/{id}/link":{"post":{"operationId":"linkShipment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentLink"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Links the carrier's existing shipment to an ambiguous one (`external_type` + `external_id`, or `reference` = tracking number).","x-required-scope":"shipments:write"}},"/purchase-orders/{id}/place":{"post":{"operationId":"placePurchaseOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PurchaseOrder"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Send a draft to the supplier: it becomes an order at the partner on the reseller's account and prices; a repeat is refused.","x-required-scope":"purchase_orders:write"}},"/label-links/{token}":{"get":{"operationId":"downloadLabelLink","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"description":"The label file or a zip"},"410":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string"},"detail":{"type":"string"},"missing":{"items":{},"type":"array"}},"required":["code","detail"],"type":"object"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not found: problem+json, or (e.g. `no_pdf`) plain JSON `{code, detail}`"}},"security":[],"summary":"Downloads the label(s) behind a signed link (valid 15 minutes) handed out by the MCP tool `shipments_label_link`. The token is the credential; 410 when it expired."}},"/domains":{"get":{"operationId":"listDomains","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Domain"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The company's domains: ownership state, the TXT record that proves it and the status of each use.","x-required-scope":"mail:read"},"post":{"operationId":"addDomain","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Domain"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Domain"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Add a domain (`name` ASCII or Unicode); `uses` are requested now and switched on once the TXT ownership record is published and checked. 422 `mail_provider_off` when `uses` has `mail` and own sender domains are not available in this installation.","x-required-scope":"mail:write"}},"/price-lists/{list_id}/copy-from":{"post":{"operationId":"copyPriceListFrom","parameters":[{"in":"path","name":"list_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListCopy"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceListCopyResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Fill an entered list once from another list (price_list_id or price_list_key), fx and steps, as in putPriceListCalculation. The list does not follow the source afterwards. A price the list already has is overwritten; a product the source does not price keeps its own. Standing prices only. Returns copied and failed (no exchange rate). `?dry_run=true` writes nothing.","x-required-scope":"prices:write"}},"/rules":{"get":{"operationId":"listRules","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Rule"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Automation rules with their last-7-day run count and last error, in run order (priority, name).","x-required-scope":"rules:read"},"post":{"operationId":"createRule","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create a rule. It is always created disabled; enable it after a dry run. The body is validated as a whole (422 with JSON pointers into it). Unknown or unbuilt triggers and actions can be saved but not enabled (see `GET /rules/catalog`).","x-required-scope":"rules:write"}},"/products/{product_id}/variants":{"get":{"operationId":"listProductVariants","parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Variant"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Variants of a product.","x-required-scope":"products:read"},"post":{"operationId":"addVariant","parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantItem"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Variant"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Variant"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Add a variant (Variant + TradeItem + SupplierItem).","x-required-scope":"products:write"}},"/invoices/attention":{"get":{"operationId":"getInvoicingAttention","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicingAttention"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Counters of what needs a human.","x-required-scope":"invoices:read"}},"/domains/{id}":{"delete":{"operationId":"removeDomain","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"502":{"$ref":"#/components/responses/Problem"}},"summary":"Remove the domain; its uses (including shop addresses) are switched off first. 502 `use_disable_failed` when a use could not be switched off (e.g. the mail provider is not responding): the domain is kept, try again.","x-required-scope":"mail:write"},"get":{"operationId":"getDomain","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One domain.","x-required-scope":"mail:read"}},"/ping":{"get":{"operationId":"ping","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ping"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Verify the key; returns tenant, key prefix, version and scopes.","x-required-scope":"products:read"}},"/rules/{id}":{"delete":{"operationId":"deleteRule","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Delete a rule; its run log is kept until retention (30 days).","x-required-scope":"rules:write"},"get":{"operationId":"getRule","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rule"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One rule.","x-required-scope":"rules:read"},"patch":{"operationId":"updateRule","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Change any part of a rule; the merged rule is validated as a whole. `version` moves when the definition (trigger, scope, when, actions, priority, stop) changes, not for name, description, group or manual settings.","x-required-scope":"rules:write"},"put":{"operationId":"putRule","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Same as PATCH.","x-required-scope":"rules:write"}},"/rules/{id}/resume":{"post":{"operationId":"resumeRule","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Clear an automatic pause: a rule whose runs failed `limits.pause_after` times in a row stops being dispatched (`paused_at`, `pause_reason`) until resumed. Enabling a disabled rule also clears the pause.","x-required-scope":"rules:write"}},"/conversations":{"get":{"operationId":"listConversations","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"description":"open, closed","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"message, dispute, claim","in":"query","name":"kind","required":false,"schema":{"type":"string"}},{"description":"seller, buyer, none","in":"query","name":"awaiting","required":false,"schema":{"type":"string"}},{"description":"conversations about one order","in":"query","name":"order_id","required":false,"schema":{"type":"string"}},{"description":"one sales channel connection","in":"query","name":"connection_id","required":false,"schema":{"type":"string"}},{"description":"ISO 8601 timestamp","in":"query","name":"updated_since","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Conversation"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Buyer conversations, least recently changed first (without messages). Filters are ANDed. Needs `conversations:read` and the grantor's inbox.view.","x-required-scope":"conversations:read"}},"/listings/drafts/{id}":{"get":{"operationId":"getListingDraft","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Draft"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One draft.","x-required-scope":"products:read"}},"/domains/{id}/shop_hosts/{host_id}":{"delete":{"operationId":"detachShopHost","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"host_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Detach the address: the shop's pages fall back to the OpenB2B address at once.","x-required-scope":"mail:write"}},"/products/by-key/{key}":{"put":{"operationId":"upsertProductByKey","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Upsert by the product key; creates the chain when missing.","x-required-scope":"products:write"}},"/stock/documents":{"post":{"operationId":"createStockDocument","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockDocumentWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StockDocument"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StockDocument"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create a draft PZ / WZ / MM / KOR.","x-required-scope":"stock:write"}},"/notification-templates/{id}/preview":{"post":{"operationId":"previewNotificationTemplate","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationPreviewRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotificationPreview"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The template rendered for one order: subject, text and the whole e-mail HTML in the layout of the order's shop (the shop's version of the template when it has one).","x-required-scope":"notifications:read"}},"/orders/{id}/payments":{"get":{"operationId":"listOrderPayments","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPaymentList"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The order's payment ledger, oldest first, with a `summary` {currency, paid_amount, refunded_amount, net_amount}. Entries of an order that predates the ledger appear the first time it is read.","x-required-scope":"orders:read"},"post":{"operationId":"recordOrderPayment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPaymentCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderPayment"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderPayment"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Record a payment, refund or adjustment (an ERP reporting a bank transfer, cash on delivery collected). A `payment` or `refund` amount is positive (a refund is stored negative), an `adjustment` is signed. With `external_payment_id` the call is idempotent: the same id and amount returns the entry already recorded (200), another amount is 409 `payment_conflict`. 422 `currency_mismatch` when the currency is not the order's. On a manual or API order `paid_amount` and `payment_status` are derived from the ledger and `order.paid` / `order.payment_changed` fire as for any other payment change; on a channel order `payment_status` stays what the channel reports.","x-required-scope":"orders:write"}},"/stock/locations/{id}":{"delete":{"operationId":"deleteLocation","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Delete an own warehouse that never held stock, documents or reservations; not the default one (422). Connections stop using it as a stock source.","x-required-scope":"stock:write"},"patch":{"operationId":"updateLocation","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Location"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Edit an own warehouse (name, description, address, lead time, stock edition). A supplier's warehouse is 422.","x-required-scope":"stock:write"}},"/listings/{id}/end":{"post":{"operationId":"endListing","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Listing"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"End a live offer on its channel. The stock ledger is not changed; the listing shows `pending_operation: end` until the channel confirms, then status `ended` (`listing.ended`).","x-required-scope":"listings:write"}},"/returns/{id}/receive":{"post":{"operationId":"receiveReturn","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnReceive"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The warehouse step: per line parts `{line_id, quantity_received, condition (resellable, damaged, missing), location_id?}`. Posts one PZ document per location with reference_type `return`; damaged goods are parked in the non-sellable bucket. A repeat with the same quantities is a no-op, a different one is 409 `already_received`. `If-Match` is required.","x-required-scope":"returns:write"}},"/returns/{id}/refunds/{rid}/void":{"post":{"operationId":"voidReturnRefund","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"rid","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnRefundVoid"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Voids a record (kept for the audit trail; `refunded_gross` ignores it). Needs returns.refund. `If-Match` is required.","x-required-scope":"returns:write"}},"/stock/documents/{id}/post":{"post":{"operationId":"postStockDocument","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentPost"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StockDocument"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Post a draft: writes the movements.","x-required-scope":"stock:write"}},"/shipments/{id}/recreate":{"post":{"operationId":"recreateShipment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentConfirm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Confirmed re-create of an ambiguous shipment: marks it absent and submits a copy.","x-required-scope":"shipments:write"}},"/returns/{id}/accept":{"post":{"operationId":"acceptReturn","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnAccept"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"requested -> accepted (accepted quantities default to the requested ones; `lines` overrides). Replaying on an accepted return is a no-op. `If-Match` is required.","x-required-scope":"returns:write"}},"/catalog/batch":{"post":{"operationId":"catalogBatch","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogBatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CatalogBatchResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Upsert up to 500 product documents (product, variants, translations per locale, prices per list, absolute stock per warehouse) by the seller's keys. Each document is applied in its own transaction; always 200 with a result per document (created, updated, unchanged or error with JSON pointers into the request) and a summary. Documents with prices / stock also need prices:write / stock:write. `?dry_run=true` validates without saving.","x-required-scope":"products:write"}},"/rules/templates/{key}/install":{"post":{"operationId":"installRuleTemplate","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleTemplateInstall"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Install a starter template as a disabled rule (keys and their questions in `templates` of GET /rules/catalog). The body may carry `answers` to the template's questions (a status key, a number of days, a tag); a bad answer is 422 at `/answers/<key>`.","x-required-scope":"rules:write"}},"/bank-transactions/{id}/ignore":{"post":{"operationId":"ignoreBankTransfer","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BankTransaction"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set a transfer aside (not a payment for an order).","x-required-scope":"bank:write"}},"/media/{id}":{"delete":{"operationId":"deleteMedia","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Remove an image.","x-required-scope":"products:write"},"get":{"operationId":"getMedia","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One image.","x-required-scope":"products:read"},"patch":{"operationId":"patchMedia","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Media"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Change alt / variant assignment.","x-required-scope":"products:write"}},"/stock/levels":{"put":{"operationId":"setStockLevels","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockLevels"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StockLevelsResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set absolute on-hand quantities (up to 1000 rows): SKU (or variant_id), warehouse by location_code / location_id (default location when omitted), on_hand and as_of. The difference goes to the ledger as an adjustment; a report older than the last applied one is ignored (stale). A result per row: set, unchanged, stale or error.","x-required-scope":"stock:write"}},"/shipments/{id}/refresh-tracking":{"post":{"operationId":"refreshShipmentTracking","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Queued"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"202":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Queued"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Queues a tracking poll for a created shipment (202). External shipments have no carrier to poll: 422 `not_applicable_for_external`.","x-required-scope":"shipments:write"}},"/products/{product_id}/channel-media/{connection_id}":{"delete":{"operationId":"resetChannelMedia","parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"connection_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChannelMedia"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Remove every override of the product on the connection (all images inherit). Returns the empty view.","x-required-scope":"products:write"},"get":{"operationId":"getChannelMedia","parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"connection_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelMedia"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Per-channel image overrides of a product on one connection, the gallery that results (what the channel gets) and its channel-rule errors. `version` is the ETag of the override set.","x-required-scope":"products:read"},"put":{"operationId":"replaceChannelMedia","parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"connection_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelMediaReplace"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChannelMedia"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Replace the whole override set: listed images get their `mode` (`inherit`, `replace` at `position`, `hide`), unlisted ones inherit. 422 for an image of another product or a duplicate.","x-required-scope":"products:write"}},"/rule-runs/{id}":{"get":{"operationId":"getRuleRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleRunLog"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One run with its condition trace (every node, with the value it saw) and the result of every action.","x-required-scope":"rules:read"}},"/orders/{id}/partner-answer":{"post":{"operationId":"answerPartnerOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerAnswer"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PartnerAnswerResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The supplier answers a partner's order (source trade_partner): confirm (optionally fewer pieces per supplier SKU) or reject with a reason.","x-required-scope":"network:write"}},"/variants/{id}":{"get":{"operationId":"getVariant","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One variant; `fields=stock,prices` adds them.","x-required-scope":"products:read"},"patch":{"operationId":"patchVariant","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Variant"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Merge the sent fields.","x-required-scope":"products:write"}},"/rules/{id}/disable":{"post":{"operationId":"disableRule","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Disable a rule. Runs waiting on a `wait` stop when they wake.","x-required-scope":"rules:write"}},"/rule-runs/{id}/handle":{"post":{"operationId":"handleRuleRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RuleRunLog"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set a failed run aside (`handled_at`): it leaves the inbox until it is retried. 409 `not_failed` (a problem) for any other run.","x-required-scope":"rules:write"}},"/webhooks/{id}/test":{"post":{"operationId":"testWebhook","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WebhookDelivery"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Send a `ping` event now and return the delivery with the response code and excerpt.","x-required-scope":"events:write"}},"/orders":{"get":{"operationId":"listOrders","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"description":"canonical status, comma list (received, accepted, ready_to_ship, shipped, delivered, cancelled, returned)","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"seller status id","in":"query","name":"status_id","required":false,"schema":{"type":"string"}},{"description":"sales channel connection","in":"query","name":"connection_id","required":false,"schema":{"type":"string"}},{"description":"market id","in":"query","name":"market","required":false,"schema":{"type":"string"}},{"description":"buyer_agent|internal_agent|channel|manual","in":"query","name":"source","required":false,"schema":{"type":"string"}},{"description":"unpaid|paid|partially_paid|refunded|cod|unknown","in":"query","name":"payment_status","required":false,"schema":{"type":"string"}},{"description":"orders carrying the tag","in":"query","name":"tag","required":false,"schema":{"type":"string"}},{"description":"order number, external order id, order id, buyer e-mail or name (substring)","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"ISO 8601","in":"query","name":"placed_after","required":false,"schema":{"type":"string"}},{"description":"ISO 8601","in":"query","name":"placed_before","required":false,"schema":{"type":"string"}},{"description":"true|false: open channel-vs-operator conflicts","in":"query","name":"has_conflict","required":false,"schema":{"type":"string"}},{"description":"custom field value (text, select and boolean fields only)","in":"query","name":"cf[<key>]","required":false,"schema":{"type":"string"}},{"description":"true|false: has / has not become ready for processing (paid or cash on delivery)","in":"query","name":"ready","required":false,"schema":{"type":"string"}},{"description":"ISO 8601: became ready strictly after this instant","in":"query","name":"ready_after","required":false,"schema":{"type":"string"}},{"description":"seller|marketplace","in":"query","name":"fulfillment_channel","required":false,"schema":{"type":"string"}},{"description":"placed_at:desc (default), placed_at:asc, updated_at:asc|desc, ready_for_processing_at:asc|desc (lists only ready orders)","in":"query","name":"sort","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Order"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Orders, newest placed first by default. Filters are ANDed. To feed another system (an ERP) page incrementally with `sort=updated_at:asc` (every change moves an order to the end) or `sort=ready_for_processing_at:asc` (ready orders only, in the order they became ready) and keep the `next_cursor`: a keyset cursor, stable under concurrent writes. Re-reading a short overlap is safe; dedupe on `id` + `revision`. `GET /events` (`order.*`) is the event alternative. A pickup-point order carries the point's address in `shipping_address.pickup_point.address`.","x-required-scope":"orders:read"},"post":{"operationId":"createOrder","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create a manual order (stock is reserved per line; `payment_status: paid` fires `order.paid` and `order.ready_for_processing`).","x-required-scope":"orders:write"}},"/orders/{id}/dropship":{"post":{"operationId":"dropshipOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DropshipCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PurchaseOrder"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PurchaseOrder"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Send the lines of a customer order that a trade-network supplier provides as a dropship order (needs dropship open on the link). A line in an open dropship order is never sent again.","x-required-scope":"purchase_orders:write"}},"/invoices/{id}/refresh":{"post":{"operationId":"refreshInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Re-reads the invoice from the app (status, KSeF, PDF cache). `If-Match` takes the invoice version.","x-required-scope":"invoices:write"}},"/shipments":{"get":{"operationId":"listShipments","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"description":"submitting, pending, created, cancelling, cancelled, failed, ambiguous","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"normalised tracking status","in":"query","name":"tracking_status","required":false,"schema":{"type":"string"}},{"description":"shipments of one order","in":"query","name":"order_id","required":false,"schema":{"type":"string"}},{"description":"shipments bought through a connection","in":"query","name":"connection_id","required":false,"schema":{"type":"string"}},{"description":"carrier id","in":"query","name":"carrier","required":false,"schema":{"type":"string"}},{"description":"a bulk run","in":"query","name":"batch_id","required":false,"schema":{"type":"string"}},{"description":"true = only shipments needing attention","in":"query","name":"attention","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Shipment"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Shipments, oldest first. Filters are ANDed; `attention=true` lists those that need a human (ambiguous, stale pending, failed, exception, cancel refused, order cancelled, tracking expired).","x-required-scope":"shipments:read"}},"/media/{id}/versions":{"get":{"operationId":"listMediaVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Loose"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Kept versions of an image, newest first (`number`, `current`, `url`, `hosted`, `content_type`, `byte_size`, `width`, `height`, `checksum`).","x-required-scope":"products:read"}},"/variants/{variant_id}/prices":{"get":{"operationId":"getVariantPrices","parameters":[{"in":"path","name":"variant_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantPrices"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Price entries of a variant per list.","x-required-scope":"products:read"}},"/order-statuses/order":{"put":{"operationId":"reorderOrderStatuses","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusOrder"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderStatus"},"type":"array"}},"required":["data"],"type":"object"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set the order of every status: `ids` lists all of them exactly once (422 `ids_mismatch`). Returns the list.","x-required-scope":"orders:admin"}},"/suppliers/{id}":{"delete":{"operationId":"deleteSupplier","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Remove a supplier and its profile (price lists are archived, stock history stays). 409 `supplier_connected` (a problem) for a supplier that belongs to an active integration: it cannot be deleted while the connection exists.","x-required-scope":"imports:write"},"get":{"operationId":"getSupplier","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Supplier"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One supplier.","x-required-scope":"imports:read"},"patch":{"operationId":"patchSupplier","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Supplier"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Change a supplier (feed, schedule, lead time, margin rules).","x-required-scope":"imports:write"},"put":{"operationId":"putSupplier","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Supplier"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Same as PATCH.","x-required-scope":"imports:write"}},"/prices/evaluate":{"post":{"operationId":"evaluatePrice","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceEvaluate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceEvaluation"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Pricing.evaluate with the full trace.","x-required-scope":"products:read"}},"/listings/{id}/images":{"get":{"operationId":"getListingImages","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingImages"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The images of a live offer: the gallery we send now, how the channel took each image of the last write (`ok`, `rejected` with reason, `pending`), and, when a pull carried the channel's gallery, the images there that are not ours, ours that are missing and the order. `warning` is the recorded overwrite warning (the channel's gallery differs from what we last sent), or null.","x-required-scope":"products:read"}},"/shipments/{id}/cancel":{"post":{"operationId":"cancelShipment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Cancels at the carrier. `NOT_CANCELLABLE` leaves the shipment `created` with `cancellable=false` (the label is paid). `If-Match` takes the shipment version.","x-required-scope":"shipments:write"}},"/orders/{id}/split":{"post":{"operationId":"splitOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderSplit"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderSplitResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderSplitResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Move parts of lines to a new manual child order (reservations move, stock does not change). A repeated request returns the same child. Live `received`/`accepted` orders without open conflicts only.","x-required-scope":"orders:write"}},"/orders/{id}/lines/{line_id}/components":{"patch":{"operationId":"setOrderLineComponents","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"line_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineComponentShares"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Loose"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set by hand how a bundle line's price splits among its components. Every component named, shares >= 0 with two decimals, summing to the line's unit price exactly. 422 allocation_sum_mismatch; 409 allocation_locked once an invoice or a return rests on the line.","x-required-scope":"orders:write"}},"/domains/{id}/uses/mail":{"post":{"operationId":"enableDomainMail","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Domain"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Request e-mail sending on the domain; switched on at once when the domain is verified. 422 `mail_provider_off` when own sender domains are not available in this installation.","x-required-scope":"mail:write"}},"/orders/merge":{"post":{"operationId":"mergeOrders","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderMerge"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Merge `source_ids` into `target_id`: lines and reservations move, the sources end in the locked `merged` status (no `order.cancelled`). 422 `not_mergeable` lists every failed precondition; `force_address` overrides the address check.","x-required-scope":"orders:write"}},"/import-jobs/{id}/errors.csv":{"get":{"operationId":"getImportErrors","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The error file: rejected records in the input's own shape plus an `_errors` column (CSV).","x-required-scope":"imports:read"}},"/domains/{id}/check":{"post":{"operationId":"checkDomain","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Domain"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Look the ownership record up now (domains are also re-checked regularly).","x-required-scope":"mail:write"}},"/shipping/services":{"get":{"operationId":"listShippingServices","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"description":"required","in":"query","name":"connection_id","required":false,"schema":{"type":"string"}},{"description":"receiver country","in":"query","name":"country","required":false,"schema":{"type":"string"}},{"description":"order whose proposals to list","in":"query","name":"order_id","required":false,"schema":{"type":"string"}},{"description":"true to refetch","in":"query","name":"refresh","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingServices"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The cached service catalogue of a connection (6 h; 10 min with `order_id`). `refresh=true` refetches.","x-required-scope":"shipments:read"}},"/mail/domains/{id}/check":{"post":{"operationId":"checkMailDomain","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MailDomain"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Re-check the domain's DNS now (pending domains are also re-checked every 15 minutes).","x-required-scope":"mail:write"}},"/price-lists/{list_id}/prices":{"get":{"operationId":"listPriceListPrices","parameters":[{"in":"path","name":"list_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListPrices"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The list's effective standing prices (quantity 1, today) by SKU: data[] of {sku, variant_id, price, currency, origin entered|calculated}, `limit` (1-500, default 100) at a time after `after` (a SKU); next_after when more remain. Items the list does not price are left out.","x-required-scope":"products:read"}},"/suppliers/{id}/items":{"get":{"operationId":"listSupplierItems","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"description":"part of the SKU, GTIN or name","in":"query","name":"search","required":false,"schema":{"type":"string"}},{"description":"all (default), taken or not_taken","in":"query","name":"state","required":false,"schema":{"type":"string"}},{"description":"true: only offers in stock as the wholesaler reports it, ignoring the minimum order quantity (false or omitted: all)","in":"query","name":"available","required":false,"schema":{"type":"string"}},{"description":"true: only offers whose price changed in the last 7 days","in":"query","name":"price_changed","required":false,"schema":{"type":"string"}},{"description":"1..200, default 50","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"default 0","in":"query","name":"offset","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierItemPage"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The offers of a connected wholesaler (a connector-backed supplier; any other supplier is 404) with the reseller's individual prices, ordered by supplier SKU. `cost_source` says whose cost the price tool uses for the product the offer is linked to: `this_supplier`, `other` (another preferred supplier) or `none`. `net_price` is the reseller's own purchase price and is confidential business data. `search` is a case-insensitive part of SKU, GTIN or name; `state` is `all` (default), `taken` (already linked to a catalogue item) or `not_taken`; `available=true` keeps offers that are active, not vanished from the stock feed and in stock as the wholesaler reports it (a quantity above 0, or a band in_stock or low). It is the wholesaler's own definition: it ignores the offer's minimum order quantity and order multiple, so an offer below its minimum is still `available` although the supplier location gets 0 for it; `price_changed=true` keeps offers whose price changed in the last 7 days. `stock_quantity` is the wholesaler's figure in the item's sale unit; `stock_band` is set instead (and `stock_quantity` is null) when the wholesaler gives no number; `stock_vanished` is true when it no longer reports the item, and what the row then shows depends on the supplier's vanish policy: under `zero_stock` (the default; `archive` counts as it) the quantity is 0 with no band, under `flag` it keeps the last quantity or band reported; offers reset after an account change are zeroed the same way; `previous_net_price` is the price before the last change. `limit` defaults to 50 and is capped at 200.","x-required-scope":"imports:read"}},"/invoices/{id}/pdf":{"get":{"operationId":"getInvoicePdf","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string"},"detail":{"type":"string"},"missing":{"items":{},"type":"array"}},"required":["code","detail"],"type":"object"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not found: problem+json, or (e.g. `no_pdf`) plain JSON `{code, detail}`"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Downloads the cached PDF (fetched from the app once); every read is audited. 404 `no_pdf` when there is none.","x-required-scope":"invoices:read"}},"/webhooks/{id}/deliveries":{"get":{"operationId":"listWebhookDeliveries","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"description":"pending|succeeded|failed|dead","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"1..200","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/WebhookDelivery"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Recent deliveries, newest first; `status` filters.","x-required-scope":"events:read"}},"/import-profiles":{"get":{"operationId":"listImportProfiles","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ImportProfile"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Saved import profiles.","x-required-scope":"imports:read"},"post":{"operationId":"createImportProfile","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportProfileWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportProfile"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportProfile"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Save an import profile.","x-required-scope":"imports:write"}},"/stock/locations":{"get":{"operationId":"listLocations","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationList"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Warehouses: own ones first (the default on top), then suppliers'.","x-required-scope":"products:read"},"post":{"operationId":"createLocation","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Location"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Location"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Add an own warehouse. `stock_edition: api` keeps its stock to the API and imports (an ERP's own warehouse).","x-required-scope":"stock:write"}},"/invoices/{id}/reconcile":{"post":{"operationId":"reconcileInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceReconcile"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"202":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"502":{"$ref":"#/components/responses/Problem"}},"summary":"Resolves an ambiguous create: `link` an existing document (`external_type` + `external_id`, or `reference` = number; verified against the buyer's tax id and the gross), `confirm_absent` (the app shows no such document) or `recreate` (marks it absent and issues a copy, 202). Needs the invoices.correct permission.","x-required-scope":"invoices:write"}},"/orders/{id}/shipments":{"get":{"operationId":"listOrderShipments","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Shipment"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Shipments of an order, oldest first.","x-required-scope":"shipments:read"},"post":{"operationId":"createShipment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/ShipmentPlan"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/ShipmentPlan"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Buys a label: resolves preset, sender, parcels, point, COD and insurance, runs the duplicate guard and the spend cap, then creates asynchronously (status `submitting`). `?dry_run=true` returns the exact request and the trace and buys nothing. A create that may duplicate (another shipment submitting, pending, ambiguous or covering the lines) is 409 `duplicate_shipment` unless `confirm_duplicate: true`. Never retried automatically.","x-required-scope":"shipments:write"}},"/custom-fields":{"get":{"operationId":"listCustomFields","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"description":"order|product","in":"query","name":"entity","required":false,"schema":{"type":"string"}},{"description":"true to include archived","in":"query","name":"archived","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CustomField"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Definitions of the additional order and product fields, by position. Without `entity` the entities the key may read; `archived=true` includes archived ones. Reading needs `orders:read` / `products:read` per entity.","x-required-scope":"orders:read"},"post":{"operationId":"createCustomField","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomField"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomField"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Define a field. `key` (lowercase letters, digits, underscores) and `type` (text, number, boolean, date, select, file) are fixed afterwards; `select` needs `options`. Needs `orders:admin` / `products:admin` per entity.","x-required-scope":"orders:admin"}},"/rule-runs":{"get":{"operationId":"listAllRuleRuns","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"description":"filter","in":"query","name":"rule_id","required":false,"schema":{"type":"string"}},{"description":"matched|not_matched|out_of_scope|loop_blocked|stopped","in":"query","name":"decision","required":false,"schema":{"type":"string"}},{"description":"running|waiting|completed|failed","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"order or item id","in":"query","name":"subject_id","required":false,"schema":{"type":"string"}},{"description":"1..200","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleRunLog"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The run log of all rules, newest first. Filter by `subject_id` to see everything that was considered for one order; `inbox=true` lists the failed runs nobody set aside (`handled_at` null).","x-required-scope":"rules:read"}},"/import-jobs/{id}/cancel":{"post":{"operationId":"cancelImportJob","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportJob"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Stop a job before its next batch.","x-required-scope":"imports:write"}},"/variants/{variant_id}/components":{"get":{"operationId":"getVariantComponents","parameters":[{"in":"path","name":"variant_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Loose"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The recipe of a bundle: [{variant_id, sku, quantity, allocation_weight}].","x-required-scope":"products:read"},"put":{"operationId":"putVariantComponents","parameters":[{"in":"path","name":"variant_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantComponents"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Variant"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Replace the whole recipe. `bundle_type`: `virtual` (no stock of its own: availability is the lowest of component available / quantity, and an order reserves the components) or `assembled` (own stock, the recipe describes the contents). `bundle_type: null` with `components: []` makes it a normal variant again. Errors, each with a `path`: 422 bundle_components_required, bundle_kind_required, bundle_kind_invalid, bundle_component_unknown, bundle_component_duplicate, bundle_component_quantity_invalid, bundle_component_is_bundle, bundle_component_self, bundle_is_component, bundle_cannot_be_untracked; 409 bundle_has_own_stock (zero the stock first, `PUT /stock/levels`), bundle_kind_locked (open orders include it), bundle_has_composed_offers (a live offer of the set was published as several products: end it first; an unchanged recipe is still accepted). `bundle_type`, `components` and `track_stock` are also accepted on every variant body and in `POST /catalog/batch`, where a component may be created later in the same batch and a stock row for a virtual or untracked variant is reported in `skipped` with `severity: warning` while the rest applies.","x-required-scope":"products:write"}},"/order-statuses/{id}":{"delete":{"operationId":"deleteOrderStatus","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Delete a status. 409 `status_locked` (the system statuses), `status_in_use` (orders still have it), `last_of_canonical` (at least one status per canonical value stays).","x-required-scope":"orders:admin"},"get":{"operationId":"getOrderStatus","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatus"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One order status.","x-required-scope":"orders:read"},"patch":{"operationId":"updateOrderStatus","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderStatus"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Edit name, short_name, buyer_name, colour, position, group_id, affects_stock_on_cancel. `key` and `canonical` are accepted only with their current value (422 `immutable_field`).","x-required-scope":"orders:admin"}},"/variants/{variant_id}/content/{locale}":{"delete":{"operationId":"deleteContent","parameters":[{"in":"path","name":"variant_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"locale","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"},{"description":"connection id","in":"query","name":"channel","required":false,"schema":{"type":"string"}},{"description":"market id","in":"query","name":"market","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Content"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Remove the override row.","x-required-scope":"products:write"},"get":{"operationId":"getContent","parameters":[{"in":"path","name":"variant_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"locale","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"description":"connection id","in":"query","name":"channel","required":false,"schema":{"type":"string"}},{"description":"market id","in":"query","name":"market","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Content"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Content at a locale and scope (`channel` = connection id, or `market`).","x-required-scope":"products:read"},"patch":{"operationId":"patchContent","parameters":[{"in":"path","name":"variant_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"locale","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"},{"description":"connection id","in":"query","name":"channel","required":false,"schema":{"type":"string"}},{"description":"market id","in":"query","name":"market","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Content"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Same as PUT.","x-required-scope":"products:write"},"put":{"operationId":"putContent","parameters":[{"in":"path","name":"variant_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"locale","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"},{"description":"connection id","in":"query","name":"channel","required":false,"schema":{"type":"string"}},{"description":"market id","in":"query","name":"market","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Content"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Merge per field; `null` clears.","x-required-scope":"products:write"}},"/listings/drafts/{id}/validate":{"post":{"operationId":"validateListingDraft","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Draft"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Queue validation.","x-required-scope":"listings:write"}},"/orders/{id}/notes":{"get":{"operationId":"listOrderNotes","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderNote"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Internal notes of the order.","x-required-scope":"orders:read"},"post":{"operationId":"addOrderNote","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderNoteCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNote"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNote"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Add an internal note.","x-required-scope":"orders:write"}},"/price-lists/{list_id}/entries":{"put":{"operationId":"putPriceEntries","parameters":[{"in":"path","name":"list_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceEntries"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceEntriesResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set up to 2000 tiers: SKU (or variant_id), amount (null removes), min_qty, max_qty, valid_from / valid_to for dated prices. A result per row: set, unchanged, removed or error.","x-required-scope":"prices:write"}},"/returns/{id}/cancel":{"post":{"operationId":"cancelReturn","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnCancel"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"requested/accepted -> cancelled (not after receive). `If-Match` is required.","x-required-scope":"returns:write"}},"/invoices/{id}/attach":{"post":{"operationId":"attachInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Uploads the issued invoice to the order on its sales channel again (a new attempt with a new idempotency key; the connector checks the channel's documents by number first). Returns the invoice with `channel_attach` pending.","x-required-scope":"invoices:write"}},"/import-jobs/{id}/confirm":{"post":{"operationId":"confirmImportJob","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportJob"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Apply a previewed job.","x-required-scope":"imports:write"}},"/order-status-groups":{"get":{"operationId":"listOrderStatusGroups","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderStatusGroup"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The groups the order list sorts statuses into, by position.","x-required-scope":"orders:read"},"post":{"operationId":"createOrderStatusGroup","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusGroupCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderStatusGroup"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderStatusGroup"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create a group (unique name; 409 `name_taken`).","x-required-scope":"orders:admin"}},"/mail/addresses/{id}":{"delete":{"operationId":"deleteMailAddress","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Delete an address; shops using it fall back to the default.","x-required-scope":"mail:write"},"patch":{"operationId":"patchMailAddress","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailAddressWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MailAddress"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Change name, local part, reply_to or default (the domain stays).","x-required-scope":"mail:write"}},"/shipments/{id}/abandon":{"post":{"operationId":"abandonShipment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Marks a paid shipment as unused: out of the duplicate guard and of tracking polls; the cost stays.","x-required-scope":"shipments:write"}},"/orders/{id}/invoices/external":{"post":{"operationId":"registerExternalInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceExternal"}},"multipart/form-data":{"schema":{"properties":{"attach_to_channel":{"type":"string"},"corrects_number":{"type":"string"},"currency":{"type":"string"},"file":{"format":"binary","type":"string"},"gross_amount":{"type":"string"},"issue_date":{"type":"string"},"kind":{"type":"string"},"ksef_number":{"type":"string"},"net_amount":{"type":"string"},"number":{"type":"string"},"replace":{"type":"string"},"sale_date":{"type":"string"},"tax_amount":{"type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Registers an invoice issued outside OpenB2B (e.g. by the ERP): `number`, `issue_date`, `gross_amount` and the PDF (at most 3 MB) as a multipart `file` part or JSON `file_base64` (+ `file_name`); optionally `kind` (`invoice` default, or `correction` with `corrects_number` / `parent_invoice_id`), `sale_date`, `currency`, `net_amount`, `tax_amount`, `ksef_number`, `source_connection_id` (an `erp`/`other` connection; default: the built-in \"Zewnętrzny system (API)\"), `attach_to_channel` (omitted: the tenant setting; true attaches even on an amount mismatch) and `replace` (supersedes the order's current invoice locally). Stored `issued` with `source: external` and the PDF kept; the gross of a primary invoice is checked against the order total (`amount_mismatch` holds the automatic attach). Then it is attached to the sales-channel order where the channel takes documents. 201 with the invoice; the same number again on the same order is 200 with the existing one; on another order 409 `number_in_use`; a second primary invoice 409 `duplicate_invoice` unless `replace`. Refresh and corrections from Core do not apply (422 `not_applicable_for_external`).","x-required-scope":"invoices:write"}},"/orders/{id}/shipments/external":{"post":{"operationId":"registerExternalShipment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentExternal"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Registers a parcel bought outside OpenB2B (e.g. by the ERP on its own carrier contract): `carrier` (OBIP id such as `inpost`, `dpd`, or a name) and `tracking_number`, optionally `lines` (default: the whole order), `tracking_url`, `service_name`, `shipped_at`, `source_connection_id` (an `erp`/`other` connection; default: the built-in \"Zewnętrzny system (API)\") and `push_to_channel` (default true: the tracking number goes to the sales channel, e.g. a marketplace order). No label is bought and no carrier is called; the shipment is `created` with `label_source: external`, tracking status stays `unknown`. 201 with the shipment; a replay of the same carrier + number on the same order is 200 with the existing one; the same number on another order is 409 `tracking_in_use`. Cancelling it is local only: the channel keeps the number.","x-required-scope":"shipments:write"}},"/import-profiles/{id}":{"delete":{"operationId":"deleteImportProfile","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Delete a profile.","x-required-scope":"imports:write"},"get":{"operationId":"getImportProfile","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportProfile"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One profile.","x-required-scope":"imports:read"},"patch":{"operationId":"patchImportProfile","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportProfileWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportProfile"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Change a profile.","x-required-scope":"imports:write"},"put":{"operationId":"putImportProfile","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportProfileWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportProfile"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Same as PATCH.","x-required-scope":"imports:write"}},"/products/{product_id}/channel-media/{connection_id}/{image_id}":{"delete":{"operationId":"clearChannelMediaImage","parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"connection_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"image_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChannelMedia"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Clear one image's override (back to inherit).","x-required-scope":"products:write"},"put":{"operationId":"setChannelMediaImage","parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"connection_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"image_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelMediaSet"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChannelMedia"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set one image's override (`inherit` clears it). Unchanged values are a no-op.","x-required-scope":"products:write"}},"/price-lists/{list_id}/used-in":{"put":{"operationId":"putPriceListUsedIn","parameters":[{"in":"path","name":"list_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListUsedIn"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceList"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Replace where the list is used: the whole company, a sales connection (optionally one market), a customer group or a single buyer. A connection row without market makes this the connection's price list and takes the place of the previous one. An empty array leaves the list unused.","x-required-scope":"prices:write"}},"/rules/{id}/versions/{n}/restore":{"post":{"operationId":"restoreRuleVersion","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"n","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Make version `n`'s trigger, scope, conditions, actions, manual settings, schedule and stop flag the current definition (a new version with kind `restored`); name, group, priority and max_per_day stay. A version equal to the current definition answers 200 with the rule unchanged (no new version). 404 for an unknown version, 422 when the old definition no longer validates.","x-required-scope":"rules:write"}},"/openapi.json":{"get":{"operationId":"openapi","responses":{"200":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object"}}},"description":"OpenAPI document"}},"security":[],"summary":"This document."}},"/reports/{id}":{"get":{"operationId":"getReport","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"description":"first Warsaw day (YYYY-MM-DD), default 30 days back","in":"query","name":"from","required":false,"schema":{"type":"string"}},{"description":"last Warsaw day, inclusive; the range is at most 366 days","in":"query","name":"to","required":false,"schema":{"type":"string"}},{"description":"channel ids (comma separated)","in":"query","name":"connector_instance_id","required":false,"schema":{"type":"string"}},{"description":"markets (comma separated)","in":"query","name":"market","required":false,"schema":{"type":"string"}},{"description":"currencies (comma separated)","in":"query","name":"currency","required":false,"schema":{"type":"string"}},{"description":"buyer_agent, internal_agent, channel, manual","in":"query","name":"source","required":false,"schema":{"type":"string"}},{"description":"placed (default) or paid","in":"query","name":"basis","required":false,"schema":{"type":"string"}},{"description":"day|week|month|none and channel|market|product (margin only)|reason|kind|sku (returns-rate only)|method|source (refunds only), comma separated","in":"query","name":"group_by","required":false,"schema":{"type":"string"}},{"description":"true = convert at the NBP rate of the order's Warsaw day, no buffer","in":"query","name":"convert_to_pln","required":false,"schema":{"type":"string"}},{"description":"true = include orders from sandbox (test environment) connections; excluded by default","in":"query","name":"include_test","required":false,"schema":{"type":"string"}},{"description":"slow-movers: 30, 60, 90 (default) or 180","in":"query","name":"slow_days","required":false,"schema":{"type":"string"}},{"description":"top-products: revenue (default) or units","in":"query","name":"top_by","required":false,"schema":{"type":"string"}},{"description":"returns-rate: return (default, by request day) or order (by order placement day)","in":"query","name":"cohort","required":false,"schema":{"type":"string"}},{"description":"json (default) or csv; `Accept: text/csv` works too and needs reports.export","in":"query","name":"format","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Report"}},"text/csv":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One report by id: `sales-summary` (orders, units, net and gross product revenue, shipping charged once per order, per period, one block per currency; cancelled and rejected orders excluded, returned included), `top-products` (top 50 per currency; cost columns need `reports:margin`), `margin` (gross margin on goods, no fees, shipping cost, ads or returns; needs `reports:margin` and the grantor's reports.view_margin permission, otherwise 403), `stock-value`, `slow-movers`, `order-to-ship`, `returns-rate` (returned orders and units against shipped orders per period, channel, market, reason, kind or SKU - `group_by=sku` lists the most returned SKUs, top 50 per currency - one block per currency; rejected and cancelled returns excluded; `cohort=return` dates a return by its request day, `cohort=order` by the order's placement day), `refunds` (refund records by the day paid, per period, channel, method or record source, one block per currency, split into goods, shipping, deduction and other; voided records excluded). JSON by default, CSV with `format=csv` or `Accept: text/csv` (needs reports.export, audited).","x-required-scope":"reports:read"}},"/notification-layouts":{"get":{"operationId":"listNotificationLayouts","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/NotificationLayout"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"How customer e-mails look: the company layout (connector_instance_id null) and the shops' own layouts.","x-required-scope":"notifications:read"}},"/notification-templates/{id}":{"patch":{"operationId":"patchNotificationTemplate","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotificationTemplate"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Change a template.","x-required-scope":"notifications:write"}},"/conversations/{id}/messages/{message_id}/attachments/{index}":{"get":{"operationId":"getConversationAttachment","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"message_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"index","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Downloads one attachment, fetched from the sales channel on each request and not stored; every download is audited. Served as a download; types other than images and PDF come as application/octet-stream. 404 when the file is not available (still scanned, unsafe or expired), 422 `too_large` over 10 MB, 502 `channel_error` when the channel did not hand it over.","x-required-scope":"conversations:read"}},"/customers/{id}/merge":{"post":{"operationId":"mergeCustomer","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerMerge"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Merge another customer (source_id) into this one: its orders and identities move, the source is deleted.","x-required-scope":"customers:write"}},"/returns/{id}/correction":{"post":{"operationId":"correctReturnInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnCorrection"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"202":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Asks the accounting app to correct the invoice of the order by the accepted line quantities at the invoiced unit values (never from the refund amount); a full return of every invoiced line is a correction to zero (the parent becomes `superseded`). `?dry_run=true` returns the exact CorrectionRequest and the before/after lines. 202 with the correction invoice. Needs scope `invoices:write` and the invoices.correct permission. Errors: `no_invoice`, `invoice_not_issued`, `already_corrected`, `nothing_to_correct`, `ambiguous_parent` (send `parent_invoice_id`), `correction_in_progress`.","x-required-scope":"invoices:write"}},"/products/{product_id}/media":{"get":{"operationId":"listMedia","parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Media"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Images of a product, in order.","x-required-scope":"products:read"},"post":{"operationId":"addMedia","parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaPost"}},"multipart/form-data":{"schema":{"properties":{"ai_generated":{"type":"string"},"alt":{"type":"string"},"file":{"format":"binary","type":"string"},"variant_id":{"type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MediaWriteResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Add one image (`url`, fetched and checked: type by magic bytes, size, dimensions, duplicates) or merge/replace a list (`media`, `mode`), or upload a file (multipart `file` part plus optional `alt`, `variant_id`, `ai_generated`; hosted by us at a public https URL; JPEG/PNG/WebP/GIF only; 413 over the size cap, 422 for an unsupported, corrupt or duplicate image; `?dry_run=true` only checks the file).","x-required-scope":"products:write"}},"/listings/{id}/why":{"get":{"operationId":"whyListing","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingWhy"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Availability and price traces of a listing.","x-required-scope":"products:read"}},"/rules/{id}/enable":{"post":{"operationId":"enableRule","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Enable a rule. 422 `rule_blocked` while it uses a trigger or action that is not available yet.","x-required-scope":"rules:write"}},"/variants/{variant_id}/stock":{"get":{"operationId":"getVariantStock","parameters":[{"in":"path","name":"variant_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockView"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Levels per own warehouse, suppliers' warehouses apart (`supplier_levels`), ATP and the availability trace per listing.","x-required-scope":"products:read"}},"/price-lists/by-key/{key}":{"put":{"operationId":"upsertPriceListByKey","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceList"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceList"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create the list with this key (currency required) or update the sent fields; changing the currency is refused.","x-required-scope":"prices:write"}},"/shipments/bulk":{"post":{"operationId":"createBulkShipments","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentBulkExecute"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShipmentBulkResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"202":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShipmentBulkResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Executes a plan for the selected orders (202). Duplicates cannot be confirmed in bulk.","x-required-scope":"shipments:write"}},"/rule-runs/{id}/retry":{"post":{"operationId":"retryRuleRun","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RuleRunLog"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"202":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RuleRunLog"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Run a failed run's failed action again (202; the run goes back to `running` and a job picks it up). 409 `not_failed` for any other run, 409 `rule_disabled` when the run's rule is disabled or deleted (both problems). Transient errors (a connector that did not answer) are retried by the engine itself with backoff — see `limits` in the catalog; this is for the rest.","x-required-scope":"rules:write"}},"/returns/{id}":{"get":{"operationId":"getReturn","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Return"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One return with lines and refunds. `ETag` is the return version.","x-required-scope":"returns:read"}},"/rules/{id}/runs":{"get":{"operationId":"listRuleRuns","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"description":"matched|not_matched|out_of_scope|loop_blocked|stopped","in":"query","name":"decision","required":false,"schema":{"type":"string"}},{"description":"running|waiting|completed|failed","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"order or item id","in":"query","name":"subject_id","required":false,"schema":{"type":"string"}},{"description":"1..200","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleRunLog"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The run log of one rule, newest first; `decision` and `status` filter.","x-required-scope":"rules:read"}},"/products/{id}":{"delete":{"operationId":"archiveProduct","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Archive the product (status archived).","x-required-scope":"products:write"},"get":{"operationId":"getProduct","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One product with its variants.","x-required-scope":"products:read"},"patch":{"operationId":"patchProduct","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Merge the sent fields (lists merge by key; `mode: replace` replaces).","x-required-scope":"products:write"},"put":{"operationId":"putProduct","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Same merge semantics as PATCH.","x-required-scope":"products:write"}},"/domains/{id}/shop_hosts/{host_id}/check":{"post":{"operationId":"checkShopHost","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"host_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShopHost"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Look the CNAME up and, when it points at OpenB2B, probe the certificate now (hosts are also re-checked regularly).","x-required-scope":"mail:write"}},"/invoices":{"get":{"operationId":"listInvoices","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"description":"submitting, pending, issued, rejected, failed, ambiguous, superseded","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"invoice, correction, proforma","in":"query","name":"kind","required":false,"schema":{"type":"string"}},{"description":"normalised KSeF status","in":"query","name":"ksef_status","required":false,"schema":{"type":"string"}},{"description":"invoices of one order","in":"query","name":"order_id","required":false,"schema":{"type":"string"}},{"description":"invoices issued through a connection","in":"query","name":"connection_id","required":false,"schema":{"type":"string"}},{"description":"the number issued by the app","in":"query","name":"number","required":false,"schema":{"type":"string"}},{"description":"issue date (YYYY-MM-DD)","in":"query","name":"date","required":false,"schema":{"type":"string"}},{"description":"true = only invoices needing attention","in":"query","name":"attention","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Invoices, oldest first. Filters are ANDed; `attention=true` lists those that need a human (ambiguous, rejected, failed, stale pending, KSeF rejected, attach failed, amount mismatch, order changed after the invoice).","x-required-scope":"invoices:read"}},"/price-lists/by-key/{key}/entries":{"put":{"operationId":"putPriceEntriesByKey","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceEntries"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceEntriesResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set up to 2000 tiers of the list with this key; same body and result as putPriceEntries.","x-required-scope":"prices:write"}},"/orders/{id}/invoices":{"get":{"operationId":"listOrderInvoices","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Invoice"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Invoices of an order, oldest first.","x-required-scope":"invoices:read"},"post":{"operationId":"issueInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceIssue"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/InvoicePlan"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"202":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/InvoicePlan"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Asks the seller's accounting app to issue an invoice (202, status `submitting`; the number arrives asynchronously). `?dry_run=true` returns the exact request, the tax trace, warnings and blockers and persists nothing. A second invoice for the order is 409 `duplicate_invoice` unless `confirm_duplicate: true`; a replayed `Idempotency-Key` returns the same invoice. Never retried automatically after an ambiguous answer.","x-required-scope":"invoices:write"}},"/products/{product_id}/media/order":{"put":{"operationId":"reorderMedia","parameters":[{"in":"path","name":"product_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaOrder"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MediaWriteResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set the order by image ids.","x-required-scope":"products:write"}},"/purchase-orders/{id}":{"get":{"operationId":"getPurchaseOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrder"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One purchase order.","x-required-scope":"purchase_orders:read"}},"/notification-layouts/{id}":{"delete":{"operationId":"deleteNotificationLayout","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"A shop uses the company layout again.","x-required-scope":"notifications:write"},"put":{"operationId":"putNotificationLayout","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationLayoutWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotificationLayout"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set the layout of the company (`company`) or of one shop (its connection id). Header and footer use the template markup and placeholders.","x-required-scope":"notifications:write"}},"/catalog/settings":{"get":{"operationId":"getCatalogSettings","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogSettingsView"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The company's catalogue languages (locales; empty = not declared, any well-formed locale is accepted) and the default locale (last step of the content fallback).","x-required-scope":"products:read"},"put":{"operationId":"putCatalogSettings","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CatalogSettingsView"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Declare the catalogue languages and the default locale. Once declared, content in other locales is refused (422 unknown_locale).","x-required-scope":"products:admin"}},"/domains/{id}/shop_hosts":{"post":{"operationId":"attachShopHost","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShopHostWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShopHost"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShopHost"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Put a web shop's pages on an address under a verified domain (default `kasa.<domain>`). Publish the returned `cname_record`; the host goes live once the CNAME is seen and a certificate is issued. 409 `host_taken` (the address belongs to another shop) or `shop_has_host` (the shop already has an address); 422 `invalid_host`, `domain_not_verified`, `shop_hosts_off` (not available in this installation); 404 for an unknown shop.","x-required-scope":"mail:write"}},"/price-lists/{list_id}/entries/{sku}":{"delete":{"operationId":"deletePriceEntry","parameters":[{"in":"path","name":"list_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"sku","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"},{"description":"tier to remove","in":"query","name":"min_qty","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Remove a tier (`min_qty` query, default 1).","x-required-scope":"prices:write"},"put":{"operationId":"putPriceEntry","parameters":[{"in":"path","name":"list_id","required":true,"schema":{"type":"string"}},{"in":"path","name":"sku","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceEntryWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceEntry"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceEntry"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set the tier price of a SKU in a list.","x-required-scope":"prices:write"}},"/shipping/points":{"get":{"operationId":"searchShippingPoints","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"description":"required","in":"query","name":"connection_id","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"postal_code","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"city","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"country","required":false,"schema":{"type":"string"}},{"description":"comma list","in":"query","name":"point_ids","required":false,"schema":{"type":"string"}},{"description":"at most 50","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingPoints"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Pickup points of a connection.","x-required-scope":"shipments:read"}},"/orders/{id}/returns":{"post":{"operationId":"createReturn","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/ReturnPlan"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/ReturnPlan"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Opens a return (ZW/) or complaint (RK/) for a shipped order. Guards: order shipped or delivered (`order_not_shipped`; a complaint or channel return of an unshipped order needs `confirm: true`), lines of the order, over-return guard (`quantity_exceeds_returnable`). `?dry_run=true` returns the plan and warnings and persists nothing. `accept: true` accepts it at once. Idempotent on `Idempotency-Key`.","x-required-scope":"returns:write"}},"/returns/{id}/complete":{"post":{"operationId":"completeReturn","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnComplete"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"received -> completed; every accepted line must be resolved and a resolution set (default `refund` for a withdrawal). A missing refund record does not block. When every unit of the order is returned by completed refund returns the order moves to `returned`. `If-Match` is required.","x-required-scope":"returns:write"}},"/orders/{id}/conflicts/{field}/resolve":{"post":{"operationId":"resolveOrderConflict","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"field","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderResolveConflict"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Resolve a channel-vs-operator conflict: `take: channel` writes the channel's value and unlocks the field, `take: mine` keeps the operator's.","x-required-scope":"orders:write"}},"/variants/{variant_id}/used-in":{"get":{"operationId":"getVariantUsedIn","parameters":[{"in":"path","name":"variant_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Loose"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The bundles containing this variant: [{variant_id, sku, bundle_type, quantity, archived}]. Archiving it takes its virtual bundles to 0.","x-required-scope":"products:read"}},"/network/links/{id}/import":{"post":{"operationId":"importSharedProducts","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkImport"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NetworkImportResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NetworkImportResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Import shared products (by the supplier's SKU) into the reseller's catalogue: each gets a source item, a cost entry and stock at the supplier's location.","x-required-scope":"network:write"}},"/stock/documents/{id}":{"get":{"operationId":"getStockDocument","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockDocument"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One stock document.","x-required-scope":"products:read"}},"/products":{"get":{"operationId":"listProducts","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"$ref":"#/components/parameters/Sort"},{"description":"name contains / exact key","in":"query","name":"q","required":false,"schema":{"type":"string"}},{"description":"category id (subtree) or text","in":"query","name":"category","required":false,"schema":{"type":"string"}},{"description":"draft|active|archived","in":"query","name":"status","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Product"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"List products (keyset by created order, or by change time with updated_after / sort=updated).","x-required-scope":"products:read"},"post":{"operationId":"createProduct","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Product"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create a product, optionally with variants and media.","x-required-scope":"products:write"}},"/conversations/{id}":{"get":{"operationId":"getConversation","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversation"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One conversation with its messages, oldest first.","x-required-scope":"conversations:read"}},"/price-lists":{"get":{"operationId":"listPriceLists","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Loose"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Price lists of the tenant.","x-required-scope":"products:read"},"post":{"operationId":"createPriceList","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceList"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceList"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create a price list (name, currency and optionally the seller's key, tax basis, kind, status, group kind, priority, default). The first list of a company becomes its default; `default: true` moves the default to this list. The currency cannot change later.","x-required-scope":"prices:write"}},"/mail/domains/{id}":{"delete":{"operationId":"removeMailDomain","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"502":{"$ref":"#/components/responses/Problem"}},"summary":"Remove a domain with its addresses; e-mails go from the default address again. 502 `use_disable_failed` when the mail provider could not forget the domain: the domain is kept, try again. 409 `domain_in_use` while a web shop still has an address under the domain (detach it first, or use `DELETE /domains/{id}`).","x-required-scope":"mail:write"},"get":{"operationId":"getMailDomain","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailDomain"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One sender domain.","x-required-scope":"mail:read"}},"/variants/by-key/{key}":{"get":{"operationId":"getVariantByKey","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Variant"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Resolve a variant by sku, `gtin:<digits>`, `external:<connector>:<id>` or `mpn:<brand_code>:<mpn>`.","x-required-scope":"products:read"},"put":{"operationId":"upsertVariantByKey","parameters":[{"in":"path","name":"key","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VariantWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Variant"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Variant"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Upsert a variant by key; creates the whole chain when missing.","x-required-scope":"products:write"}},"/bank-transactions/{id}/apply":{"post":{"operationId":"applyBankTransfer","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankTransferApply"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BankTransaction"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Apply a transfer to orders (ids or numbers; none = the proposed order): an entry in each order's payment ledger. Several orders: each but the last gets its outstanding amount.","x-required-scope":"bank:write"}},"/suppliers/{id}/run":{"post":{"operationId":"runSupplier","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierRun"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportJob"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportJob"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Fetch the supplier's feed now: an import job is created (planned in the background; applied at once unless the profile requires confirmation). `force` ignores ETag and content hash; `dry_run` only previews.","x-required-scope":"imports:write"}},"/shipments/attention":{"get":{"operationId":"getShipmentAttention","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShippingAttention"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Counters of what needs a human.","x-required-scope":"shipments:read"}},"/bank-transactions":{"get":{"operationId":"listBankTransactions","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/BankTransaction"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Incoming transfers from bank statements, newest booking first; `status` = new, matched, applied, ignored.","x-required-scope":"bank:read"}},"/listings/{id}/resume":{"post":{"operationId":"resumeListing","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Listing"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Reactivate an ended or paused offer (`listings.write op=publish`).","x-required-scope":"listings:write"}},"/customers":{"get":{"operationId":"listCustomers","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPage"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"End customers recognised across orders and channels, latest order first, 50 per page. Filters: q (name, e-mail, phone, company, tax id), channel (connection id), tag, b2b=1, min_orders, page.","x-required-scope":"customers:read"}},"/invoices/{id}":{"get":{"operationId":"getInvoice","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One invoice with lines, the tax trace and its history. `ETag` is the invoice version.","x-required-scope":"invoices:read"}},"/customers/{id}":{"get":{"operationId":"getCustomer","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One customer with its orders.","x-required-scope":"customers:read"},"patch":{"operationId":"patchCustomer","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Customer"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The staff's tags and note.","x-required-scope":"customers:write"}},"/invoices/{id}/ksef-send":{"post":{"operationId":"sendInvoiceToKsef","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Invoice"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Manual re-send to KSeF after a rejection or error; at most 3 a day, never while processing or accepted.","x-required-scope":"invoices:write"}},"/shipments/bulk/plan":{"post":{"operationId":"planBulkShipments","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentBulk"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShipmentBulkPlan"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Read-only plan for up to 200 orders: what each would get, warnings and blockers. Returns `plan_id`.","x-required-scope":"shipments:write"}},"/listings/{id}/price-review":{"post":{"operationId":"reviewListingPrice","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceReview"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Listing"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Decide on a held price: `approve` sends it if the calculation still gives it, `reject` keeps the channel's price and stops proposing that value. 422 `not_held` when nothing waits.","x-required-scope":"listings:write"}},"/media/{id}/restore":{"post":{"operationId":"restoreMediaVersion","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaRestore"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Media"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Make an earlier version current again (recorded as a new version).","x-required-scope":"products:write"}},"/orders/{id}/notifications":{"get":{"operationId":"listOrderNotifications","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/NotificationDelivery"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Notifications sent (or skipped, with the reason) for an order, newest first.","x-required-scope":"notifications:read"},"post":{"operationId":"sendOrderNotification","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationSend"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotificationDelivery"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotificationDelivery"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Send one template to the order's customer now. The answer is the delivery: queued, or skipped with a reason (no_email, no_phone, template_disabled, sms_not_connected, no_mailer, order_redacted).","x-required-scope":"notifications:write"}},"/uploads":{"post":{"operationId":"createUpload","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Upload"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Upload"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Stage a file for later use as `source: {kind: file_ref, upload_id}`. Send multipart (`file` field) or the raw bytes with their `Content-Type` (name via `?filename=`; send JSON files as multipart or `application/octet-stream`). Limit 100 MB (413); uploads expire after 24 h.","x-required-scope":"imports:write"}},"/listings":{"get":{"operationId":"listListings","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"$ref":"#/components/parameters/Sort"},{"description":"filter","in":"query","name":"connection_id","required":false,"schema":{"type":"string"}},{"description":"filter","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"filter","in":"query","name":"sku","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Listing"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Channel listings.","x-required-scope":"products:read"}},"/invoice-links/{token}":{"get":{"operationId":"downloadInvoiceLink","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/pdf":{"schema":{"format":"binary","type":"string"}}},"description":"The invoice PDF"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string"},"detail":{"type":"string"},"missing":{"items":{},"type":"array"}},"required":["code","detail"],"type":"object"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not found: problem+json, or (e.g. `no_pdf`) plain JSON `{code, detail}`"},"410":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string"},"detail":{"type":"string"},"missing":{"items":{},"type":"array"}},"required":["code","detail"],"type":"object"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not found: problem+json, or (e.g. `no_pdf`) plain JSON `{code, detail}`"}},"security":[],"summary":"Downloads an invoice PDF behind a signed link (valid 15 minutes) handed out by the MCP tool `invoice_pdf_link`. The token is the credential; every download is audited; 410 when it expired."}},"/stock/movements":{"post":{"operationId":"createStockMovement","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockMovement"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StockView"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Receipt / adjustment / transfer with a reason (never an absolute value); schedules channel pushes.","x-required-scope":"stock:write"}},"/order-status-groups/{id}":{"delete":{"operationId":"deleteOrderStatusGroup","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Delete an empty group (409 `group_not_empty`).","x-required-scope":"orders:admin"},"get":{"operationId":"getOrderStatusGroup","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusGroup"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One group.","x-required-scope":"orders:read"},"patch":{"operationId":"updateOrderStatusGroup","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusGroupPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderStatusGroup"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Rename or move a group.","x-required-scope":"orders:admin"}},"/import-jobs/{id}":{"get":{"operationId":"getImportJob","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportJob"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Status, counts and the preview.","x-required-scope":"imports:read"}},"/shipments/{id}/label":{"get":{"operationId":"getShipmentLabel","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"description":"pdf, zpl or epl","in":"query","name":"format","required":false,"schema":{"type":"string"}},{"description":"a4, a6 or carrier_default","in":"query","name":"size","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string"},"detail":{"type":"string"},"missing":{"items":{},"type":"array"}},"required":["code","detail"],"type":"object"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not found: problem+json, or (e.g. `no_pdf`) plain JSON `{code, detail}`"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Downloads the label file (`format`, `size`; default pdf / carrier default). Fetched from the carrier once and stored.","x-required-scope":"shipments:read"}},"/orders/{id}/returnable":{"get":{"operationId":"getReturnableLines","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Returnable"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Per active order line: ordered, already in non-rejected returns, still returnable.","x-required-scope":"returns:read"}},"/listings/drafts":{"post":{"operationId":"createListingDraft","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Draft"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Draft"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Build a draft from variant + connection (+ template). 409 `already_listed` when the connection already has an offer of this SKU that has not ended (matched by catalog link or by SKU): edit that offer, or send `allow_duplicate: true` to list a further offer of the SKU (e.g. to compare offers or to show one only on some markets; marketplaces may restrict duplicate offers).","x-required-scope":"listings:write"}},"/purchase-orders/{id}/receive":{"post":{"operationId":"receivePurchaseOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PurchaseOrder"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Receive what the supplier confirmed and not yet received: a posted PZ into the default warehouse at the lines' cost.","x-required-scope":"purchase_orders:write"}},"/orders/{id}/conversations":{"get":{"operationId":"listOrderConversations","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Conversation"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The conversations about one order, newest message first.","x-required-scope":"conversations:read"}},"/categories":{"get":{"operationId":"listCategories","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/CategoryNode"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Category tree.","x-required-scope":"products:read"},"post":{"operationId":"createCategory","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Category"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Category"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create a category.","x-required-scope":"products:write"}},"/mail/domains":{"get":{"operationId":"listMailDomains","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MailDomain"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The company's own sender domains: DNS records to set, verification checks, `ready` once verified with a sending key.","x-required-scope":"mail:read"},"post":{"operationId":"addMailDomain","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailDomainWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MailDomain"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MailDomain"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Add a sender domain; the answer lists the DNS records to set. A domain belongs to one company.","x-required-scope":"mail:write"}},"/rules/{id}/dry-run":{"post":{"operationId":"dryRunRule","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleDryRun"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RulePreview"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Evaluate the rule over the subjects of the last `days` days (default 7) without writing anything: per subject the condition trace and what each action would do.","x-required-scope":"rules:read"}},"/rules/{id}/run":{"post":{"operationId":"runRule","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleRunRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RuleRunLog"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Run an enabled rule now. A `manual` rule takes `order_ids` (max 500); any other order rule is back-filled over `days` on the orders its preview matches (max 500). Each order is logged as its own run. `?dry_run=true` returns the preview of the same selection and runs nothing.","x-required-scope":"rules:write"}},"/webhooks":{"get":{"operationId":"listWebhooks","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Webhook"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Webhook endpoints (the secret is never listed).","x-required-scope":"events:read"},"post":{"operationId":"createWebhook","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Webhook"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Webhook"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Register an endpoint. The URL must be public (same SSRF guard as feeds). The response carries the signing `secret` once. Deliveries carry OpenB2B-Event-Id, OpenB2B-Event-Type, OpenB2B-Delivery-Id and OpenB2B-Signature (`t=<unix>,v1=<hex HMAC-SHA256 of \"t.body\">`).","x-required-scope":"events:write"}},"/listings/{id}/images/restore":{"post":{"operationId":"restoreListingImages","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Listing"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Queue an update of the offer's images only to our current gallery (same path as `PATCH` with `images`: validated against the channel's rules, then sent asynchronously). `?dry_run=true` shows the diff and sends nothing. 422 when the offer is ended, unmatched, already being updated or the product has no images.","x-required-scope":"listings:write"}},"/stock/locations/{id}/default":{"post":{"operationId":"setDefaultLocation","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Location"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Make an own warehouse the default: where stock goes when nothing names a warehouse.","x-required-scope":"stock:write"}},"/stock/settings":{"get":{"operationId":"getStockSettings","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockSettingsView"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Company stock settings: `stock_out_at`, the order status from which reservations become sales.","x-required-scope":"products:read"},"put":{"operationId":"putStockSettings","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockSettings"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/StockSettingsView"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set `stock_out_at` (accepted, ready_to_ship or shipped). Orders already at or past the new point have their active reservations turned into sales in the same call (`settled_orders` counts them); moving the point later undoes no sale.","x-required-scope":"stock:write"}},"/purchase-orders":{"get":{"operationId":"listPurchaseOrders","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PurchaseOrder"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Purchase orders to trade-network suppliers, newest first.","x-required-scope":"purchase_orders:read"},"post":{"operationId":"createPurchaseOrder","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseOrderCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PurchaseOrder"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PurchaseOrder"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"A draft to a trade-network supplier from variants it supplies.","x-required-scope":"purchase_orders:write"}},"/import-jobs":{"get":{"operationId":"listImportJobs","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ImportJob"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Recent import jobs.","x-required-scope":"imports:read"},"post":{"operationId":"createImportJob","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportJobCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportJob"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ImportJob"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create a job from inline `items`, an NDJSON body (`Content-Type: application/x-ndjson`, `profile_id` as query), a `file_ref` (`content` / `content_base64`), a staged upload (`source: {kind: file_ref, upload_id}`), a `url` (feeds) or a `connector` (reverse import from listings). Small bodies carried in the request (up to 500 items) are planned before the response; uploads, URLs and bigger bodies are planned in the background (`status: validating`, progress in `counts.planned` / `counts.total`). The job is parsed, mapped, matched and dry-run through the same code as the write endpoints and stays `previewed`; `auto_confirm` applies it at once (Oban queue `imports`, batches of 200), `dry_run` never does.","x-required-scope":"imports:write"}},"/reports":{"get":{"operationId":"listReports","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportList"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The reports available to the key (the margin report only with `reports:margin`) and the filter parameters they share.","x-required-scope":"reports:read"}},"/rules/draft":{"post":{"operationId":"draftRule","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleDraft"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Rule"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"},"502":{"$ref":"#/components/responses/Problem"},"503":{"$ref":"#/components/responses/Problem"}},"summary":"Draft a rule from a sentence (`text`, 3–1000 characters) with the configured language model: the model sees the rules catalog and the tenant's status keys, never order data; its answer is validated like any rule (one repair round) and saved **disabled** with `created_from: nl_draft`, the sentence as `description` and the model's `notes`. Errors are problems: 422 with the problems when the answer stays invalid or the text is outside 3–1000 characters (`text_length`), 429 `draft_rate_limited` with `Retry-After` when the company's hourly drafting allowance is used up, 409 `draft_in_progress` while another draft of the company is being prepared, 503 `ai_disabled` without a model, 502 `ai_provider` when the model does not answer.","x-required-scope":"rules:write"}},"/order-statuses":{"get":{"operationId":"listOrderStatuses","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderStatus"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The seller's order statuses by position. `canonical` is the fixed vocabulary (received, accepted, ready_to_ship, shipped, delivered, cancelled, returned); a status is the seller's refinement of it.","x-required-scope":"orders:read"},"post":{"operationId":"createOrderStatus","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderStatus"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderStatus"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Create a status. `name` and `canonical` are required; `key` defaults to a slug of the name and, like `canonical`, cannot be changed later. `colour` is a palette name (zinc, sky, emerald, amber, indigo, teal, rose). 409 `key_taken`; 422 `unknown_group`, `invalid_key`.","x-required-scope":"orders:admin"}},"/listings/{id}":{"get":{"operationId":"getListing","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Listing"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One listing.","x-required-scope":"products:read"},"patch":{"operationId":"updateListing","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListingUpdate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Listing"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Edit a live offer (title, description, images, parameters, compliance, delivery). Queues validation and `listings.write op=update`; price and stock are not touched. 422 for an ended offer or an update already in flight.","x-required-scope":"listings:write"}},"/events":{"get":{"operationId":"listEvents","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"description":"cursor from next_cursor","in":"query","name":"after","required":false,"schema":{"type":"string"}},{"description":"comma list, e.g. stock.changed,price.changed","in":"query","name":"types","required":false,"schema":{"type":"string"}},{"description":"1..500","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventPage"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The public event feed over the domain-event log, ascending by (occurred_at, id). `after` is the opaque cursor from `next_cursor`; `types` is a comma list of public types; `limit` 1..500 (default 100). Resume by storing `next_cursor`.","x-required-scope":"events:read"}},"/returns/{id}/reject":{"post":{"operationId":"rejectReturn","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnReject"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"requested/accepted -> rejected with a code and a reason. `write_to_channel` also needs the returns.reject_channel permission. `If-Match` is required.","x-required-scope":"returns:write"}},"/listings/price-changes":{"get":{"operationId":"listPriceChanges","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"description":"held or pending","in":"query","name":"state","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Listing"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Offers whose calculated channel price differs from the channel's. `state=held` (default): waiting for a decision, because the change is above the connection's threshold, under the purchase cost or the channel gives no price. `state=pending`: not sent, usually because price sync is off on the connection.","x-required-scope":"products:read"}},"/media/{id}/file":{"put":{"operationId":"replaceMediaFile","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaReplace"}},"multipart/form-data":{"schema":{"properties":{"file":{"format":"binary","type":"string"}},"required":["file"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Media"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Replace the file of an image with a new version: multipart `file` part or JSON `{url}`. The newest 5 versions are kept.","x-required-scope":"products:write"}},"/bank-statements":{"post":{"operationId":"uploadBankStatement","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankStatementUpload"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BankImportResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BankImportResult"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Import a statement (CAMT.053, MT940, or CSV with a mapping), base64 in JSON. Exact matches (order or invoice number in the title and the outstanding amount) are applied when the tenant has automatic applying on; a re-upload adds nothing.","x-required-scope":"bank:write"}},"/listings/compliance-objects":{"get":{"operationId":"listComplianceObjects","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"description":"connection id (required)","in":"query","name":"connection_id","required":false,"schema":{"type":"string"}},{"description":"filter","in":"query","name":"kind","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ComplianceObject"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"A connection's compliance and delivery objects (responsible producers and persons, return and warranty policies, shipping rates). Their `id`s go into a draft's `compliance` and `delivery`.","x-required-scope":"products:read"},"post":{"operationId":"createComplianceObject","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplianceObjectCreate"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ComplianceObject"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ComplianceObject"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Add a responsible producer or person on the channel. Safe to repeat: the same `name` with the same data returns the existing object. 422 with field errors when the channel refuses it or cannot add objects.","x-required-scope":"listings:write"}},"/webhooks/{id}/deliveries/{delivery_id}/replay":{"post":{"operationId":"replayWebhookDelivery","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"in":"path","name":"delivery_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WebhookDelivery"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Queue the same delivery (same id, same body) again.","x-required-scope":"events:write"}},"/price-lists/{list_id}/calculation":{"put":{"operationId":"putPriceListCalculation","parameters":[{"in":"path","name":"list_id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceListCalculation"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PriceList"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set how the list gets its prices: entered, or calculated from another list (price_list_id or price_list_key) or from each item's purchase price, converted by fx when the source is in another currency (mode fixed with rate, or daily with source nbp and buffer_pct), then the steps in order (percent pct, fixed_delta amount, multiplier factor, markup_on_cost pct, floor_margin pct, round mode end_99|step). A price entered in a calculated list is an exception that wins. Calculated prices follow their source and are never stored.","x-required-scope":"prices:write"}},"/network/links/{id}/catalogue":{"get":{"operationId":"getSharedCatalogue","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SharedProduct"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Products the supplier shares on an active link (reseller side only), with the reseller's price and stock.","x-required-scope":"network:read"}},"/network/links":{"get":{"operationId":"listNetworkLinks","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/NetworkLink"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The caller's trade-network links, newest first, with its role and the partner's card.","x-required-scope":"network:read"}},"/order-status-groups/order":{"put":{"operationId":"reorderOrderStatusGroups","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusOrder"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderStatusGroup"},"type":"array"}},"required":["data"],"type":"object"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set the order of every group (`ids` lists all of them exactly once).","x-required-scope":"orders:admin"}},"/mail/addresses":{"get":{"operationId":"listMailAddresses","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MailAddress"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Sender addresses, the default first.","x-required-scope":"mail:read"},"post":{"operationId":"createMailAddress","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailAddressWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MailAddress"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MailAddress"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"A sender address on a verified domain; `default: true` makes it the company default.","x-required-scope":"mail:write"}},"/orders/{id}/timeline":{"get":{"operationId":"getOrderTimeline","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OrderTimelineEntry"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The order's history (events, notes, stock movements, sync operations), newest first; cursor-paged.","x-required-scope":"orders:read"}},"/uploads/{id}/content":{"get":{"operationId":"getUploadContent","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The bytes of a staged or kept upload: what a `file` custom field value links to. Needs `imports:read`, `orders:read` or `products:read`.","x-required-scope":"imports:read"}},"/import-jobs/{id}/items":{"get":{"operationId":"listImportItems","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"description":"created|updated|unchanged|skipped|skipped_ownership|rejected|would_erase|vanished","in":"query","name":"outcome","required":false,"schema":{"type":"string"}},{"description":"1..200","in":"query","name":"limit","required":false,"schema":{"type":"string"}},{"description":"from next_cursor","in":"query","name":"cursor","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportItem"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Per-item results (keyset by line); `outcome` filters.","x-required-scope":"imports:read"}},"/rules/{id}/versions":{"get":{"operationId":"listRuleVersions","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleVersionList"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The stored versions of a rule, newest first: {version, kind created|edited|restored, by, restored_from, definition, created_at}. `version` moves on trigger, scope, conditions, actions, manual, schedule or stop changes — not on a reorder.","x-required-scope":"rules:read"}},"/orders/{id}/status":{"post":{"operationId":"setOrderStatus","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusChange"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Move to a canonical `status` or a seller `status_id`. Any forward move of received, accepted, ready_to_ship, shipped, delivered is allowed (steps may be skipped; reservations are consumed when the order reaches shipped or delivered); cancelled from any non-final status; returned from shipped or delivered. A move back needs `force: true` and scope `orders:admin` and is audited. 409 `illegal_transition`. Cancelling releases stock.","x-required-scope":"orders:write"}},"/shipments/{id}/confirm-absent":{"post":{"operationId":"confirmShipmentAbsent","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipmentConfirm"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Shipment"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"The operator confirms the carrier shows no such shipment: ambiguous (or stale pending) becomes failed `operator_confirmed_absent`.","x-required-scope":"shipments:write"}},"/suppliers/{id}/items/add":{"post":{"operationId":"addSupplierItemsToCatalogue","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierItemsAdd"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierItemsAddResult"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Add chosen offers (1..200 distinct `ids`; ids of other suppliers or tenants are ignored) to the catalogue, synchronously. An offer matching an existing product (by GTIN; by SKU only when neither side has a GTIN) is only linked: that product's own data and prices stay unchanged and the wholesaler does not become its preferred supplier. A new product gets the wholesaler as its preferred supplier and its cost from the supplier's cost list. Offers that cannot be added come back in `skipped` with a reason: already_in_catalogue, inactive, no_price, currency_mismatch, not_imported, not_linked, cost_entry_failed or sku_conflict (the SKU belongs to a product whose GTIN is missing on one side only, or differs, so the offer is neither linked nor imported: fill in or correct the EAN on the product). There is no dry run: `?dry_run=true` is 400 `dry_run_not_supported`. New products fetch their images during the call, so a large batch may take long: send smaller batches (a few dozen ids) and do not retry before the call has returned. 404 for a supplier that is not a connected wholesaler; 422 for no ids, too many ids or a supplier without a cost price list (`no_cost_list`).","x-required-scope":"imports:write"}},"/shipments/labels":{"get":{"operationId":"getShipmentLabels","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"description":"comma separated shipment ids","in":"query","name":"ids","required":false,"schema":{"type":"string"}},{"description":"pdf, zpl or epl","in":"query","name":"format","required":false,"schema":{"type":"string"}},{"description":"a4, a6 or carrier_default","in":"query","name":"size","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"content":{"application/json":{"schema":{"properties":{"code":{"type":"string"},"detail":{"type":"string"},"missing":{"items":{},"type":"array"}},"required":["code","detail"],"type":"object"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}},"description":"Not found: problem+json, or (e.g. `no_pdf`) plain JSON `{code, detail}`"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One file, or a zip for several (`ids` comma list, at most 100). Missing labels are listed in `X-Labels-Missing`.","x-required-scope":"shipments:read"}},"/notification-templates":{"get":{"operationId":"listNotificationTemplates","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/NotificationTemplate"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Customer notification templates (e-mail, SMS) with `{placeholders}`.","x-required-scope":"notifications:read"},"post":{"operationId":"createNotificationTemplate","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotificationTemplateWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotificationTemplate"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"201":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotificationTemplate"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"A new template.","x-required-scope":"notifications:write"}},"/rules/catalog":{"get":{"operationId":"getRuleCatalog","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RuleCatalog"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Triggers, actions, condition paths and starter templates; each part says `available: false` with a `reason` when it is not built yet.","x-required-scope":"rules:read"}},"/returns/{id}/refunds":{"get":{"operationId":"listReturnRefunds","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Loose"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Refund records of a return, including voided ones.","x-required-scope":"returns:read"},"post":{"operationId":"recordReturnRefund","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReturnRefund"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Return"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Records a refund that was paid (amount, method, date, reference). A record only: Core executes no payment. Needs the returns.refund permission; above the order's paid amount it is 422 `refund_exceeds_paid` unless `confirm: true`. `If-Match` is required.","x-required-scope":"returns:write"}},"/webhooks/{id}":{"delete":{"operationId":"deleteWebhook","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Remove an endpoint and its deliveries.","x-required-scope":"events:write"},"get":{"operationId":"getWebhook","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One webhook.","x-required-scope":"events:read"},"patch":{"operationId":"patchWebhook","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Webhook"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Change url, types, description or `active` (re-enabling clears an automatic disable).","x-required-scope":"events:write"},"put":{"operationId":"putWebhook","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Webhook"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Same as PATCH.","x-required-scope":"events:write"}},"/mail/shops":{"get":{"operationId":"listMailShops","parameters":[{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/MailShop"},"type":"array"}},"required":["data"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Sales channels and their sender address (null: the company default).","x-required-scope":"mail:read"}},"/suppliers/{id}/items/cost-source":{"post":{"operationId":"setSupplierItemsCostSource","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierItemsCostSource"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupplierItemsCostSourceResult"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Choose (`use: true`) or drop (`use: false`) the wholesaler as the cost source of products already in the catalogue (1..200 distinct offer `ids`; ids of other suppliers or tenants are ignored), synchronously. `use: true` makes the wholesaler the product's preferred supplier, also when another supplier was preferred: the price tool then calculates cost-based selling prices from the wholesaler's cost, so those prices change. If the supplier's cost list has no entry for the product, one is written from the offer when it is active, priced and in the supplier's currency. `use: false` clears the preferred supplier only where it is this wholesaler, and the automatic repair never prefers it again for that product until `use: true` is sent. Offers that were not changed come back in `skipped` with a reason: not_in_catalogue, inactive, no_price, currency_mismatch, cost_entry_failed, already_preferred, not_preferred or update_failed. The offer list shows the state as `cost_source`. There is no dry run: `?dry_run=true` is 400 `dry_run_not_supported`. 404 for a supplier that is not a connected wholesaler; 422 for no ids or too many ids.","x-required-scope":"imports:write"}},"/returns":{"get":{"operationId":"listReturns","parameters":[{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Cursor"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Fields"},{"$ref":"#/components/parameters/UpdatedAfter"},{"description":"requested, accepted, received, completed, rejected, cancelled","in":"query","name":"status","required":false,"schema":{"type":"string"}},{"description":"withdrawal, complaint","in":"query","name":"kind","required":false,"schema":{"type":"string"}},{"description":"manual, channel, api, form","in":"query","name":"source","required":false,"schema":{"type":"string"}},{"description":"returns of one order","in":"query","name":"order_id","required":false,"schema":{"type":"string"}},{"description":"ISO 8601 timestamp","in":"query","name":"updated_since","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Return"},"type":"array"},"next_cursor":{"oneOf":[{"type":"string"},{"type":"null"}]}},"required":["data","next_cursor"],"type":"object"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Returns and complaints, oldest first (without lines and refunds). Filters are ANDed.","x-required-scope":"returns:read"}},"/categories/{id}":{"patch":{"operationId":"patchCategory","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Category"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Rename or move (cycles are refused).","x-required-scope":"products:write"}},"/orders/{id}":{"get":{"operationId":"getOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/Fields"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}},"description":"OK","headers":{"ETag":{"schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One order with its lines. `fields` adds `notes`, `stock` (reservations per line, with `location_id`), `allocations` (the same reservations grouped by warehouse, default first; a bundle's components carry `bundle_line_id`), `payments` (the payment ledger) and `timeline` (first page). `payments`, `allocations` and `stock` also work on the order list (read per page, not per order).","x-required-scope":"orders:read"},"patch":{"operationId":"updateOrder","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"},{"$ref":"#/components/parameters/IfMatch"},{"$ref":"#/components/parameters/Force"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Order"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"412":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"428":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Edit buyer, addresses, invoice flag, label, tags, lines (`set_quantity`, `set_price`, `add`, `remove`) and, on manual orders, `payment_status`. `If-Match` is required when `lines` is present (428). Editing a quantity changes channel stock. 409 `not_editable`, `order_closed`, `channel_owned_field`; stock shortfall on `add` is a warning.","x-required-scope":"orders:write"}},"/mail/shops/{id}":{"put":{"operationId":"setMailShop","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MailShopWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MailShop"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Set a shop's sender address, or null for the company default.","x-required-scope":"mail:write"}},"/listings/drafts/{id}/publish":{"post":{"operationId":"publishListingDraft","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Draft"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Queue publishing.","x-required-scope":"listings:write"}},"/custom-fields/{id}":{"delete":{"operationId":"archiveCustomField","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/DryRun"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DryRun"}}},"description":"The dry-run diff (`?dry_run=true`)"},"204":{"description":"No content"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Archive a definition: stored values stay readable, writes to the key are refused.","x-required-scope":"orders:admin"},"get":{"operationId":"getCustomField","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomField"}}},"description":"OK"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"One definition.","x-required-scope":"orders:read"},"patch":{"operationId":"patchCustomField","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/VersionHeader"},{"$ref":"#/components/parameters/IdempotencyKey"},{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomFieldPatch"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomField"},{"$ref":"#/components/schemas/DryRun"}]}}},"description":"OK (the dry-run diff with `?dry_run=true`)"},"400":{"$ref":"#/components/responses/Problem"},"401":{"$ref":"#/components/responses/Problem"},"403":{"$ref":"#/components/responses/Problem"},"404":{"$ref":"#/components/responses/Problem"},"409":{"$ref":"#/components/responses/Problem"},"413":{"$ref":"#/components/responses/Problem"},"422":{"$ref":"#/components/responses/Problem"},"429":{"$ref":"#/components/responses/Problem"}},"summary":"Change label, options, position or `archived`.","x-required-scope":"orders:admin"}}},"security":[{"bearerAuth":[]}],"servers":[{"url":"/api/v1"}]}