{"openapi":"3.1.0","info":{"title":"Fulfillment Manager API","version":"0.1.0","description":"Event-sourced fulfillment (dispatch) service. Owns the sales-order pipeline — `draft? → order → allocate → pick → pack → ship → invoice`, with a refund path back out — whose shape is configured per tenant and snapshotted onto each order, so combining steps (pick+pack for a merchant with no warehouse, ship+invoice for one who invoices on despatch) is configuration rather than a different code path. For tracked SKUs the pick names exactly which serials/lot left the shelf, validated against the registry fold (purchasing receipts, minus what is picked or already dispatched, plus what came back on a refund). Ship authorisation is the COGS trigger for accounting. Quantity movements — reserve at allocation, dispatch at ship, return at refund — are commanded through the inventory service, the platform's source of truth for stock levels."},"paths":{"/workflow":{"get":{"tags":["workflow"],"operationId":"workflow.get","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"WorkflowConfig","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowConfigEncoded"},"examples":{"contract":{"summary":"workflow.get","value":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The tenant's order pipeline. A tenant that has never configured one gets the default pipeline: on-account terms, a manual pick whose pack rides with it, a manual ship, no invoicing, a shortfall that waits, and quotes sent to customers.\n\nRequires `settings:read` or `orders:read`.","x-mcp-tool":{"name":"fulfillment_get_workflow","title":"Fulfillment: Get workflow","toolset":"fulfillment","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["settings:read","orders:read"],"x-example-source":{"origin":"contract"}},"put":{"tags":["workflow"],"operationId":"workflow.set","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"WorkflowConfig","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowConfigEncoded"},"examples":{"order-to-cash":{"summary":"Order to cash","value":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"split"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Replace the tenant's pipeline; an omitted field takes its default. A step may not be manual when the step before it is automatic — `pick: \"auto\"` with `pack: \"manual\"` is refused with 400. Appends `fulfillment.workflow-configured`. Idempotent by content: the event is a last-write-wins snapshot of the whole pipeline, and an identical one appends nothing. `allocation` chooses where stock is drawn from: `single-site-preferred` (the default) ships the order from the first site in the routing order that can fill it, else per-site; `per-site` draws each line from the sites in that order. `routing.order`: `rank` (default, the priority list then site ranks), `nearest` (distance to the ship-to, rank breaking ties) or `stable`. `quoteMode: draft-orders` refuses issuing, sending and linking quotes (`QuotesDisabled`). `requireCustomer` (default `true`) refuses an order or a placed quote without a customer (`CustomerRequired`). Orders already created keep the pipeline they were created under.\n\nRequires `settings:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowConfigEncoded"},"example":{"pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"split","paymentTerms":"on-account"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_set_workflow","title":"Fulfillment: Set workflow","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["settings:write"],"x-example-source":{"origin":"workflow","workflow":"order-to-cash","step":1}}},"/line-item-properties":{"get":{"tags":["lineProperties"],"operationId":"lineProperties.get","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"LineProperties","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinePropertiesEncoded"},"examples":{"contract":{"summary":"lineProperties.get","value":{"allowOther":true,"definitions":[{"id":"lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607181","name":"Engraving","type":"text","options":[],"required":true,"maxLength":24,"helpText":"Up to 24 characters, engraved as typed","appliesTo":{"tags":["engravable"],"productIds":[],"skus":[]},"customerVisible":true,"archived":false},{"id":"lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607182","name":"Gift wrap","type":"select","options":["None","Kraft","Gold foil"],"required":false,"appliesTo":{"tags":[],"productIds":[],"skus":[]},"customerVisible":true,"archived":false},{"id":"lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607183","name":"_Batch","type":"text","options":[],"required":false,"appliesTo":{"tags":[],"productIds":[],"skus":[]},"customerVisible":false,"archived":false}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The tenant's line item properties: the definitions (`lip_`) an order line's `attributes` are held to, in display order, and `allowOther`. None defined answers `allowOther: true`. Appends nothing: a read of the settings.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_get_line_properties","title":"Fulfillment: Get line properties","toolset":"imports","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}},"put":{"tags":["lineProperties"],"operationId":"lineProperties.set","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"LineProperties","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinePropertiesEncoded"},"examples":{"contract":{"summary":"lineProperties.set","value":{"allowOther":true,"definitions":[{"id":"lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607181","name":"Engraving","type":"text","options":[],"required":true,"maxLength":24,"helpText":"Up to 24 characters, engraved as typed","appliesTo":{"tags":["engravable"],"productIds":[],"skus":[]},"customerVisible":true,"archived":false},{"id":"lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607182","name":"Gift wrap","type":"select","options":["None","Kraft","Gold foil"],"required":false,"appliesTo":{"tags":[],"productIds":[],"skus":[]},"customerVisible":true,"archived":false},{"id":"lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607183","name":"_Batch","type":"text","options":[],"required":false,"appliesTo":{"tags":[],"productIds":[],"skus":[]},"customerVisible":false,"archived":false}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"LinePropertyRemoved | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LinePropertyRemovedEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Replace the tenant's line item properties, whole, each definition keyed by its caller-minted `lip_` id. Leaving one out is 409 `LinePropertyRemoved`: archive it, since orders name it. A name starting with `_` is never shown to customers. A line written in Manifold is then held to them (400 `LineAttributeInvalid`, 409 `LineAttributeRequired` when placed); a channel's lines are kept as sent. Appends `fulfillment.line-properties-configured`. Idempotent by content: the properties as they already stand append nothing.\n\nRequires `settings:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinePropertiesEncoded"},"example":{"allowOther":true,"definitions":[{"id":"lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607181","name":"Engraving","type":"text","options":[],"required":true,"maxLength":24,"helpText":"Up to 24 characters, engraved as typed","appliesTo":{"tags":["engravable"],"productIds":[],"skus":[]},"customerVisible":true,"archived":false},{"id":"lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607182","name":"Gift wrap","type":"select","options":["None","Kraft","Gold foil"],"required":false,"appliesTo":{"tags":[],"productIds":[],"skus":[]},"customerVisible":true,"archived":false},{"id":"lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607183","name":"_Batch","type":"text","options":[],"required":false,"appliesTo":{"tags":[],"productIds":[],"skus":[]},"customerVisible":false,"archived":false}]}}},"required":true},"x-mcp-tool":{"name":"fulfillment_set_line_properties","title":"Fulfillment: Set line properties","toolset":"imports","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["settings:write"],"x-example-source":{"origin":"contract"}}},"/line-item-properties/applicable":{"get":{"tags":["lineProperties"],"operationId":"lineProperties.applicable","parameters":[{"name":"skus","in":"query","schema":{"type":"string"},"required":true,"example":"PEN-BRASS,MUG-12OZ"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"ApplicableProperties","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicablePropertiesEncoded"},"examples":{"contract":{"summary":"lineProperties.applicable","value":{"items":[{"sku":"PEN-BRASS","propertyIds":["lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607181","lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607182","lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607183"]},{"sku":"MUG-12OZ","propertyIds":["lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607182","lip_0192f3a0-6c1e-7a10-8b2c-3d4e5f607183"]}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Which live (unarchived) definitions apply to each of these SKUs (comma-separated), in display order: a definition scoped by tag or product is judged against the product inventory holds the SKU under now. What the order form offers on a line. Appends nothing: a read of the settings.\n\nRequires `orders:read`.","x-mcp-withheld":"the order form's per-SKU lookup of which properties to offer; an agent reads the definitions with `fulfillment_get_line_properties`, and the service holds every line it writes to them","x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/numbering":{"get":{"tags":["numbering"],"operationId":"numbering.get","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"DocumentNumbering","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentNumberingEncoded"},"examples":{"contract":{"summary":"numbering.get","value":{"orders":{"prefix":"SO-","next":1047},"shipments":{"prefix":"SH-","next":1064},"invoices":{"prefix":"INV-","next":872},"payments":{"prefix":"PAY-","next":913},"refunds":{"prefix":"RF-","next":65}}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The tenant's document series: one each for `orders` (and quotes), `shipments`, `invoices`, `payments` and `refunds`, each a `prefix` (`SO-`, `SH-`, `INV-`, `PAY-`, `RF-` until set) and the `next` serial. Every document minted advances its own series, so a series is always past everything it has issued.\n\nRequires `settings:read`.","x-mcp-tool":{"name":"fulfillment_get_numbering","title":"Fulfillment: Get numbering","toolset":"fulfillment","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["settings:read"],"x-example-source":{"origin":"contract"}},"put":{"tags":["numbering"],"operationId":"numbering.set","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"DocumentNumbering","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentNumberingEncoded"},"examples":{"contract":{"summary":"numbering.set","value":{"orders":{"prefix":"SO-","next":5001},"shipments":{"prefix":"SH-","next":5001},"invoices":{"prefix":"INV-","next":3001},"payments":{"prefix":"PAY-","next":3001},"refunds":{"prefix":"RF-","next":201}}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Replace the document numbering: per series, a `prefix` (up to 12 of A-Z a-z 0-9 -) and the `next` serial. A serial only moves forward — a value at or below a number already issued is clamped to the next free one, never applied, so a number never names two documents. Appends `fulfillment.numbering-configured`. Idempotent by content: a retry that says what already holds is acknowledged and appends nothing.\n\nRequires `settings:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentNumberingEncoded"},"example":{"orders":{"prefix":"SO-","next":5001},"shipments":{"prefix":"SH-","next":5001},"invoices":{"prefix":"INV-","next":3001},"payments":{"prefix":"PAY-","next":3001},"refunds":{"prefix":"RF-","next":201}}}},"required":true},"x-mcp-tool":{"name":"fulfillment_set_numbering","title":"Fulfillment: Set numbering","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["settings:write"],"x-example-source":{"origin":"contract"}}},"/orders":{"get":{"tags":["orders"],"operationId":"orders.list","parameters":[{"name":"reference","in":"query","schema":{"type":"string","minLength":1},"required":false,"example":"PO-7781"},{"name":"personId","in":"query","schema":{"$ref":"#/components/schemas/PsnId"},"required":false},{"name":"companyId","in":"query","schema":{"$ref":"#/components/schemas/CmpId"},"required":false},{"name":"ids","in":"query","schema":{"type":"string"},"required":false},{"name":"book","in":"query","schema":{"$ref":"#/components/schemas/OrderBook"},"required":false},{"name":"search","in":"query","schema":{"type":"string","minLength":1},"required":false},{"name":"catalogIds","in":"query","schema":{"type":"string"},"required":false},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/FulfillmentOrderStatus"},"required":false},{"name":"backordered","in":"query","schema":{"$ref":"#/components/schemas/BooleanString"},"required":false},{"name":"awaitingApproval","in":"query","schema":{"$ref":"#/components/schemas/BooleanString"},"required":false},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"offset","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"}},"examples":{"contract":{"summary":"orders.list","value":[{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":4,"returned":1,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-01058","reference":"PO-7781-bowls","status":"cancelled","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[],"cartons":[],"createdAt":"2026-10-20T03:31:09.402Z","updatedAt":"2026-10-20T03:33:51.660Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-021324a5b6c7","number":"SH-01059","reference":"moved:PO-7781-bowls-shopfront","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-8b9cadbecfd5","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T03:33:51.660Z","updatedAt":"2026-10-20T03:33:51.660Z"}],"invoices":[{"id":"inv_01a1588b-1a20-7b31-9c42-7f8091021324","number":"INV-00871","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"unitPriceCents":2400,"discountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"tax":{"netCents":9600,"taxCents":960,"grossCents":10560,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":9600,"taxCents":960}]},"header":{"kind":"tax-invoice","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"totalCents":10560,"shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","issuedAt":"2026-10-20T03:15:00.000Z"}],"refunds":[{"id":"rfd_01a16470-4d50-7e61-9f72-b6c7d8e9f0a1","number":"RF-00064","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":1,"restock":false,"condition":"damaged","tax":{"inclusive":false,"amountCents":2400,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2400,"taxCents":240,"source":"manifold"}],"netCents":2400,"taxCents":240,"grossCents":2640}}],"amountCents":2640,"tax":{"netCents":2400,"taxCents":240,"grossCents":2640,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":2400,"taxCents":240}]},"header":{"kind":"adjustment-note","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"reason":"One mug arrived chipped","refundedAt":"2026-10-22T00:48:30.256Z"}],"payments":[{"id":"pay_01a15f20-3c40-7d51-8e62-a5b6c7d8e9f0","number":"PAY-00912","amountCents":10560,"method":"bank-transfer","reference":"HARBOUR CERAMICS 4471","receivedAt":"2026-10-21T01:10:00.000Z","recordedAt":"2026-10-21T01:12:44.381Z","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-21","source":"same"}}],"notes":[{"id":"note_01a15f6e-5e60-7f71-8a82-c7d8e9f0a1b2","reference":"note-harbour-dock","body":"Deliveries to the rear dock, weekdays before 3pm.","by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"postedAt":"2026-10-21T02:05:17.902Z"}],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":10560,"refundedCents":2640,"balanceCents":11000,"refundOwedCents":0,"status":"partially-refunded"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-22T00:48:30.256Z"}]}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"List fulfillment orders from the current read model, newest-created-first pages of `limit` (default 100, capped at 1000) from `offset`. `book` keeps to placed `orders` or unplaced `quotes`, `status` to one status, `backordered=true` to the orders still short of stock, `search` to the orders whose number, id, reference or customer's PO number contains it (ignoring case) and `catalogIds` to the orders priced from any of those catalogs; `GET /orders/count` totals the same filters and `GET /orders/tallies` counts each tab. `personId` / `companyId` narrow to the orders placed for that party — a customer's order history, indexed on the order's customer ids. `ids` resolves exactly those `ord_` ids (comma-separated, up to 200), so a screen holding order ids can show their numbers. `reference` filters to orders whose external reference matches exactly — an indexed lookup, the supported way for integrations (a channel app's order bridge) to recover an order they created without listing the tenant's history.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_list_orders","title":"Fulfillment: List orders","toolset":"orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}},"post":{"tags":["orders"],"operationId":"orders.create","parameters":[],"security":[{"bearer":[]}],"responses":{"201":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.create","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"open","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4},{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T01:02:11.204Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":0,"refundedCents":0,"balanceCents":18920,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T01:02:11.204Z"}}}}}},"400":{"description":"ShippingRateInvalid | LineAttributeInvalid","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShippingRateInvalidEncoded"},{"$ref":"#/components/schemas/LineAttributeInvalidEncoded"}]}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"ChannelSourceForbidden | CatalogNotOpenToRep | SalesRepNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChannelSourceForbiddenEncoded"},{"$ref":"#/components/schemas/CatalogNotOpenToRepEncoded"},{"$ref":"#/components/schemas/SalesRepNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"ItemNotFound | OrderCatalogNotFound | CompanyNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ItemNotFoundEncoded"},{"$ref":"#/components/schemas/OrderCatalogNotFoundEncoded"},{"$ref":"#/components/schemas/CompanyNotFoundEncoded"}]}}}},"409":{"description":"OrderCatalogCurrencyMismatch | LineUnpriced | LineDiscountRefused | TaxRateMissing | FulfillmentLocationInvalid | LineAttributeRequired | BelowMinimumMargin | CustomerRequired | SkuNotInCatalogs | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderCatalogCurrencyMismatchEncoded"},{"$ref":"#/components/schemas/LineUnpricedEncoded"},{"$ref":"#/components/schemas/LineDiscountRefusedEncoded"},{"$ref":"#/components/schemas/TaxRateMissingEncoded"},{"$ref":"#/components/schemas/FulfillmentLocationInvalidEncoded"},{"$ref":"#/components/schemas/LineAttributeRequiredEncoded"},{"$ref":"#/components/schemas/BelowMinimumMarginEncoded"},{"$ref":"#/components/schemas/CustomerRequiredEncoded"},{"$ref":"#/components/schemas/SkuNotInCatalogsEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"422":{"description":"QuantityBelowMinimum | QuantityNotInStep","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuantityBelowMinimumEncoded"},{"$ref":"#/components/schemas/QuantityNotInStepEncoded"}]}}}},"502":{"description":"InventoryUnavailable | CrmUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InventoryUnavailableEncoded"},{"$ref":"#/components/schemas/CrmUnavailableEncoded"}]}}}},"503":{"description":"OrderCreationPending | RequestLogUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderCreationPendingEncoded"},{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}]}}}}},"description":"Create (place) a sales order for a customer, or a draft quote with `stage: \"draft-quote\"`. The smallest order is a `reference` and one line: `{ \"reference\": \"WEB-10231\", \"lines\": [{ \"sku\": \"WIDGET-BLUE\", \"quantity\": 2 }] }`. A draft quote may start with `lines: []`; an order needs one.\n\n**Lines.** Each line is a SKU and a quantity. The same SKU may sit on several lines, told apart by `attributes` (name/value pairs, shown on the pick list) and, for a channel order, `externalId`. Each line gets a `lin_` id; later calls (parcels, picks, invoices, refunds, repricing) name the line by it. A kit's line keeps its recipe as `components`: it is priced and invoiced as one line, while stock moves through each part. A SKU neither stocked nor a variant is 404 `ItemNotFound`. A SKU's order rules (`orderRules`: `minQuantity`, then `step`s) refuse a line with 422 `QuantityBelowMinimum` or `QuantityNotInStep` (`reason` says the rule); a channel's order is taken, the line flagged `ruleBreach`. `attributes` are held to the line item properties.\n\n**Prices.** Lines are priced from a catalog: `catalogId` if you name one; else the catalogs of the company in `customer`, each SKU at the lowest price any of them lists; else the `Default` catalog. An unknown company is 404 `CompanyNotFound` (502 `CrmUnavailable` if unreadable). Catalogs mixing currencies, or a `currency` no named or company catalog uses, is 409 `OrderCatalogCurrencyMismatch`; an unknown or archived catalog 404 `OrderCatalogNotFound`. Send `unitPriceCents` to set a line's price; a price other than the list price is kept as a `priceOverride` with who set it and `priceReason`. Every line of an order needs a price (zero is a price): a line no catalog lists and with no `unitPriceCents` is 409 `LineUnpriced`. A draft quote may leave a line unpriced until it is issued or placed. A person may order only SKUs the order's catalogs list (409 `SkuNotInCatalogs`) unless they hold `catalog-override:write`; a line's `catalogId` then prices it from another catalog. Apps and system runs are not held to the list.\n\nA line's discount (and `charges`' order discount) is `discountCents` or `discountBps`, a percentage kept as one as the line changes; an amount past the line's worth is 409 `LineDiscountRefused`. `customerPo` is the buyer's PO number, not a key.\n\n**Charges and tax.** `charges` holds shipping and an order-level discount. Tax comes from the tax settings, each SKU's tax class and `shipToCountry`; no rate for a class that day is 409 `TaxRateMissing`. A channel sends the tax it charged (`pricesIncludeTax`, `channelTax`, `shippingTax`). `money` shows the tax, the total, payments, refunds and the balance. `shippingRate` (a `POST /rates` `code` + `sealed`) records the rate chosen, which the parcels book.\n\n**Customer.** `customer` names who it is for by `personId`, `companyId` or both; `salesRepId` who sold it. While the tenant's `requireCustomer` is on (the default), a person's order without one is 409 `CustomerRequired`; a draft quote, a channel app's order and a system run's are not held to it.\n\n**What it records.** A draft quote appends only `fulfillment.quote-created`: no stock, no sale until placed (`POST /orders/:orderId/place`). An order appends `fulfillment.order-created`, holds stock (`fulfillment.stock-allocated`) and opens a parcel (`fulfillment.shipment-created`); an automatic pipeline also picks, packs, ships (`fulfillment.dispatched` per line) and invoices (`fulfillment.invoice-issued`). It keeps the pipeline and number (`SO-00042`) as they are now.\n\n**Retries.** `reference` (your own order number, or the channel's) is required and is the idempotency key: a retry with the same reference is answered with the order it already opened and holds no stock again. 502 `InventoryUnavailable`: stock could not be read, nothing was made. 503 `OrderCreationPending`: the order is still being made; send the same request again and it is answered with the order once saved. A stock hold or dispatch refused part-way is not an error: the order stays `open` to allocate later, or the parcel `packed` to ship later.\n\n**Channel orders.** Only the channel's own app may send a `channel` `source` (403 `ChannelSourceForbidden`).\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFulfillmentOrderEncoded"},"example":{"reference":"PO-7781","customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"lines":[{"sku":"MUG-SPECKLE","quantity":4},{"sku":"BOWL-SALT-L","quantity":2}],"shippingMethod":{"title":"Standard","code":"STD"}}}},"required":true},"x-mcp-tool":{"name":"fulfillment_create_order","title":"Fulfillment: Create order","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/count":{"get":{"tags":["orders"],"operationId":"orders.count","parameters":[{"name":"personId","in":"query","schema":{"$ref":"#/components/schemas/PsnId"},"required":false},{"name":"companyId","in":"query","schema":{"$ref":"#/components/schemas/CmpId"},"required":false,"example":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d"},{"name":"book","in":"query","schema":{"$ref":"#/components/schemas/OrderBook"},"required":false,"example":"orders"},{"name":"search","in":"query","schema":{"type":"string","minLength":1},"required":false},{"name":"catalogIds","in":"query","schema":{"type":"string"},"required":false},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/FulfillmentOrderStatus"},"required":false},{"name":"backordered","in":"query","schema":{"$ref":"#/components/schemas/BooleanString"},"required":false},{"name":"awaitingApproval","in":"query","schema":{"$ref":"#/components/schemas/BooleanString"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"OrderCount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCountEncoded"},"examples":{"contract":{"summary":"orders.count","value":{"total":4}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"How many orders `GET /orders` would page through for the same `personId` / `companyId`, `book`, `status`, `backordered`, `search` and `catalogIds` filters (every order, unfiltered) — the total a paged order history shows beside its pages. Read-only.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_count_orders","title":"Fulfillment: Count orders","toolset":"orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/orders/tallies":{"get":{"tags":["orders"],"operationId":"orders.tallies","parameters":[{"name":"book","in":"query","schema":{"$ref":"#/components/schemas/OrderBook"},"required":false,"example":"orders"},{"name":"search","in":"query","schema":{"type":"string","minLength":1},"required":false},{"name":"catalogIds","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"OrderTallies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTalliesEncoded"},"examples":{"contract":{"summary":"orders.tallies","value":{"total":6,"statuses":{"draft-quote":0,"quote":0,"open":3,"awaiting-stock":1,"partially-shipped":1,"shipped":0,"cancelled":1},"backordered":1}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"How an order list's tabs count, in one read: of the orders matching `book`, `search` and `catalogIds`, how many there are (`total`), how many are in each status (`statuses`, every status named) and how many are still short of stock whatever their status (`backordered`). Read-only.\n\nRequires `orders:read`.","x-mcp-withheld":"the admin order list's tab counts in one read; an agent counts a status or the backorder queue with `fulfillment_count_orders`","x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/orders/defaults":{"get":{"tags":["orders"],"operationId":"orders.defaults","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"OrderDefaults","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderDefaultsEncoded"},"examples":{"contract":{"summary":"orders.defaults","value":{"fulfillmentLocationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"What a new order or quote of yours takes when it names nothing: `fulfillmentLocationId`, the site it ships from — the site of the last order or quote you created while it can still sell, else the first fulfillable site by routing rank (absent only when no site can sell). `POST /orders` with `source.kind: \"admin\"` and no `fulfillmentLocationId` takes the same site; a form shows it before anything is created. 502 `InventoryUnavailable` when the sites cannot be read. Appends nothing: a read.\n\nRequires `orders:write`.","x-mcp-withheld":"the admin's new-order form reads it to show its default site; an agent names `fulfillmentLocationId` on POST /orders or leaves routing to decide","x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/customer-summary":{"get":{"tags":["orders"],"operationId":"orders.customerSummary","parameters":[{"name":"personId","in":"query","schema":{"$ref":"#/components/schemas/PsnId"},"required":false},{"name":"companyId","in":"query","schema":{"$ref":"#/components/schemas/CmpId"},"required":false,"example":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"CustomerOrderSummary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerOrderSummaryEncoded"},"examples":{"contract":{"summary":"orders.customerSummary","value":{"orders":3,"liveOrders":3,"historicalOrders":0,"firstOrderAt":"2026-10-20T00:58:19.664Z","lastOrderAt":"2026-10-20T05:10:03.447Z","homeCurrency":"AUD","home":{"spentCents":182930,"refundedCents":2640,"netCents":180290},"unconvertedOrders":0,"totals":[{"currency":"AUD","orders":3,"spentCents":182930,"refundedCents":2640,"netCents":180290}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"A customer's lifetime value (`docs/historical-orders.md` › §4): for `personId`, `companyId` or both, orders placed, first and latest, and spent, refunded and net in the home currency (`home`, at each order's captured rate) and per currency charged (`totals`). Live orders (not quotes or cancelled) and history (not cancelled), each once: an adopted mirrored order adds only what its history came to beyond the live order. Appends nothing: a read of the orders.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_get_customer_summary","title":"Fulfillment: Get customer summary","toolset":"orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/orders/attention":{"get":{"tags":["orders"],"operationId":"orders.attention","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"OrdersAttention","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrdersAttentionEncoded"},"examples":{"contract":{"summary":"orders.attention","value":{"unfulfilled":5,"awaitingStock":1,"shipments":{"pending":4,"picked":0,"packed":1},"awaitingPayment":{"orders":0,"amounts":[],"oldest":[]},"refundsOwed":{"orders":0,"amounts":[],"oldest":[]}}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"What in the order book needs a person today — the home dashboard's fulfilment summary. `unfulfilled` counts orders placed but not fully shipped (`open`, `awaiting-stock`, `partially-shipped`; drafts and cancellations are not work), `awaitingStock` the ones among them waiting on stock, and `shipments` their parcels by stage: `pending` (to pick), `picked` (to pack), `packed` (to ship). `awaitingPayment` is the prepaid orders holding a packed parcel until the balance is paid, and `refundsOwed` the orders whose customer has paid more than the order now totals (an edit took value off a paid order) — each with how many, the sum per currency (never across currencies), and the five longest waiting. Read from the order projection as it stands; read-only.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_get_orders_attention","title":"Fulfillment: Get orders attention","toolset":"orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/orders/board":{"get":{"tags":["orders"],"operationId":"orders.board","parameters":[{"name":"today","in":"query","schema":{"type":"string"},"required":false,"example":"2026-08-17T00:00:00.000Z"},{"name":"stuckHours","in":"query","schema":{"type":"string"},"required":false,"example":"24"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"OperationsBoard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationsBoardEncoded"},"examples":{"order-to-cash":{"summary":"Order to cash","value":{"asOf":"2026-08-17T09:00:00.000Z","today":"2026-08-17T00:00:00.000Z","sites":[{"locationId":"loc_01a15852-46d1-7a3b-9c0d-1e2f3a4b5c6d","pending":{"count":1,"oldest":[{"orderId":"ord_01a15859-9053-7a55-9e77-0b2c4d6e8f01","orderNumber":"SO-00042","shipmentId":"shp_01a15888-1ced-7bb0-8f21-3a5c7e9d1b04","number":"SH-00042","since":"2026-08-17T09:00:00.000Z"}]},"picked":{"count":0,"oldest":[]},"packed":{"count":0,"oldest":[]},"shippedToday":0,"shippedYesterday":0,"awaitingPayment":{"count":0,"orders":[]},"refusedConsignments":{"count":0,"items":[]},"stuck":{"count":0,"orders":[]}}],"awaitingPayment":{"count":0,"orders":[]},"refusedConsignments":{"count":0,"items":[]},"stuck":{"count":0,"orders":[]},"stuckHours":24}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The warehouse floor as the operations board shows it. `sites`: each site's open parcels by stage (`pending`, `picked`, `packed`), each with its count and the ten standing longest, and `shippedToday` / `shippedYesterday` from `?today=` (the caller's day start; UTC midnight when omitted). Exceptions, each counted with the twenty longest waiting: `awaitingPayment` (prepaid, packed, unpaid), `refusedConsignments` (latest booking refused — rebook with `POST /orders/:orderId/shipments/:shipmentId/consignments`) and `stuck` (open orders unchanged for `?stuckHours=`, default 24). Shortfalls are `GET /backorders`'s. Read-only.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_get_operations_board","title":"Fulfillment: Get operations board","toolset":"orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"workflow","workflow":"order-to-cash","step":6}}},"/shipments/queue":{"get":{"tags":["orders"],"operationId":"orders.stationQueue","parameters":[{"name":"locationId","in":"query","schema":{"$ref":"#/components/schemas/LocId_1"},"required":true,"example":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4"},{"name":"stage","in":"query","schema":{"$ref":"#/components/schemas/StationStage"},"required":false,"example":"pick"},{"name":"channel","in":"query","schema":{"type":"string","minLength":1},"required":false},{"name":"carrier","in":"query","schema":{"type":"string","minLength":1},"required":false},{"name":"number","in":"query","schema":{"type":"string","minLength":1},"required":false},{"name":"exclude","in":"query","schema":{"$ref":"#/components/schemas/ShpId"},"required":false},{"name":"after","in":"query","schema":{"type":"string","minLength":1},"required":false},{"name":"limit","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"StationQueue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StationQueueEncoded"},"examples":{"contract":{"summary":"orders.stationQueue","value":{"parcels":[{"orderId":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","orderNumber":"SO-01045","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","number":"SH-00045","stage":"pick","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","units":1,"lines":1,"channelId":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","carrier":"Express Post","urgent":true,"openedAt":"2026-10-20T02:00:00.000Z"},{"orderId":"ord_01a15960-bec0-7fd1-8ae2-93a4b5c6d7e8","orderNumber":"SO-01046","shipmentId":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-00046","stage":"pick","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","units":2,"lines":1,"urgent":false,"openedAt":"2026-10-20T01:30:00.000Z"}],"counts":{"pick":2,"pack":0,"ship":1,"held":0},"channels":["chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","direct"],"carriers":["Express Post"]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"A pick-pack station's queue: the parcels at `locationId` (and those naming no site) still waiting on a person — `pick` (pending, picked by hand), `pack` (picked, packed by hand), `ship` (packed, to label and ship) or `held` (packed on a prepaid order not paid in full) — urgent first (part-shipped, or asking for speed), then oldest. Narrow with `stage`, `channel` (a `chn_` id, or `direct`), `carrier`, `number` (a scanned parcel or order number) and `exclude` (the parcel just done); page with `limit` (default 50, at most 200) and the previous page's `next` as `after`. Beside the page, `counts` per stage under the same channel and carrier, and the `channels` and `carriers` waiting here for the filters. Read from the station index, never the order book. Appends nothing: a read.\n\nRequires `orders:read`.","x-mcp-withheld":"a pick-pack station's own work list, paged for its screen; an agent reads the floor with `fulfillment_get_operations_board`","x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/shipments/dispatch":{"get":{"tags":["orders"],"operationId":"orders.dispatchOrders","parameters":[{"name":"since","in":"query","schema":{"type":"string"},"required":true,"example":"2026-10-20T00:00:00.000Z"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"}},"examples":{"contract":{"summary":"orders.dispatchOrders","value":[{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":4,"returned":1,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-01058","reference":"PO-7781-bowls","status":"cancelled","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[],"cartons":[],"createdAt":"2026-10-20T03:31:09.402Z","updatedAt":"2026-10-20T03:33:51.660Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-021324a5b6c7","number":"SH-01059","reference":"moved:PO-7781-bowls-shopfront","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-8b9cadbecfd5","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T03:33:51.660Z","updatedAt":"2026-10-20T03:33:51.660Z"}],"invoices":[{"id":"inv_01a1588b-1a20-7b31-9c42-7f8091021324","number":"INV-00871","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"unitPriceCents":2400,"discountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"tax":{"netCents":9600,"taxCents":960,"grossCents":10560,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":9600,"taxCents":960}]},"header":{"kind":"tax-invoice","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"totalCents":10560,"shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","issuedAt":"2026-10-20T03:15:00.000Z"}],"refunds":[{"id":"rfd_01a16470-4d50-7e61-9f72-b6c7d8e9f0a1","number":"RF-00064","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":1,"restock":false,"condition":"damaged","tax":{"inclusive":false,"amountCents":2400,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2400,"taxCents":240,"source":"manifold"}],"netCents":2400,"taxCents":240,"grossCents":2640}}],"amountCents":2640,"tax":{"netCents":2400,"taxCents":240,"grossCents":2640,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":2400,"taxCents":240}]},"header":{"kind":"adjustment-note","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"reason":"One mug arrived chipped","refundedAt":"2026-10-22T00:48:30.256Z"}],"payments":[{"id":"pay_01a15f20-3c40-7d51-8e62-a5b6c7d8e9f0","number":"PAY-00912","amountCents":10560,"method":"bank-transfer","reference":"HARBOUR CERAMICS 4471","receivedAt":"2026-10-21T01:10:00.000Z","recordedAt":"2026-10-21T01:12:44.381Z","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-21","source":"same"}}],"notes":[{"id":"note_01a15f6e-5e60-7f71-8a82-c7d8e9f0a1b2","reference":"note-harbour-dock","body":"Deliveries to the rear dock, weekdays before 3pm.","by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"postedAt":"2026-10-21T02:05:17.902Z"}],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":10560,"refundedCents":2640,"balanceCents":11000,"refundOwedCents":0,"status":"partially-refunded"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-22T00:48:30.256Z"}]}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The orders a station's dispatch tab reads: every order with a booking asked for at or after `since` (the start of the station's day), and every open order whose booking was refused, newest created first, at most 1000. Read from the bookings index, never the whole order book. Appends nothing: a read.\n\nRequires `orders:read`.","x-mcp-withheld":"a station's dispatch tab reads its day's bookings with it; an agent reads an account's bookings with the carrier tools or the order itself","x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}":{"get":{"tags":["orders"],"operationId":"orders.get","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.get","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":4,"returned":1,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-01058","reference":"PO-7781-bowls","status":"cancelled","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[],"cartons":[],"createdAt":"2026-10-20T03:31:09.402Z","updatedAt":"2026-10-20T03:33:51.660Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-021324a5b6c7","number":"SH-01059","reference":"moved:PO-7781-bowls-shopfront","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-8b9cadbecfd5","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T03:33:51.660Z","updatedAt":"2026-10-20T03:33:51.660Z"}],"invoices":[{"id":"inv_01a1588b-1a20-7b31-9c42-7f8091021324","number":"INV-00871","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"unitPriceCents":2400,"discountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"tax":{"netCents":9600,"taxCents":960,"grossCents":10560,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":9600,"taxCents":960}]},"header":{"kind":"tax-invoice","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"totalCents":10560,"shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","issuedAt":"2026-10-20T03:15:00.000Z"}],"refunds":[{"id":"rfd_01a16470-4d50-7e61-9f72-b6c7d8e9f0a1","number":"RF-00064","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":1,"restock":false,"condition":"damaged","tax":{"inclusive":false,"amountCents":2400,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2400,"taxCents":240,"source":"manifold"}],"netCents":2400,"taxCents":240,"grossCents":2640}}],"amountCents":2640,"tax":{"netCents":2400,"taxCents":240,"grossCents":2640,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":2400,"taxCents":240}]},"header":{"kind":"adjustment-note","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"reason":"One mug arrived chipped","refundedAt":"2026-10-22T00:48:30.256Z"}],"payments":[{"id":"pay_01a15f20-3c40-7d51-8e62-a5b6c7d8e9f0","number":"PAY-00912","amountCents":10560,"method":"bank-transfer","reference":"HARBOUR CERAMICS 4471","receivedAt":"2026-10-21T01:10:00.000Z","recordedAt":"2026-10-21T01:12:44.381Z","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-21","source":"same"}}],"notes":[{"id":"note_01a15f6e-5e60-7f71-8a82-c7d8e9f0a1b2","reference":"note-harbour-dock","body":"Deliveries to the rear dock, weekdays before 3pm.","by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"postedAt":"2026-10-21T02:05:17.902Z"}],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":10560,"refundedCents":2640,"balanceCents":11000,"refundOwedCents":0,"status":"partially-refunded"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-22T00:48:30.256Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Fetch one sales order or quote by its `ord_` id: its lines, shipments, invoices, payments, refunds and any shortfall.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_get_order","title":"Fulfillment: Get order","toolset":"orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/margins":{"get":{"tags":["orders"],"operationId":"orders.margins","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"OrderMargins","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderMarginsEncoded"},"examples":{"contract":{"summary":"orders.margins","value":{"orderId":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","currency":"AUD","lines":[{"lineId":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","quantity":48,"status":"costed","revenueCents":100800,"unitCostCents":1250,"costCents":60000,"marginCents":40800,"marginBps":4048,"minimumMarginBps":3500,"belowMinimum":false},{"lineId":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","quantity":6,"status":"costed","revenueCents":22800,"unitCostCents":2600,"costCents":15600,"marginCents":7200,"marginBps":3158,"minimumMarginBps":3500,"belowMinimum":true}],"order":{"revenueCents":123600,"costCents":75600,"marginCents":48000,"marginBps":3883,"linesWithoutCost":0,"unpricedLines":0,"linesBelowMinimum":1}}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"An order's or quote's margin, per line and in total: revenue net of discounts and tax against each SKU's cost basis now (a kit, its parts'). `no-cost` lines are counted, never guessed; `belowMinimum` flags a line under its catalog's minimum. Read-only.\n\nRequires `margins:read`.","x-mcp-tool":{"name":"fulfillment_get_order_margins","title":"Fulfillment: Get order margins","toolset":"accounting","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["margins:read"],"x-example-source":{"origin":"contract"}}},"/orders/margins":{"post":{"tags":["orders"],"operationId":"orders.draftMargins","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"OrderMargins","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderMarginsEncoded"},"examples":{"contract":{"summary":"orders.draftMargins","value":{"currency":"AUD","lines":[{"sku":"MUG-SPECKLE","catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","quantity":24,"status":"costed","revenueCents":56400,"unitCostCents":1250,"costCents":30000,"marginCents":26400,"marginBps":4681,"minimumMarginBps":3500,"belowMinimum":false}],"order":{"revenueCents":56400,"costCents":30000,"marginCents":26400,"marginBps":4681,"linesWithoutCost":0,"unpricedLines":0,"linesBelowMinimum":0}}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"OrderCatalogNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderCatalogNotFoundEncoded"}}}},"409":{"description":"TaxRateMissing | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TaxRateMissingEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The margins of an order still being typed — lines priced from one catalog, not yet saved — worked out as `GET /orders/:orderId/margins` works out a saved one's: revenue net of the line's discount and tax, the order's net of the order discount too; cost the SKUs' cost basis, a kit's its parts'; each line held to the catalog's minimum margin (or its base catalog's). A catalog whose prices include tax has it taken out at the tenant's own rates for the SKUs' classes on today's domestic sale, so the figure can move once the order's ship-to is known and it is saved (`TaxRateMissing` when a class has no rate today). Only a caller holding `margins:read` sees cost. Appends nothing: a pure calculation, acknowledged in the request log. No idempotency key: it records nothing, so a retry answers the same figures.\n\nRequires `margins:read`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftMarginsEncoded"},"example":{"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","lines":[{"sku":"MUG-SPECKLE","quantity":24,"unitPriceCents":2400,"discountCents":1200}]}}},"required":true},"x-mcp-withheld":"the new-order form's preview of lines not yet saved; an agent saves a draft quote and reads its margins with `fulfillment_get_order_margins`","x-required-scopes":["margins:read"],"x-example-source":{"origin":"contract"}}},"/backorders":{"get":{"tags":["orders"],"operationId":"orders.backorders","parameters":[{"name":"sku","in":"query","schema":{"$ref":"#/components/schemas/Sku_1"},"required":false},{"name":"limit","in":"query","schema":{"type":"string"},"required":false,"example":"50"},{"name":"offset","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"BackorderQueuePage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BackorderQueuePageEncoded"},"examples":{"contract":{"summary":"orders.backorders","value":{"items":[{"orderId":"ord_01a15960-bec0-7fd1-8ae2-93a4b5c6d7e8","number":"SO-01046","reference":"PO-7810","status":"awaiting-stock","shortfalls":[{"sku":"BOWL-SALT-L","quantity":3}],"createdAt":"2026-10-20T07:45:12.001Z","waitingSince":"2026-10-20T07:45:12.001Z","queuePosition":1}],"total":1,"limit":50,"offset":0}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"A page of the tenant's backorder queue: the orders still waiting on stock — status `open`, `awaiting-stock` or `partially-shipped` with outstanding shortfalls — sorted oldest wait first, `limit` per page (1–200, 50 when omitted) from `offset`, with the queue's `total`. Served from a per-SKU backorder index written with each order, so a page never loads the tenant's order history. Each entry carries the per-SKU shortfall quantities, `createdAt`, `waitingSince` (when the current shortfall state began: the moment of the latest allocation run that left the order short, or the order's creation), and `queuePosition` — the order's 1-based rank, by creation sequence, among backordered orders shorted on any of the same SKUs. `?sku=` narrows the list to orders short of that SKU; positions are still computed against the whole queue. **Allocation policy** (documented here on purpose): stock is granted strictly oldest-order-first by creation sequence per SKU — the earliest-created order short of a SKU is offered everything it still needs before the next order in line gets anything; there is no partial-fairness or pro-rata split across competing orders, and no priority rules. Re-allocation runs when `inventory.stock-received` commits for the SKU (the NATS trigger) or when `POST /orders/:orderId/allocate` is called manually. Appends nothing: a read of the backorder index.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_backorders","title":"Fulfillment: Backorders","toolset":"orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/quote":{"post":{"tags":["orders"],"operationId":"orders.issueQuote","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.issueQuote","value":{"id":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","reference":"QUOTE-HARBOUR-OCT","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01041","serial":1041,"status":"quote","quote":{"createdAt":"2026-10-19T22:40:02.551Z","issuedAt":"2026-10-19T22:44:30.812Z","validUntil":"2026-11-02T00:00:00.000Z"},"lines":[{"id":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":48,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2100,"listPriceCents":2400,"priceOverride":{"fromCents":2400,"by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"at":"2026-10-19T22:41:15.090Z","reason":"Trade price for 24 or more"},"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":100800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":100800,"taxCents":10080,"source":"manifold"}],"netCents":100800,"taxCents":10080,"grossCents":110880}},{"id":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":22800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":22800,"taxCents":2280,"source":"manifold"}],"netCents":22800,"taxCents":2280,"grossCents":25080}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4071,"shipments":[],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":123600,"charges":{"shippingCents":2500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":126100,"taxCents":12610,"grossCents":138710,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":126100,"taxCents":12610}]},"shippingTax":{"inclusive":false,"amountCents":2500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2500,"taxCents":250,"source":"manifold"}],"netCents":2500,"taxCents":250,"grossCents":2750},"totalCents":138710,"paidCents":0,"refundedCents":0,"balanceCents":138710,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-19T22:40:02.551Z","updatedAt":"2026-10-19T22:44:30.812Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"NotAQuote | LineUnpriced | QuoteEmpty | QuotesDisabled | BelowMinimumMargin | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotAQuoteEncoded"},{"$ref":"#/components/schemas/LineUnpricedEncoded"},{"$ref":"#/components/schemas/QuoteEmptyEncoded"},{"$ref":"#/components/schemas/QuotesDisabledEncoded"},{"$ref":"#/components/schemas/BelowMinimumMarginEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Issue a draft quote to the customer: its prices lock from here — a reprice is 409 `LineNotRepriceable` and an edit 409 `EditNotAllowed` until it is reopened — and it still holds no stock. `validUntil` optionally records the date it holds its prices until. Appends `fulfillment.quote-issued`. 409 `NotAQuote` if the order is not a draft quote or an issued one; 409 `LineUnpriced` while any line has no price (set one with `PUT /orders/:orderId/lines/:lineId/price` — zero is a price), `QuoteEmpty` with none; 409 `QuotesDisabled` when `quoteMode` is `draft-orders`. Idempotent by state: a quote is issued once until reopened, so a retry answers it as it stands, appending nothing.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueQuoteEncoded"},"example":{"validUntil":"2026-11-02T00:00:00.000Z"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_issue_quote","title":"Fulfillment: Issue quote","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/reopen":{"post":{"tags":["orders"],"operationId":"orders.reopenQuote","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.reopenQuote","value":{"id":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","reference":"QUOTE-HARBOUR-OCT","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01041","serial":1041,"status":"draft-quote","quote":{"createdAt":"2026-10-19T22:40:02.551Z","issuedAt":"2026-10-19T22:44:30.812Z","validUntil":"2026-11-02T00:00:00.000Z"},"lines":[{"id":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":48,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2100,"listPriceCents":2400,"priceOverride":{"fromCents":2400,"by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"at":"2026-10-19T22:41:15.090Z","reason":"Trade price for 24 or more"},"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":100800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":100800,"taxCents":10080,"source":"manifold"}],"netCents":100800,"taxCents":10080,"grossCents":110880}},{"id":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":22800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":22800,"taxCents":2280,"source":"manifold"}],"netCents":22800,"taxCents":2280,"grossCents":25080}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4071,"shipments":[],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":123600,"charges":{"shippingCents":2500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":126100,"taxCents":12610,"grossCents":138710,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":126100,"taxCents":12610}]},"shippingTax":{"inclusive":false,"amountCents":2500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2500,"taxCents":250,"source":"manifold"}],"netCents":2500,"taxCents":250,"grossCents":2750},"totalCents":138710,"paidCents":0,"refundedCents":0,"balanceCents":138710,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-19T22:40:02.551Z","updatedAt":"2026-10-19T23:20:07.330Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"NotAQuote | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotAQuoteEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Take an issued quote back to draft to revise it: its lines and prices open again, and it is issued afresh when ready. Appends `fulfillment.quote-reopened`. 409 `NotAQuote` if the order is not a quote. Idempotent by state: a draft quote is already open, so a retried reopen answers it as it stands and appends nothing.\n\nRequires `orders:write`.","x-mcp-tool":{"name":"fulfillment_reopen_quote","title":"Fulfillment: Reopen quote","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/place":{"post":{"tags":["orders"],"operationId":"orders.place","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.place","value":{"id":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","reference":"QUOTE-HARBOUR-OCT","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01041","serial":1041,"status":"open","quote":{"createdAt":"2026-10-19T22:40:02.551Z","issuedAt":"2026-10-19T23:22:45.118Z","validUntil":"2026-11-02T00:00:00.000Z","placedAt":"2026-10-20T00:58:19.664Z"},"lines":[{"id":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":48,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":48,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2100,"listPriceCents":2400,"priceOverride":{"fromCents":2400,"by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"at":"2026-10-19T22:41:15.090Z","reason":"Trade price for 24 or more"},"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":100800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":100800,"taxCents":10080,"source":"manifold"}],"netCents":100800,"taxCents":10080,"grossCents":110880}},{"id":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":6,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":22800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":22800,"taxCents":2280,"source":"manifold"}],"netCents":22800,"taxCents":2280,"grossCents":25080}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4089,"shipments":[{"id":"shp_01a15060-7a80-7b91-8ca2-0a1b2c3d4e5f","number":"SH-01056","reference":"auto:ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3:1","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","quantity":48},{"lineId":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","quantity":6}],"cartons":[],"createdAt":"2026-10-20T00:58:19.664Z","updatedAt":"2026-10-20T00:58:19.664Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":123600,"charges":{"shippingCents":2500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":126100,"taxCents":12610,"grossCents":138710,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":126100,"taxCents":12610}]},"shippingTax":{"inclusive":false,"amountCents":2500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2500,"taxCents":250,"source":"manifold"}],"netCents":2500,"taxCents":250,"grossCents":2750},"totalCents":138710,"paidCents":0,"refundedCents":0,"balanceCents":138710,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-19T22:40:02.551Z","updatedAt":"2026-10-20T00:58:19.664Z"}}}}}},"400":{"description":"LineAttributeInvalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineAttributeInvalidEncoded"}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"CatalogNotOpenToRep | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CatalogNotOpenToRepEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ItemNotFound | OrderCatalogNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"},{"$ref":"#/components/schemas/OrderCatalogNotFoundEncoded"}]}}}},"409":{"description":"NotAQuote | LineUnpriced | QuoteEmpty | TaxRateMissing | LineAttributeRequired | BelowMinimumMargin | CustomerRequired | SkuNotInCatalogs | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotAQuoteEncoded"},{"$ref":"#/components/schemas/LineUnpricedEncoded"},{"$ref":"#/components/schemas/QuoteEmptyEncoded"},{"$ref":"#/components/schemas/TaxRateMissingEncoded"},{"$ref":"#/components/schemas/LineAttributeRequiredEncoded"},{"$ref":"#/components/schemas/BelowMinimumMarginEncoded"},{"$ref":"#/components/schemas/CustomerRequiredEncoded"},{"$ref":"#/components/schemas/SkuNotInCatalogsEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"422":{"description":"QuantityBelowMinimum | QuantityNotInStep","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuantityBelowMinimumEncoded"},{"$ref":"#/components/schemas/QuantityNotInStepEncoded"}]}}}},"502":{"description":"InventoryUnavailable | CrmUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InventoryUnavailableEncoded"},{"$ref":"#/components/schemas/CrmUnavailableEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Place a quote — a draft or an issued one — as an order, under the same number: appends `fulfillment.order-created` carrying the quote as it stands (its lines and their prices, now locked, and the tenant's workflow as it is now), followed by the allocation and any automatic steps behind it, in one transaction. Only now is stock held and the order counted. 409 `NotAQuote` for a cancelled one; 409 `LineUnpriced` while any line of a draft quote has no price — an order is priced on every line, zero being a price, `QuoteEmpty` with none; 422 `QuantityBelowMinimum` / `QuantityNotInStep` for a line its SKU's order rules, as they stand now, refuse; 409 `CustomerRequired` for a quote with no customer while the tenant's `requireCustomer` is on; 409 `SkuNotInCatalogs` when a person without `catalog-override:write` places a line its catalogs no longer list. Idempotent by state: a quote becomes an order once, so a retried place answers the order as it stands and appends nothing.\n\nRequires `orders:write`.","x-mcp-tool":{"name":"fulfillment_place_order","title":"Fulfillment: Place order","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/channel-placement":{"post":{"tags":["orders"],"operationId":"orders.placeChannelQuote","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.placeChannelQuote","value":{"id":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","reference":"QUOTE-HARBOUR-OCT","source":{"kind":"channel","channelId":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","externalId":"5512830033977","name":"#1042"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01041","serial":1041,"status":"open","quote":{"createdAt":"2026-10-19T22:40:02.551Z","issuedAt":"2026-10-19T23:22:45.118Z","validUntil":"2026-11-02T00:00:00.000Z","placedAt":"2026-10-20T00:58:19.664Z"},"lines":[{"id":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":48,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":48,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2100,"listPriceCents":2400,"priceOverride":{"fromCents":2400,"by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"at":"2026-10-19T22:41:15.090Z","reason":"Trade price for 24 or more"},"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":100800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":100800,"taxCents":10080,"source":"manifold"}],"netCents":100800,"taxCents":10080,"grossCents":110880},"externalId":"14872036065337"},{"id":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":6,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":22800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":22800,"taxCents":2280,"source":"manifold"}],"netCents":22800,"taxCents":2280,"grossCents":25080},"externalId":"1066630380"}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4089,"shipments":[{"id":"shp_01a15060-7a80-7b91-8ca2-0a1b2c3d4e5f","number":"SH-01056","reference":"auto:ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3:1","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","quantity":48},{"lineId":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","quantity":6}],"cartons":[],"createdAt":"2026-10-20T00:58:19.664Z","updatedAt":"2026-10-20T00:58:19.664Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":123600,"charges":{"shippingCents":2500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":126100,"taxCents":12610,"grossCents":138710,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":126100,"taxCents":12610}]},"shippingTax":{"inclusive":false,"amountCents":2500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2500,"taxCents":250,"source":"manifold"}],"netCents":2500,"taxCents":250,"grossCents":2750},"totalCents":138710,"paidCents":0,"refundedCents":0,"balanceCents":138710,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-19T22:40:02.551Z","updatedAt":"2026-10-20T00:58:19.664Z"}}}}}},"400":{"description":"LineAttributeInvalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineAttributeInvalidEncoded"}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"ChannelSourceForbidden | CatalogNotOpenToRep | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChannelSourceForbiddenEncoded"},{"$ref":"#/components/schemas/CatalogNotOpenToRepEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ItemNotFound | OrderCatalogNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"},{"$ref":"#/components/schemas/OrderCatalogNotFoundEncoded"}]}}}},"409":{"description":"NotAQuote | LineUnpriced | QuoteEmpty | TaxRateMissing | LineAttributeRequired | BelowMinimumMargin | CustomerRequired | SkuNotInCatalogs | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotAQuoteEncoded"},{"$ref":"#/components/schemas/LineUnpricedEncoded"},{"$ref":"#/components/schemas/QuoteEmptyEncoded"},{"$ref":"#/components/schemas/TaxRateMissingEncoded"},{"$ref":"#/components/schemas/LineAttributeRequiredEncoded"},{"$ref":"#/components/schemas/BelowMinimumMarginEncoded"},{"$ref":"#/components/schemas/CustomerRequiredEncoded"},{"$ref":"#/components/schemas/SkuNotInCatalogsEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"422":{"description":"QuantityBelowMinimum | QuantityNotInStep","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuantityBelowMinimumEncoded"},{"$ref":"#/components/schemas/QuantityNotInStepEncoded"}]}}}},"502":{"description":"InventoryUnavailable | CrmUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InventoryUnavailableEncoded"},{"$ref":"#/components/schemas/CrmUnavailableEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Place a channel's quote as the order the channel made of it — a draft the channel holds (a store's draft order) that it has completed into an order of its own. Like `POST /orders/:orderId/place` it appends `fulfillment.order-created` carrying the quote as it stands, under the same id, number and lines, then the allocation, in one transaction; the order it makes names the channel's order instead of the draft: its `source.externalId` (and `name`) and each listed line's `externalId`, so the channel's later edits, payments, refunds and fulfilments find the lines they name; `paymentTerms`, when given, are the placed order's from the first moment — decided before the allocation and any automatic shipping behind it. Only the app that provides the quote's channel may call it (403 `ChannelSourceForbidden`, also for a quote that came from no channel); 409 `NotAQuote` for a cancelled one, and the same refusals as placing otherwise. Idempotent by state: a quote becomes an order once, so a retried placement answers the order as it stands and appends nothing.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaceChannelQuoteEncoded"},"example":{"externalId":"5512830033977","name":"#1042","lines":[{"lineId":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","externalId":"14872036065337"}]}}},"required":true},"x-mcp-withheld":"a channel app's own call when its store completes a draft into an order; staff and agents place a quote with `fulfillment_place_order`","x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/margin-approvals":{"post":{"tags":["orders"],"operationId":"orders.requestMarginApproval","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.requestMarginApproval","value":{"id":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","reference":"QUOTE-HARBOUR-OCT","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01041","serial":1041,"status":"draft-quote","quote":{"createdAt":"2026-10-19T22:40:02.551Z"},"lines":[{"id":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":48,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2100,"listPriceCents":2400,"priceOverride":{"fromCents":2400,"by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"at":"2026-10-19T22:41:15.090Z","reason":"Trade price for 24 or more"},"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":100800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":100800,"taxCents":10080,"source":"manifold"}],"netCents":100800,"taxCents":10080,"grossCents":110880}},{"id":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":22800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":22800,"taxCents":2280,"source":"manifold"}],"netCents":22800,"taxCents":2280,"grossCents":25080}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4071,"shipments":[],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":123600,"charges":{"shippingCents":2500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":126100,"taxCents":12610,"grossCents":138710,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":126100,"taxCents":12610}]},"shippingTax":{"inclusive":false,"amountCents":2500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2500,"taxCents":250,"source":"manifold"}],"netCents":2500,"taxCents":250,"grossCents":2750},"totalCents":138710,"paidCents":0,"refundedCents":0,"balanceCents":138710,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-19T22:40:02.551Z","updatedAt":"2026-10-19T22:42:10.000Z","marginApprovals":[{"approvalId":"apr_01a15660-1a20-7b31-9c42-6e7f80910213","status":"pending","lines":[{"lineId":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE"}],"note":"Matching their last order's price","requestedBy":{"_tag":"user","id":"usr_01a15660-1a20-7b31-9c42-7f8091021324"},"requestedAt":"2026-10-19T22:42:10.000Z","terms":"[[[\"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4\",48,2100,0],[\"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5\",6,3800,0]],0]"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"NotAQuote | NothingBelowMinimum | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotAQuoteEncoded"},{"$ref":"#/components/schemas/NothingBelowMinimumEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Ask a sales manager to approve issuing or placing a quote whose lines are below their catalog's minimum margin; names the lines, never a figure. An approval holds for the order as it stands: a later price, quantity or discount change voids it. 409 `NotAQuote` once placed, `NothingBelowMinimum` when none is below. Appends `fulfillment.margin-approval-requested`. Keyed by `approvalId` (a caller-minted `apr_`): a retry with one the order already has is acknowledged and appends nothing.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestMarginApprovalEncoded"},"example":{"approvalId":"apr_01a15660-1a20-7b31-9c42-6e7f80910213","note":"Matching their last order's price"}}},"required":true},"x-mcp-withheld":"a rep asks for a margin approval on the quote's page, beside the refusal that calls for it; an agent prices the quote at or above its minimum instead","x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/margin-approvals/{approvalId}/decide":{"post":{"tags":["orders"],"operationId":"orders.decideMarginApproval","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"},{"name":"approvalId","in":"path","schema":{"$ref":"#/components/schemas/AprId"},"required":true,"example":"apr_01a15660-1a20-7b31-9c42-6e7f80910213"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.decideMarginApproval","value":{"id":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","reference":"QUOTE-HARBOUR-OCT","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01041","serial":1041,"status":"draft-quote","quote":{"createdAt":"2026-10-19T22:40:02.551Z"},"lines":[{"id":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":48,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2100,"listPriceCents":2400,"priceOverride":{"fromCents":2400,"by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"at":"2026-10-19T22:41:15.090Z","reason":"Trade price for 24 or more"},"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":100800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":100800,"taxCents":10080,"source":"manifold"}],"netCents":100800,"taxCents":10080,"grossCents":110880}},{"id":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":22800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":22800,"taxCents":2280,"source":"manifold"}],"netCents":22800,"taxCents":2280,"grossCents":25080}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4071,"shipments":[],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":123600,"charges":{"shippingCents":2500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":126100,"taxCents":12610,"grossCents":138710,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":126100,"taxCents":12610}]},"shippingTax":{"inclusive":false,"amountCents":2500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2500,"taxCents":250,"source":"manifold"}],"netCents":2500,"taxCents":250,"grossCents":2750},"totalCents":138710,"paidCents":0,"refundedCents":0,"balanceCents":138710,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-19T22:40:02.551Z","updatedAt":"2026-10-19T22:43:00.000Z","marginApprovals":[{"approvalId":"apr_01a15660-1a20-7b31-9c42-6e7f80910213","status":"approved","lines":[{"lineId":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE"}],"note":"Matching their last order's price","requestedBy":{"_tag":"user","id":"usr_01a15660-1a20-7b31-9c42-7f8091021324"},"requestedAt":"2026-10-19T22:42:10.000Z","terms":"[[[\"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4\",48,2100,0],[\"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5\",6,3800,0]],0]","decidedBy":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"decidedAt":"2026-10-19T22:43:00.000Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | MarginApprovalNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/MarginApprovalNotFoundEncoded"}]}}}},"409":{"description":"MarginApprovalDecided | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/MarginApprovalDecidedEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Approve or decline a rep's request to sell below the minimum margin, as a signed-in sales manager, owner or admin (`margins:write`) — never through a link. An approval lets the order be issued and placed as it stands; a decline tells the rep, with the `reason`. Appends `fulfillment.margin-approval-decided`. Idempotent by state: a request is decided once, so the decision it already has answers the order as it stands and appends nothing, and the other one is 409 `MarginApprovalDecided`.\n\nRequires `margins:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideMarginApprovalEncoded"},"example":{"decision":"approve"}}},"required":true},"x-mcp-withheld":"selling below the minimum margin is a sales manager's own call, made signed in on the order's page in the admin; an agent reads the lines' margins with `fulfillment_get_order_margins`","x-required-scopes":["margins:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/links":{"post":{"tags":["orders"],"operationId":"orders.issueLink","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"CustomerLinkIssued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLinkIssuedEncoded"},"examples":{"contract":{"summary":"orders.issueLink","value":{"link":{"id":"cpl_01a15653-1a2b-7c3d-8e4f-5a6b7c8d9e0f","document":{"kind":"quote"},"issuedAt":"2026-10-19T22:45:02.004Z","issuedBy":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"}},"token":"01a1565263f77a819b92d8e9f0a1b2c3.01a156531a2b7c3d8e4f5a6b7c8d9e0f.q0W8rTz3mPd5LkXv2NfYbA","url":"https://pages.getmanifold.io/org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d/01a1565263f77a819b92d8e9f0a1b2c3.01a156531a2b7c3d8e4f5a6b7c8d9e0f.q0W8rTz3mPd5LkXv2NfYbA"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"DocumentNotLinkable | QuotesDisabled | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DocumentNotLinkableEncoded"},{"$ref":"#/components/schemas/QuotesDisabledEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The signed link a customer opens one of the order's documents by, on a page in the tenant's brand (`docs/customer-pages.md`): its `quote`, the `order`, an `invoice` (`invoiceId`) or a parcel's `shipment` (`shipmentId`). Answers the link, its `token` and the page's `url`; with `notificationId` the token names the message carrying it, so opening it marks it opened. Appends `fulfillment.customer-link-issued`. 409 `DocumentNotLinkable` for a document the order does not have; 409 `QuotesDisabled` for a new `quote` link when `quoteMode` is `draft-orders`. Idempotent by state: a document has one live link, so a retry answers it, appending nothing.\n\nRequires `orders:write` or `notifications:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCustomerLinkEncoded"},"example":{"document":{"kind":"quote"}}}},"required":true},"x-mcp-tool":{"name":"fulfillment_issue_customer_link","title":"Fulfillment: Issue customer link","toolset":"notifications","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write","notifications:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/links/{linkId}/revoke":{"post":{"tags":["orders"],"operationId":"orders.revokeLink","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"},{"name":"linkId","in":"path","schema":{"$ref":"#/components/schemas/CplId"},"required":true,"example":"cpl_01a15653-1a2b-7c3d-8e4f-5a6b7c8d9e0f"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.revokeLink","value":{"id":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","reference":"QUOTE-HARBOUR-OCT","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01041","serial":1041,"status":"open","quote":{"createdAt":"2026-10-19T22:40:02.551Z","issuedAt":"2026-10-19T23:22:45.118Z","validUntil":"2026-11-02T00:00:00.000Z","placedAt":"2026-10-20T00:58:19.664Z"},"lines":[{"id":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":48,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":48,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2100,"listPriceCents":2400,"priceOverride":{"fromCents":2400,"by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"at":"2026-10-19T22:41:15.090Z","reason":"Trade price for 24 or more"},"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":100800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":100800,"taxCents":10080,"source":"manifold"}],"netCents":100800,"taxCents":10080,"grossCents":110880}},{"id":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":6,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":22800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":22800,"taxCents":2280,"source":"manifold"}],"netCents":22800,"taxCents":2280,"grossCents":25080}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4089,"shipments":[{"id":"shp_01a15060-7a80-7b91-8ca2-0a1b2c3d4e5f","number":"SH-01056","reference":"auto:ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3:1","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","quantity":48},{"lineId":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","quantity":6}],"cartons":[],"createdAt":"2026-10-20T00:58:19.664Z","updatedAt":"2026-10-20T00:58:19.664Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":123600,"charges":{"shippingCents":2500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":126100,"taxCents":12610,"grossCents":138710,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":126100,"taxCents":12610}]},"shippingTax":{"inclusive":false,"amountCents":2500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2500,"taxCents":250,"source":"manifold"}],"netCents":2500,"taxCents":250,"grossCents":2750},"totalCents":138710,"paidCents":0,"refundedCents":0,"balanceCents":138710,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-19T22:40:02.551Z","updatedAt":"2026-10-20T01:10:00.000Z","links":[{"id":"cpl_01a15653-1a2b-7c3d-8e4f-5a6b7c8d9e0f","document":{"kind":"quote"},"issuedAt":"2026-10-19T22:45:02.004Z","issuedBy":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"viewedAt":"2026-10-19T23:02:44.310Z","revokedAt":"2026-10-20T01:10:00.000Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | CustomerLinkNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/CustomerLinkNotFoundEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Revoke a customer link: its token opens nothing from now, and the document's next link (`POST /orders/:orderId/links`) is a new one with a new token. Appends `fulfillment.customer-link-revoked`. 404 `CustomerLinkNotFound` for a link that is not the order's. Idempotent by state: a link is revoked once, so a retried revoke answers the order as it stands and appends nothing.\n\nRequires `orders:write`.","x-mcp-withheld":"ending a customer's link is a person's call, made from the order's page in the admin; an agent issues links, never ends one","x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/lines/{lineId}/price":{"put":{"tags":["orders"],"operationId":"orders.repriceLine","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"},{"name":"lineId","in":"path","schema":{"$ref":"#/components/schemas/LinId"},"required":true,"example":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.repriceLine","value":{"id":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","reference":"QUOTE-HARBOUR-OCT","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01041","serial":1041,"status":"draft-quote","quote":{"createdAt":"2026-10-19T22:40:02.551Z"},"lines":[{"id":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":48,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2100,"listPriceCents":2400,"priceOverride":{"fromCents":2400,"by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"at":"2026-10-19T22:41:15.090Z","reason":"Trade price for 24 or more"},"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":100800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":100800,"taxCents":10080,"source":"manifold"}],"netCents":100800,"taxCents":10080,"grossCents":110880}},{"id":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":22800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":22800,"taxCents":2280,"source":"manifold"}],"netCents":22800,"taxCents":2280,"grossCents":25080}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4071,"shipments":[],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":123600,"charges":{"shippingCents":2500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":126100,"taxCents":12610,"grossCents":138710,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":126100,"taxCents":12610}]},"shippingTax":{"inclusive":false,"amountCents":2500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2500,"taxCents":250,"source":"manifold"}],"netCents":2500,"taxCents":250,"grossCents":2750},"totalCents":138710,"paidCents":0,"refundedCents":0,"balanceCents":138710,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-19T22:40:02.551Z","updatedAt":"2026-10-19T22:41:15.090Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | OrderLineNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/OrderLineNotFoundEncoded"}]}}}},"409":{"description":"LineNotRepriceable | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LineNotRepriceableEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Change one line's unit price while the quote is a draft — the operator's decision, on the record: the line's `priceOverride` names who changed it, when, the price it had before and the `reason` given. Prices lock when the quote is issued or the order placed: after that, and on a cancelled order, 409 `LineNotRepriceable`; an unknown line id is 404 `OrderLineNotFound`. Appends `fulfillment.line-repriced`. Idempotent by content: a retry setting the price the line already has appends nothing.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepriceOrderLineEncoded"},"example":{"unitPriceCents":2100,"reason":"Trade price for 24 or more"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_reprice_line","title":"Fulfillment: Reprice line","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/cancel":{"post":{"tags":["orders"],"operationId":"orders.cancel","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15920-adb0-7ec1-9fd2-60718293a4b5"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.cancel","value":{"id":"ord_01a15920-adb0-7ec1-9fd2-60718293a4b5","reference":"PO-7790","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"number":"SO-01044","serial":1044,"status":"cancelled","lines":[{"id":"lin_01a15920-adb0-7ec1-9fd2-718293a4b5c6","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":1,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":1,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":3800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":3800,"taxCents":380,"source":"manifold"}],"netCents":3800,"taxCents":380,"grossCents":4180}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4140,"shipments":[{"id":"shp_01a15920-adb0-7ec1-9fd2-8293a4b5c6d7","number":"SH-01062","reference":"auto:ord_01a15920-adb0-7ec1-9fd2-60718293a4b5:1","status":"cancelled","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a15920-adb0-7ec1-9fd2-718293a4b5c6","sku":"BOWL-SALT-L","quantity":1}],"cartons":[],"createdAt":"2026-10-20T06:02:57.310Z","updatedAt":"2026-10-20T06:09:12.744Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":3800,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":3800,"taxCents":380,"grossCents":4180,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":3800,"taxCents":380}]},"totalCents":4180,"paidCents":0,"refundedCents":0,"balanceCents":4180,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T06:02:57.310Z","updatedAt":"2026-10-20T06:09:12.744Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Withdraw an order. Releases whatever it still has reserved through the inventory service, then appends `fulfillment.order-cancelled`. Units already dispatched are not recalled — that is a refund, not a cancellation. Idempotent by content: cancelling twice is acknowledged, and a retry appends nothing.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelFulfillmentOrderEncoded"},"example":{"reason":"Customer ordered twice"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_cancel_order","title":"Fulfillment: Cancel order","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/allocate":{"post":{"tags":["orders"],"operationId":"orders.allocate","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"Nothing is short, so nothing more is allocated: the order comes back as it stands.","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"open","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4},{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T01:02:11.204Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":0,"refundedCents":0,"balanceCents":18920,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T01:02:11.204Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ItemNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"}]}}}},"409":{"description":"OrderNotOpen | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNotOpenEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Run allocation again for an order waiting on stock. Reserves what inventory now has (bounded by `ordered - allocated`, so it is safe to call repeatedly) and appends `fulfillment.stock-allocated` with the residual shortfall; under the `split` policy the newly covered quantity also opens a shipment. This is the manual equivalent of the `inventory.stock-received` subscription, which does the same thing automatically when goods arrive. Idempotency key: the allocation reference `alloc:<orderId>:<lineId>:<locationId>:<allocated>` recorded in inventory.\n\nRequires `orders:write`.","x-mcp-tool":{"name":"fulfillment_allocate_order","title":"Fulfillment: Allocate order","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/lines/{lineId}/allocation":{"post":{"tags":["orders"],"operationId":"orders.moveAllocation","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"},{"name":"lineId","in":"path","schema":{"$ref":"#/components/schemas/LinId"},"required":true,"example":"lin_01a156d4-8704-7a21-8b32-7f8091021324"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.moveAllocation","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-01058","reference":"PO-7781-bowls","status":"cancelled","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[],"cartons":[],"createdAt":"2026-10-20T03:31:09.402Z","updatedAt":"2026-10-20T03:33:51.660Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-021324a5b6c7","number":"SH-01059","reference":"moved:PO-7781-bowls-shopfront","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-8b9cadbecfd5","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T03:33:51.660Z","updatedAt":"2026-10-20T03:33:51.660Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":0,"refundedCents":0,"balanceCents":18920,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:33:51.660Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ItemNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"}]}}}},"409":{"description":"UnknownOrderLine | AllocationNotMovable | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnknownOrderLineEncoded"},{"$ref":"#/components/schemas/AllocationNotMovableEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Move a line's held stock to another site: the hold is released where it was, taken at `toLocationId`, and the pending parcel moves with it (joining the parcel already open at that site, or opening one). Allocation is decided once and stands until someone moves it, and this is that move — the way a merchant overrules routing, or ships from the warehouse that actually has the room. `fromLocationId` defaults to the site holding most of the line and `quantity` to everything it holds. 409 `AllocationNotMovable` when no parcel on the shelf holds the line, when the named site holds less than asked, or when the parcel is already picked — units off the shelf move physically, not by decision. Appends `fulfillment.allocation-moved`. Idempotent on `reference`: the release and the reserve carry it, so a retry moves nothing twice and is acknowledged.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveAllocationEncoded"},"example":{"toLocationId":"loc_01a0f6b0-1100-7e51-8f62-8b9cadbecfd5","reference":"PO-7781-bowls-shopfront","reason":"The shopfront has the bowls boxed"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_move_allocation","title":"Fulfillment: Move allocation","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/shipments":{"post":{"tags":["orders"],"operationId":"orders.createShipment","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"}],"security":[{"bearer":[]}],"responses":{"201":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.createShipment","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-01058","reference":"PO-7781-bowls","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T03:31:09.402Z","updatedAt":"2026-10-20T03:31:09.402Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":0,"refundedCents":0,"balanceCents":18920,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:31:09.402Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"OrderNotOpen | UnknownOrderLine | OverDispatch | StockUnavailable | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNotOpenEncoded"},{"$ref":"#/components/schemas/UnknownOrderLineEncoded"},{"$ref":"#/components/schemas/OverDispatchEncoded"},{"$ref":"#/components/schemas/StockUnavailableEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Open a parcel over some of the order's allocated quantity, naming each order line by its `lineId` (409 `UnknownOrderLine` for one the order does not have). `locationId` is the site it ships from; absent takes the site the order's allocation already holds those lines at, so the units leave the shelf they were promised on. Appends `fulfillment.shipment-created`, plus the automatic pick/pack/ship chain behind it when the workflow says so. 409 `OrderNotOpen` for an unconfirmed draft or a cancelled order; 409 `StockUnavailable` if the lines exceed what has been allocated, and 409 `OverDispatch` if they exceed what was ordered. `reference` is required and is the idempotency key: a retry with the same reference is acknowledged with the parcel it already opened.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShipmentEncoded"},"example":{"reference":"PO-7781-bowls","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","quantity":2}]}}},"required":true},"x-mcp-tool":{"name":"fulfillment_create_shipment","title":"Fulfillment: Create shipment","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/shipments/{shipmentId}/pick":{"post":{"tags":["orders"],"operationId":"orders.pick","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"},{"name":"shipmentId","in":"path","schema":{"$ref":"#/components/schemas/ShpId"},"required":true,"example":"shp_01a156d4-8704-7a21-8b32-8091021324a5"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.pick","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"open","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"picked","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4}],"cartons":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T02:40:18.530Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":0,"refundedCents":0,"balanceCents":18920,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T02:40:18.530Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ShipmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ShipmentNotFoundEncoded"}]}}}},"409":{"description":"ShipmentNotInState | UnknownOrderLine | PickTrackingMismatch | UnitsNotOnShelf | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShipmentNotInStateEncoded"},{"$ref":"#/components/schemas/UnknownOrderLineEncoded"},{"$ref":"#/components/schemas/PickTrackingMismatchEncoded"},{"$ref":"#/components/schemas/UnitsNotOnShelfEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"PurchasingUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchasingUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Record what the operator physically took for this parcel, per parcel line (`lineId`; 409 `UnknownOrderLine` for a line not on the parcel). A kit line is picked by `parts` — identity per component, each `kits × per` units; untracked parts may be left out, a tracked part left out is 409 `PickTrackingMismatch`. Tracked SKUs must name it: picked serials (409 `UnitsNotOnShelf` if any is not free on the shelf per the registry) or a batch with sufficient remaining stock; identity that does not match the SKU's tracking mode is 409 `PickTrackingMismatch`, and nothing is appended when a pick is refused. Appends `fulfillment.shipment-picked` — which takes the named units off the free shelf immediately, so a second parcel cannot claim them — followed by `fulfillment.shipment-packed` (and ship/invoice) when those steps are automatic. 409 `ShipmentNotInState` if the parcel is not `pending`. Idempotent by state: a parcel is picked once, so a retried pick meets 409 `ShipmentNotInState`, never a second pick.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PickShipmentEncoded"},"example":{"lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","quantity":4}]}}},"required":true},"x-mcp-tool":{"name":"fulfillment_pick_shipment","title":"Fulfillment: Pick shipment","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/shipments/{shipmentId}/pack":{"post":{"tags":["orders"],"operationId":"orders.pack","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"},{"name":"shipmentId","in":"path","schema":{"$ref":"#/components/schemas/ShpId"},"required":true,"example":"shp_01a156d4-8704-7a21-8b32-8091021324a5"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.pack","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"open","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"packed","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T02:52:05.118Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":0,"refundedCents":0,"balanceCents":18920,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T02:52:05.118Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ShipmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ShipmentNotFoundEncoded"}]}}}},"409":{"description":"ShipmentNotInState | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShipmentNotInStateEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Close the parcel for despatch, optionally with the `cartons` it went in. Appends `fulfillment.shipment-packed`, plus the ship (and invoice) steps behind it when they are automatic. Nothing moves in inventory yet. 409 `ShipmentNotInState` unless the parcel is `picked`. Idempotent by state: a parcel is packed once, so a retried pack meets 409 `ShipmentNotInState`, never a second pack.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackShipmentEncoded"},"example":{"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}]}}},"required":true},"x-mcp-tool":{"name":"fulfillment_pack_shipment","title":"Fulfillment: Pack shipment","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/shipments/{shipmentId}/ship":{"post":{"tags":["orders"],"operationId":"orders.ship","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"},{"name":"shipmentId","in":"path","schema":{"$ref":"#/components/schemas/ShpId"},"required":true,"example":"shp_01a156d4-8704-7a21-8b32-8091021324a5"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.ship","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":0,"refundedCents":0,"balanceCents":18920,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ShipmentNotFound | ItemNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ShipmentNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"}]}}}},"409":{"description":"ShipmentNotInState | OrderUnpaid | InsufficientStock | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShipmentNotInStateEncoded"},{"$ref":"#/components/schemas/OrderUnpaidEncoded"},{"$ref":"#/components/schemas/InsufficientStockEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"422":{"description":"MissingUnitPrice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissingUnitPriceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Ship a parcel: the point its stock leaves the shelf and its cost becomes the cost of the sale. Under `prepaid` terms the order must be paid in full first (409 `OrderUnpaid`). Commands the inventory service to dispatch each line (which also consumes the line's reservation; 409 `InsufficientStock` if on-hand is short, 502 `InventoryUnavailable` if that call fails), then appends one `fulfillment.dispatched` per line plus `fulfillment.shipment-shipped` under a single transaction, and `fulfillment.invoice-issued` too when invoicing is automatic. The order becomes `partially-shipped`, or `shipped` once every line has gone. A parcel booked with a carrier ships under its booking — carrier, service, tracking number and link — unless the body names a `carrier` or `trackingNumber` of its own. Idempotent by state: a parcel ships once, so a retried ship on a `shipped` parcel is acknowledged and appends nothing — and the per-line `dispatchId`, derived from shipment + line and recorded in both journals, makes inventory's dispatch a retry too, never a second movement.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShipShipmentEncoded"},"example":{"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_ship_shipment","title":"Fulfillment: Ship shipment","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/invoices":{"post":{"tags":["orders"],"operationId":"orders.invoice","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"}],"security":[{"bearer":[]}],"responses":{"201":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.invoice","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":4,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-01058","reference":"PO-7781-bowls","status":"cancelled","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[],"cartons":[],"createdAt":"2026-10-20T03:31:09.402Z","updatedAt":"2026-10-20T03:33:51.660Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-021324a5b6c7","number":"SH-01059","reference":"moved:PO-7781-bowls-shopfront","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-8b9cadbecfd5","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T03:33:51.660Z","updatedAt":"2026-10-20T03:33:51.660Z"}],"invoices":[{"id":"inv_01a1588b-1a20-7b31-9c42-7f8091021324","number":"INV-00871","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"unitPriceCents":2400,"discountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"tax":{"netCents":9600,"taxCents":960,"grossCents":10560,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":9600,"taxCents":960}]},"header":{"kind":"tax-invoice","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"totalCents":10560,"shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","issuedAt":"2026-10-20T03:15:00.000Z"}],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":0,"refundedCents":0,"balanceCents":18920,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:15:00.000Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ShipmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ShipmentNotFoundEncoded"}]}}}},"409":{"description":"NothingToInvoice | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NothingToInvoiceEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"422":{"description":"MissingUnitPrice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissingUnitPriceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Raise a sales invoice — for one shipment when `shipmentId` is given, otherwise for everything shipped and not yet invoiced. Appends `fulfillment.invoice-issued`. The invoice is a document, not a ledger posting: payments and AR ageing live outside this service. Lines bill their units' tax at the invoice date's rates (`rateMoved` when it differs from the order's); a line's last invoice takes the remainder; shipping rides on the first. A `header` gives the title and tax particulars. 422 `MissingUnitPrice` if a line has no sales price (typical of orders created before prices were captured), 409 `NothingToInvoice` if there is nothing left to bill. Idempotent by state: a shipment is invoiced once, so a retry naming the same `shipmentId` is acknowledged with the document already raised and appends nothing; a retry without one meets 409 `NothingToInvoice`.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueInvoiceEncoded"},"example":{"shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_issue_invoice","title":"Fulfillment: Issue invoice","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/payments":{"post":{"tags":["orders"],"operationId":"orders.recordPayment","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"}],"security":[{"bearer":[]}],"responses":{"201":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.recordPayment","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":4,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-01058","reference":"PO-7781-bowls","status":"cancelled","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[],"cartons":[],"createdAt":"2026-10-20T03:31:09.402Z","updatedAt":"2026-10-20T03:33:51.660Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-021324a5b6c7","number":"SH-01059","reference":"moved:PO-7781-bowls-shopfront","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-8b9cadbecfd5","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T03:33:51.660Z","updatedAt":"2026-10-20T03:33:51.660Z"}],"invoices":[{"id":"inv_01a1588b-1a20-7b31-9c42-7f8091021324","number":"INV-00871","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"unitPriceCents":2400,"discountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"tax":{"netCents":9600,"taxCents":960,"grossCents":10560,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":9600,"taxCents":960}]},"header":{"kind":"tax-invoice","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"totalCents":10560,"shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","issuedAt":"2026-10-20T03:15:00.000Z"}],"refunds":[],"payments":[{"id":"pay_01a15f20-3c40-7d51-8e62-a5b6c7d8e9f0","number":"PAY-00912","amountCents":10560,"method":"bank-transfer","reference":"HARBOUR CERAMICS 4471","receivedAt":"2026-10-21T01:10:00.000Z","recordedAt":"2026-10-21T01:12:44.381Z","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-21","source":"same"}}],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":10560,"refundedCents":0,"balanceCents":8360,"refundOwedCents":0,"status":"partially-paid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-21T01:12:44.381Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | GiftCardNotFound | ItemNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/GiftCardNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"}]}}}},"409":{"description":"OrderNotOpen | OverPayment | InsufficientCredit | CreditHolderMismatch | GiftCardNotRedeemable | GiftCardExpired | InsufficientStock | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNotOpenEncoded"},{"$ref":"#/components/schemas/OverPaymentEncoded"},{"$ref":"#/components/schemas/InsufficientCreditEncoded"},{"$ref":"#/components/schemas/CreditHolderMismatchEncoded"},{"$ref":"#/components/schemas/GiftCardNotRedeemableEncoded"},{"$ref":"#/components/schemas/GiftCardExpiredEncoded"},{"$ref":"#/components/schemas/InsufficientStockEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"422":{"description":"MissingUnitPrice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissingUnitPriceEncoded"}}}},"429":{"description":"GiftCardAttemptsLocked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardAttemptsLockedEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Record money received against the order — a card capture, a bank transfer, a gateway settlement (`method`, with the gateway's own `reference` kept verbatim). The order's `money` moves: `paidCents`, `balanceCents` and `status` (`unpaid` → `partially-paid` → `paid`). A payment may not exceed what the order still owes (409 `OverPayment`), and a cancelled order takes none (409 `OrderNotOpen`). Under `prepaid` terms the payment that settles the order also releases its parcels: every `packed` parcel ships in the same transaction when shipping is automatic (`fulfillment.dispatched` × lines and `fulfillment.shipment-shipped`, plus `fulfillment.invoice-issued` when invoicing is), commanding the inventory service as a ship does. Appends `fulfillment.payment-recorded`. `paymentId` (a caller-minted `pay_…`) is required and is the idempotency key: a retry with the same id is acknowledged with the payment already recorded and counts the money once. A channel's payment for money it took because it was asked names that request as `collectionId`, which the order then shows collected.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordPaymentEncoded"},"example":{"paymentId":"pay_01a15f20-3c40-7d51-8e62-a5b6c7d8e9f0","amountCents":10560,"method":"bank-transfer","reference":"HARBOUR CERAMICS 4471","receivedAt":"2026-10-21T01:10:00.000Z"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_record_payment","title":"Fulfillment: Record payment","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/collections":{"post":{"tags":["orders"],"operationId":"orders.requestPaymentCollection","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9"}],"security":[{"bearer":[]}],"responses":{"201":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.requestPaymentCollection","value":{"id":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","reference":"WEB-31002","source":{"kind":"channel","channelId":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","externalId":"5512340987"},"customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","shippingAddressId":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01"},"party":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","name":"Priya Raman","shipTo":{"id":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01","address":{"firstName":"Priya","lastName":"Raman","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01045","serial":1045,"status":"open","lines":[{"id":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"tenant","createdSequence":4146,"shipments":[{"id":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","number":"SH-01063","reference":"auto:ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9:1","status":"packed","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","quantity":4}],"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:52:10.774Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"booked","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-20T06:53:41.860Z","booking":{"carrier":"Australia Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"trackingNumbers":["33XYZ0098765"],"trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0098765","externalId":"ssi-order-905512","cost":{"priceCents":1395,"currency":"AUD","taxCents":127}},"costFx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"}}],"money":{"subtotalCents":9600,"charges":{"shippingCents":1500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":11100,"taxCents":1110,"grossCents":12210,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":11100,"taxCents":1110}]},"shippingTax":{"inclusive":false,"amountCents":1500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":1500,"taxCents":150,"source":"manifold"}],"netCents":1500,"taxCents":150,"grossCents":1650},"totalCents":12210,"paidCents":0,"refundedCents":0,"balanceCents":12210,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T05:10:00.000Z","collections":[{"id":"pcol_01a15a50-0a10-7c21-8f36-2c3d4e5f6071","kind":"capture-authorised","channelId":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","appId":"app_5e1d3c22-7a41-4b8e-9c0f-6f2a1b3c4d5e","trigger":"manual","amountCents":12210,"final":true,"status":"requested","requestedAt":"2026-10-20T05:10:00.000Z","requestedBy":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"}}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ShipmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ShipmentNotFoundEncoded"}]}}}},"409":{"description":"OrderNotOpen | OverPayment | NothingToCollect | PaymentCollectionUnavailable | PaymentCollectionOpen | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNotOpenEncoded"},{"$ref":"#/components/schemas/OverPaymentEncoded"},{"$ref":"#/components/schemas/NothingToCollectEncoded"},{"$ref":"#/components/schemas/PaymentCollectionUnavailableEncoded"},{"$ref":"#/components/schemas/PaymentCollectionOpenEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Ask the sales channel an order came from to take the order's money through the channel's own processor: `capture-authorised` takes what the buyer's card authorised at the channel's checkout, `charge-saved-method` charges a card the buyer saved with the channel. Only a channel that declares the kind (`Channel.collects`, available now) can be asked — any other order, an admin or API order, a channel that cannot, one whose capability is still pending or one let go, is 409 `PaymentCollectionUnavailable`. What is asked for is `amountCents`, what an invoice bills (`invoiceId`), what a parcel holds (`shipmentId`) or else everything still owed — never more (409 `OverPayment`; 409 `NothingToCollect` when nothing is owed), and one collection waits for its channel at a time (409 `PaymentCollectionOpen`). The channel's app hears `payment.collection-requested` and answers; the money itself arrives as the channel's own record of it, naming the collection, so it is counted once. Appends `fulfillment.payment-collection-requested`. `collectionId` (a caller-minted `pcol_…`) is required and is the idempotency key, across the tenant: a retry with the same id on the same order is acknowledged with the collection already asked for, and the channel is asked once; the same id on another order is 409 `PaymentCollectionUnavailable`. Whether the channel can collect is read from the channel registry under Manifold's own credential, so asking needs `payments:write` alone.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPaymentCollectionEncoded"},"example":{"collectionId":"pcol_01a15a50-0a10-7c21-8f36-2c3d4e5f6071","kind":"capture-authorised"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_collect_via_channel","title":"Fulfillment: Collect via channel","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/collections/{collectionId}/answer":{"post":{"tags":["orders"],"operationId":"orders.answerPaymentCollection","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9"},{"name":"collectionId","in":"path","schema":{"$ref":"#/components/schemas/PcolId"},"required":true,"example":"pcol_01a15a50-0a10-7c21-8f36-2c3d4e5f6071"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.answerPaymentCollection","value":{"id":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","reference":"WEB-31002","source":{"kind":"channel","channelId":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","externalId":"5512340987"},"customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","shippingAddressId":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01"},"party":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","name":"Priya Raman","shipTo":{"id":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01","address":{"firstName":"Priya","lastName":"Raman","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01045","serial":1045,"status":"open","lines":[{"id":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"tenant","createdSequence":4146,"shipments":[{"id":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","number":"SH-01063","reference":"auto:ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9:1","status":"packed","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","quantity":4}],"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:52:10.774Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"booked","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-20T06:53:41.860Z","booking":{"carrier":"Australia Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"trackingNumbers":["33XYZ0098765"],"trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0098765","externalId":"ssi-order-905512","cost":{"priceCents":1395,"currency":"AUD","taxCents":127}},"costFx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"}}],"money":{"subtotalCents":9600,"charges":{"shippingCents":1500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":11100,"taxCents":1110,"grossCents":12210,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":11100,"taxCents":1110}]},"shippingTax":{"inclusive":false,"amountCents":1500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":1500,"taxCents":150,"source":"manifold"}],"netCents":1500,"taxCents":150,"grossCents":1650},"totalCents":12210,"paidCents":0,"refundedCents":0,"balanceCents":12210,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T05:10:04.512Z","collections":[{"id":"pcol_01a15a50-0a10-7c21-8f36-2c3d4e5f6071","kind":"capture-authorised","channelId":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","appId":"app_5e1d3c22-7a41-4b8e-9c0f-6f2a1b3c4d5e","trigger":"manual","amountCents":12210,"final":true,"status":"succeeded","requestedAt":"2026-10-20T05:10:00.000Z","requestedBy":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"answeredAt":"2026-10-20T05:10:04.512Z","transactionId":"7783261904","collectedCents":12210}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"PaymentCollectionNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PaymentCollectionNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | PaymentCollectionNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/PaymentCollectionNotFoundEncoded"}]}}}},"409":{"description":"PaymentCollectionAnswered | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PaymentCollectionAnsweredEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The app providing the order's channel answers a collection it was asked for: `succeeded` (the payment system's `transactionId` and what it took), `refused` with a code and the reason — `declined`, `authorisation-expired`, `nothing-to-collect`, `not-permitted`, `held`, `cancelled`, `payment-in-progress` or `error` — which the order shows its staff, or `pending` (the payment system has the charge and has not finished it: the collection stays open, and no other is asked for, until a final answer follows). Only that app answers (403 `PaymentCollectionNotYours`). The answer moves no money: what the channel took arrives as its payment record. Appends `fulfillment.payment-collection-answered`. Idempotent by state: a collection is answered finally once, so the same answer again — or a retry of any pending answer it already gave — is acknowledged, and a different one is 409 `PaymentCollectionAnswered`.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerPaymentCollection"},"example":{"_tag":"succeeded","transactionId":"7783261904","amountCents":12210}}},"required":true},"x-mcp-withheld":"only the app providing the order's sales channel answers a collection, with what its payment system did","x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/collections/{collectionId}/resolve":{"post":{"tags":["orders"],"operationId":"orders.resolvePaymentCollection","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9"},{"name":"collectionId","in":"path","schema":{"$ref":"#/components/schemas/PcolId"},"required":true,"example":"pcol_01a15a50-0a10-7c21-8f36-2c3d4e5f6071"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.resolvePaymentCollection","value":{"id":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","reference":"WEB-31002","source":{"kind":"channel","channelId":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","externalId":"5512340987"},"customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","shippingAddressId":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01"},"party":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","name":"Priya Raman","shipTo":{"id":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01","address":{"firstName":"Priya","lastName":"Raman","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01045","serial":1045,"status":"open","lines":[{"id":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"tenant","createdSequence":4146,"shipments":[{"id":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","number":"SH-01063","reference":"auto:ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9:1","status":"packed","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","quantity":4}],"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:52:10.774Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"booked","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-20T06:53:41.860Z","booking":{"carrier":"Australia Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"trackingNumbers":["33XYZ0098765"],"trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0098765","externalId":"ssi-order-905512","cost":{"priceCents":1395,"currency":"AUD","taxCents":127}},"costFx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"}}],"money":{"subtotalCents":9600,"charges":{"shippingCents":1500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":11100,"taxCents":1110,"grossCents":12210,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":11100,"taxCents":1110}]},"shippingTax":{"inclusive":false,"amountCents":1500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":1500,"taxCents":150,"source":"manifold"}],"netCents":1500,"taxCents":150,"grossCents":1650},"totalCents":12210,"paidCents":0,"refundedCents":0,"balanceCents":12210,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T05:10:04.512Z","collections":[{"id":"pcol_01a15a50-0a10-7c21-8f36-2c3d4e5f6071","kind":"capture-authorised","channelId":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","appId":"app_5e1d3c22-7a41-4b8e-9c0f-6f2a1b3c4d5e","trigger":"manual","amountCents":12210,"final":true,"status":"succeeded","requestedAt":"2026-10-20T05:10:00.000Z","requestedBy":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"answeredAt":"2026-10-20T05:10:04.512Z","transactionId":"7783261904","collectedCents":12210}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | PaymentCollectionNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/PaymentCollectionNotFoundEncoded"}]}}}},"409":{"description":"PaymentCollectionNotInDoubt | PaymentCollectionAnswered | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PaymentCollectionNotInDoubtEncoded"},{"$ref":"#/components/schemas/PaymentCollectionAnsweredEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"A person settles a collection that needs checking — one whose channel sent the charge, lost the answer and could not tie what its payment system shows to it, so it holds the order's collections open (`PaymentCollection.check` lists what may be it). Having looked in the channel's own records, they say `collected`, naming the transaction they found (one the check lists) and what it took, or `not-collected`, which frees the order to ask again as a new collection with its own key. Only a collection that needs checking is resolved here (409 `PaymentCollectionNotInDoubt`). Moves no money: what the channel took arrives as its payment record. Appends `fulfillment.payment-collection-answered` (refused `checked-not-collected` for not collected), its actor the person. Idempotent by state: a collection is answered finally once, so the same resolution again is acknowledged and a different one is 409 `PaymentCollectionAnswered`.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvePaymentCollection"},"example":{"_tag":"collected","transactionId":"7783261904","amountCents":12210}}},"required":true},"x-mcp-withheld":"a person settles a collection in doubt only after checking the channel's own payment records, on the order's page in the admin","x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/costs":{"post":{"tags":["orders"],"operationId":"orders.recordCost","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15ad0-c1a0-7b2c-8d3e-4f5a6b7c8d9e"}],"security":[{"bearer":[]}],"responses":{"201":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"journal-order-costs":{"summary":"Journal an additional cost on an order","value":{"id":"ord_01a15ad0-c1a0-7b2c-8d3e-4f5a6b7c8d9e","reference":"WEB-20417","source":{"kind":"api"},"salesRepId":"usr_01a15ad0-a1b2-7c3d-8e4f-5a6b7c8d9e01","commission":{"earnedOn":"invoiced","earner":"order-rep","earnedBy":{"userId":"usr_01a15ad0-a1b2-7c3d-8e4f-5a6b7c8d9e01","groupId":"cgr_00000000-0000-0000-0000-000000000000","groupName":"default","baseRateBps":0}},"customer":{"personId":"psn_01a15ad0-c0f9-7a1b-8c2d-3e4f5a6b7c8d"},"party":{"personId":"psn_01a15ad0-c0f9-7a1b-8c2d-3e4f5a6b7c8d"},"catalogIds":["cat_01a15ad0-a2c3-7d4e-8f5a-6b7c8d9e0f12"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-21","source":"same"},"convention":"inclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":0},"number":"SO-00001","serial":1,"status":"open","lines":[{"id":"lin_01a15ad0-a3d4-7e5f-9a6b-7c8d9e0f1a23","sku":"MUG-SPECKLED","name":"Speckled stoneware mug","ordered":4,"removed":false,"kind":"stock","outsideCatalogs":true,"discountCents":0,"discountKind":"amount","allocated":4,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"priceOverride":{"by":{"_tag":"user","id":"usr_01a15ad0-a1b2-7c3d-8e4f-5a6b7c8d9e01"},"at":"2026-10-21T01:10:33.484Z"},"inclusive":true,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":0,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":true,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":0,"netCents":9600,"taxCents":0,"source":"manifold"}],"netCents":9600,"taxCents":0,"grossCents":9600},"commission":{}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"auto","ship":"manual","invoice":"off","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{},"quoteMode":"quotes","requireCustomer":true,"marginPolicies":{}},"paymentTermsBy":"tenant","createdSequence":0,"shipments":[{"id":"shp_01a15ad0-a4e5-7f6a-8b7c-8d9e0f1a2b34","number":"SH-00001","reference":"auto:ord_01a15ad0-c1a0-7b2c-8d3e-4f5a6b7c8d9e:1","status":"pending","locationId":"loc_01a15ad0-a5f6-7a7b-9c8d-9e0f1a2b3c45","lines":[{"lineId":"lin_01a15ad0-a3d4-7e5f-9a6b-7c8d9e0f1a23","sku":"MUG-SPECKLED","quantity":4}],"cartons":[],"createdAt":"2026-10-21T01:10:33.484Z","updatedAt":"2026-10-21T01:10:33.484Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"links":[],"costs":[{"costId":"cost_01a15ad0-e9c0-7551-91df-0a1b2c3d4e5f","amountCents":4500,"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-21","source":"same"},"reason":"Courier to redeliver after a failed first attempt","accountCode":"6300","date":"2026-10-21","recordedBy":{"_tag":"user","id":"usr_01a15ad0-a1b2-7c3d-8e4f-5a6b7c8d9e01"},"recordedAt":"2026-10-21T01:10:35.822Z"}],"marginApprovals":[],"money":{"subtotalCents":9600,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":9600,"taxCents":0,"grossCents":9600,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":0,"exempt":false,"taxableCents":9600,"taxCents":0}]},"totalCents":9600,"paidCents":0,"refundedCents":0,"balanceCents":9600,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"routing":[{"lineId":"lin_01a15ad0-a3d4-7e5f-9a6b-7c8d9e0f1a23","locationId":"loc_01a15ad0-a5f6-7a7b-9c8d-9e0f1a2b3c45","routedBy":"rank"}],"createdAt":"2026-10-21T01:10:33.484Z","updatedAt":"2026-10-21T01:10:35.822Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | OrderLineNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/OrderLineNotFoundEncoded"}]}}}},"409":{"description":"OrderNotOpen | AccountNotPostable | CostCurrencyRefused | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNotOpenEncoded"},{"$ref":"#/components/schemas/AccountNotPostableEncoded"},{"$ref":"#/components/schemas/CostCurrencyRefusedEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Journal an additional cost on the order by hand: an amount, a `reason` and the chart account it is charged to (`accountCode`), for the order or one line (`lineId`; 404 `OrderLineNotFound`). 409 `AccountNotPostable` for an account not in the chart, archived or kept by the ledger; 409 `CostCurrencyRefused` for a currency other than the order's or the home one; 409 `OrderNotOpen` on a quote or a cancelled order. Posts the account against 2160 accrued costs (`docs/order-costs.md`). Appends `fulfillment.cost-recorded`. `costId` (a caller-minted `cost_…`) is required and is the idempotency key: a retry with the same id is acknowledged and appends nothing.\n\nRequires `financials:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordOrderCostEncoded"},"example":{"costId":"cost_01a15ad0-e9c0-7551-91df-0a1b2c3d4e5f","amountCents":4500,"reason":"Courier to redeliver after a failed first attempt","accountCode":"6300"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_record_order_cost","title":"Fulfillment: Record order cost","toolset":"costs","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["financials:write"],"x-example-source":{"origin":"workflow","workflow":"journal-order-costs","step":8}}},"/orders/{orderId}/costs/{costId}/reverse":{"post":{"tags":["orders"],"operationId":"orders.reverseCost","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"},{"name":"costId","in":"path","schema":{"$ref":"#/components/schemas/CostId"},"required":true,"example":"cost_01a15ad0-e9c0-7551-91df-0a1b2c3d4e5f"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.reverseCost","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":4,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-01058","reference":"PO-7781-bowls","status":"cancelled","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[],"cartons":[],"createdAt":"2026-10-20T03:31:09.402Z","updatedAt":"2026-10-20T03:33:51.660Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-021324a5b6c7","number":"SH-01059","reference":"moved:PO-7781-bowls-shopfront","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-8b9cadbecfd5","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T03:33:51.660Z","updatedAt":"2026-10-20T03:33:51.660Z"}],"invoices":[{"id":"inv_01a1588b-1a20-7b31-9c42-7f8091021324","number":"INV-00871","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"unitPriceCents":2400,"discountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"tax":{"netCents":9600,"taxCents":960,"grossCents":10560,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":9600,"taxCents":960}]},"header":{"kind":"tax-invoice","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"totalCents":10560,"shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","issuedAt":"2026-10-20T03:15:00.000Z"}],"refunds":[],"payments":[{"id":"pay_01a15f20-3c40-7d51-8e62-a5b6c7d8e9f0","number":"PAY-00912","amountCents":10560,"method":"bank-transfer","reference":"HARBOUR CERAMICS 4471","receivedAt":"2026-10-21T01:10:00.000Z","recordedAt":"2026-10-21T01:12:44.381Z","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-21","source":"same"}}],"notes":[],"edits":[],"consignments":[],"costs":[{"costId":"cost_01a15ad0-e9c0-7551-91df-0a1b2c3d4e5f","amountCents":4500,"reason":"Courier to redeliver after a failed first attempt","accountCode":"6300","date":"2026-10-21","currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-21","source":"same"},"recordedBy":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"recordedAt":"2026-10-21T02:05:00.000Z","reversal":{"by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"at":"2026-10-21T02:20:00.000Z","reason":"Entered against the wrong order"}}],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":10560,"refundedCents":0,"balanceCents":8360,"refundOwedCents":0,"status":"partially-paid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-21T02:20:00.000Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | CostNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/CostNotFoundEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Reverse a cost on the order (404 `CostNotFound`): it stays, marked reversed, and the ledger posts its exact opposite. Appends `fulfillment.cost-reversed`. Idempotent by state: a cost is reversed once, so a retry is acknowledged and appends nothing.\n\nRequires `financials:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReverseCostEncoded"},"example":{"reason":"Entered against the wrong order"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_reverse_order_cost","title":"Fulfillment: Reverse order cost","toolset":"costs","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["financials:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/payment-terms":{"put":{"tags":["orders"],"operationId":"orders.setPaymentTerms","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.setPaymentTerms","value":{"id":"ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60","reference":"PO-7795","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"number":"SO-01043","serial":1043,"status":"open","lines":[{"id":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":6,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":14400,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":14400,"taxCents":1440,"source":"manifold"}],"netCents":14400,"taxCents":1440,"grossCents":15840}}],"workflow":{"paymentTerms":"prepaid","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"changed","createdSequence":4131,"shipments":[{"id":"shp_01a158e0-8b90-7ca1-9db2-4e5f60718293","number":"SH-01060","reference":"auto:ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60:1","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","sku":"MUG-SPECKLE","quantity":6}],"cartons":[],"createdAt":"2026-10-20T05:10:03.447Z","updatedAt":"2026-10-20T05:10:03.447Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":14400,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":14400,"taxCents":1440,"grossCents":15840,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":14400,"taxCents":1440}]},"totalCents":15840,"paidCents":0,"refundedCents":0,"balanceCents":15840,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T05:10:03.447Z","updatedAt":"2026-10-20T05:14:22.019Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ItemNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"}]}}}},"409":{"description":"OrderNotOpen | InsufficientStock | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNotOpenEncoded"},{"$ref":"#/components/schemas/InsufficientStockEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"422":{"description":"MissingUnitPrice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissingUnitPriceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Change whether this order may ship before it is paid — a person's credit decision on one order: `on-account` lets its parcels leave unpaid (a trusted customer's bank transfer, terms agreed by phone), `prepaid` holds them until the order is paid in full. Every order settles its terms when it is created — what its creator said, else on account for a company on trade terms, else the tenant's default — and `paymentTermsBy` says which; after a change it reads `changed`. Releasing a held order lets its parcels go: when shipping is automatic every `packed` parcel ships in the same transaction (`fulfillment.dispatched` × lines and `fulfillment.shipment-shipped`, plus `fulfillment.invoice-issued` when invoicing is), commanding the inventory service as a ship does. A cancelled order is 409 `OrderNotOpen`. Appends `fulfillment.payment-terms-changed`. Idempotent by content: a retry, or any request for the terms the order already has, appends nothing.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPaymentTermsEncoded"},"example":{"paymentTerms":"prepaid"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_set_payment_terms","title":"Fulfillment: Set payment terms","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/sales-rep":{"put":{"tags":["orders"],"operationId":"orders.setSalesRep","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.setSalesRep","value":{"id":"ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60","reference":"PO-7795","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"number":"SO-01043","serial":1043,"status":"open","lines":[{"id":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":6,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":14400,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":14400,"taxCents":1440,"source":"manifold"}],"netCents":14400,"taxCents":1440,"grossCents":15840},"commission":{}}],"workflow":{"paymentTerms":"prepaid","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"changed","createdSequence":4131,"shipments":[{"id":"shp_01a158e0-8b90-7ca1-9db2-4e5f60718293","number":"SH-01060","reference":"auto:ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60:1","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","sku":"MUG-SPECKLE","quantity":6}],"cartons":[],"createdAt":"2026-10-20T05:10:03.447Z","updatedAt":"2026-10-20T05:10:03.447Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":14400,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":14400,"taxCents":1440,"grossCents":15840,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":14400,"taxCents":1440}]},"totalCents":15840,"paidCents":0,"refundedCents":0,"balanceCents":15840,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T05:10:03.447Z","updatedAt":"2026-10-29T09:30:00.000Z","salesRepId":"usr_019e5a10-51b0-7a42-8c1d-0e9f3a6b2c71","commission":{"earnedOn":"invoiced","earner":"order-rep","earnedBy":{"userId":"usr_019e5a10-51b0-7a42-8c1d-0e9f3a6b2c71","groupId":"cgr_019e5a10-4c2a-7d11-9a3e-5b7c2d8e1f40","groupName":"Gold","baseRateBps":500}}}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | OrderCatalogNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/OrderCatalogNotFoundEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable | CrmUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InventoryUnavailableEncoded"},{"$ref":"#/components/schemas/CrmUnavailableEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Re-attribute an order or a quote (`docs/commissions.md`): set its sales rep, or `null` for none. The earner is read again as it stands now — the new rep, or under the `account-manager` setting the customer's account rep (which is how an unassigned order is fixed: set the customer's account rep, then re-attribute) — with their group and every line's catalog rule, and only commission earned after this moves. Appends `fulfillment.sales-rep-changed`. Idempotent by content: a retry naming the rep the order already has, whose terms read the same, is acknowledged and appends nothing.\n\nRequires `commissions:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSalesRepEncoded"},"example":{"salesRepId":"usr_019e5a10-51b0-7a42-8c1d-0e9f3a6b2c71"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_set_sales_rep","title":"Fulfillment: Set sales rep","toolset":"commissions","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["commissions:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/customer-po":{"put":{"tags":["orders"],"operationId":"orders.setCustomerPo","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.setCustomerPo","value":{"id":"ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60","reference":"PO-7795","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"number":"SO-01043","serial":1043,"status":"open","lines":[{"id":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":6,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":14400,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":14400,"taxCents":1440,"source":"manifold"}],"netCents":14400,"taxCents":1440,"grossCents":15840}}],"workflow":{"paymentTerms":"prepaid","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"changed","createdSequence":4131,"shipments":[{"id":"shp_01a158e0-8b90-7ca1-9db2-4e5f60718293","number":"SH-01060","reference":"auto:ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60:1","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","sku":"MUG-SPECKLE","quantity":6}],"cartons":[],"createdAt":"2026-10-20T05:10:03.447Z","updatedAt":"2026-10-20T05:10:03.447Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[],"money":{"subtotalCents":14400,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":14400,"taxCents":1440,"grossCents":15840,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":14400,"taxCents":1440}]},"totalCents":15840,"paidCents":0,"refundedCents":0,"balanceCents":15840,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T05:10:03.447Z","updatedAt":"2026-10-20T05:18:09.502Z","customerPo":"4471-B"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"OrderNotOpen | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNotOpenEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Set, change or clear (omit `customerPo`) the buyer's PO number on an order or quote; issued invoices keep theirs. A cancelled order is 409 `OrderNotOpen`. Appends `fulfillment.customer-po-changed`. Idempotent by content: the number the order already has appends nothing.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomerPoEncoded"},"example":{"customerPo":"4471-B"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_set_customer_po","title":"Fulfillment: Set customer PO number","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/edits":{"post":{"tags":["orders"],"operationId":"orders.edit","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60"}],"security":[{"bearer":[]}],"responses":{"201":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.edit","value":{"id":"ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60","reference":"PO-7795","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"number":"SO-01043","serial":1043,"status":"open","lines":[{"id":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":8,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":8,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":19200,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":19200,"taxCents":1920,"source":"manifold"}],"netCents":19200,"taxCents":1920,"grossCents":21120}},{"id":"lin_01a15900-9ca0-7db1-8ec2-3d4e5f607182","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":1,"removed":false,"discountCents":0,"allocated":1,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":3800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":3800,"taxCents":380,"source":"manifold"}],"netCents":3800,"taxCents":380,"grossCents":4180}}],"workflow":{"paymentTerms":"prepaid","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"changed","createdSequence":4131,"shipments":[{"id":"shp_01a158e0-8b90-7ca1-9db2-4e5f60718293","number":"SH-01060","reference":"auto:ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60:1","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","sku":"MUG-SPECKLE","quantity":6}],"cartons":[],"createdAt":"2026-10-20T05:10:03.447Z","updatedAt":"2026-10-20T05:10:03.447Z"},{"id":"shp_01a15900-9ca0-7db1-8ec2-5f60718293a4","number":"SH-01061","reference":"auto:ord_01a158e0-8b90-7ca1-9db2-1b2c3d4e5f60:2","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","sku":"MUG-SPECKLE","quantity":2},{"lineId":"lin_01a15900-9ca0-7db1-8ec2-3d4e5f607182","sku":"BOWL-SALT-L","quantity":1}],"cartons":[],"createdAt":"2026-10-20T05:31:40.808Z","updatedAt":"2026-10-20T05:31:40.808Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[{"editId":"edit-po-7795-1","changes":[{"_tag":"quantity-changed","lineId":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","quantity":8},{"_tag":"line-added","lineId":"lin_01a15900-9ca0-7db1-8ec2-3d4e5f607182","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","quantity":1,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]}}],"reason":"Customer added a bowl by phone","by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"editedAt":"2026-10-20T05:31:40.808Z"}],"consignments":[],"money":{"subtotalCents":23000,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":23000,"taxCents":2300,"grossCents":25300,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":23000,"taxCents":2300}]},"totalCents":25300,"paidCents":0,"refundedCents":0,"balanceCents":25300,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T05:10:03.447Z","updatedAt":"2026-10-20T05:31:40.808Z"}}}}}},"400":{"description":"ShippingRateInvalid | LineAttributeInvalid","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShippingRateInvalidEncoded"},{"$ref":"#/components/schemas/LineAttributeInvalidEncoded"}]}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"CatalogNotOpenToRep | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CatalogNotOpenToRepEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | OrderLineNotFound | ItemNotFound | OrderCatalogNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/OrderLineNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"},{"$ref":"#/components/schemas/OrderCatalogNotFoundEncoded"}]}}}},"409":{"description":"OrderNotOpen | EditNotAllowed | LineUnpriced | LineDiscountRefused | TaxRateMissing | OrderCatalogCurrencyMismatch | FulfillmentLocationInvalid | LineAttributeRequired | SkuNotInCatalogs | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNotOpenEncoded"},{"$ref":"#/components/schemas/EditNotAllowedEncoded"},{"$ref":"#/components/schemas/LineUnpricedEncoded"},{"$ref":"#/components/schemas/LineDiscountRefusedEncoded"},{"$ref":"#/components/schemas/TaxRateMissingEncoded"},{"$ref":"#/components/schemas/OrderCatalogCurrencyMismatchEncoded"},{"$ref":"#/components/schemas/FulfillmentLocationInvalidEncoded"},{"$ref":"#/components/schemas/LineAttributeRequiredEncoded"},{"$ref":"#/components/schemas/SkuNotInCatalogsEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"422":{"description":"QuantityBelowMinimum | QuantityNotInStep","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuantityBelowMinimumEncoded"},{"$ref":"#/components/schemas/QuantityNotInStepEncoded"}]}}}},"502":{"description":"InventoryUnavailable | CrmUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InventoryUnavailableEncoded"},{"$ref":"#/components/schemas/CrmUnavailableEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Edit an order in place, the way a storefront edits one: lines, discounts, charges, ship-to, ship-from site or customer. A draft quote takes an edit and allocates nothing; an issued quote refuses one (409 `EditNotAllowed` until reopened). A reduction reaches only unpicked quantity (409 `EditNotAllowed`) and releases its hold; an addition is priced like a create's line (409 `LineUnpriced`, 409 `SkuNotInCatalogs`) and allocated now. Added or resized lines keep their order rules (422), their `attributes` the line item properties, and are re-taxed (409 `TaxRateMissing`); `shipping-rate-chosen` takes a `POST /rates` rate. A discount past the line's worth is 409 `LineDiscountRefused`. `customer-changed` sets who the order is for (absent `customer`: none) with the addresses; a placed order only gains a customer it never had (409 `EditNotAllowed`), and on a draft quote a company with its own catalogs moves the quote onto them, repricing every line without a `priceOverride` (409 `OrderCatalogCurrencyMismatch` across currencies). Appends `fulfillment.order-edited` (and `fulfillment.stock-allocated` / `fulfillment.shipment-created` for new quantity). `editId` is required and is the idempotency key: a retry with the same id is acknowledged and appends nothing.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EditOrderEncoded"},"example":{"editId":"edit-po-7795-1","reason":"Customer added a bowl by phone","changes":[{"_tag":"quantity-changed","lineId":"lin_01a158e0-8b90-7ca1-9db2-2c3d4e5f6071","quantity":8},{"_tag":"line-added","sku":"BOWL-SALT-L","quantity":1}]}}},"required":true},"x-mcp-tool":{"name":"fulfillment_edit_order","title":"Fulfillment: Edit order","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/notes":{"post":{"tags":["orders"],"operationId":"orders.postNote","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"}],"security":[{"bearer":[]}],"responses":{"201":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.postNote","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":4,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-01058","reference":"PO-7781-bowls","status":"cancelled","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[],"cartons":[],"createdAt":"2026-10-20T03:31:09.402Z","updatedAt":"2026-10-20T03:33:51.660Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-021324a5b6c7","number":"SH-01059","reference":"moved:PO-7781-bowls-shopfront","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-8b9cadbecfd5","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T03:33:51.660Z","updatedAt":"2026-10-20T03:33:51.660Z"}],"invoices":[{"id":"inv_01a1588b-1a20-7b31-9c42-7f8091021324","number":"INV-00871","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"unitPriceCents":2400,"discountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"tax":{"netCents":9600,"taxCents":960,"grossCents":10560,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":9600,"taxCents":960}]},"header":{"kind":"tax-invoice","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"totalCents":10560,"shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","issuedAt":"2026-10-20T03:15:00.000Z"}],"refunds":[],"payments":[{"id":"pay_01a15f20-3c40-7d51-8e62-a5b6c7d8e9f0","number":"PAY-00912","amountCents":10560,"method":"bank-transfer","reference":"HARBOUR CERAMICS 4471","receivedAt":"2026-10-21T01:10:00.000Z","recordedAt":"2026-10-21T01:12:44.381Z","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-21","source":"same"}}],"notes":[{"id":"note_01a15f6e-5e60-7f71-8a82-c7d8e9f0a1b2","reference":"note-harbour-dock","body":"Deliveries to the rear dock, weekdays before 3pm.","by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"postedAt":"2026-10-21T02:05:17.902Z"}],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":10560,"refundedCents":0,"balanceCents":8360,"refundOwedCents":0,"status":"partially-paid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-21T02:05:17.902Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Leave a note on the order's activity stream — commentary for the next person, kept in the clear beside the order's facts. Appends `fulfillment.note-posted`. `reference` (the composer's key for this submission) is required and is the idempotency key: a retry with the same reference is acknowledged with the note already written and appends nothing.\n\nRequires `orders:write` or `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOrderNoteEncoded"},"example":{"reference":"note-harbour-dock","body":"Deliveries to the rear dock, weekdays before 3pm."}}},"required":true},"x-mcp-tool":{"name":"fulfillment_post_order_note","title":"Fulfillment: Post order note","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write","payments:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/transcripts":{"post":{"tags":["orders"],"operationId":"orders.attachTranscript","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"},{"name":"reference","in":"query","schema":{"$ref":"#/components/schemas/VcsId"},"required":true,"example":"vcs_01a15652-6a10-7c2e-8f41-0b2c3d4e5f60"},{"name":"utterances","in":"query","schema":{"type":"string"},"required":true,"example":"42"},{"name":"audioSeconds","in":"query","schema":{"type":"string"},"required":true,"example":"754"},{"name":"startedAt","in":"query","schema":{"type":"string"},"required":true,"example":"2026-10-19T22:45:30.000Z"}],"security":[{"bearer":[]}],"responses":{"201":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"Send the transcript as the raw request body, with `Content-Type: text/plain; charset=utf-8`.","value":{"id":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","reference":"QUOTE-HARBOUR-OCT","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01041","serial":1041,"status":"draft-quote","quote":{"createdAt":"2026-10-19T22:40:02.551Z"},"lines":[{"id":"lin_01a15652-63f7-7a81-9b92-e9f0a1b2c3d4","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":48,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2100,"listPriceCents":2400,"priceOverride":{"fromCents":2400,"by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"at":"2026-10-19T22:41:15.090Z","reason":"Trade price for 24 or more"},"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":100800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":100800,"taxCents":10080,"source":"manifold"}],"netCents":100800,"taxCents":10080,"grossCents":110880}},{"id":"lin_01a15652-63f7-7a81-9b92-f0a1b2c3d4e5","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":6,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":0,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":22800,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":22800,"taxCents":2280,"source":"manifold"}],"netCents":22800,"taxCents":2280,"grossCents":25080}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4071,"shipments":[],"invoices":[],"refunds":[],"payments":[],"notes":[],"transcripts":[{"sessionId":"vcs_01a15652-6a10-7c2e-8f41-0b2c3d4e5f60","utterances":42,"audioSeconds":754,"bytes":4180,"startedAt":"2026-10-19T22:45:30.000Z","by":{"_tag":"system","id":"voice-manager:transcripts"},"attachedAt":"2026-10-19T22:58:12.204Z"}],"edits":[],"consignments":[],"money":{"subtotalCents":123600,"charges":{"shippingCents":2500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":126100,"taxCents":12610,"grossCents":138710,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":126100,"taxCents":12610}]},"shippingTax":{"inclusive":false,"amountCents":2500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2500,"taxCents":250,"source":"manifold"}],"netCents":2500,"taxCents":250,"grossCents":2750},"totalCents":138710,"paidCents":0,"refundedCents":0,"balanceCents":138710,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-19T22:40:02.551Z","updatedAt":"2026-10-19T22:58:12.204Z"}}}}}},"400":{"description":"TranscriptUnreadable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptUnreadableEncoded"}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"410":{"description":"TranscriptErased","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptErasedEncoded"}}}},"413":{"description":"TranscriptTooLarge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptTooLargeEncoded"}}}},"503":{"description":"TranscriptStoreUnavailable | RequestLogUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TranscriptStoreUnavailableEncoded"},{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}]}}}}},"description":"Keep a voice conversation's transcript on the order or quote it built (`docs/voice-quoting.md` §5): the voice service hands it over when the conversation ends. The body is the raw file — not multipart, not JSON — `text/plain`, an utterance a line, at most 5 MiB (413 `TranscriptTooLarge`; 400 `TranscriptUnreadable` when empty or not plain text — the body is read whole and held to that before a byte is written), kept in the private bucket under the order. The query string carries the voice session's id as `reference` and what the conversation came to (`utterances`, `audioSeconds`, `startedAt`). Appends `fulfillment.transcript-attached`. Idempotent on `reference`: an order keeps one transcript per conversation, so a retry is acknowledged with the order as it stands and stores nothing — an erased transcript stays erased. 410 `TranscriptErased` when the order's customer was erased — on the order (`fulfillment.customer-erased`) or in the CRM, asked as it is handed over: a conversation with them is not kept; a retry for a transcript erased since deletes its file again before it answers (503 `TranscriptStoreUnavailable` when the bucket or the CRM cannot be reached). 404 `FulfillmentOrderNotFound`.\n\nRequires `orders:write`.","x-mcp-withheld":"The voice service hands a conversation's transcript to the quote it built when the session ends, under its own credential, as a raw text body a JSON tool call cannot carry; an agent reads one with fulfillment_link_transcript.","x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"},"requestBody":{"required":true,"content":{"text/plain":{"schema":{"type":"string","format":"binary"},"example":"Voice session … \n[00:04] Speaker 1: Forty-eight of the stoneware mugs, please."}}}}},"/orders/{orderId}/transcripts/{sessionId}/link":{"post":{"tags":["orders"],"operationId":"orders.transcriptLink","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3"},{"name":"sessionId","in":"path","schema":{"$ref":"#/components/schemas/VcsId"},"required":true,"example":"vcs_01a15652-6a10-7c2e-8f41-0b2c3d4e5f60"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"TranscriptLink","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptLinkEncoded"},"examples":{"contract":{"summary":"orders.transcriptLink","value":{"url":"https://files.getmanifold.io/org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d/ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3/transcripts/vcs_01a15652-6a10-7c2e-8f41-0b2c3d4e5f60?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20261020T065400Z&X-Amz-Expires=300&X-Amz-SignedHeaders=host&X-Amz-Signature=5d1f0c9b7e3a4f2c8b6d0e1a9c7f3b5d2e8a4c6f0b1d3e5a7c9f2b4d6e8a0c1f","expiresAt":"2026-10-20T06:59:00.000Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | TranscriptNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/TranscriptNotFoundEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"410":{"description":"TranscriptErased","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptErasedEncoded"}}}},"503":{"description":"TranscriptStoreUnavailable | RequestLogUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TranscriptStoreUnavailableEncoded"},{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}]}}}}},"description":"A five-minute link to one of the order's call transcripts (plain text, an utterance a line with its time and speaker): open it, or read it. 404 `TranscriptNotFound` when the order keeps none of that conversation; 410 `TranscriptErased` once it was deleted with the customer's personal data. Appends nothing: a signed link to a file already stored. No idempotency key: each call signs a fresh link and changes nothing.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_link_transcript","title":"Fulfillment: Call transcript link","toolset":"voice","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/refunds":{"post":{"tags":["orders"],"operationId":"orders.refund","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091"}],"security":[{"bearer":[]}],"responses":{"201":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"orders.refund","value":{"id":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","reference":"PO-7781","source":{"kind":"api"},"customer":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","shippingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","billingAddressId":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e"},"party":{"companyId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","name":"Harbour Ceramics Pty Ltd","paymentTermsDays":30,"shipTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"firstName":"Receiving","lastName":"Dock","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"billTo":{"id":"cloc_01a1588a-1f02-7a3b-8c4d-6f7a8b9c0d1e","label":"Fremantle warehouse","address":{"company":"Harbour Ceramics Pty Ltd","address1":"PO Box 412","city":"Fremantle","provinceCode":"WA","countryCode":"AU","zip":"6959"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01042","serial":1042,"status":"partially-shipped","lines":[{"id":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":4,"invoiced":4,"returned":1,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}},{"id":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","ordered":2,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":2,"picked":0,"packed":0,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":3800,"listPriceCents":3800,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":7600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":7600,"taxCents":760,"source":"manifold"}],"netCents":7600,"taxCents":760,"grossCents":8360}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"customer","createdSequence":4096,"shipments":[{"id":"shp_01a156d4-8704-7a21-8b32-8091021324a5","number":"SH-01057","reference":"auto:ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091:1","status":"shipped","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213"}],"cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}],"carrier":"Australia Post","service":"Parcel Post","trackingNumber":"33XYZ0012345","trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0012345","createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-20T03:12:40.000Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-91021324a5b6","number":"SH-01058","reference":"PO-7781-bowls","status":"cancelled","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[],"cartons":[],"createdAt":"2026-10-20T03:31:09.402Z","updatedAt":"2026-10-20T03:33:51.660Z"},{"id":"shp_01a1588b-2b30-7c41-8d52-021324a5b6c7","number":"SH-01059","reference":"moved:PO-7781-bowls-shopfront","status":"pending","locationId":"loc_01a0f6b0-1100-7e51-8f62-8b9cadbecfd5","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-7f8091021324","sku":"BOWL-SALT-L","quantity":2}],"cartons":[],"createdAt":"2026-10-20T03:33:51.660Z","updatedAt":"2026-10-20T03:33:51.660Z"}],"invoices":[{"id":"inv_01a1588b-1a20-7b31-9c42-7f8091021324","number":"INV-00871","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4,"unitPriceCents":2400,"discountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"tax":{"netCents":9600,"taxCents":960,"grossCents":10560,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":9600,"taxCents":960}]},"header":{"kind":"tax-invoice","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"totalCents":10560,"shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","issuedAt":"2026-10-20T03:15:00.000Z"}],"refunds":[{"id":"rfd_01a16470-4d50-7e61-9f72-b6c7d8e9f0a1","number":"RF-00064","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":1,"restock":false,"condition":"damaged","tax":{"inclusive":false,"amountCents":2400,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":2400,"taxCents":240,"source":"manifold"}],"netCents":2400,"taxCents":240,"grossCents":2640}}],"amountCents":2640,"tax":{"netCents":2400,"taxCents":240,"grossCents":2640,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":2400,"taxCents":240}]},"header":{"kind":"adjustment-note","region":"AU-GST","sellerTaxNumber":"11 222 333 444","buyerIdentityRequired":false,"presentation":"exclusive"},"reason":"One mug arrived chipped","refundedAt":"2026-10-22T00:48:30.256Z"}],"payments":[{"id":"pay_01a15f20-3c40-7d51-8e62-a5b6c7d8e9f0","number":"PAY-00912","amountCents":10560,"method":"bank-transfer","reference":"HARBOUR CERAMICS 4471","receivedAt":"2026-10-21T01:10:00.000Z","recordedAt":"2026-10-21T01:12:44.381Z","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-21","source":"same"}}],"notes":[{"id":"note_01a15f6e-5e60-7f71-8a82-c7d8e9f0a1b2","reference":"note-harbour-dock","body":"Deliveries to the rear dock, weekdays before 3pm.","by":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"postedAt":"2026-10-21T02:05:17.902Z"}],"edits":[],"consignments":[],"money":{"subtotalCents":17200,"charges":{"shippingCents":0,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":17200,"taxCents":1720,"grossCents":18920,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":17200,"taxCents":1720}]},"totalCents":18920,"paidCents":10560,"refundedCents":2640,"balanceCents":11000,"refundOwedCents":0,"status":"partially-refunded"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T01:02:11.204Z","updatedAt":"2026-10-22T00:48:30.256Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ItemNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"}]}}}},"409":{"description":"UnknownOrderLine | OverRefund | RefundExceedsPayments | CreditHolderMismatch | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnknownOrderLineEncoded"},{"$ref":"#/components/schemas/OverRefundEncoded"},{"$ref":"#/components/schemas/RefundExceedsPaymentsEncoded"},{"$ref":"#/components/schemas/CreditHolderMismatchEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Refund money and, for lines marked `restock`, walk the stock movements backwards. A refund with no `lines` is money only — shipping refunded for a late delivery, a goodwill credit — and `reason` says why. Lines are named by `lineId` (409 `UnknownOrderLine` otherwise); a kit line returns each of its `parts`, `kits × per`, in the part's own `condition` when named. The inventory service takes the units back (`sellable` to on-hand, `damaged` to the damaged bucket), the registry puts named sellable units back on the shelf, and accounting reverses the COGS they were drawn at as a `cogs-reversal` entry. A `condition: \"damaged\"` line additionally posts a `write-down` at the same drawn cost in the same fold step — revenue reversed, loss recognised, cost layers not restored; the units then sit in the damaged bucket until disposed via `POST /write-offs` (`bucket: \"damaged\"`), which posts no further entry. `amountCents` is the money going back: at most what the order has received net of earlier refunds (409 `RefundExceedsPayments`), so the order's `money` never shows a refund it was never paid for. It reverses only invoiced tax. Appends `fulfillment.refunded`. 409 `OverRefund` if a line would return more than the order shipped. `refundId` (a caller-minted `rfd_…`) is required and is the idempotency key: a retry with the same id is acknowledged with the refund already recorded and neither refunds nor restocks twice. Restocking refunds persist their validated plan before inventory calls; background recovery resumes interrupted movements before later tenant mutations. The outcome fact is appended only after inventory acknowledges every return.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundOrderEncoded"},"example":{"refundId":"rfd_01a16470-4d50-7e61-9f72-b6c7d8e9f0a1","amountCents":2640,"reason":"One mug arrived chipped","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","quantity":1,"restock":false,"condition":"damaged"}]}}},"required":true},"x-mcp-tool":{"name":"fulfillment_refund_order","title":"Fulfillment: Refund order","toolset":"fulfillment","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/shelf/{sku}":{"get":{"tags":["shelf"],"operationId":"shelf.view","parameters":[{"name":"sku","in":"path","schema":{"$ref":"#/components/schemas/Sku"},"required":true,"example":"KETTLE-COPPER"},{"name":"locationId","in":"query","schema":{"anyOf":[{"$ref":"#/components/schemas/LocId"},{"type":"null"}]},"required":false,"example":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ShelfEntryEncoded"}},"examples":{"contract":{"summary":"shelf.view","value":[{"unit":{"sku":"KETTLE-COPPER","quantity":1,"serial":"KC-24-0187","receivedAt":"2026-10-02T01:40:00.000Z","poId":"po_01a0f6b1-4b10-7e61-8f72-0a1b2c3d4e5f","receiptId":"rcpt_01a0f6b1-5c20-7f71-9a83-1b2c3d4e5f60","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4"},"expired":false},{"unit":{"sku":"KETTLE-COPPER","quantity":1,"serial":"KC-24-0188","receivedAt":"2026-10-02T01:40:00.000Z","poId":"po_01a0f6b1-4b10-7e61-8f72-0a1b2c3d4e5f","receiptId":"rcpt_01a0f6b1-5c20-7f71-9a83-1b2c3d4e5f60","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4"},"expired":false}]}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"FEFO-ordered pick suggestions for a SKU from the registry fold: soonest expiry first, ties broken by receipt time, never-expiring stock last; expired units are flagged, not hidden. Materialized from purchasing receipts, minus the units a shipment has already picked or dispatched, plus the identified sellable units a refund put back — so what this returns is exactly what an operator may still claim, and no two parcels can be picked against the same one. `locationId` narrows it to one site: a parcel ships from one shelf, so a pick against it may only name units that are there (units whose site is unknown — a return, a receipt that named none — are offered at every site, because nothing rules them out).\n\nRequires `stock:read` or `allocations:read`.","x-mcp-tool":{"name":"fulfillment_shelf_view","title":"Fulfillment: Shelf view","toolset":"parcels","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["stock:read","allocations:read"],"x-example-source":{"origin":"contract"}}},"/write-offs":{"post":{"tags":["writeOffs"],"operationId":"writeOffs.create","parameters":[],"security":[{"bearer":[]}],"responses":{"201":{"description":"StockWriteOff","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockWriteOffEncoded"},"examples":{"contract":{"summary":"writeOffs.create","value":{"id":"wo_01a15ac0-d8b0-7441-80ce-f90a1b2c3d4e","sku":"MUG-SPECKLE","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","quantity":2,"reason":"damaged","disposition":"dispose","bucket":"onHand","note":"Dropped during a stock count","occurredAt":"2026-10-20T08:20:41.556Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"ItemNotFound | LocationNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ItemNotFoundEncoded"},{"$ref":"#/components/schemas/LocationNotFoundEncoded"}]}}}},"409":{"description":"InsufficientStock | LocationArchived | PickTrackingMismatch | UnitsNotOnShelf | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientStockEncoded"},{"$ref":"#/components/schemas/LocationArchivedEncoded"},{"$ref":"#/components/schemas/PickTrackingMismatchEncoded"},{"$ref":"#/components/schemas/UnitsNotOnShelfEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable | PurchasingUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InventoryUnavailableEncoded"},{"$ref":"#/components/schemas/PurchasingUnavailableEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Write off stock — damaged, expired or lost units leaving the platform. `locationId` is the site the units leave from (the tenant's default location when absent): one inventory does not know is 404 `LocationNotFound`, an archived one 409 `LocationArchived`, and nothing is written off. For tracked SKUs writing off on-hand stock the units must be named exactly as a pick names them: serials free on the shelf at that site, or a lot with enough free units there (409 `PickTrackingMismatch` / `UnitsNotOnShelf` otherwise; *expired* units are claimable — leaving as a write-off is what expiry is for). `disposition` decides what happens physically: `dispose` (default) removes the units from inventory entirely; `keep-damaged` moves them to the damaged bucket (broken but kept). Either way the units leave the free shelf and registry, and accounting consumes their cost layers per the SKU's costing method and posts a `write-down` ledger entry — the loss is recognised when the damage is, so a later disposal of kept-damaged stock posts nothing. `bucket: \"damaged\"` is that later disposal: it empties units already in inventory's damaged bucket (damaged refund returns, earlier keep-damaged write-offs), skips shelf validation (those units are not on the free shelf), and posts **no** ledger entry. Inventory is commanded before the append (`inventory.stock-disposed` or `inventory.stock-damaged`, reference = the write-off id; 409 `InsufficientStock` when the bucket is short). Appends `fulfillment.stock-written-off`. `writeOffId` (a caller-minted `wo_…`) is required and is the idempotency key — a retried write-off is acknowledged with the original document, never applied twice.\n\nRequires `stock:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteOffStockEncoded"},"example":{"writeOffId":"wo_01a15ac0-d8b0-7441-80ce-f90a1b2c3d4e","sku":"MUG-SPECKLE","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","quantity":2,"reason":"damaged","disposition":"dispose","note":"Dropped during a stock count"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_write_off_stock","title":"Fulfillment: Write off stock","toolset":"parcels","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["stock:write"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts":{"get":{"tags":["shipping"],"operationId":"shipping.listAccounts","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"CarrierAccountList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierAccountListEncoded"},"examples":{"contract":{"summary":"shipping.listAccounts","value":{"items":[{"id":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","appId":"app_cc0cd668-9d5b-45cc-ac5a-b96892231a0e","externalId":"ssi-48213","name":"Starshipit · Saltbush Homewares","settingsPath":"/settings/shipping/starshipit","quoteUrl":"https://starshipit.getmanifold.io/quotes","status":"connected","connectedAt":"2026-10-14T22:51:30.118Z","updatedAt":"2026-10-14T22:51:30.118Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The carrier accounts the tenant books labels with (`docs/shipping-apps.md`), connected or let go, oldest first: each one the app that keeps it, the account's id and name at the provider, and where its app is set up.\n\nRequires `shipping:read`.","x-mcp-tool":{"name":"fulfillment_list_carrier_accounts","title":"Fulfillment: List carrier accounts","toolset":"parcels","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts/{carrierAccountId}":{"put":{"tags":["shipping"],"operationId":"shipping.connectAccount","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"CarrierAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierAccountEncoded"},"examples":{"contract":{"summary":"shipping.connectAccount","value":{"id":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","appId":"app_cc0cd668-9d5b-45cc-ac5a-b96892231a0e","externalId":"ssi-48213","name":"Starshipit · Saltbush Homewares","settingsPath":"/settings/shipping/starshipit","quoteUrl":"https://starshipit.getmanifold.io/quotes","status":"connected","connectedAt":"2026-10-14T22:51:30.118Z","updatedAt":"2026-10-14T22:51:30.118Z"}}}}}},"400":{"description":"UnsafeQuoteUrl","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsafeQuoteUrlEncoded"}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"NotACarrierApp | CarrierAccountNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotACarrierAppEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"A shipping app connects the account it books with, or describes it again: its id and name at the provider, its settings page and the `quoteUrl` it answers live rates at (https on a public host — 400 `UnsafeQuoteUrl` otherwise — or, for a first-party app, the platform's own). The app is read from its own token (403 `NotACarrierApp` for a person; 403 `CarrierAccountNotYours` for an account another app keeps). Appends `fulfillment.carrier-account-connected` (also for one let go before) or `fulfillment.carrier-account-updated`. Idempotent by content: the account as it already stands appends nothing.\n\nRequires `shipping:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectCarrierAccountEncoded"},"example":{"externalId":"ssi-48213","name":"Starshipit · Saltbush Homewares","settingsPath":"/settings/shipping/starshipit","quoteUrl":"https://starshipit.getmanifold.io/quotes"}}},"required":true},"x-mcp-withheld":"only a shipping app keeps a carrier account, under its own token — it connects one from its own setup page","x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts/{carrierAccountId}/disconnect":{"post":{"tags":["shipping"],"operationId":"shipping.disconnectAccount","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"CarrierAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierAccountEncoded"},"examples":{"contract":{"summary":"shipping.disconnectAccount","value":{"id":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","appId":"app_cc0cd668-9d5b-45cc-ac5a-b96892231a0e","externalId":"ssi-48213","name":"Starshipit · Saltbush Homewares","settingsPath":"/settings/shipping/starshipit","quoteUrl":"https://starshipit.getmanifold.io/quotes","status":"disconnected","connectedAt":"2026-10-14T22:51:30.118Z","updatedAt":"2026-10-22T06:40:00.512Z","disconnectedAt":"2026-10-22T06:40:00.512Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"NotACarrierApp | CarrierAccountNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotACarrierAppEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Its app lets a carrier account go: nothing more is booked with it, and its consignments keep their record. Appends `fulfillment.carrier-account-disconnected`. Idempotent by state: an account is let go once, so a retry on one already let go appends nothing.\n\nRequires `shipping:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectCarrierAccountEncoded"},"example":{"reason":"Starshipit uninstalled"}}},"required":true},"x-mcp-withheld":"only a shipping app lets its carrier account go, under its own token — a person uninstalls the app instead","x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts/{carrierAccountId}/consignments":{"get":{"tags":["shipping"],"operationId":"shipping.listConsignments","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/ConsignmentStatus"},"required":false,"example":"requested"},{"name":"awaitingDelivery","in":"query","schema":{"$ref":"#/components/schemas/BooleanString"},"required":false},{"name":"after","in":"query","schema":{"$ref":"#/components/schemas/CnsId"},"required":false},{"name":"limit","in":"query","schema":{"type":"string"},"required":false,"example":"50"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"ConsignmentList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsignmentListEncoded"},"examples":{"contract":{"summary":"shipping.listConsignments","value":{"items":[{"orderId":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","consignment":{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"requested","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-20T06:53:30.009Z"}}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"NotACarrierApp | CarrierAccountNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotACarrierAppEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"One account's consignments for the app that keeps it, oldest request first, at most `limit` (default 100, capped at 500), narrowed by `status`: the catch-up behind the consignment-requested webhook, so a missed delivery is booked on the app's next sweep. `awaitingDelivery=true` narrows to booked parcels its carrier has not yet called delivered — what a tracking sweep reads, so delivered parcels never fill the page. The listing pages by keyset: a full page carries `next`, and `after=<next>` reads on from it; a page without `next` is the end, and a sweep starts again from the oldest. Appends nothing: a read of the account's consignments.\n\nRequires `shipping:read`.","x-mcp-withheld":"a shipping app's catch-up over its own account; a person reads consignments on the order (`fulfillment_get_order`)","x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts/{carrierAccountId}/consignments/{consignmentId}":{"get":{"tags":["shipping"],"operationId":"shipping.consignment","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"},{"name":"consignmentId","in":"path","schema":{"$ref":"#/components/schemas/CnsId"},"required":true,"example":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"ConsignmentDetail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsignmentDetailEncoded"},"examples":{"contract":{"summary":"shipping.consignment","value":{"orderId":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","orderNumber":"SO-01045","orderReference":"WEB-31002","currency":"AUD","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","shipmentNumber":"SH-01063","consignment":{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"requested","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-20T06:53:30.009Z"},"shippingMethod":{"title":"Standard","code":"STD"},"shipTo":{"address":{"firstName":"Priya","lastName":"Raman","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}},"shipFrom":{"locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","name":"Main","address":{"company":"Saltbush Homewares","address1":"3 Quarry Road","city":"Bibra Lake","province":"Western Australia","provinceCode":"WA","countryCode":"AU","zip":"6163"}},"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"lines":[{"lineId":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":4,"unitPriceCents":2400,"weightGrams":380}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"NotACarrierApp | CarrierAccountNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotACarrierAppEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound | FulfillmentOrderNotFound | ConsignmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"},{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ConsignmentNotFoundEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable | CrmUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InventoryUnavailableEncoded"},{"$ref":"#/components/schemas/CrmUnavailableEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Everything the account's app books one consignment by: the ship-to the order states (the address version it pinned, never the customer's current one; `null` once the person was erased), the site it leaves from (absent `address` until the site is given one), the cartons (the packer's, or one weighing the lines' SKU weights when every one is known), each line with its weight and customs (the tariff code for the destination, the country of origin, the price of one) and the buyer's shipping method.\n\nRequires `shipping:read`.","x-mcp-withheld":"what a shipping app books a consignment by, read under its own account; a person reads the parcel on its order (`fulfillment_get_order`)","x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts/{carrierAccountId}/consignments/{consignmentId}/answer":{"post":{"tags":["shipping"],"operationId":"shipping.answerConsignment","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"},{"name":"consignmentId","in":"path","schema":{"$ref":"#/components/schemas/CnsId"},"required":true,"example":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"shipping.answerConsignment","value":{"id":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","reference":"WEB-31002","source":{"kind":"api"},"customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","shippingAddressId":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01"},"party":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","name":"Priya Raman","shipTo":{"id":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01","address":{"firstName":"Priya","lastName":"Raman","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01045","serial":1045,"status":"open","lines":[{"id":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"tenant","createdSequence":4146,"shipments":[{"id":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","number":"SH-01063","reference":"auto:ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9:1","status":"packed","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","quantity":4}],"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:52:10.774Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"booked","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-20T06:53:41.860Z","booking":{"carrier":"Australia Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"trackingNumbers":["33XYZ0098765"],"trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0098765","externalId":"ssi-order-905512","cost":{"priceCents":1395,"currency":"AUD","taxCents":127}},"costFx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"}}],"money":{"subtotalCents":9600,"charges":{"shippingCents":1500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":11100,"taxCents":1110,"grossCents":12210,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":11100,"taxCents":1110}]},"shippingTax":{"inclusive":false,"amountCents":1500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":1500,"taxCents":150,"source":"manifold"}],"netCents":1500,"taxCents":150,"grossCents":1650},"totalCents":12210,"paidCents":0,"refundedCents":0,"balanceCents":12210,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:53:41.860Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"NotACarrierApp | CarrierAccountNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotACarrierAppEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound | FulfillmentOrderNotFound | ConsignmentNotFound | ItemNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"},{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ConsignmentNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"}]}}}},"409":{"description":"ConsignmentNotInState | InsufficientStock | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConsignmentNotInStateEncoded"},{"$ref":"#/components/schemas/InsufficientStockEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"422":{"description":"MissingUnitPrice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissingUnitPriceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The app answers a requested consignment: `booked` (carrier, service, one tracking number per carton, the tracking page, the provider's id) or `refused` with a code and the reason — `needs-service` puts the parcel in front of an operator to choose one. Appends `fulfillment.consignment-booked` or `fulfillment.consignment-refused`; a booking under an automatic ship also ships the packed parcel in the same commit (`fulfillment.dispatched` per line and `fulfillment.shipment-shipped`). Idempotent by state: a consignment is answered once, so the same answer again is acknowledged and a different one is 409 `ConsignmentNotInState`.\n\nRequires `shipping:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerConsignment"},"example":{"_tag":"booked","booking":{"carrier":"Australia Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"trackingNumbers":["33XYZ0098765"],"trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0098765","externalId":"ssi-order-905512","cost":{"priceCents":1395,"currency":"AUD","taxCents":127}}}}},"required":true},"x-mcp-withheld":"only the account's shipping app answers a consignment, with what its carrier booked","x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts/{carrierAccountId}/consignments/{consignmentId}/tracking":{"post":{"tags":["shipping"],"operationId":"shipping.trackConsignment","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"},{"name":"consignmentId","in":"path","schema":{"$ref":"#/components/schemas/CnsId"},"required":true,"example":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"shipping.trackConsignment","value":{"id":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","reference":"WEB-31002","source":{"kind":"api"},"customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","shippingAddressId":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01"},"party":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","name":"Priya Raman","shipTo":{"id":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01","address":{"firstName":"Priya","lastName":"Raman","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01045","serial":1045,"status":"open","lines":[{"id":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"tenant","createdSequence":4146,"shipments":[{"id":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","number":"SH-01063","reference":"auto:ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9:1","status":"packed","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","quantity":4}],"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:52:10.774Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"booked","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[{"status":"in-transit","at":"2026-10-20T09:12:00.000Z","detail":"Processed at Perth facility"}],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-20T09:12:00.000Z","booking":{"carrier":"Australia Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"trackingNumbers":["33XYZ0098765"],"trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0098765","externalId":"ssi-order-905512","cost":{"priceCents":1395,"currency":"AUD","taxCents":127}},"costFx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"label":{"contentType":"application/pdf","size":48213,"storedAt":"2026-10-20T06:53:44.105Z"},"tracking":{"status":"in-transit","at":"2026-10-20T09:12:00.000Z","detail":"Processed at Perth facility"}}],"money":{"subtotalCents":9600,"charges":{"shippingCents":1500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":11100,"taxCents":1110,"grossCents":12210,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":11100,"taxCents":1110}]},"shippingTax":{"inclusive":false,"amountCents":1500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":1500,"taxCents":150,"source":"manifold"}],"netCents":1500,"taxCents":150,"grossCents":1650},"totalCents":12210,"paidCents":0,"refundedCents":0,"balanceCents":12210,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T09:12:00.000Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"NotACarrierApp | CarrierAccountNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotACarrierAppEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound | FulfillmentOrderNotFound | ConsignmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"},{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ConsignmentNotFoundEncoded"}]}}}},"409":{"description":"ConsignmentNotInState | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConsignmentNotInStateEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The app reports where a booked parcel has got to, as its carrier said it: the status, when, and the carrier's words. 409 `ConsignmentNotInState` unless the consignment is booked. Appends `fulfillment.consignment-tracked`. Idempotent by content: the carrier's word said again appends nothing.\n\nRequires `shipping:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackConsignmentEncoded"},"example":{"status":"in-transit","at":"2026-10-20T09:12:00.000Z","detail":"Processed at Perth facility"}}},"required":true},"x-mcp-withheld":"only the account's shipping app reports tracking, as its carrier said it","x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts/{carrierAccountId}/consignments/{consignmentId}/label":{"post":{"tags":["shipping"],"operationId":"shipping.storeLabel","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"},{"name":"consignmentId","in":"path","schema":{"$ref":"#/components/schemas/CnsId"},"required":true,"example":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"},{"name":"reference","in":"query","schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"example":"label-ssi-order-905512"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"The label's bytes are the request body, sent as `Content-Type: application/pdf`.","value":{"id":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","reference":"WEB-31002","source":{"kind":"api"},"customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","shippingAddressId":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01"},"party":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","name":"Priya Raman","shipTo":{"id":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01","address":{"firstName":"Priya","lastName":"Raman","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01045","serial":1045,"status":"open","lines":[{"id":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"tenant","createdSequence":4146,"shipments":[{"id":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","number":"SH-01063","reference":"auto:ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9:1","status":"packed","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","quantity":4}],"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:52:10.774Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"booked","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-20T06:53:44.105Z","booking":{"carrier":"Australia Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"trackingNumbers":["33XYZ0098765"],"trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0098765","externalId":"ssi-order-905512","cost":{"priceCents":1395,"currency":"AUD","taxCents":127}},"costFx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"label":{"contentType":"application/pdf","size":48213,"storedAt":"2026-10-20T06:53:44.105Z"}}],"money":{"subtotalCents":9600,"charges":{"shippingCents":1500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":11100,"taxCents":1110,"grossCents":12210,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":11100,"taxCents":1110}]},"shippingTax":{"inclusive":false,"amountCents":1500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":1500,"taxCents":150,"source":"manifold"}],"netCents":1500,"taxCents":150,"grossCents":1650},"totalCents":12210,"paidCents":0,"refundedCents":0,"balanceCents":12210,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:53:44.105Z"}}}}}},"400":{"description":"LabelUnreadable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelUnreadableEncoded"}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"NotACarrierApp | CarrierAccountNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotACarrierAppEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound | FulfillmentOrderNotFound | ConsignmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"},{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ConsignmentNotFoundEncoded"}]}}}},"409":{"description":"ConsignmentNotInState | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConsignmentNotInStateEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"413":{"description":"LabelTooLarge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelTooLargeEncoded"}}}},"503":{"description":"LabelStoreUnavailable | RequestLogUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LabelStoreUnavailableEncoded"},{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}]}}}}},"description":"The account's app stores the label it booked: the body is the raw file — not multipart, not JSON — `application/pdf`, `image/png` or `application/zpl` in `Content-Type`, every carton's label in one document, at most 10 MiB (413 `LabelTooLarge`), streamed into the private bucket and kept 90 days. `reference` in the query string keys the request log. Appends `fulfillment.consignment-labelled`. Idempotent by state: a consignment keeps one label, so a retry is answered with it and stores nothing.\n\nRequires `shipping:write`.","x-mcp-withheld":"a raw file only a shipping app stores, for the consignment it booked; a person prints it with `fulfillment_print_label`","x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"},"requestBody":{"required":true,"content":{"application/pdf":{"schema":{"type":"string","format":"binary"},"example":"%PDF-1.7 … (the label's bytes)"}}}}},"/orders/{orderId}/consignments/{consignmentId}/label":{"post":{"tags":["shipping"],"operationId":"shipping.labelLink","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9"},{"name":"consignmentId","in":"path","schema":{"$ref":"#/components/schemas/CnsId"},"required":true,"example":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"LabelLink","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelLinkEncoded"},"examples":{"contract":{"summary":"shipping.labelLink","value":{"url":"https://files.getmanifold.io/labels/org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d/cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20261020T065400Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=5d1f0c9b7e3a4f2c8b6d0e1a9c7f3b5d2e8a4c6f0b1d3e5a7c9f2b4d6e8a0c1f","contentType":"application/pdf","expiresAt":"2026-10-20T07:09:00.000Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ConsignmentNotFound | LabelNotStored","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ConsignmentNotFoundEncoded"},{"$ref":"#/components/schemas/LabelNotStoredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"410":{"description":"LabelExpired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelExpiredEncoded"}}}},"503":{"description":"LabelStoreUnavailable | RequestLogUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LabelStoreUnavailableEncoded"},{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}]}}}}},"description":"A link to print (or reprint) a consignment's label from, signed for fifteen minutes: open it, or hand it to a printer. 404 `LabelNotStored` until its app has stored one; 410 `LabelExpired` once it is older than labels are kept (90 days). Appends nothing: the label is read where its app stored it. No idempotency key: each call signs a fresh link and changes nothing.\n\nRequires `shipping:read`.","x-mcp-tool":{"name":"fulfillment_print_label","title":"Fulfillment: Print label","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/shipments/{shipmentId}/consignments":{"post":{"tags":["shipping"],"operationId":"shipping.requestConsignment","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9"},{"name":"shipmentId","in":"path","schema":{"$ref":"#/components/schemas/ShpId"},"required":true,"example":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"shipping.requestConsignment","value":{"id":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","reference":"WEB-31002","source":{"kind":"api"},"customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","shippingAddressId":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01"},"party":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","name":"Priya Raman","shipTo":{"id":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01","address":{"firstName":"Priya","lastName":"Raman","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01045","serial":1045,"status":"open","lines":[{"id":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"tenant","createdSequence":4146,"shipments":[{"id":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","number":"SH-01063","reference":"auto:ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9:1","status":"packed","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","quantity":4}],"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:52:10.774Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"requested","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-20T06:53:30.009Z"}],"money":{"subtotalCents":9600,"charges":{"shippingCents":1500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":11100,"taxCents":1110,"grossCents":12210,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":11100,"taxCents":1110}]},"shippingTax":{"inclusive":false,"amountCents":1500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":1500,"taxCents":150,"source":"manifold"}],"netCents":1500,"taxCents":150,"grossCents":1650},"totalCents":12210,"paidCents":0,"refundedCents":0,"balanceCents":12210,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:53:30.009Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ShipmentNotFound | CarrierAccountNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ShipmentNotFoundEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"}]}}}},"409":{"description":"ShipmentNotInState | CarrierAccountDisconnected | ConsignmentOpen | QuoteTokenInvalid | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ShipmentNotInStateEncoded"},{"$ref":"#/components/schemas/CarrierAccountDisconnectedEncoded"},{"$ref":"#/components/schemas/ConsignmentOpenEncoded"},{"$ref":"#/components/schemas/QuoteTokenInvalidEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Put a packed (or shipped, after a void) parcel to a carrier account to book, at the `service` an operator chose (a live quote's, or a code typed by hand, with the price it was `quoted` at) or, absent, by the order's shipping method; the account's app hears `consignment.requested` and answers. With the live quote's `sealedQuote`, the consignment keeps every rate the parcel was quoted, as `POST /rates` answered them, and a chosen service found among them is kept at the quote's price (409 `QuoteTokenInvalid` for a token another parcel's, altered or no longer readable — ask for rates again). Appends `fulfillment.consignment-requested`. Idempotent by state: a parcel holds one consignment in force, so asking again for the same account and service answers with it, and asking for another is 409 `ConsignmentOpen` until it is voided.\n\nRequires `shipping:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestConsignmentEncoded"},"example":{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"sealedQuote":"v2.bb69318e.leF4NuWnwS59NbfvosrUhoeY5ck0miHaIN1GJ+dqLGL1+RREhp04qMH3HEJkVBbmzMc664oOnBUXAN/12kZWRgy0HcGyZSdRo9Acz1ZCIbQIz3oj2XwLagX"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_request_consignment","title":"Fulfillment: Request consignment","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/consignments/{consignmentId}/void":{"post":{"tags":["shipping"],"operationId":"shipping.voidConsignment","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9"},{"name":"consignmentId","in":"path","schema":{"$ref":"#/components/schemas/CnsId"},"required":true,"example":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"The web order's consignment voided while it is still `requested`, before the carrier books it.","value":{"id":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","reference":"WEB-31002","source":{"kind":"api"},"customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","shippingAddressId":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01"},"party":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","name":"Priya Raman","shipTo":{"id":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01","address":{"firstName":"Priya","lastName":"Raman","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01045","serial":1045,"status":"open","lines":[{"id":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"tenant","createdSequence":4146,"shipments":[{"id":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","number":"SH-01063","reference":"auto:ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9:1","status":"packed","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","quantity":4}],"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:52:10.774Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"voided","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-20T06:53:36.200Z"}],"money":{"subtotalCents":9600,"charges":{"shippingCents":1500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":11100,"taxCents":1110,"grossCents":12210,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":11100,"taxCents":1110}]},"shippingTax":{"inclusive":false,"amountCents":1500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":1500,"taxCents":150,"source":"manifold"}],"netCents":1500,"taxCents":150,"grossCents":1650},"totalCents":12210,"paidCents":0,"refundedCents":0,"balanceCents":12210,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:53:36.200Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ConsignmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ConsignmentNotFoundEncoded"}]}}}},"409":{"description":"ConsignmentNotInState | ConsignmentManifested | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConsignmentNotInStateEncoded"},{"$ref":"#/components/schemas/ConsignmentManifestedEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Cancel a consignment — a booking at the carrier, or a request not yet booked; its app hears `consignment.voided` and cancels it there, and the parcel may be requested again. 409 `ConsignmentNotInState` for one refused; 409 `ConsignmentManifested` once it is on a manifest the carrier holds or is being handed. Appends `fulfillment.consignment-voided`. Idempotent by state: a consignment is voided once, so a retry on a voided one appends nothing.\n\nRequires `shipping:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoidConsignmentEncoded"},"example":{"reason":"Customer will collect from the warehouse"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_void_consignment","title":"Fulfillment: Void consignment","toolset":"parcels","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/consignments/{consignmentId}/payment":{"post":{"tags":["shipping"],"operationId":"shipping.payCarrier","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9"},{"name":"consignmentId","in":"path","schema":{"$ref":"#/components/schemas/CnsId"},"required":true,"example":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"FulfillmentOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderEncoded"},"examples":{"contract":{"summary":"shipping.payCarrier","value":{"id":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","reference":"WEB-31002","source":{"kind":"api"},"customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","shippingAddressId":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01"},"party":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","name":"Priya Raman","shipTo":{"id":"adr_01a1588a-0c41-7d2e-9a10-4c6d7e8f9a01","address":{"firstName":"Priya","lastName":"Raman","company":"Harbour Ceramics","address1":"14 Kiln Street","city":"Fremantle","province":"Western Australia","provinceCode":"WA","country":"Australia","countryCode":"AU","zip":"6160"}}},"catalogIds":["cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e"],"currency":"AUD","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"convention":"exclusive","shippingTaxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","class":"follows-goods","rateBps":1000},"shippingMethod":{"title":"Standard","code":"STD"},"number":"SO-01045","serial":1045,"status":"open","lines":[{"id":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","ordered":4,"removed":false,"catalogId":"cat_01a15880-2a10-7b2c-8d3e-4f5a6b7c8d9e","discountCents":0,"allocated":4,"picked":4,"packed":4,"dispatched":0,"invoiced":0,"returned":0,"unitPriceCents":2400,"listPriceCents":2400,"inclusive":false,"taxBasis":{"_tag":"calculated","treatment":"domestic","country":"AU","parts":[{"class":"standard","rateBps":1000,"weight":1}]},"orderDiscountCents":0,"tax":{"inclusive":false,"amountCents":9600,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":9600,"taxCents":960,"source":"manifold"}],"netCents":9600,"taxCents":960,"grossCents":10560}}],"workflow":{"paymentTerms":"on-account","pick":"manual","pack":"manual","ship":"manual","invoice":"manual","shortfall":"wait","allocation":"single-site-preferred","routing":{"order":"rank","decider":"manifold","priority":[]},"routingByCatalog":{}},"paymentTermsBy":"tenant","createdSequence":4146,"shipments":[{"id":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","number":"SH-01063","reference":"auto:ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9:1","status":"packed","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","lines":[{"lineId":"lin_01a159a0-cfd0-70e1-9bf2-b5c6d7e8f90a","sku":"MUG-SPECKLE","quantity":4}],"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-20T06:52:10.774Z"}],"invoices":[],"refunds":[],"payments":[],"notes":[],"edits":[],"consignments":[{"id":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","attempt":1,"status":"booked","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"quoted":{"priceCents":1395,"currency":"AUD"},"quote":{"quotedAt":"2026-10-20T06:53:02.415Z","rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[]},"trackingHistory":[{"status":"in-transit","at":"2026-10-20T09:12:00.000Z","detail":"Processed at Perth facility"}],"requestedAt":"2026-10-20T06:53:30.009Z","updatedAt":"2026-10-21T23:05:19.640Z","booking":{"carrier":"Australia Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"trackingNumbers":["33XYZ0098765"],"trackingUrl":"https://auspost.com.au/mypost/track/details/33XYZ0098765","externalId":"ssi-order-905512","cost":{"priceCents":1395,"currency":"AUD","taxCents":127}},"costFx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-20","source":"same"},"label":{"contentType":"application/pdf","size":48213,"storedAt":"2026-10-20T06:53:44.105Z"},"tracking":{"status":"in-transit","at":"2026-10-20T09:12:00.000Z","detail":"Processed at Perth facility"},"payment":{"paymentId":"cpy_01a15a40-f200-7311-8e25-1b2c3d4e5f60","amountCents":1395,"taxCents":127,"reference":"SSI-INV-20931","paidAt":"2026-10-21T23:05:19.640Z"}}],"money":{"subtotalCents":9600,"charges":{"shippingCents":1500,"shippingDiscountCents":0,"discountCents":0},"discountCents":0,"tax":{"netCents":11100,"taxCents":1110,"grossCents":12210,"breakdown":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"exempt":false,"taxableCents":11100,"taxCents":1110}]},"shippingTax":{"inclusive":false,"amountCents":1500,"entries":[{"class":"standard","treatment":"domestic","country":"AU","rateBps":1000,"netCents":1500,"taxCents":150,"source":"manifold"}],"netCents":1500,"taxCents":150,"grossCents":1650},"totalCents":12210,"paidCents":0,"refundedCents":0,"balanceCents":12210,"refundOwedCents":0,"status":"unpaid"},"discounts":[],"shortfalls":[],"createdAt":"2026-10-20T06:18:33.020Z","updatedAt":"2026-10-21T23:05:19.640Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ConsignmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ConsignmentNotFoundEncoded"}]}}}},"409":{"description":"ConsignmentNotPayable | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ConsignmentNotPayableEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Record what was paid to the carrier for a booked parcel: `amountCents` (tax included, in the booked charge's currency; omitted, the booked charge) and the `taxCents` inside it (omitted, the booked tax), with the bank's `reference`. Booked at the payment day's rate: accounting relieves the accrued carrier charge (2150) against supplier payments clearing (1195), posts what the payment differs from the booking by — a surcharge, a credit — as shipping cost and its tax, and, for a tenant on the cash basis, recognises the charge's deferred expense (`docs/accounting-basis.md`). 409 `ConsignmentNotPayable` for a consignment that is not booked (`not-booked`), whose booking carries no charge (`no-cost`), or that another payment paid (`already-paid`). Appends `fulfillment.consignment-paid`. `paymentId` is required and is the idempotency key: a retry with the same `paymentId` is acknowledged and appends nothing.\n\nRequires `shipping:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayCarrierEncoded"},"example":{"paymentId":"cpy_01a15a40-f200-7311-8e25-1b2c3d4e5f60","reference":"SSI-INV-20931"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_record_carrier_payment","title":"Fulfillment: Record carrier payment","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts/{carrierAccountId}/manifests":{"get":{"tags":["shipping"],"operationId":"shipping.listManifests","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"ManifestList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManifestListEncoded"},"examples":{"contract":{"summary":"shipping.listManifests","value":{"items":[{"id":"mnf_38e2db9b-2871-629c-51a1-cb5a2a5d8198","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","reference":"manifest-2026-10-20","status":"requested","consignments":[{"orderId":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","consignmentId":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"}],"requestedAt":"2026-10-20T07:30:04.512Z","updatedAt":"2026-10-20T07:30:04.512Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"One carrier account's manifests — the end-of-day handovers — oldest first: the consignments each hands over and whether the carrier has it.\n\nRequires `shipping:read`.","x-mcp-tool":{"name":"fulfillment_list_manifests","title":"Fulfillment: List manifests","toolset":"parcels","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}},"post":{"tags":["shipping"],"operationId":"shipping.requestManifest","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Manifest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManifestEncoded"},"examples":{"contract":{"summary":"shipping.requestManifest","value":{"id":"mnf_38e2db9b-2871-629c-51a1-cb5a2a5d8198","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","reference":"manifest-2026-10-20","status":"requested","consignments":[{"orderId":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","consignmentId":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"}],"requestedAt":"2026-10-20T07:30:04.512Z","updatedAt":"2026-10-20T07:30:04.512Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound | ManifestNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"},{"$ref":"#/components/schemas/ManifestNotFoundEncoded"}]}}}},"409":{"description":"CarrierAccountDisconnected | NothingToManifest | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CarrierAccountDisconnectedEncoded"},{"$ref":"#/components/schemas/NothingToManifestEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Hand over the day's parcels: every consignment booked with the account and on no manifest yet, for its app to lodge with the carrier (it hears `manifest.requested`). `locationId` narrows the handover to the parcels leaving one site (a parcel naming no site is any site's), so a station sharing the account with another site hands over only its own. 409 `NothingToManifest` when none waits. Appends `fulfillment.manifest-requested`. Idempotent on `reference`: the manifest's id is derived from the account, the site and it, so a retry answers the manifest it made and appends nothing.\n\nRequires `shipping:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestManifestEncoded"},"example":{"reference":"manifest-2026-10-20"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_request_manifest","title":"Fulfillment: Request manifest","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts/{carrierAccountId}/manifests/{manifestId}/answer":{"post":{"tags":["shipping"],"operationId":"shipping.answerManifest","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"},{"name":"manifestId","in":"path","schema":{"$ref":"#/components/schemas/MnfId"},"required":true,"example":"mnf_38e2db9b-2871-629c-51a1-cb5a2a5d8198"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Manifest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManifestEncoded"},"examples":{"contract":{"summary":"shipping.answerManifest","value":{"id":"mnf_38e2db9b-2871-629c-51a1-cb5a2a5d8198","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","reference":"manifest-2026-10-20","status":"lodged","consignments":[{"orderId":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","consignmentId":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"}],"requestedAt":"2026-10-20T07:30:04.512Z","updatedAt":"2026-10-20T07:30:09.077Z","externalId":"AP-MAN-778120"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"NotACarrierApp | CarrierAccountNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotACarrierAppEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound | ManifestNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"},{"$ref":"#/components/schemas/ManifestNotFoundEncoded"}]}}}},"409":{"description":"ManifestNotInState | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ManifestNotInStateEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The account's app answers a manifest: `lodged` with the carrier (its id there), after which none of its consignments can be voided, or `refused` with the reason, which frees them for the next manifest. Appends `fulfillment.manifest-lodged` or `fulfillment.manifest-refused`. Idempotent by state: a manifest is answered once, so the same answer again is acknowledged and a different one is 409 `ManifestNotInState`.\n\nRequires `shipping:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerManifest"},"example":{"_tag":"lodged","externalId":"AP-MAN-778120"}}},"required":true},"x-mcp-withheld":"only the account's shipping app answers a manifest, with what its carrier said","x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/carrier-accounts/{carrierAccountId}/manifests/{manifestId}/document":{"post":{"tags":["shipping"],"operationId":"shipping.storeManifestDocument","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"},{"name":"manifestId","in":"path","schema":{"$ref":"#/components/schemas/MnfId"},"required":true,"example":"mnf_38e2db9b-2871-629c-51a1-cb5a2a5d8198"},{"name":"reference","in":"query","schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"example":"manifest-doc-AP-MAN-778120"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Manifest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManifestEncoded"},"examples":{"contract":{"summary":"The manifest's bytes are the request body, sent as `Content-Type: application/pdf`.","value":{"id":"mnf_38e2db9b-2871-629c-51a1-cb5a2a5d8198","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","reference":"manifest-2026-10-20","status":"lodged","consignments":[{"orderId":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","consignmentId":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"}],"requestedAt":"2026-10-20T07:30:04.512Z","updatedAt":"2026-10-20T07:30:11.903Z","externalId":"AP-MAN-778120","document":{"contentType":"application/pdf","size":61340,"storedAt":"2026-10-20T07:30:11.903Z"}}}}}}},"400":{"description":"LabelUnreadable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelUnreadableEncoded"}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"NotACarrierApp | CarrierAccountNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NotACarrierAppEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound | ManifestNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"},{"$ref":"#/components/schemas/ManifestNotFoundEncoded"}]}}}},"409":{"description":"ManifestNotInState | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ManifestNotInStateEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"413":{"description":"LabelTooLarge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelTooLargeEncoded"}}}},"503":{"description":"LabelStoreUnavailable | RequestLogUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LabelStoreUnavailableEncoded"},{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}]}}}}},"description":"The account's app stores the carrier's manifest document for a manifest it lodged: the body is the raw file — not multipart, not JSON — `application/pdf`, `image/png` or `application/zpl` in `Content-Type`, at most 10 MiB (413 `LabelTooLarge`), streamed into the private bucket and kept as the record of what was handed over (409 `ManifestNotInState` for a manifest not lodged). `reference` in the query string keys the request log. Appends `fulfillment.manifest-documented`. Idempotent by state: a manifest keeps one document, so a retry is answered with it and stores nothing.\n\nRequires `shipping:write`.","x-mcp-withheld":"a raw file only a shipping app stores, for the manifest it lodged; a person opens it with `fulfillment_open_manifest`","x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"},"requestBody":{"required":true,"content":{"application/pdf":{"schema":{"type":"string","format":"binary"},"example":"%PDF-1.7 … (the manifest's bytes)"}}}}},"/carrier-accounts/{carrierAccountId}/manifests/{manifestId}/document-link":{"post":{"tags":["shipping"],"operationId":"shipping.manifestDocumentLink","parameters":[{"name":"carrierAccountId","in":"path","schema":{"$ref":"#/components/schemas/CarId_1"},"required":true,"example":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d"},{"name":"manifestId","in":"path","schema":{"$ref":"#/components/schemas/MnfId"},"required":true,"example":"mnf_38e2db9b-2871-629c-51a1-cb5a2a5d8198"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"LabelLink","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelLinkEncoded"},"examples":{"contract":{"summary":"shipping.manifestDocumentLink","value":{"url":"https://files.getmanifold.io/manifests/org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d/mnf_38e2db9b-2871-629c-51a1-cb5a2a5d8198?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20261020T073200Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=5d1f0c9b7e3a4f2c8b6d0e1a9c7f3b5d2e8a4c6f0b1d3e5a7c9f2b4d6e8a0c1f","contentType":"application/pdf","expiresAt":"2026-10-20T07:47:00.000Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CarrierAccountNotFound | ManifestNotFound | ManifestDocumentNotStored","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"},{"$ref":"#/components/schemas/ManifestNotFoundEncoded"},{"$ref":"#/components/schemas/ManifestDocumentNotStoredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"LabelStoreUnavailable | RequestLogUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LabelStoreUnavailableEncoded"},{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}]}}}}},"description":"A link to open or print a manifest's carrier document from, signed for fifteen minutes. 404 `ManifestDocumentNotStored` until its app has stored one. Appends nothing: the document is read where its app stored it. No idempotency key: each call signs a fresh link and changes nothing.\n\nRequires `shipping:read`.","x-mcp-tool":{"name":"fulfillment_open_manifest","title":"Fulfillment: Open manifest","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}}},"/boxes":{"get":{"tags":["shipping"],"operationId":"shipping.listBoxes","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"BoxList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoxListEncoded"},"examples":{"contract":{"summary":"shipping.listBoxes","value":{"items":[{"id":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","name":"Mailer box","inner":{"lengthMm":260,"widthMm":210,"heightMm":120},"tareGrams":180,"maxWeightGrams":10000,"packaging":"carton","sites":{"_tag":"all"},"archived":false,"createdAt":"2026-10-14T23:02:10.400Z","updatedAt":"2026-10-14T23:02:10.400Z"},{"id":"box_01a0f6b4-4f20-7bb1-9d35-3d4e5f607182","name":"Mailer satchel","inner":{"lengthMm":350,"widthMm":250,"heightMm":40},"tareGrams":30,"maxWeightGrams":3000,"packaging":"satchel","sites":{"_tag":"all"},"archived":true,"createdAt":"2026-10-14T23:04:51.902Z","updatedAt":"2026-10-20T04:00:12.310Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The tenant's box catalogue (`docs/shipping-apps.md` › Boxes and packing), archived boxes included, oldest first: each box's inner size in millimetres, its tare and maximum weight in grams, what a carrier rates it as, and which sites pack with it. Boxes are not stock. Appends nothing: a read of the catalogue.\n\nRequires `shipping:read`.","x-mcp-tool":{"name":"fulfillment_list_boxes","title":"Fulfillment: List boxes","toolset":"parcels","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}}},"/boxes/{boxId}":{"put":{"tags":["shipping"],"operationId":"shipping.saveBox","parameters":[{"name":"boxId","in":"path","schema":{"$ref":"#/components/schemas/BoxId"},"required":true,"example":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Box","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoxEncoded"},"examples":{"contract":{"summary":"shipping.saveBox","value":{"id":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","name":"Mailer box","inner":{"lengthMm":260,"widthMm":210,"heightMm":120},"tareGrams":180,"maxWeightGrams":10000,"packaging":"carton","sites":{"_tag":"all"},"archived":false,"createdAt":"2026-10-14T23:02:10.400Z","updatedAt":"2026-10-14T23:02:10.400Z"}}}}}},"400":{"description":"BoxPackagingInvalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoxPackagingInvalidEncoded"}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"LocationNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationNotFoundEncoded"}}}},"409":{"description":"LocationNotFulfillable | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LocationNotFulfillableEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Add a box to the catalogue, or replace one (restoring it, when it was archived): its name, inner size, tare and maximum weight, packaging, and the sites that stock it — `all`, or a `listed` set. 400 `BoxPackagingInvalid` for `item` packaging (goods in their own packaging are no box); 404 `LocationNotFound` or 409 `LocationNotFulfillable` for a listed site the tenant does not ship from. Appends `fulfillment.box-saved`. Idempotent by content: the box as it already stands appends nothing.\n\nRequires `shipping:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveBox"},"example":{"name":"Mailer box","inner":{"lengthMm":260,"widthMm":210,"heightMm":120},"tareGrams":180,"maxWeightGrams":10000,"packaging":"carton","sites":{"_tag":"all"}}}},"required":true},"x-mcp-tool":{"name":"fulfillment_save_box","title":"Fulfillment: Save box","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/boxes/{boxId}/archive":{"post":{"tags":["shipping"],"operationId":"shipping.archiveBox","parameters":[{"name":"boxId","in":"path","schema":{"$ref":"#/components/schemas/BoxId"},"required":true,"example":"box_01a0f6b4-4f20-7bb1-9d35-3d4e5f607182"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Box","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoxEncoded"},"examples":{"contract":{"summary":"shipping.archiveBox","value":{"id":"box_01a0f6b4-4f20-7bb1-9d35-3d4e5f607182","name":"Mailer satchel","inner":{"lengthMm":350,"widthMm":250,"heightMm":40},"tareGrams":30,"maxWeightGrams":3000,"packaging":"satchel","sites":{"_tag":"all"},"archived":true,"createdAt":"2026-10-14T23:04:51.902Z","updatedAt":"2026-10-20T04:00:12.310Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"BoxNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoxNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Archive a box: nothing more is packed into it, and parcels already packed keep their cartons. Saving it again restores it. Appends `fulfillment.box-archived`. Idempotent by state: a box is archived once, so a retry on one already archived appends nothing.\n\nRequires `shipping:write`.","x-mcp-tool":{"name":"fulfillment_archive_box","title":"Fulfillment: Archive box","toolset":"parcels","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:write"],"x-example-source":{"origin":"contract"}}},"/orders/{orderId}/shipments/{shipmentId}/packing":{"get":{"tags":["shipping"],"operationId":"shipping.suggestPacking","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9"},{"name":"shipmentId","in":"path","schema":{"$ref":"#/components/schemas/ShpId"},"required":true,"example":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"PackingSuggestion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackingSuggestionEncoded"},"examples":{"contract":{"summary":"shipping.suggestPacking","value":{"cartons":[{"packaging":"carton","boxId":"box_01a0f6b4-3e10-7aa1-8c24-2c3d4e5f6071","weightGrams":1700,"size":{"lengthMm":260,"widthMm":210,"heightMm":120}}],"oversize":[],"unmeasured":[]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ShipmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ShipmentNotFoundEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The cartons a parcel would go out in: its units (a kit as its parts), measured as inventory holds each SKU, packed into the fewest and then the smallest of the boxes its site stocks; a SKU in its own packaging travels as its own carton. `oversize` lists SKUs no box takes, `unmeasured` those with no size or weight. With no boxes it is one carton weighing what the known weights sum to. What the pack screen pre-fills and a booking falls back to. Appends nothing: the packer is a pure calculation.\n\nRequires `shipping:read`.","x-mcp-tool":{"name":"fulfillment_suggest_packing","title":"Fulfillment: Suggest packing","toolset":"parcels","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}}},"/rates":{"post":{"tags":["rates"],"operationId":"rates.quote","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"RateQuote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateQuoteEncoded"},"examples":{"contract":{"summary":"rates.quote","value":{"rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Parcel Post","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"},"priceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55","carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","title":"Australia Post · Express Post","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"},"priceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2}}],"unanswered":[],"estimated":false,"unweighed":[],"sealed":"v2.bb69318e.leF4NuWnwS59NbfvosrUhoeY5ck0miHaIN1GJ+dqLGL1+RREhp04qMH3HEJkVBbmzMc664oOnBUXAN/12kZWRgy0HcGyZSdRo9Acz1ZCIbQIz3oj2XwLagX"}}}}}},"400":{"description":"QuoteInputInvalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteInputInvalidEncoded"}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ShipmentNotFound | LocationNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ShipmentNotFoundEncoded"},{"$ref":"#/components/schemas/LocationNotFoundEncoded"}]}}}},"409":{"description":"NoShipFrom | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NoShipFromEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable | CrmUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InventoryUnavailableEncoded"},{"$ref":"#/components/schemas/CrmUnavailableEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Live rates from every carrier account with a `quoteUrl`, each coded `<car_>:<service>`. For a parcel (`orderId` + `shipmentId`, or `locationId`, `to`, `cartons`, `currency`) or a sale's `lines` (`currency`, `to` or `shippingAddressId`); 400 `QuoteInputInvalid`, 409 `NoShipFrom`. `sealed` goes back with a booking or `shippingRate`. Appends nothing: a quote is kept nowhere. No idempotency key: each call asks the carriers again and changes nothing.\n\nRequires `shipping:read`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRatesEncoded"},"example":{"orderId":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","shipmentId":"shp_01a159a0-cfd0-70e1-9bf2-c6d7e8f90a1b"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_quote_rates","title":"Fulfillment: Quote rates","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":false,"openWorldHint":false},"x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}}},"/channels/{channelId}/rate-rules":{"get":{"tags":["rates"],"operationId":"rates.rateRules","parameters":[{"name":"channelId","in":"path","schema":{"$ref":"#/components/schemas/ChnId"},"required":true,"example":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"RateRules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateRulesEncoded"},"examples":{"contract":{"summary":"rates.rateRules","value":{"channelId":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","adjust":{"percentBp":1000,"rounding":"up-to-99","fixedCents":0},"allow":[{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7E55"},{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7J55"}],"collapse":"none","renames":[{"ref":{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7E55"},"title":"Standard shipping"},{"ref":{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7J55"},"title":"Express shipping"}],"free":{"overCents":15000,"applies":"cheapest"},"fallback":{"title":"Standard shipping","priceCents":1500},"dispatch":{"handlingDays":1,"cutoff":"14:00","timeZone":"Australia/Perth"},"transit":[]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"How a sales channel's checkout shows the carriers' rates (`docs/shipping-apps.md` §4 › Checkout): the markup (`percentBp`, `fixedCents`, `rounding`), the allow list of services, whether they collapse to the cheapest and/or fastest and under what titles, renames, free shipping over a cart total, the fallback flat rate, transit days per service for carriers that give no ETA, and when parcels leave (`dispatch`: handling days, a cut-off and the time zone they count in). A channel never configured answers pass-through rules: every rate, at the carrier's price. Appends nothing: a read of the rules.\n\nRequires `shipping:read`.","x-mcp-tool":{"name":"fulfillment_get_rate_rules","title":"Fulfillment: Get rate rules","toolset":"parcels","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}},"put":{"tags":["rates"],"operationId":"rates.saveRateRules","parameters":[{"name":"channelId","in":"path","schema":{"$ref":"#/components/schemas/ChnId"},"required":true,"example":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"RateRules","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateRulesEncoded"},"examples":{"contract":{"summary":"rates.saveRateRules","value":{"channelId":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293","adjust":{"percentBp":1000,"rounding":"up-to-99","fixedCents":0},"allow":[{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7E55"},{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7J55"}],"collapse":"none","renames":[{"ref":{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7E55"},"title":"Standard shipping"},{"ref":{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7J55"},"title":"Express shipping"}],"free":{"overCents":15000,"applies":"cheapest"},"fallback":{"title":"Standard shipping","priceCents":1500},"dispatch":{"handlingDays":1,"cutoff":"14:00","timeZone":"Australia/Perth"},"transit":[]}}}}}},"400":{"description":"RateRulesInvalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateRulesInvalidEncoded"}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"ChannelNotFound | CarrierAccountNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChannelNotFoundEncoded"},{"$ref":"#/components/schemas/CarrierAccountNotFoundEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Replace a sales channel's checkout rate rules, whole. The channel must be one of the tenant's (404 `ChannelNotFound`) and every carrier account a rule names the tenant's (404 `CarrierAccountNotFound`); free shipping on `listed` services must list some and transit days name each service once (400 `RateRulesInvalid`). Appends `fulfillment.rate-rules-saved`. Idempotent by content: the rules as they already stand append nothing.\n\nRequires `settings:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveRateRulesEncoded"},"example":{"adjust":{"percentBp":1000,"rounding":"up-to-99"},"allow":[{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7E55"},{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7J55"}],"collapse":"none","renames":[{"ref":{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7E55"},"title":"Standard shipping"},{"ref":{"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","serviceCode":"7J55"},"title":"Express shipping"}],"free":{"overCents":15000,"applies":"cheapest"},"fallback":{"title":"Standard shipping","priceCents":1500},"dispatch":{"handlingDays":1,"cutoff":"14:00","timeZone":"Australia/Perth"}}}},"required":true},"x-mcp-tool":{"name":"fulfillment_save_rate_rules","title":"Fulfillment: Save rate rules","toolset":"parcels","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["settings:write"],"x-example-source":{"origin":"contract"}}},"/channels/{channelId}/rates":{"post":{"tags":["rates"],"operationId":"rates.checkout","parameters":[{"name":"channelId","in":"path","schema":{"$ref":"#/components/schemas/ChnId"},"required":true,"example":"chn_01a0f6b5-5030-7cc1-8e46-4e5f60718293"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"CheckoutRates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRatesEncoded"},"examples":{"contract":{"summary":"rates.checkout","value":{"rates":[{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7E55~chq_01a15a60-6140-7dd1-9f57-5f60718293a4","title":"Standard shipping","priceCents":1599,"carrierPriceCents":1395,"currency":"AUD","etaDays":{"min":2,"max":5},"delivery":{"earliest":"2026-10-23","latest":"2026-10-28"},"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","service":{"code":"7E55","name":"Parcel Post","carrier":"Australia Post"}},{"code":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d:7J55~chq_01a15a60-6140-7dd1-9f57-5f60718293a4","title":"Express shipping","priceCents":2199,"carrierPriceCents":1980,"currency":"AUD","etaDays":{"min":1,"max":2},"delivery":{"earliest":"2026-10-22","latest":"2026-10-23"},"carrierAccountId":"car_01a0f6b3-2d00-7a91-9b13-e8f90a1b2c3d","service":{"code":"7J55","name":"Express Post","carrier":"Australia Post"}}],"quoteId":"chq_01a15a60-6140-7dd1-9f57-5f60718293a4","fallback":false,"estimated":false,"unweighed":[]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"ChannelNotYours | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChannelNotYoursEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"ChannelNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"What a cart would cost to send, for a sales channel's checkout (`docs/shipping-apps.md` §4 › Checkout): any channel app calls it from its own checkout hook under its own token, and an app's token must be the app that provides the channel (403 `ChannelNotYours`); a person may call it to preview the rules. The core dry-runs the tenant's routing against current stock (the channel's first catalog deciding the policy), packs each site's parcel into its boxes (a line with no SKU, or one inventory does not hold, by its `weightGrams`), quotes every parcel from its site within `CHECKOUT_RATES_BUDGET_MS` (4 s), and offers the services every parcel shares, priced as their sum and coded `<car_>:<service>`, and — for a cart split across sites — the cheapest combination, coded `combo:<chn_>`, which names no single service (each parcel's is chosen at pack). Then the channel's rules apply — their money (a fixed markup, the free-shipping threshold, the fallback's price) is in the channel's own currency: a cart in another converts it at `exchangeRate` when the channel gave one, else at today's central-bank reference rate (each currency against the home currency, crossed), and leaves it out only when no rate converts it — never applied at face value. When no carrier answers in time, or every rate is ruled out, the fallback stands in (`flat:<chn_>`, `fallback: true`), or no rate at all without one. A SKU inventory has not weighed is weighed at the line's `weightGrams`; one nobody weighed makes the answer `estimated`, naming it in `unweighed`. A rate with an ETA — the carrier's, else the channel's transit days — carries `delivery`: the earliest and latest days it arrives, counted in business days (Monday to Friday; public holidays are not counted out) from its dispatch day under the channel's handling days and cut-off. Allowed while the tenant is read-only. Appends nothing: a quote is asked of the carriers' apps and kept nowhere. No idempotency key: each call asks the carriers again and changes nothing.\n\nRequires `shipping:read`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRateRequestEncoded"},"example":{"lines":[{"sku":"MUG-SPECKLE","quantity":4,"priceCents":2400}],"to":{"address1":"20 George Street","city":"Sydney","province":"New South Wales","provinceCode":"NSW","zip":"2000","countryCode":"AU"},"currency":"AUD"}}},"required":true},"x-mcp-withheld":"a channel app's checkout callback under its own token; people preview in Settings › Shipping","x-required-scopes":["shipping:read"],"x-example-source":{"origin":"contract"}}},"/historical-orders":{"get":{"tags":["history"],"operationId":"history.list","parameters":[{"name":"search","in":"query","schema":{"type":"string","maxLength":100},"required":false},{"name":"personId","in":"query","schema":{"$ref":"#/components/schemas/PsnId"},"required":false,"example":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90"},{"name":"companyId","in":"query","schema":{"$ref":"#/components/schemas/CmpId"},"required":false},{"name":"outcome","in":"query","schema":{"$ref":"#/components/schemas/HistoricalOutcome"},"required":false},{"name":"channelId","in":"query","schema":{"$ref":"#/components/schemas/ChnId"},"required":false},{"name":"adopted","in":"query","schema":{"$ref":"#/components/schemas/BooleanString"},"required":false},{"name":"limit","in":"query","schema":{"type":"string"},"required":false,"example":"20"},{"name":"offset","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"HistoricalOrderPage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoricalOrderPageEncoded"},"examples":{"contract":{"summary":"history.list","value":{"items":[{"id":"ord_01a0e100-8360-7ff1-9b79-93a4b5c6d7e8","source":{"kind":"api"},"externalNumber":"#1342","placedAt":"2026-10-19T22:05:41.000Z","customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90"},"currency":"AUD","lines":[{"id":"lin_0b1c9c62-2d1d-b2a5-e5d7-ff4db69bd770","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":4,"unitPriceCents":2400,"discountCents":0,"taxCents":873,"externalId":"13011229004"}],"charges":{"shippingCents":1000,"shippingDiscountCents":0,"discountCents":0},"taxesIncluded":true,"money":{"totalCents":10600,"paidCents":10600,"refundedCents":0},"outcome":"open","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-19","source":"same"},"refunds":[],"adoptedAs":"ord_01a15a80-9470-7001-8c8a-b5c6d7e8f90a","recordedAt":"2026-10-19T22:30:02.118Z","updatedAt":"2026-10-20T00:10:44.902Z"},{"id":"ord_01a0e100-7250-7ee1-8a68-60718293a4b5","source":{"kind":"api"},"externalNumber":"#1188","placedAt":"2025-11-14T03:22:10.000Z","customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90"},"currency":"AUD","lines":[{"id":"lin_ad6f099f-b8df-e1c1-4d01-3ec78fc98587","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":4,"unitPriceCents":2400,"discountCents":0,"taxCents":873,"externalId":"13011223001"},{"id":"lin_1cb63d29-651e-6b92-7b22-38433247989f","name":"Gift wrap","quantity":1,"unitPriceCents":500,"discountCents":0,"taxCents":45}],"charges":{"shippingCents":1000,"shippingDiscountCents":0,"discountCents":0},"taxesIncluded":true,"money":{"totalCents":11100,"paidCents":11100,"refundedCents":0},"outcome":"fulfilled","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2025-11-14","source":"same"},"refunds":[{"refundId":"rfd_01a15a90-a580-7111-9d9b-c6d7e8f90a1b","number":"RF-00063","amountCents":2400,"taxCents":0,"lines":[{"lineId":"lin_ad6f099f-b8df-e1c1-4d01-3ec78fc98587","quantity":1,"restock":true}],"refundedAt":"2026-10-21T03:41:10.502Z"}],"recordedAt":"2026-10-16T02:00:41.229Z","updatedAt":"2026-10-21T03:41:10.502Z"}],"total":2,"limit":20,"offset":0}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"A page of the tenant's historical orders (`docs/historical-orders.md`): orders that ended before Manifold, newest first by date, `limit` per page (1–200, 50 when omitted) from `offset`, with the `total`. `?search=` narrows to numbers containing the term; `?personId=` / `?companyId=` to one party's; `?outcome=open&adopted=false` to the mirrored orders nothing has taken over. Each carries the source's `externalNumber`, `placedAt`, its lines, the money as recorded and its `outcome`. Appends nothing: a read of the history.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_list_historical_orders","title":"Fulfillment: List historical orders","toolset":"orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/historical-orders/{orderId}":{"get":{"tags":["history"],"operationId":"history.get","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a0e100-7250-7ee1-8a68-60718293a4b5"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"HistoricalOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoricalOrderEncoded"},"examples":{"contract":{"summary":"history.get","value":{"id":"ord_01a0e100-7250-7ee1-8a68-60718293a4b5","source":{"kind":"api"},"externalNumber":"#1188","placedAt":"2025-11-14T03:22:10.000Z","customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90"},"currency":"AUD","lines":[{"id":"lin_ad6f099f-b8df-e1c1-4d01-3ec78fc98587","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":4,"unitPriceCents":2400,"discountCents":0,"taxCents":873,"externalId":"13011223001"},{"id":"lin_1cb63d29-651e-6b92-7b22-38433247989f","name":"Gift wrap","quantity":1,"unitPriceCents":500,"discountCents":0,"taxCents":45}],"charges":{"shippingCents":1000,"shippingDiscountCents":0,"discountCents":0},"taxesIncluded":true,"money":{"totalCents":11100,"paidCents":11100,"refundedCents":0},"outcome":"fulfilled","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2025-11-14","source":"same"},"refunds":[],"recordedAt":"2026-10-16T02:00:41.229Z","updatedAt":"2026-10-16T02:00:41.229Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"One historical order as last recorded; 404 `FulfillmentOrderNotFound` when no history has that id. Appends nothing: a read of the history.\n\nRequires `orders:read`.","x-mcp-tool":{"name":"fulfillment_get_historical_order","title":"Fulfillment: Get historical order","toolset":"orders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}},"put":{"tags":["history"],"operationId":"history.record","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a0e100-7250-7ee1-8a68-60718293a4b5"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"HistoricalOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoricalOrderEncoded"},"examples":{"contract":{"summary":"history.record","value":{"id":"ord_01a0e100-7250-7ee1-8a68-60718293a4b5","source":{"kind":"api"},"externalNumber":"#1188","placedAt":"2025-11-14T03:22:10.000Z","customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90"},"currency":"AUD","lines":[{"id":"lin_ad6f099f-b8df-e1c1-4d01-3ec78fc98587","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":4,"unitPriceCents":2400,"discountCents":0,"taxCents":873,"externalId":"13011223001"},{"id":"lin_1cb63d29-651e-6b92-7b22-38433247989f","name":"Gift wrap","quantity":1,"unitPriceCents":500,"discountCents":0,"taxCents":45}],"charges":{"shippingCents":1000,"shippingDiscountCents":0,"discountCents":0},"taxesIncluded":true,"money":{"totalCents":11100,"paidCents":11100,"refundedCents":0},"outcome":"fulfilled","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2025-11-14","source":"same"},"refunds":[],"recordedAt":"2026-10-16T02:00:41.229Z","updatedAt":"2026-10-16T02:00:41.229Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"ChannelSourceForbidden | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChannelSourceForbiddenEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"OrderNotHistorical | HistoricalOrderCurrencyUnsupported | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/OrderNotHistoricalEncoded"},{"$ref":"#/components/schemas/HistoricalOrderCurrencyUnsupportedEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Record an order from before Manifold as history (`docs/historical-orders.md`), whole as the source reports it: number, date, lines with their tax lines, charges, money and `outcome`. An `open` order is mirrored — re-recorded as the source works it, adopted as a live order at go live. History holds no stock, ships nothing, is never billed or posted to the ledger. `orderId` is derived from the order's history key, so a re-import names the same order; an id a live order holds is 409 `OrderNotHistorical`; a `channel` source is the providing app's alone (403 `ChannelSourceForbidden`). `placedAt` before 2000-01-01T00:00:00Z is refused (400). A `currency` other than the tenant's home currency (`GET /settings`) is converted into it at a central bank's published rate for the last business day on or before `placedAt` — the bank local to the home currency first, then the ECB, then a cross through another bank's currency — and the order is kept in the home currency with its `conversion` (source, rate, date, the original money); a currency no bank covers is 409 `HistoricalOrderCurrencyUnsupported`, and the home currency unreadable is 502 `InventoryUnavailable`. Appends `fulfillment.historical-order-recorded`. Idempotent by content: the same body appends nothing, a different one replaces it, keeping Manifold's refunds and an adoption.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordHistoricalOrderEncoded"},"example":{"source":{"kind":"api"},"externalNumber":"#1188","placedAt":"2025-11-14T03:22:10.000Z","customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90"},"currency":"AUD","lines":[{"sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":4,"unitPriceCents":2400,"taxCents":873,"externalId":"13011223001"},{"name":"Gift wrap","quantity":1,"unitPriceCents":500,"taxCents":45}],"charges":{"shippingCents":1000},"taxesIncluded":true,"money":{"totalCents":11100,"paidCents":11100,"refundedCents":0},"outcome":"fulfilled"}}},"required":true},"x-mcp-withheld":"history arrives in bulk, through an import's `fulfillment.historical-order` target or a channel app's own import; an agent brings orders in with the import tools, never one at a time","x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/historical-orders/{orderId}/refunds":{"post":{"tags":["history"],"operationId":"history.refund","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a0e100-7250-7ee1-8a68-60718293a4b5"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"HistoricalOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoricalOrderEncoded"},"examples":{"contract":{"summary":"history.refund","value":{"id":"ord_01a0e100-7250-7ee1-8a68-60718293a4b5","source":{"kind":"api"},"externalNumber":"#1188","placedAt":"2025-11-14T03:22:10.000Z","customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90"},"currency":"AUD","lines":[{"id":"lin_ad6f099f-b8df-e1c1-4d01-3ec78fc98587","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":4,"unitPriceCents":2400,"discountCents":0,"taxCents":873,"externalId":"13011223001"},{"id":"lin_1cb63d29-651e-6b92-7b22-38433247989f","name":"Gift wrap","quantity":1,"unitPriceCents":500,"discountCents":0,"taxCents":45}],"charges":{"shippingCents":1000,"shippingDiscountCents":0,"discountCents":0},"taxesIncluded":true,"money":{"totalCents":11100,"paidCents":11100,"refundedCents":0},"outcome":"fulfilled","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2025-11-14","source":"same"},"refunds":[{"refundId":"rfd_01a15a90-a580-7111-9d9b-c6d7e8f90a1b","number":"RF-00063","amountCents":2400,"taxCents":0,"lines":[{"lineId":"lin_ad6f099f-b8df-e1c1-4d01-3ec78fc98587","quantity":1,"restock":true}],"refundedAt":"2026-10-21T03:41:10.502Z"}],"recordedAt":"2026-10-16T02:00:41.229Z","updatedAt":"2026-10-21T03:41:10.502Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ItemNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ItemNotFoundEncoded"}]}}}},"409":{"description":"HistoricalOrderNotRefundable | UnknownOrderLine | OverRefund | RefundExceedsPayments | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HistoricalOrderNotRefundableEncoded"},{"$ref":"#/components/schemas/UnknownOrderLineEncoded"},{"$ref":"#/components/schemas/OverRefundEncoded"},{"$ref":"#/components/schemas/RefundExceedsPaymentsEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Refund a historical order after go live (`docs/historical-orders.md` › §2.2): money back and, per named line, units returned (restocked or not). Issues a credit note from the `refunds` series reversing the tax the order recorded. 409 `RefundExceedsPayments` past paid less refunded; 409 `OverRefund` past a line's units; 409 `HistoricalOrderNotRefundable` while read-only (`before-go-live`), for an `open` mirrored order, or restocking a line with no SKU. Appends `fulfillment.historical-order-refunded`. Idempotent on `refundId`: a retry answers the order as it stands and appends nothing.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundHistoricalOrderEncoded"},"example":{"refundId":"rfd_01a15a90-a580-7111-9d9b-c6d7e8f90a1b","amountCents":2400,"reason":"Returned unused","lines":[{"lineId":"lin_ad6f099f-b8df-e1c1-4d01-3ec78fc98587","quantity":1,"restock":true,"condition":"sellable"}]}}},"required":true},"x-mcp-tool":{"name":"fulfillment_refund_historical_order","title":"Fulfillment: Refund historical order","toolset":"orders","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/historical-orders/{orderId}/adoption":{"post":{"tags":["history"],"operationId":"history.adopt","parameters":[{"name":"orderId","in":"path","schema":{"$ref":"#/components/schemas/OrdId"},"required":true,"example":"ord_01a0e100-8360-7ff1-9b79-93a4b5c6d7e8"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"HistoricalOrder","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoricalOrderEncoded"},"examples":{"contract":{"summary":"history.adopt","value":{"id":"ord_01a0e100-8360-7ff1-9b79-93a4b5c6d7e8","source":{"kind":"api"},"externalNumber":"#1342","placedAt":"2026-10-19T22:05:41.000Z","customer":{"personId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90"},"currency":"AUD","lines":[{"id":"lin_0b1c9c62-2d1d-b2a5-e5d7-ff4db69bd770","sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":4,"unitPriceCents":2400,"discountCents":0,"taxCents":873,"externalId":"13011229004"}],"charges":{"shippingCents":1000,"shippingDiscountCents":0,"discountCents":0},"taxesIncluded":true,"money":{"totalCents":10600,"paidCents":10600,"refundedCents":0},"outcome":"open","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-19","source":"same"},"refunds":[],"adoptedAs":"ord_01a15a80-9470-7001-8c8a-b5c6d7e8f90a","recordedAt":"2026-10-19T22:30:02.118Z","updatedAt":"2026-10-20T00:10:44.902Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"}}}},"409":{"description":"HistoricalOrderNotAdoptable | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/HistoricalOrderNotAdoptableEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Say an `open` mirrored order became a live order when the tenant went live (`docs/historical-orders.md` › §2.1): the channel or migration created `liveOrderId` for what was left to ship, and history keeps the link. 404 `FulfillmentOrderNotFound` when no history or no live order has those ids; 409 `HistoricalOrderNotAdoptable` for an order that is not `open`, or that names another live order already. Appends `fulfillment.historical-order-adopted`. Idempotent by state: adopted as that order already, it answers as it stands and appends nothing.\n\nRequires `orders:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdoptHistoricalOrderEncoded"},"example":{"liveOrderId":"ord_01a15a80-9470-7001-8c8a-b5c6d7e8f90a"}}},"required":true},"x-mcp-withheld":"go live adopts a mirrored order as the live order the channel app created for it; the app makes this call, never a person or an agent","x-required-scopes":["orders:write"],"x-example-source":{"origin":"contract"}}},"/payouts":{"post":{"tags":["payouts"],"operationId":"payouts.record","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"Payout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutEncoded"},"examples":{"contract":{"summary":"payouts.record","value":{"id":"pyo_01a15ab0-b690-7221-8eac-d7e8f90a1b2c","provider":"channel","providerPayoutId":"payout-88120331","currency":"AUD","netCents":10286,"status":"paid","issuedAt":"2026-10-22T00:00:00.000Z","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-22","source":"same"},"unaccountedCents":0,"recordedAt":"2026-10-22T01:05:33.640Z","updatedAt":"2026-10-22T01:05:33.640Z","items":[{"kind":"charge","amountCents":10600,"currency":"AUD","providerTransactionId":"txn-6620019931","paymentId":"pay_01a15aa0-c7a0-7331-9fbd-e8f90a1b2c3d","orderId":"ord_01a15a80-9470-7001-8c8a-b5c6d7e8f90a","orderReference":"#1342","matched":true,"homeCents":10600},{"kind":"fee","amountCents":-314,"currency":"AUD","description":"Processing fee","matched":false,"homeCents":-314}],"homeNetCents":10286}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"PayoutItemUnknown | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PayoutItemUnknownEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Record a payment provider's payout as the provider reports it now (`docs/multi-currency.md` › §5): its net in its own currency, its status and its lines — the charges and refunds it settles, the provider's fees, chargebacks, adjustments, reserves and conversions, each signed by what it did to the payout. Each `charge` and `refund` is matched to the payment or refund it settles, at commit: by the `paymentId` / `refundId` it names, else the `providerTransactionId` a payment carries, else on its order (`orderId`, or the `orderReference` of an order) by amount; a line that names a payment or refund the tenant has not got, another provider's or one another payout settled is 409 `PayoutItemUnknown`, and what finds nothing stays unmatched for the reconciliation. The payout's id is derived from `provider` and `providerPayoutId`. Appends `fulfillment.payout-recorded`. Idempotent by content: the same report appends nothing, a different one (its status moving to `paid`) replaces it.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordPayoutEncoded"},"example":{"provider":"channel","providerPayoutId":"payout-88120331","currency":"AUD","netCents":10286,"status":"paid","issuedAt":"2026-10-22T00:00:00.000Z","items":[{"kind":"charge","amountCents":10600,"currency":"AUD","providerTransactionId":"txn-6620019931","orderReference":"#1342"},{"kind":"fee","amountCents":-314,"currency":"AUD","description":"Processing fee"}]}}},"required":true},"x-mcp-withheld":"a payout is the payment provider's report, recorded by its channel app's sync or the payout import; never typed by a person or an agent","x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}},"get":{"tags":["payouts"],"operationId":"payouts.list","parameters":[{"name":"provider","in":"query","schema":{"$ref":"#/components/schemas/PaymentProvider"},"required":false,"example":"channel"},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/PayoutStatus"},"required":false},{"name":"currency","in":"query","schema":{"$ref":"#/components/schemas/CurrencyCode"},"required":false},{"name":"limit","in":"query","schema":{"type":"string"},"required":false,"example":"20"},{"name":"offset","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"PayoutPage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutPageEncoded"},"examples":{"contract":{"summary":"payouts.list","value":{"items":[{"id":"pyo_01a15ab0-b690-7221-8eac-d7e8f90a1b2c","provider":"channel","providerPayoutId":"payout-88120331","currency":"AUD","netCents":10286,"status":"paid","issuedAt":"2026-10-22T00:00:00.000Z","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-22","source":"same"},"unaccountedCents":0,"recordedAt":"2026-10-22T01:05:33.640Z","updatedAt":"2026-10-22T01:05:33.640Z","items":[{"kind":"charge","amountCents":10600,"currency":"AUD","providerTransactionId":"txn-6620019931","paymentId":"pay_01a15aa0-c7a0-7331-9fbd-e8f90a1b2c3d","orderId":"ord_01a15a80-9470-7001-8c8a-b5c6d7e8f90a","orderReference":"#1342","matched":true,"homeCents":10600},{"kind":"fee","amountCents":-314,"currency":"AUD","description":"Processing fee","matched":false,"homeCents":-314}],"homeNetCents":10286}],"total":1,"limit":20,"offset":0}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"A page of the tenant's payouts, newest issued first, `limit` per page (1–200, 50 when omitted) from `offset`, with the `total`; `?provider=`, `?status=` and `?currency=` narrow it. Each carries its lines and what each was matched to, and its net and lines in the home currency (`homeNetCents`, `homeCents`) at the rates its fact captured (`fx`, `itemRates`). Appends nothing: a read of the payouts.\n\nRequires `payments:read`.","x-mcp-tool":{"name":"fulfillment_list_payouts","title":"Fulfillment: List payouts","toolset":"accounting","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["payments:read"],"x-example-source":{"origin":"contract"}}},"/payouts/reconciliation":{"get":{"tags":["payouts"],"operationId":"payouts.reconciliation","parameters":[{"name":"provider","in":"query","schema":{"$ref":"#/components/schemas/PaymentProvider"},"required":false,"example":"channel"},{"name":"currency","in":"query","schema":{"$ref":"#/components/schemas/CurrencyCode"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"PayoutReconciliation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutReconciliationEncoded"},"examples":{"contract":{"summary":"payouts.reconciliation","value":{"providers":[{"provider":"channel","currency":"AUD","unsettled":{"count":0,"amountCents":0,"homeCents":0,"payments":[]},"unmatched":{"count":0,"amountCents":0,"homeCents":0,"items":[]},"payouts":{"count":1,"paidCents":10286,"paidHomeCents":10286,"inTransitCents":0,"inTransitHomeCents":0}}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"How each payment provider's money stands, per currency (`docs/multi-currency.md` › §5): the payments it took that no payout has settled yet, the payout charges and refunds that matched nothing Manifold knows (an order it never saw, a chargeback), each with a count and a sum and at most 100 rows, and its payouts paid and in transit. `?provider=` and `?currency=` narrow it. Appends nothing: a read of the payouts.\n\nRequires `payments:read`.","x-mcp-tool":{"name":"fulfillment_get_payout_reconciliation","title":"Fulfillment: Get payout reconciliation","toolset":"accounting","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["payments:read"],"x-example-source":{"origin":"contract"}}},"/payouts/{payoutId}":{"get":{"tags":["payouts"],"operationId":"payouts.get","parameters":[{"name":"payoutId","in":"path","schema":{"$ref":"#/components/schemas/PyoId"},"required":true,"example":"pyo_01a15ab0-b690-7221-8eac-d7e8f90a1b2c"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Payout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutEncoded"},"examples":{"contract":{"summary":"payouts.get","value":{"id":"pyo_01a15ab0-b690-7221-8eac-d7e8f90a1b2c","provider":"channel","providerPayoutId":"payout-88120331","currency":"AUD","netCents":10286,"status":"paid","issuedAt":"2026-10-22T00:00:00.000Z","fx":{"currency":"AUD","home":"AUD","rate":1,"rateDate":"2026-10-22","source":"same"},"unaccountedCents":0,"recordedAt":"2026-10-22T01:05:33.640Z","updatedAt":"2026-10-22T01:05:33.640Z","items":[{"kind":"charge","amountCents":10600,"currency":"AUD","providerTransactionId":"txn-6620019931","paymentId":"pay_01a15aa0-c7a0-7331-9fbd-e8f90a1b2c3d","orderId":"ord_01a15a80-9470-7001-8c8a-b5c6d7e8f90a","orderReference":"#1342","matched":true,"homeCents":10600},{"kind":"fee","amountCents":-314,"currency":"AUD","description":"Processing fee","matched":false,"homeCents":-314}],"homeNetCents":10286}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"PayoutNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayoutNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"One payout as last reported, its lines and what each settled, with home figures as on the list; the exchange it realised is the ledger's (`GET /postings?payoutId=`). 404 `PayoutNotFound` when the tenant has none with that id. Appends nothing: a read of the payouts.\n\nRequires `payments:read`.","x-mcp-withheld":"one payout is the list's row; `fulfillment_list_payouts` answers it, and the profile budget keeps one payout tool","x-required-scopes":["payments:read"],"x-example-source":{"origin":"contract"}}},"/credit":{"get":{"tags":["tenders"],"operationId":"tenders.credit","parameters":[{"name":"personId","in":"query","schema":{"$ref":"#/components/schemas/PsnId"},"required":false},{"name":"companyId","in":"query","schema":{"$ref":"#/components/schemas/CmpId"},"required":false,"example":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"CreditAccounts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAccountsEncoded"},"examples":{"contract":{"summary":"tenders.credit","value":{"accounts":[{"holderId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","currency":"AUD","balanceCents":2500,"entries":[{"kind":"issued","amountCents":2500,"at":"2026-10-21T02:15:40.000Z","creditId":"crd_01a15912-4c01-7f2a-8b3c-4d5e6f7a8b9c","reason":"Goodwill — the October delivery arrived two days late"}]}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"A customer's store credit: one account per currency it has held credit in, for the person (`?personId=`) or the company (`?companyId=`) — its balance and its history, newest first (issued by hand, taken back, spent on an order's payment, refunded onto it). Credit is never converted between currencies. Appends nothing: a read of the credit accounts.\n\nRequires `customers:read` or `payments:read`.","x-mcp-tool":{"name":"fulfillment_get_store_credit","title":"Fulfillment: Get store credit","toolset":"tenders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["customers:read","payments:read"],"x-example-source":{"origin":"contract"}},"post":{"tags":["tenders"],"operationId":"tenders.issueCredit","parameters":[],"security":[{"bearer":[]}],"responses":{"201":{"description":"CreditAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAccountEncoded"},"examples":{"contract":{"summary":"tenders.issueCredit","value":{"holderId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","currency":"AUD","balanceCents":2500,"entries":[{"kind":"issued","amountCents":2500,"at":"2026-10-21T02:15:40.000Z","creditId":"crd_01a15912-4c01-7f2a-8b3c-4d5e6f7a8b9c","reason":"Goodwill — the October delivery arrived two days late"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Give a person or a company (`holderId`) store credit by hand, in one currency, with the `reason` for the record; answers the account as it now stands. The books post it as store credit given against customer credit. Appends `fulfillment.credit-issued`. `creditId` (a caller-minted `crd_…`) is required and is the idempotency key: a retry with the same id is acknowledged and gives the credit once.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueCreditEncoded"},"example":{"creditId":"crd_01a15912-4c01-7f2a-8b3c-4d5e6f7a8b9c","holderId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","currency":"AUD","amountCents":2500,"reason":"Goodwill — the October delivery arrived two days late"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_issue_store_credit","title":"Fulfillment: Issue store credit","toolset":"tenders","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}}},"/credit/{creditId}/reverse":{"post":{"tags":["tenders"],"operationId":"tenders.reverseCredit","parameters":[{"name":"creditId","in":"path","schema":{"$ref":"#/components/schemas/CrdId"},"required":true,"example":"crd_01a15912-4c01-7f2a-8b3c-4d5e6f7a8b9c"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"CreditAccount","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditAccountEncoded"},"examples":{"contract":{"summary":"tenders.reverseCredit","value":{"holderId":"cmp_01a1588a-1f02-7a3b-8c4d-5e6f7a8b9c0d","currency":"AUD","balanceCents":0,"entries":[{"kind":"reversed","amountCents":2500,"at":"2026-10-21T02:40:03.000Z","creditId":"crd_01a15912-4c01-7f2a-8b3c-4d5e6f7a8b9c","reason":"Issued to the wrong account"},{"kind":"issued","amountCents":2500,"at":"2026-10-21T02:15:40.000Z","creditId":"crd_01a15912-4c01-7f2a-8b3c-4d5e6f7a8b9c","reason":"Goodwill — the October delivery arrived two days late"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"CreditNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditNotFoundEncoded"}}}},"409":{"description":"InsufficientCredit | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/InsufficientCreditEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Take back credit given by hand — the whole issue, while it is still unspent (409 `InsufficientCredit` once spent; 404 `CreditNotFound` for an id no issue has). A spend is never reversed here: a refund gives it back. Appends `fulfillment.credit-reversed`. Idempotent by state: an issue reverses once, and a retry answers the account as the reversal left it.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReverseCreditEncoded"},"example":{"reason":"Issued to the wrong account"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_reverse_store_credit","title":"Fulfillment: Reverse store credit","toolset":"tenders","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}}},"/gift-cards":{"get":{"tags":["tenders"],"operationId":"tenders.giftCards","parameters":[{"name":"last4","in":"query","schema":{"type":"string"},"required":false,"example":"K7QM"},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/GiftCardStatus"},"required":false},{"name":"limit","in":"query","schema":{"type":"string"},"required":false},{"name":"offset","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"GiftCardPage","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardPageEncoded"},"examples":{"contract":{"summary":"tenders.giftCards","value":{"items":[{"id":"gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e","last4":"K7QM","currency":"AUD","initialCents":5000,"balanceCents":5000,"status":"active","expiresOn":"2029-10-21","recipientId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","note":"Birthday raffle prize","issuedAt":"2026-10-21T03:02:11.000Z","entries":[{"kind":"issued","amountCents":5000,"at":"2026-10-21T03:02:11.000Z"}]}],"total":1}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"A page of the tenant's gift cards, newest issued first, `limit` per page (1–200, 50 when omitted) from `offset`, with the `total`; `?last4=` finds a card by its code's last four characters and `?status=` narrows to `active`, `disabled` or `depleted`. A card shows its balance, expiry and history, never its code. Appends nothing: a read of the gift cards.\n\nRequires `payments:read`.","x-mcp-tool":{"name":"fulfillment_list_gift_cards","title":"Fulfillment: List gift cards","toolset":"tenders","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["payments:read"],"x-example-source":{"origin":"contract"}},"post":{"tags":["tenders"],"operationId":"tenders.issueGiftCard","parameters":[],"security":[{"bearer":[]}],"responses":{"201":{"description":"IssuedGiftCard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssuedGiftCardEncoded"},"examples":{"contract":{"summary":"tenders.issueGiftCard","value":{"card":{"id":"gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e","last4":"K7QM","currency":"AUD","initialCents":5000,"balanceCents":5000,"status":"active","expiresOn":"2029-10-21","recipientId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","note":"Birthday raffle prize","issuedAt":"2026-10-21T03:02:11.000Z","entries":[{"kind":"issued","amountCents":5000,"at":"2026-10-21T03:02:11.000Z"}]},"code":"7H2D-9QXR-W4NB-K7QM"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Issue a gift card by hand — a prize, a goodwill gesture — worth `amountCents` in `currency`, for an optional `recipientId` (a person or a company). It expires at the end of `expiresOn`, else after the tenant's `giftCardExpiryMonths`, else never. Answers the card and its `code` — the one answer that ever carries it: no read shows it again, only its last four. The books post it as store credit given against gift card liability. Appends `fulfillment.gift-card-issued`. `giftCardId` (a caller-minted `gcd_…`) is required and is the idempotency key: the code is derived from it, so a retry with the same id answers the same card and the same code and issues nothing.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueGiftCardEncoded"},"example":{"giftCardId":"gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e","amountCents":5000,"currency":"AUD","expiresOn":"2029-10-21","recipientId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","note":"Birthday raffle prize"}}},"required":true},"x-mcp-withheld":"issuing a gift card answers its code once — a bearer secret that belongs on the card or in the recipient's mail, never in a chat transcript; it is issued in the admin","x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}}},"/gift-cards/{giftCardId}":{"get":{"tags":["tenders"],"operationId":"tenders.giftCard","parameters":[{"name":"giftCardId","in":"path","schema":{"$ref":"#/components/schemas/GcdId"},"required":true,"example":"gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"GiftCard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardEncoded"},"examples":{"contract":{"summary":"tenders.giftCard","value":{"id":"gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e","last4":"K7QM","currency":"AUD","initialCents":5000,"balanceCents":5000,"status":"active","expiresOn":"2029-10-21","recipientId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","note":"Birthday raffle prize","issuedAt":"2026-10-21T03:02:11.000Z","entries":[{"kind":"issued","amountCents":5000,"at":"2026-10-21T03:02:11.000Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"GiftCardNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"One gift card by id: its last four, currency, initial value, balance, status, expiry, recipient and history (issued, redeemed, refunded, disabled, enabled), never its code. 404 `GiftCardNotFound`. Appends nothing: a read of one card.\n\nRequires `payments:read`.","x-mcp-withheld":"one gift card is the list's row (`fulfillment_list_gift_cards` finds it by its last four), and the profile budget keeps one card read","x-required-scopes":["payments:read"],"x-example-source":{"origin":"contract"}}},"/gift-cards/{giftCardId}/disable":{"post":{"tags":["tenders"],"operationId":"tenders.disableGiftCard","parameters":[{"name":"giftCardId","in":"path","schema":{"$ref":"#/components/schemas/GcdId"},"required":true,"example":"gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"GiftCard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardEncoded"},"examples":{"contract":{"summary":"tenders.disableGiftCard","value":{"id":"gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e","last4":"K7QM","currency":"AUD","initialCents":5000,"balanceCents":5000,"status":"disabled","expiresOn":"2029-10-21","recipientId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","note":"Birthday raffle prize","issuedAt":"2026-10-21T03:02:11.000Z","entries":[{"kind":"disabled","at":"2026-10-21T05:30:00.000Z","reason":"Reported lost"},{"kind":"issued","amountCents":5000,"at":"2026-10-21T03:02:11.000Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"GiftCardNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Stop a gift card — lost, stolen, issued in error: no payment may draw on it until it is enabled, and a refund that would go back onto it goes to store credit instead. Appends `fulfillment.gift-card-disabled`. Idempotent by state: a card already disabled appends nothing.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetGiftCardStatusEncoded"},"example":{"reason":"Reported lost"}}},"required":true},"x-mcp-tool":{"name":"fulfillment_disable_gift_card","title":"Fulfillment: Disable gift card","toolset":"tenders","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}}},"/gift-cards/{giftCardId}/enable":{"post":{"tags":["tenders"],"operationId":"tenders.enableGiftCard","parameters":[{"name":"giftCardId","in":"path","schema":{"$ref":"#/components/schemas/GcdId"},"required":true,"example":"gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"GiftCard","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardEncoded"},"examples":{"contract":{"summary":"tenders.enableGiftCard","value":{"id":"gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e","last4":"K7QM","currency":"AUD","initialCents":5000,"balanceCents":5000,"status":"active","expiresOn":"2029-10-21","recipientId":"psn_01a1588a-0c41-7d2e-9a10-3b5c6d7e8f90","note":"Birthday raffle prize","issuedAt":"2026-10-21T03:02:11.000Z","entries":[{"kind":"issued","amountCents":5000,"at":"2026-10-21T03:02:11.000Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"GiftCardNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Let a disabled gift card be used again, with its balance as it stood. Appends `fulfillment.gift-card-enabled`. Idempotent by state: a card not disabled appends nothing.\n\nRequires `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetGiftCardStatusEncoded"},"example":{"reason":"Found"}}},"required":true},"x-mcp-withheld":"re-enabling a stopped gift card is a person's call on a card reported lost; done in the admin's gift card drawer, and the books profile's budget keeps disable alone","x-required-scopes":["payments:write"],"x-example-source":{"origin":"contract"}}},"/gift-cards/check":{"post":{"tags":["tenders"],"operationId":"tenders.checkGiftCard","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"GiftCardBalance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardBalanceEncoded"},"examples":{"contract":{"summary":"tenders.checkGiftCard","value":{"giftCardId":"gcd_01a15912-6e02-7b3c-9d4e-5f6a7b8c9d0e","last4":"K7QM","currency":"AUD","balanceCents":5000,"status":"active","expiresOn":"2029-10-21"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"GiftCardNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"429":{"description":"GiftCardAttemptsLocked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardAttemptsLockedEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"What a gift card code is good for, before it pays: the card's last four, currency, balance, status and expiry, and `refusal` (`disabled`, `expired`) when it can pay nothing today. The code travels in the body, never a URL. A code matching no card is 404 `GiftCardNotFound` and counts against the caller: ten such in fifteen minutes and every code is refused for fifteen (429 `GiftCardAttemptsLocked`, with `retryAfterSeconds`). Appends nothing: a lookup, whose misses are kept for the lockout and not as facts. No idempotency key: a lookup changes nothing, so a retry answers the same (or counts another miss).\n\nRequires `payments:read` or `payments:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckGiftCardEncoded"},"example":{"code":"7H2D-9QXR-W4NB-K7QM"}}},"required":true},"x-mcp-withheld":"checking a gift card takes its code, a bearer secret typed at the till or by the customer, never into a chat; the admin's payment dialog and hosted pages check it","x-required-scopes":["payments:read","payments:write"],"x-example-source":{"origin":"contract"}}},"/customer/{tenantId}/{token}":{"get":{"tags":["customer"],"operationId":"customer.document","parameters":[{"name":"tenantId","in":"path","schema":{"$ref":"#/components/schemas/TenantId"},"required":true,"example":"org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d"},{"name":"token","in":"path","schema":{"type":"string","minLength":1},"required":true,"example":"01a1565263f77a819b92d8e9f0a1b2c3.01a156531a2b7c3d8e4f5a6b7c8d9e0f.q0W8rTz3mPd5LkXv2NfYbA"}],"security":[],"responses":{"200":{"description":"CustomerDocumentView","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDocumentViewEncoded"},"examples":{"contract":{"summary":"customer.document","value":{"tenantId":"org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d","linkId":"cpl_01a15653-1a2b-7c3d-8e4f-5a6b7c8d9e0f","orderId":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","country":"AU","timeZone":"Australia/Sydney","actions":{"accept":true,"decline":true},"document":{"kind":"quote","status":"open","number":"SO-01041","quote":{"currency":"AUD","reference":"QUOTE-HARBOUR-OCT","issuedAt":"2026-10-19T22:44:30.812Z","validUntil":"2026-11-02T00:00:00.000Z","companyName":"Harbour Ceramics","lines":[{"sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":48,"unitPriceCents":2100,"pricesIncludeTax":false,"discountCents":0,"totalCents":100800,"taxCents":10080,"taxClasses":["standard"]},{"sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","quantity":6,"unitPriceCents":3800,"pricesIncludeTax":false,"discountCents":0,"totalCents":22800,"taxCents":2280,"taxClasses":["standard"]}],"totals":{"presentation":"exclusive","linesCents":123600,"discountCents":0,"shippingCents":2500,"netCents":126100,"taxCents":12610,"totalCents":138710,"breakdown":[]}}}}}}}}},"404":{"description":"CustomerLinkNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLinkNotFoundEncoded"}}}},"429":{"description":"CustomerLinkThrottled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLinkThrottledEncoded"}}}}},"description":"The one document a customer link opens — a quote, an order's status and parcels, an invoice with the order's payments, or a parcel's tracking — presented as the tenant's messages present it, with what the customer may do (`actions`) and the business's country and time zone to write money and dates in. 404 `CustomerLinkNotFound` for any token that opens nothing (unknown, altered, revoked, another tenant's); 429 `CustomerLinkThrottled` when one link is asked too often. Appends nothing: opening is recorded by `POST /customer/:tenantId/:token/viewed`.\n\nPublic: a customer holds no account: the signed link token in the path is the credential, checked before anything is read","x-mcp-withheld":"what a customer's signed link opens, read by the hosted pages; staff and agents read the order itself with `fulfillment_get_order`","x-requires":{"kind":"public","reason":"a customer holds no account: the signed link token in the path is the credential, checked before anything is read"},"x-example-source":{"origin":"contract"}}},"/customer/{tenantId}/{token}/viewed":{"post":{"tags":["customer"],"operationId":"customer.viewed","parameters":[{"name":"tenantId","in":"path","schema":{"$ref":"#/components/schemas/TenantId"},"required":true,"example":"org_01a15a10-2b3c-7d4e-8f50-61728394a5b6"},{"name":"token","in":"path","schema":{"type":"string","minLength":1},"required":true,"example":"01a15a103c4d7e5f8a61728394a5b6c7.01a15a104d5e7f608b72839405b6c7d8.Kd3mT8qWz1pLx5vBn2RyGA"}],"security":[],"responses":{"204":{"description":"<No Content>"},"404":{"description":"CustomerLinkNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLinkNotFoundEncoded"}}}},"429":{"description":"CustomerLinkThrottled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLinkThrottledEncoded"}}}}},"description":"Record that the customer opened the link: appends `fulfillment.customer-link-viewed`, naming the notification when the token carries one, which is how the notifications service learns its message was opened. 404 `CustomerLinkNotFound` for a token that opens nothing. Idempotent by state: a link is recorded opened once, and once for each message that carried it, so a reopened page appends nothing.\n\nPublic: a customer holds no account: the signed link token in the path is the credential, checked before anything is read","x-mcp-withheld":"recorded by the hosted page when the customer opens their link; no person or agent opens a customer's link for them","x-requires":{"kind":"public","reason":"a customer holds no account: the signed link token in the path is the credential, checked before anything is read"},"x-example-source":{"origin":"workflow","workflow":"share-a-quote","step":11}}},"/customer/{tenantId}/{token}/accept":{"post":{"tags":["customer"],"operationId":"customer.accept","parameters":[{"name":"tenantId","in":"path","schema":{"$ref":"#/components/schemas/TenantId"},"required":true,"example":"org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d"},{"name":"token","in":"path","schema":{"type":"string","minLength":1},"required":true,"example":"01a1565263f77a819b92d8e9f0a1b2c3.01a156531a2b7c3d8e4f5a6b7c8d9e0f.q0W8rTz3mPd5LkXv2NfYbA"}],"security":[],"responses":{"200":{"description":"CustomerDocumentView","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDocumentViewEncoded"},"examples":{"contract":{"summary":"customer.accept","value":{"tenantId":"org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d","linkId":"cpl_01a15653-1a2b-7c3d-8e4f-5a6b7c8d9e0f","orderId":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","country":"AU","timeZone":"Australia/Sydney","actions":{"accept":false,"decline":false},"document":{"kind":"quote","status":"accepted","number":"SO-01041","quote":{"currency":"AUD","reference":"QUOTE-HARBOUR-OCT","issuedAt":"2026-10-19T22:44:30.812Z","validUntil":"2026-11-02T00:00:00.000Z","companyName":"Harbour Ceramics","lines":[{"sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":48,"unitPriceCents":2100,"pricesIncludeTax":false,"discountCents":0,"totalCents":100800,"taxCents":10080,"taxClasses":["standard"]},{"sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","quantity":6,"unitPriceCents":3800,"pricesIncludeTax":false,"discountCents":0,"totalCents":22800,"taxCents":2280,"taxClasses":["standard"]}],"totals":{"presentation":"exclusive","linesCents":123600,"discountCents":0,"shippingCents":2500,"netCents":126100,"taxCents":12610,"totalCents":138710,"breakdown":[]}},"acceptedAt":"2026-10-20T00:58:19.664Z"}}}}}}},"404":{"description":"CustomerLinkNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLinkNotFoundEncoded"}}}},"409":{"description":"QuoteNotAnswerable | CustomerActionHeld | LineAttributeRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/QuoteNotAnswerableEncoded"},{"$ref":"#/components/schemas/CustomerActionHeldEncoded"},{"$ref":"#/components/schemas/LineAttributeRequiredEncoded"}]}}}},"429":{"description":"CustomerLinkThrottled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLinkThrottledEncoded"}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}}},"description":"The customer accepts the quote the link opens: it is placed as an order under its number, as `POST /orders/:orderId/place` places one, with the customer (the link) as the actor — appends `fulfillment.order-created` and the allocation behind it. 409 `QuoteNotAnswerable` while it is being revised (`not-issued`), past its `validUntil` (`expired`), after a decline (`declined`), once cancelled, or when the business must look at it first (`needs-review`: a price or an order rule moved since it was issued); 409 `CustomerActionHeld` while the tenant is read-only — accepting acts for the business — or its mode cannot be read; 503 `InventoryUnavailable` when stock cannot be asked. Idempotent by state: a quote is placed once, so a retried accept answers the page as it stands and appends nothing.\n\nPublic: a customer holds no account: the signed link token in the path is the credential, checked before anything is read","x-mcp-withheld":"the customer's own answer through their signed link; staff and agents place a quote with `fulfillment_place_order`","x-requires":{"kind":"public","reason":"a customer holds no account: the signed link token in the path is the credential, checked before anything is read"},"x-example-source":{"origin":"contract"}}},"/customer/{tenantId}/{token}/decline":{"post":{"tags":["customer"],"operationId":"customer.decline","parameters":[{"name":"tenantId","in":"path","schema":{"$ref":"#/components/schemas/TenantId"},"required":true,"example":"org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d"},{"name":"token","in":"path","schema":{"type":"string","minLength":1},"required":true,"example":"01a1565263f77a819b92d8e9f0a1b2c3.01a156531a2b7c3d8e4f5a6b7c8d9e0f.q0W8rTz3mPd5LkXv2NfYbA"}],"security":[],"responses":{"200":{"description":"CustomerDocumentView","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerDocumentViewEncoded"},"examples":{"contract":{"summary":"customer.decline","value":{"tenantId":"org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d","linkId":"cpl_01a15653-1a2b-7c3d-8e4f-5a6b7c8d9e0f","orderId":"ord_01a15652-63f7-7a81-9b92-d8e9f0a1b2c3","country":"AU","timeZone":"Australia/Sydney","actions":{"accept":false,"decline":false},"document":{"kind":"quote","status":"declined","number":"SO-01041","quote":{"currency":"AUD","reference":"QUOTE-HARBOUR-OCT","issuedAt":"2026-10-19T22:44:30.812Z","validUntil":"2026-11-02T00:00:00.000Z","companyName":"Harbour Ceramics","lines":[{"sku":"MUG-SPECKLE","name":"Speckled stoneware mug","quantity":48,"unitPriceCents":2100,"pricesIncludeTax":false,"discountCents":0,"totalCents":100800,"taxCents":10080,"taxClasses":["standard"]},{"sku":"BOWL-SALT-L","name":"Salt-glaze serving bowl, large","quantity":6,"unitPriceCents":3800,"pricesIncludeTax":false,"discountCents":0,"totalCents":22800,"taxCents":2280,"taxClasses":["standard"]}],"totals":{"presentation":"exclusive","linesCents":123600,"discountCents":0,"shippingCents":2500,"netCents":126100,"taxCents":12610,"totalCents":138710,"breakdown":[]}},"declinedAt":"2026-10-19T23:02:44.310Z","declineReason":"We found the bowls cheaper elsewhere"}}}}}}},"404":{"description":"CustomerLinkNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLinkNotFoundEncoded"}}}},"409":{"description":"QuoteNotAnswerable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteNotAnswerableEncoded"}}}},"429":{"description":"CustomerLinkThrottled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerLinkThrottledEncoded"}}}}},"description":"The customer declines the quote the link opens, saying why if they choose (`reason`, up to 1000 characters): appends `fulfillment.quote-declined`, and the quote stays for a person to reopen and revise, place anyway or let lie. 409 `QuoteNotAnswerable` while it is being revised, once placed, expired or cancelled. Idempotent by state: a quote is declined once until it is reopened, so a retried decline answers the page as it stands and appends nothing.\n\nPublic: a customer holds no account: the signed link token in the path is the credential, checked before anything is read","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeclineQuoteEncoded"},"example":{"reason":"We found the bowls cheaper elsewhere"}}},"required":true},"x-mcp-withheld":"the customer's own answer through their signed link; an agent never answers for the customer","x-requires":{"kind":"public","reason":"a customer holds no account: the signed link token in the path is the credential, checked before anything is read"},"x-example-source":{"origin":"contract"}}},"/printers":{"get":{"tags":["printing"],"operationId":"printing.listPrinters","parameters":[{"name":"locationId","in":"query","schema":{"$ref":"#/components/schemas/LocId"},"required":false,"example":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"PrinterList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrinterListEncoded"},"examples":{"contract":{"summary":"printing.listPrinters","value":{"items":[{"id":"prn_01a15a10-2c00-7a11-8b22-3c4d5e6f7a8b","name":"Dispatch Zebra","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","language":"zpl","media":{"widthMm":50,"heightMm":25,"dpi":203},"connection":{"_tag":"network-raw","host":"192.168.1.40","port":9100},"defaultFor":["sku-label","bin-label"],"removed":false,"createdAt":"2026-10-15T01:12:40.215Z","updatedAt":"2026-10-15T01:12:40.215Z"},{"id":"prn_01a15a10-2c00-7a11-8b22-4d5e6f7a8b9c","name":"Office laser","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","language":"pdf","media":{"widthMm":100,"heightMm":150,"dpi":300},"connection":{"_tag":"os-printer","queue":"Brother_HL_L2350DW"},"defaultFor":["shipping-label","packing-slip"],"removed":false,"createdAt":"2026-10-15T01:14:02.871Z","updatedAt":"2026-10-15T01:14:02.871Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"PrintAgentOnly | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentOnlyEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The tenant's printers (`docs/label-printing.md` › Printers), removed ones included, oldest first — or one site's, with `locationId`: each printer's language (`zpl` or `pdf`), label media, how its print agent reaches it, and the purposes it is the site's default printer for. A print agent's device token is refused 403 `PrintAgentOnly`: an agent learns its printer from the job it claims. Appends nothing: a read of the printers.\n\nRequires `locations:read` or `printing:read`.","x-mcp-tool":{"name":"fulfillment_list_printers","title":"Fulfillment: List printers","toolset":"printing","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["locations:read","printing:read"],"x-example-source":{"origin":"contract"}}},"/printers/{printerId}":{"put":{"tags":["printing"],"operationId":"printing.savePrinter","parameters":[{"name":"printerId","in":"path","schema":{"$ref":"#/components/schemas/PrnId"},"required":true,"example":"prn_01a15a10-2c00-7a11-8b22-3c4d5e6f7a8b"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Printer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrinterEncoded"},"examples":{"contract":{"summary":"printing.savePrinter","value":{"id":"prn_01a15a10-2c00-7a11-8b22-3c4d5e6f7a8b","name":"Dispatch Zebra","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","language":"zpl","media":{"widthMm":50,"heightMm":25,"dpi":203},"connection":{"_tag":"network-raw","host":"192.168.1.40","port":9100},"defaultFor":["sku-label","bin-label"],"removed":false,"createdAt":"2026-10-15T01:12:40.215Z","updatedAt":"2026-10-15T01:12:40.215Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"PrintAgentOnly | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentOnlyEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"LocationNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LocationNotFoundEncoded"}}}},"409":{"description":"PrintAgentNotAtSite | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentNotAtSiteEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"PrintAgentsUnavailable | RequestLogUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentsUnavailableEncoded"},{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}]}}}}},"description":"Add a printer to a site, or replace one (restoring it, when it was removed): its name, the print agent that reaches it, its language, media and connection (`network-raw` host and port, or an `os-printer` queue on the agent's computer), and the purposes it is the site's default for — saving it takes those purposes from the site's other printers. Moving it to another site or print agent fails its queued jobs with the reason in the same commit (`fulfillment.print-job-failed`). 404 `LocationNotFound` for a site the tenant does not have; 409 `PrintAgentNotAtSite` for an agent that is not the organization's, is enrolled at another site, or was revoked (asked of auth with the caller's token; 503 `PrintAgentsUnavailable` when auth does not answer). Appends `fulfillment.printer-saved`. Idempotent by content: the printer as it already stands appends nothing.\n\nRequires `locations:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavePrinter"},"example":{"name":"Dispatch Zebra","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","language":"zpl","media":{"widthMm":50,"heightMm":25,"dpi":203},"connection":{"_tag":"network-raw","host":"192.168.1.40","port":9100},"defaultFor":["sku-label","bin-label"]}}},"required":true},"x-mcp-tool":{"name":"fulfillment_save_printer","title":"Fulfillment: Save printer","toolset":"printing","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["locations:write"],"x-example-source":{"origin":"contract"}}},"/printers/{printerId}/remove":{"post":{"tags":["printing"],"operationId":"printing.removePrinter","parameters":[{"name":"printerId","in":"path","schema":{"$ref":"#/components/schemas/PrnId"},"required":true,"example":"prn_01a15a10-2c00-7a11-8b22-4d5e6f7a8b9c"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Printer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrinterEncoded"},"examples":{"contract":{"summary":"printing.removePrinter","value":{"id":"prn_01a15a10-2c00-7a11-8b22-4d5e6f7a8b9c","name":"Office laser","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","language":"pdf","media":{"widthMm":100,"heightMm":150,"dpi":300},"connection":{"_tag":"os-printer","queue":"Brother_HL_L2350DW"},"defaultFor":[],"removed":true,"createdAt":"2026-10-15T01:14:02.871Z","updatedAt":"2026-10-21T22:05:11.402Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"PrintAgentOnly | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentOnlyEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"PrinterNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrinterNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Remove a printer: nothing more is sent to it and it is the default for nothing; its queued jobs fail with the reason in the same commit (`fulfillment.print-job-failed`), and a job its agent already took finishes. Saving it again restores it. Appends `fulfillment.printer-removed`. Idempotent by state: a printer is removed once, so a retry on one already removed appends nothing.\n\nRequires `locations:write`.","x-mcp-tool":{"name":"fulfillment_remove_printer","title":"Fulfillment: Remove printer","toolset":"printing","readOnlyHint":false,"destructiveHint":true,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["locations:write"],"x-example-source":{"origin":"contract"}}},"/print-jobs":{"post":{"tags":["printing"],"operationId":"printing.requestPrint","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"PrintJob","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintJobEncoded"},"examples":{"contract":{"summary":"printing.requestPrint","value":{"id":"pjb_01a15a20-4400-7e55-8f66-6f7a8b9c0d1e","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","printerId":"prn_01a15a10-2c00-7a11-8b22-3c4d5e6f7a8b","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","purpose":"sku-label","document":{"_tag":"sku-labels","sku":"MUG-SPECKLE","copies":12},"content":{"name":"Speckled mug","barcode":"9312345000017"},"status":"queued","requestedAt":"2026-10-20T02:41:07.330Z","updatedAt":"2026-10-20T02:41:07.330Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"PrintAgentOnly | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentOnlyEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"FulfillmentOrderNotFound | ConsignmentNotFound","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ConsignmentNotFoundEncoded"}]}}}},"409":{"description":"NoPrinterForJob | PrinterCannotPrint | PrintDocumentMissing | PrintJobIdTaken | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/NoPrinterForJobEncoded"},{"$ref":"#/components/schemas/PrinterCannotPrintEncoded"},{"$ref":"#/components/schemas/PrintDocumentMissingEncoded"},{"$ref":"#/components/schemas/PrintJobIdTakenEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"502":{"description":"InventoryUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InventoryUnavailableEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Print a document at a site (`docs/label-printing.md` › Print jobs): a consignment's label, or `copies` of a SKU's label, laid out by Manifold. It goes to the printer named, else to the site's default printer for its purpose; 409 `NoPrinterForJob` when there is none, 409 `PrinterCannotPrint` when the printer cannot take it (a PDF label to a ZPL printer), 409 `PrintDocumentMissing` when the consignment has no label stored yet. The job waits, `queued`, for the printer's print agent. Printing stays at the tenant's own sites, so read-only mode does not hold it. Appends `fulfillment.print-job-requested`. Idempotent on `jobId`, the caller's: a retry with the same id answers the job as it stands and prints nothing twice; the same id for a different request is 409 `PrintJobIdTaken`. A reprint is a new `jobId`.\n\nRequires `printing:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPrint"},"example":{"jobId":"pjb_01a15a20-4400-7e55-8f66-6f7a8b9c0d1e","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","document":{"_tag":"sku-labels","sku":"MUG-SPECKLE","copies":12}}}},"required":true},"x-mcp-tool":{"name":"fulfillment_request_print","title":"Fulfillment: Request print","toolset":"printing","readOnlyHint":false,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["printing:write"],"x-example-source":{"origin":"contract"}},"get":{"tags":["printing"],"operationId":"printing.listPrintJobs","parameters":[{"name":"locationId","in":"query","schema":{"$ref":"#/components/schemas/LocId"},"required":false,"example":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4"},{"name":"status","in":"query","schema":{"$ref":"#/components/schemas/PrintJobStatus"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"PrintJobList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintJobListEncoded"},"examples":{"contract":{"summary":"printing.listPrintJobs","value":{"items":[{"id":"pjb_01a15a20-4400-7e55-8f66-7a8b9c0d1e2f","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","printerId":"prn_01a15a10-2c00-7a11-8b22-4d5e6f7a8b9c","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","purpose":"shipping-label","document":{"_tag":"consignment-label","orderId":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","consignmentId":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"},"status":"failed","failure":"the printer did not answer at Brother_HL_L2350DW: out of paper","requestedAt":"2026-10-20T06:54:12.019Z","sentAt":"2026-10-20T06:54:12.640Z","finishedAt":"2026-10-20T06:54:42.655Z","updatedAt":"2026-10-20T06:54:42.655Z"},{"id":"pjb_01a15a20-4400-7e55-8f66-6f7a8b9c0d1e","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","printerId":"prn_01a15a10-2c00-7a11-8b22-3c4d5e6f7a8b","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","purpose":"sku-label","document":{"_tag":"sku-labels","sku":"MUG-SPECKLE","copies":12},"content":{"name":"Speckled mug","barcode":"9312345000017"},"status":"printed","requestedAt":"2026-10-20T02:41:07.330Z","updatedAt":"2026-10-20T02:41:09.104Z","sentAt":"2026-10-20T02:41:07.912Z","finishedAt":"2026-10-20T02:41:09.104Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"PrintAgentOnly | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentOnlyEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The newest print jobs, at most 200, newest first — narrowed to a site with `locationId` and to a status with `status`: what each printed, where it was sent, and why a failed one failed. A print agent's device token is refused 403 `PrintAgentOnly`: an agent reads its own queue. Appends nothing: a read of the jobs.\n\nRequires `printing:read`.","x-mcp-tool":{"name":"fulfillment_list_print_jobs","title":"Fulfillment: List print jobs","toolset":"printing","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["printing:read"],"x-example-source":{"origin":"contract"}}},"/print-jobs/{jobId}":{"get":{"tags":["printing"],"operationId":"printing.getPrintJob","parameters":[{"name":"jobId","in":"path","schema":{"$ref":"#/components/schemas/PjbId"},"required":true,"example":"pjb_01a15a20-4400-7e55-8f66-7a8b9c0d1e2f"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"PrintJob","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintJobEncoded"},"examples":{"contract":{"summary":"printing.getPrintJob","value":{"id":"pjb_01a15a20-4400-7e55-8f66-7a8b9c0d1e2f","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","printerId":"prn_01a15a10-2c00-7a11-8b22-4d5e6f7a8b9c","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","purpose":"shipping-label","document":{"_tag":"consignment-label","orderId":"ord_01a159a0-cfd0-70e1-9bf2-a4b5c6d7e8f9","consignmentId":"cns_01a159c0-d0e0-71f1-8c03-d7e8f90a1b2c"},"status":"failed","failure":"the printer did not answer at Brother_HL_L2350DW: out of paper","requestedAt":"2026-10-20T06:54:12.019Z","sentAt":"2026-10-20T06:54:12.640Z","finishedAt":"2026-10-20T06:54:42.655Z","updatedAt":"2026-10-20T06:54:42.655Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"PrintAgentOnly | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentOnlyEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"PrintJobNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintJobNotFoundEncoded"}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"One print job as it stands: `queued`, `sent`, `printed` or `failed` with the reason. A print agent's device token is refused 403 `PrintAgentOnly`: an agent reads its own queue. Appends nothing: a read of the job.\n\nRequires `printing:read`.","x-mcp-tool":{"name":"fulfillment_get_print_job","title":"Fulfillment: Get print job","toolset":"printing","readOnlyHint":true,"destructiveHint":false,"idempotentHint":true,"openWorldHint":false},"x-required-scopes":["printing:read"],"x-example-source":{"origin":"contract"}}},"/print-agent/jobs":{"get":{"tags":["printing"],"operationId":"printing.agentJobs","parameters":[],"security":[{"bearer":[]}],"responses":{"200":{"description":"PrintJobList","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintJobListEncoded"},"examples":{"contract":{"summary":"printing.agentJobs","value":{"items":[{"id":"pjb_01a15a20-4400-7e55-8f66-6f7a8b9c0d1e","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","printerId":"prn_01a15a10-2c00-7a11-8b22-3c4d5e6f7a8b","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","purpose":"sku-label","document":{"_tag":"sku-labels","sku":"MUG-SPECKLE","copies":12},"content":{"name":"Speckled mug","barcode":"9312345000017"},"status":"queued","requestedAt":"2026-10-20T02:41:07.330Z","updatedAt":"2026-10-20T02:41:07.330Z"}]}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"PrintAgentOnly | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentOnlyEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The calling print agent's open jobs, oldest first: `queued` ones to take, and `sent` ones it took and has not answered. An agent reads it when it connects and after every `fulfillment.print-job-requested` it hears. Only a print agent's device token calls it (`POST /api/auth/print-agent/token`); a person's session is refused 403 `PrintAgentOnly`. Appends nothing: a read of the agent's queue.\n\nRequires `printing:read`.","x-mcp-withheld":"a print agent's own queue, read under its device token alone; a person reads a site's jobs with `fulfillment_list_print_jobs`","x-required-scopes":["printing:read"],"x-example-source":{"origin":"contract"}}},"/print-jobs/{jobId}/claim":{"post":{"tags":["printing"],"operationId":"printing.claimPrintJob","parameters":[{"name":"jobId","in":"path","schema":{"$ref":"#/components/schemas/PjbId"},"required":true,"example":"pjb_01a15a20-4400-7e55-8f66-6f7a8b9c0d1e"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"ClaimedPrintJob","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimedPrintJobEncoded"},"examples":{"contract":{"summary":"printing.claimPrintJob","value":{"job":{"id":"pjb_01a15a20-4400-7e55-8f66-6f7a8b9c0d1e","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","printerId":"prn_01a15a10-2c00-7a11-8b22-3c4d5e6f7a8b","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","purpose":"sku-label","document":{"_tag":"sku-labels","sku":"MUG-SPECKLE","copies":12},"content":{"name":"Speckled mug","barcode":"9312345000017"},"status":"sent","requestedAt":"2026-10-20T02:41:07.330Z","updatedAt":"2026-10-20T02:41:07.912Z","sentAt":"2026-10-20T02:41:07.912Z"},"printer":{"id":"prn_01a15a10-2c00-7a11-8b22-3c4d5e6f7a8b","name":"Dispatch Zebra","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","language":"zpl","media":{"widthMm":50,"heightMm":25,"dpi":203},"connection":{"_tag":"network-raw","host":"192.168.1.40","port":9100},"defaultFor":["sku-label","bin-label"],"removed":false,"createdAt":"2026-10-15T01:12:40.215Z","updatedAt":"2026-10-15T01:12:40.215Z"},"content":{"_tag":"inline","contentType":"application/zpl","body":"^XA\n^CI28\n^PW400\n^LL200\n^FO16,16^A0N,24,24^FB368,2,0,L^FH\\^FDSpeckled mug^FS\n^FO16,80^BY2^BCN,42,Y,N,N^FH\\^FD9312345000017^FS\n^FO16,152^A0N,32,32^FB368,1,0,L^FH\\^FDMUG-SPECKLE^FS\n^PQ12,0,1,Y\n^XZ"}}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"PrintAgentOnly | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentOnlyEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"PrintJobNotFound | FulfillmentOrderNotFound | ConsignmentNotFound | LabelNotStored","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintJobNotFoundEncoded"},{"$ref":"#/components/schemas/FulfillmentOrderNotFoundEncoded"},{"$ref":"#/components/schemas/ConsignmentNotFoundEncoded"},{"$ref":"#/components/schemas/LabelNotStoredEncoded"}]}}}},"409":{"description":"PrintJobNotOpen | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintJobNotOpenEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"410":{"description":"LabelExpired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelExpiredEncoded"}}}},"503":{"description":"LabelStoreUnavailable | RequestLogUnavailable","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LabelStoreUnavailableEncoded"},{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}]}}}}},"description":"Take a job to print it: the job, its printer and what to send — a label Manifold rendered `inline` (a SKU's ZPL) or a `link` to the label its carrier app stored, signed for fifteen minutes. 409 `PrintJobNotOpen` for another agent's job, one already answered, or one whose printer has since moved to another site or agent or been removed — that job is failed with the reason (`fulfillment.print-job-failed`) and its printer never shown. Only a print agent's device token calls it (`POST /api/auth/print-agent/token`); a person's session is refused 403 `PrintAgentOnly`. Appends `fulfillment.print-job-sent`. Idempotent by state: a job is sent once, so the agent's retry on a job it already took appends nothing and answers it again.\n\nRequires `printing:write`.","x-mcp-withheld":"only a print agent takes a job, under its device token, to send it to the printer it reaches","x-required-scopes":["printing:write"],"x-example-source":{"origin":"contract"}}},"/print-jobs/{jobId}/outcome":{"post":{"tags":["printing"],"operationId":"printing.reportPrintOutcome","parameters":[{"name":"jobId","in":"path","schema":{"$ref":"#/components/schemas/PjbId"},"required":true,"example":"pjb_01a15a20-4400-7e55-8f66-6f7a8b9c0d1e"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"PrintJob","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintJobEncoded"},"examples":{"contract":{"summary":"printing.reportPrintOutcome","value":{"id":"pjb_01a15a20-4400-7e55-8f66-6f7a8b9c0d1e","locationId":"loc_01a0f6b0-1100-7e51-8f62-7a8b9cadbec4","printerId":"prn_01a15a10-2c00-7a11-8b22-3c4d5e6f7a8b","agentId":"pag_01a15a0f-9e00-7c33-8d44-5e6f7a8b9c0d","purpose":"sku-label","document":{"_tag":"sku-labels","sku":"MUG-SPECKLE","copies":12},"content":{"name":"Speckled mug","barcode":"9312345000017"},"status":"printed","requestedAt":"2026-10-20T02:41:07.330Z","updatedAt":"2026-10-20T02:41:09.104Z","sentAt":"2026-10-20T02:41:07.912Z","finishedAt":"2026-10-20T02:41:09.104Z"}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"PrintAgentOnly | TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintAgentOnlyEncoded"},{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"404":{"description":"PrintJobNotFound","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrintJobNotFoundEncoded"}}}},"409":{"description":"PrintJobNotOpen | MirroredFromSource","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PrintJobNotOpenEncoded"},{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}]}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Say how a job went: `printed`, or `failed` with the reason (the printer refused the connection, ran out of labels). 409 `PrintJobNotOpen` for another agent's job. Only a print agent's device token calls it (`POST /api/auth/print-agent/token`); a person's session is refused 403 `PrintAgentOnly`. Appends `fulfillment.print-job-printed` or `fulfillment.print-job-failed`. Idempotent by state: a job is answered once, so a retry on one already answered appends nothing and answers it as it stands.\n\nRequires `printing:write`.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportPrintOutcome"},"example":{"_tag":"printed"}}},"required":true},"x-mcp-withheld":"only the print agent that sent a job to its printer can say how it went, under its device token","x-required-scopes":["printing:write"],"x-example-source":{"origin":"contract"}}},"/events":{"get":{"tags":["events"],"operationId":"events.list","parameters":[{"name":"since","in":"query","schema":{"type":"string"},"required":false,"example":"4112"},{"name":"limit","in":"query","schema":{"type":"string"},"required":false,"example":"500"},{"name":"upTo","in":"query","schema":{"type":"string"},"required":false}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"anyOf":[{"$ref":"#/components/schemas/fulfillment.order-createdEncoded"},{"$ref":"#/components/schemas/fulfillment.line-repricedEncoded"},{"$ref":"#/components/schemas/fulfillment.payment-terms-changedEncoded"},{"$ref":"#/components/schemas/fulfillment.customer-po-changedEncoded"},{"$ref":"#/components/schemas/fulfillment.sales-rep-changedEncoded"},{"$ref":"#/components/schemas/fulfillment.payment-recordedEncoded"},{"$ref":"#/components/schemas/fulfillment.cost-recordedEncoded"},{"$ref":"#/components/schemas/fulfillment.cost-reversedEncoded"},{"$ref":"#/components/schemas/fulfillment.virtual-fulfilledEncoded"},{"$ref":"#/components/schemas/fulfillment.note-postedEncoded"},{"$ref":"#/components/schemas/fulfillment.transcript-attachedEncoded"},{"$ref":"#/components/schemas/fulfillment.customer-erasedEncoded"},{"$ref":"#/components/schemas/fulfillment.order-editedEncoded"},{"$ref":"#/components/schemas/fulfillment.quote-createdEncoded"},{"$ref":"#/components/schemas/fulfillment.quote-issuedEncoded"},{"$ref":"#/components/schemas/fulfillment.quote-reopenedEncoded"},{"$ref":"#/components/schemas/fulfillment.quote-declinedEncoded"},{"$ref":"#/components/schemas/fulfillment.margin-approval-requestedEncoded"},{"$ref":"#/components/schemas/fulfillment.margin-approval-decidedEncoded"},{"$ref":"#/components/schemas/fulfillment.customer-link-issuedEncoded"},{"$ref":"#/components/schemas/fulfillment.customer-link-revokedEncoded"},{"$ref":"#/components/schemas/fulfillment.customer-link-viewedEncoded"},{"$ref":"#/components/schemas/fulfillment.stock-allocatedEncoded"},{"$ref":"#/components/schemas/fulfillment.allocation-movedEncoded"},{"$ref":"#/components/schemas/fulfillment.shipment-createdEncoded"},{"$ref":"#/components/schemas/fulfillment.shipment-pickedEncoded"},{"$ref":"#/components/schemas/fulfillment.shipment-packedEncoded"},{"$ref":"#/components/schemas/fulfillment.dispatchedEncoded"},{"$ref":"#/components/schemas/fulfillment.shipment-shippedEncoded"},{"$ref":"#/components/schemas/fulfillment.invoice-issuedEncoded"},{"$ref":"#/components/schemas/fulfillment.refundedEncoded"},{"$ref":"#/components/schemas/fulfillment.order-cancelledEncoded"},{"$ref":"#/components/schemas/fulfillment.consignment-requestedEncoded"},{"$ref":"#/components/schemas/fulfillment.consignment-bookedEncoded"},{"$ref":"#/components/schemas/fulfillment.payment-collection-requestedEncoded"},{"$ref":"#/components/schemas/fulfillment.payment-collection-answeredEncoded"},{"$ref":"#/components/schemas/fulfillment.consignment-refusedEncoded"},{"$ref":"#/components/schemas/fulfillment.consignment-voidedEncoded"},{"$ref":"#/components/schemas/fulfillment.consignment-paidEncoded"},{"$ref":"#/components/schemas/fulfillment.consignment-trackedEncoded"},{"$ref":"#/components/schemas/fulfillment.consignment-labelledEncoded"}]},{"anyOf":[{"$ref":"#/components/schemas/fulfillment.historical-order-recordedEncoded"},{"$ref":"#/components/schemas/fulfillment.historical-order-refundedEncoded"},{"$ref":"#/components/schemas/fulfillment.historical-order-adoptedEncoded"}]},{"anyOf":[{"$ref":"#/components/schemas/fulfillment.payout-recordedEncoded"}]},{"anyOf":[{"$ref":"#/components/schemas/fulfillment.credit-issuedEncoded"},{"$ref":"#/components/schemas/fulfillment.credit-reversedEncoded"},{"$ref":"#/components/schemas/fulfillment.gift-card-issuedEncoded"},{"$ref":"#/components/schemas/fulfillment.gift-card-disabledEncoded"},{"$ref":"#/components/schemas/fulfillment.gift-card-enabledEncoded"}]},{"anyOf":[{"$ref":"#/components/schemas/fulfillment.stock-written-offEncoded"}]},{"anyOf":[{"$ref":"#/components/schemas/fulfillment.workflow-configuredEncoded"},{"$ref":"#/components/schemas/fulfillment.numbering-configuredEncoded"}]},{"anyOf":[{"$ref":"#/components/schemas/fulfillment.line-properties-configuredEncoded"}]},{"anyOf":[{"$ref":"#/components/schemas/fulfillment.carrier-account-connectedEncoded"},{"$ref":"#/components/schemas/fulfillment.carrier-account-updatedEncoded"},{"$ref":"#/components/schemas/fulfillment.carrier-account-disconnectedEncoded"},{"$ref":"#/components/schemas/fulfillment.carrier-quotes-degradedEncoded"},{"$ref":"#/components/schemas/fulfillment.carrier-quotes-recoveredEncoded"},{"$ref":"#/components/schemas/fulfillment.manifest-requestedEncoded"},{"$ref":"#/components/schemas/fulfillment.manifest-lodgedEncoded"},{"$ref":"#/components/schemas/fulfillment.manifest-refusedEncoded"},{"$ref":"#/components/schemas/fulfillment.manifest-documentedEncoded"},{"$ref":"#/components/schemas/fulfillment.box-savedEncoded"},{"$ref":"#/components/schemas/fulfillment.box-archivedEncoded"},{"$ref":"#/components/schemas/fulfillment.rate-rules-savedEncoded"}]},{"anyOf":[{"$ref":"#/components/schemas/fulfillment.printer-savedEncoded"},{"$ref":"#/components/schemas/fulfillment.printer-removedEncoded"},{"$ref":"#/components/schemas/fulfillment.print-job-requestedEncoded"},{"$ref":"#/components/schemas/fulfillment.print-job-sentEncoded"},{"$ref":"#/components/schemas/fulfillment.print-job-printedEncoded"},{"$ref":"#/components/schemas/fulfillment.print-job-failedEncoded"}]}]}},"examples":{"contract":{"summary":"events.list","value":[{"_tag":"fulfillment.shipment-picked","eventId":"evt_01a156d4-8704-7a21-8b32-000000004112","txId":"tx_01a156d4-8704-7a21-8b32-000000004112","tenantId":"org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d","sequence":4112,"occurredAt":"2026-10-20T02:40:18.530Z","source":"fulfillment-manager","version":1,"actor":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"correlationId":"req_01a156d4-8704-7a21-8b32-000000004112","payload":{"orderId":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","lines":[{"lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4}]}},{"_tag":"fulfillment.shipment-packed","eventId":"evt_01a156d4-8704-7a21-8b32-000000004113","txId":"tx_01a156d4-8704-7a21-8b32-000000004113","tenantId":"org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d","sequence":4113,"occurredAt":"2026-10-20T02:52:05.118Z","source":"fulfillment-manager","version":1,"actor":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"correlationId":"req_01a156d4-8704-7a21-8b32-000000004113","payload":{"orderId":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","cartons":[{"packaging":"carton","weightGrams":2150,"size":{"lengthMm":300,"widthMm":250,"heightMm":150}}]}},{"_tag":"fulfillment.dispatched","eventId":"evt_01a156d4-8704-7a21-8b32-000000004114","txId":"tx_01a156d4-8704-7a21-8b32-000000004114","tenantId":"org_01a1586e-f9f6-7a8b-9c7d-6e5f4a3b2c1d","sequence":4114,"occurredAt":"2026-10-20T03:12:40.000Z","source":"fulfillment-manager","version":1,"actor":{"_tag":"user","id":"usr_01a15889-fa80-7b11-8c22-3d4e5f6a7b8c"},"correlationId":"req_01a156d4-8704-7a21-8b32-000000004114","payload":{"orderId":"ord_01a156d4-8704-7a21-8b32-4c5d6e7f8091","dispatchId":"dsp_01a1588b-1a20-7b31-9c42-6e7f80910213","shipmentId":"shp_01a156d4-8704-7a21-8b32-8091021324a5","lineId":"lin_01a156d4-8704-7a21-8b32-5d6e7f809102","sku":"MUG-SPECKLE","quantity":4}}]}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"Replay committed fulfillment events at-or-after `since` (a journal sequence number), oldest first, at most `limit` per page (default 500, capped at 5000 — an over-cap `limit` is clamped, not an error). Page forward with `since=<last sequence + 1>`. Registry materializers and accounting catch up here before subscribing to NATS `fulfillment.>`. `upTo` (inclusive) ends the replay at a sequence instead of the journal's head — with `GET /events/head` it replays the journal as it stood at a moment. Appends nothing: a read of facts already journalled.\n\nRequires `orders:read`.","x-mcp-withheld":"The journal replay a consumer pages through to build its projection; agents read the projections the list and get tools serve, and the audit trail (`audit_trail`) for history.","x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}},"/events/head":{"get":{"tags":["events"],"operationId":"events.head","parameters":[{"name":"at","in":"query","schema":{"type":"string"},"required":true,"example":"2026-10-20T04:00:00.000Z"}],"security":[{"bearer":[]}],"responses":{"200":{"description":"Where a tenant's journal stood at a moment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JournalHead"},"examples":{"contract":{"summary":"events.head","value":{"at":"2026-10-20T04:00:00.000Z","sequence":4127}}}}}},"401":{"description":"Unauthorized | TokenAlreadyUsed","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/UnauthorizedEncoded"},{"$ref":"#/components/schemas/TokenAlreadyUsedEncoded"}]}}}},"402":{"description":"SubscriptionRequired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionRequiredEncoded"}}}},"403":{"description":"TenantRequired | ScopeRequired | PlatformAdminRequired","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/TenantRequiredEncoded"},{"$ref":"#/components/schemas/ScopeRequiredEncoded"},{"$ref":"#/components/schemas/PlatformAdminRequiredEncoded"}]}}}},"409":{"description":"MirroredFromSource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MirroredFromSourceEncoded"}}}},"503":{"description":"RequestLogUnavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestLogUnavailableEncoded"}}}}},"description":"The journal's position at a moment: the last `sequence` the database had recorded for this tenant at `at` (absent when it held nothing yet), by the database's own clock rather than the service's. Replaying with `upTo=<sequence>` then gives the journal exactly as it stood then; a set of heads taken at one `at` is a consistent cut across journals. Appends nothing: a read of facts already journalled.\n\nRequires `orders:read`.","x-mcp-withheld":"Where a journal stood at a moment, for a consumer cutting journals to replay them as of then; agents read history through the audit trail (`audit_trail`).","x-required-scopes":["orders:read"],"x-example-source":{"origin":"contract"}}}},"components":{"schemas":{"PaymentTerms":{"type":"string","enum":["on-account","prepaid"],"description":"`on-account` — the goods ship regardless of payment (a trade customer on terms); `prepaid` — a parcel cannot ship until the order is paid in full: a manual ship is refused with `OrderUnpaid`, an automatic ship waits at `packed` and runs when the payment that settles the order is recorded"},"StepMode":{"type":"string","enum":["manual","auto"],"description":"`manual` — an explicit command performs the step; `auto` — the step is performed inside the preceding step's commit"},"InvoiceMode":{"type":"string","enum":["manual","auto","off"],"description":"`manual` — an explicit command raises the sales invoice; `auto` — raised inside the shipping commit; `off` — no sales invoices are raised"},"ShortfallPolicy":{"type":"string","enum":["wait","split"],"description":"`wait` — hold the whole order until the shortfall arrives; `split` — ship what there is and backorder the rest"},"AllocationPolicy":{"type":"string","enum":["per-site","single-site-preferred"],"description":"`single-site-preferred` (default) — the first site in the routing order that can fill the whole order ships it all (ties: most stock left), else per-site; `per-site` — each line draws from the sites in order"},"RoutingOrder":{"type":"string","enum":["rank","nearest","stable"],"description":"`rank` (default) — the policy's `priority` list, then `Location.rank`; `nearest` — distance from the ship-to, rank breaking ties and placing what has no point; `stable` — no preference, `loc_` order"},"RoutingDecider":{"type":"string","enum":["manifold","channel"],"description":"`manifold` — allocation decides from the policy below; `channel` — take the location the order's sales channel assigned to each line (the store's own routing of its orders), honouring only sites that channel is bound to; an assignment manifold cannot honour falls back to the policy and is reported"},"LocId":{"type":"string","pattern":"^loc_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A loc-prefixed uuid, e.g. loc_9f8c1c2e-0000-4000-8000-000000000000"},"RoutingPolicyEncoded":{"type":"object","properties":{"order":{"$ref":"#/components/schemas/RoutingOrder"},"decider":{"$ref":"#/components/schemas/RoutingDecider"},"priority":{"type":"array","items":{"$ref":"#/components/schemas/LocId"}}},"additionalProperties":false},"QuoteMode":{"type":"string","enum":["quotes","draft-orders"],"description":"`quotes` — drafts are sent as quotes; `draft-orders` — drafts stay internal draft orders"},"MarginPolicy":{"type":"string","enum":["warn","block"],"description":"`warn` or `block` below the minimum"},"MarginPolicies":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MarginPolicy"}},"WorkflowConfigEncoded":{"type":"object","properties":{"paymentTerms":{"$ref":"#/components/schemas/PaymentTerms"},"pick":{"$ref":"#/components/schemas/StepMode"},"pack":{"$ref":"#/components/schemas/StepMode"},"ship":{"$ref":"#/components/schemas/StepMode"},"invoice":{"$ref":"#/components/schemas/InvoiceMode"},"shortfall":{"$ref":"#/components/schemas/ShortfallPolicy"},"allocation":{"$ref":"#/components/schemas/AllocationPolicy"},"routing":{"$ref":"#/components/schemas/RoutingPolicyEncoded"},"routingByCatalog":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RoutingPolicyEncoded"}},"quoteMode":{"$ref":"#/components/schemas/QuoteMode"},"requireCustomer":{"type":"boolean"},"marginPolicies":{"$ref":"#/components/schemas/MarginPolicies"},"giftCardExpiryMonths":{"type":"integer","minimum":1,"maximum":120}},"additionalProperties":false},"UnauthorizedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["Unauthorized"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"TokenAlreadyUsedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TokenAlreadyUsed"]},"tokenId":{"type":"string"}},"required":["_tag","tokenId"],"additionalProperties":false},"RequestLogUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["RequestLogUnavailable"]},"tokenId":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","tokenId","reason"],"additionalProperties":false},"TenantRequiredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TenantRequired"]},"userId":{"type":"string"}},"required":["_tag","userId"],"additionalProperties":false},"ScopeRequiredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ScopeRequired"]},"required":{"type":"array","items":{"type":"string"}}},"required":["_tag","required"],"additionalProperties":false},"PlatformAdminRequiredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PlatformAdminRequired"]},"userId":{"type":"string"}},"required":["_tag","userId"],"additionalProperties":false},"SubscriptionRequiredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["SubscriptionRequired"]},"status":{"type":"string"}},"required":["_tag","status"],"additionalProperties":false},"MirroredFromSourceEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["MirroredFromSource"]},"source":{"type":"string"}},"required":["_tag","source"],"additionalProperties":false},"LipId":{"type":"string","pattern":"^lip_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A lip-prefixed uuid, e.g. lip_9f8c1c2e-0000-4000-8000-000000000000"},"LinePropertyType":{"type":"string","enum":["text","long-text","number","select","date","checkbox"],"description":"What a line item property holds: `text` — one line; `long-text` — several lines; `number` — a decimal, within `min`/`max` when set; `select` — one of `options`; `date` — a calendar day, `YYYY-MM-DD`; `checkbox` — `Yes` or `No`"},"Tag":{"type":"string","pattern":"^\\S[\\s\\S]*\\S$|^\\S$|^$","minLength":1,"maxLength":256,"description":"one tag: trimmed, 1–256 characters; matched case-insensitively"},"Tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"PrdId":{"type":"string","pattern":"^prd_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A prd-prefixed uuid, e.g. prd_9f8c1c2e-0000-4000-8000-000000000000"},"Sku":{"type":"string","minLength":1,"pattern":"^\\s*[A-Z0-9](?:[A-Z0-9 ._/-]*[A-Z0-9._/-])?\\s*$","description":"A-Z 0-9 space - _ . / (trimmed, uppercased)"},"LinePropertyScopeEncoded":{"type":"object","properties":{"tags":{"$ref":"#/components/schemas/Tags"},"productIds":{"type":"array","items":{"$ref":"#/components/schemas/PrdId"},"maxItems":500},"skus":{"type":"array","items":{"$ref":"#/components/schemas/Sku"},"maxItems":500}},"additionalProperties":false},"LinePropertyDefinitionEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/LipId"},"name":{"type":"string"},"type":{"$ref":"#/components/schemas/LinePropertyType"},"options":{"type":"array","items":{"type":"string"},"maxItems":100},"required":{"type":"boolean"},"maxLength":{"type":"integer","exclusiveMinimum":0,"maximum":1024},"min":{"type":"number"},"max":{"type":"number"},"helpText":{"type":"string","maxLength":300},"appliesTo":{"$ref":"#/components/schemas/LinePropertyScopeEncoded"},"customerVisible":{"type":"boolean"},"archived":{"type":"boolean"}},"required":["id","name","type"],"additionalProperties":false},"LinePropertiesEncoded":{"type":"object","properties":{"allowOther":{"type":"boolean"},"definitions":{"type":"array","items":{"$ref":"#/components/schemas/LinePropertyDefinitionEncoded"},"maxItems":100}},"additionalProperties":false},"ApplicablePropertiesEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku"},"propertyIds":{"type":"array","items":{"$ref":"#/components/schemas/LipId"}}},"required":["sku","propertyIds"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false},"InventoryUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["InventoryUnavailable"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"LinePropertyRemovedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LinePropertyRemoved"]},"propertyId":{"type":"string"},"name":{"type":"string"}},"required":["_tag","propertyId","name"],"additionalProperties":false},"DocumentNumberPrefix":{"type":"string","pattern":"^[A-Za-z0-9-]{0,12}$"},"NumberSeriesEncoded":{"type":"object","properties":{"prefix":{"$ref":"#/components/schemas/DocumentNumberPrefix"},"next":{"type":"integer","exclusiveMinimum":0}},"required":["prefix","next"],"additionalProperties":false},"DocumentNumberingEncoded":{"type":"object","properties":{"orders":{"$ref":"#/components/schemas/NumberSeriesEncoded"},"shipments":{"$ref":"#/components/schemas/NumberSeriesEncoded"},"invoices":{"$ref":"#/components/schemas/NumberSeriesEncoded"},"payments":{"$ref":"#/components/schemas/NumberSeriesEncoded"},"refunds":{"$ref":"#/components/schemas/NumberSeriesEncoded"}},"required":["orders","shipments","invoices","payments","refunds"],"additionalProperties":false},"PsnId":{"type":"string","pattern":"^psn_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A psn-prefixed uuid, e.g. psn_9f8c1c2e-0000-4000-8000-000000000000"},"CmpId":{"type":"string","pattern":"^cmp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cmp-prefixed uuid, e.g. cmp_9f8c1c2e-0000-4000-8000-000000000000"},"OrderBook":{"type":"string","enum":["orders","quotes"],"description":"Which book an order is in: `quotes` (a draft or issued quote, or one withdrawn before it was placed) or `orders` (placed)"},"FulfillmentOrderStatus":{"type":"string","enum":["draft-quote","quote","open","awaiting-stock","partially-shipped","shipped","cancelled"],"description":"Where an order stands: a quote not yet placed (`draft-quote` — prices open; `quote` — issued, prices locked), then `open`, `awaiting-stock`, `partially-shipped`, `shipped`, or `cancelled`"},"BooleanString":{"type":"string","enum":["true","false"],"description":"A boolean as a query string spells it: `true` or `false`."},"OrdId":{"type":"string","pattern":"^ord_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A ord-prefixed uuid, e.g. ord_9f8c1c2e-0000-4000-8000-000000000000"},"ChnId":{"type":"string","pattern":"^chn_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A chn-prefixed uuid, e.g. chn_9f8c1c2e-0000-4000-8000-000000000000"},"OrderSource":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["admin"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["api"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["channel"]},"channelId":{"$ref":"#/components/schemas/ChnId"},"externalId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["kind","channelId","externalId"],"additionalProperties":false}]},"UsrId":{"type":"string","pattern":"^usr_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A usr-prefixed uuid, e.g. usr_9f8c1c2e-0000-4000-8000-000000000000"},"CommissionEarnedOn":{"type":"string","enum":["invoiced","paid","shipped"],"description":"When commission is earned, tenant-wide: `invoiced` (each invoice line, on the invoice's day — the default), `paid` (each payment's share of the order, on its day) or `shipped` (each shipped parcel's units, on the day it shipped)"},"CommissionEarner":{"type":"string","enum":["order-rep","account-manager"],"description":"Who earns an order's commission, tenant-wide: `order-rep` (the order's sales rep — the default) or `account-manager` (the account rep of the order's company, else its customer, when the order is placed; none is `unassigned` and earns nothing)"},"CgrId":{"type":"string","pattern":"^cgr_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cgr-prefixed uuid, e.g. cgr_9f8c1c2e-0000-4000-8000-000000000000"},"CommissionRateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A commission rate in basis points, 0–10 000 (100 bps is 1%)"},"SalesRepSnapshot":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UsrId"},"groupId":{"$ref":"#/components/schemas/CgrId"},"groupName":{"type":"string","minLength":1,"maxLength":80},"baseRateBps":{"$ref":"#/components/schemas/CommissionRateBps"}},"required":["userId","groupId","groupName","baseRateBps"],"additionalProperties":false},"OrderCommission":{"type":"object","properties":{"earnedOn":{"$ref":"#/components/schemas/CommissionEarnedOn"},"earner":{"$ref":"#/components/schemas/CommissionEarner"},"earnedBy":{"$ref":"#/components/schemas/SalesRepSnapshot"}},"required":["earnedOn","earner"],"additionalProperties":false},"PsnId_1":{"type":"string","pattern":"^psn_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A psn-prefixed uuid, e.g. psn_9f8c1c2e-0000-4000-8000-000000000000"},"CmpId_1":{"type":"string","pattern":"^cmp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cmp-prefixed uuid, e.g. cmp_9f8c1c2e-0000-4000-8000-000000000000"},"AdrId":{"type":"string","pattern":"^adr_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A adr-prefixed uuid, e.g. adr_9f8c1c2e-0000-4000-8000-000000000000"},"ClocId":{"type":"string","pattern":"^cloc_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cloc-prefixed uuid, e.g. cloc_9f8c1c2e-0000-4000-8000-000000000000"},"TaxNumber":{"type":"string","minLength":1,"maxLength":60,"pattern":"^\\S(?:.*\\S)?$","description":"A tax registration number (ABN, NZ GST number, VAT number) as the business writes it, up to 60 characters"},"PadId":{"type":"string","pattern":"^pad_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A platform address: a pad-prefixed uuid"},"PostalAddress":{"type":"object","properties":{"firstName":{"type":"string","maxLength":500},"lastName":{"type":"string","maxLength":500},"company":{"type":"string","maxLength":500},"address1":{"type":"string","maxLength":500},"address2":{"type":"string","maxLength":500},"city":{"type":"string","maxLength":500},"province":{"type":"string","maxLength":500},"provinceCode":{"type":"string","maxLength":10},"country":{"type":"string","maxLength":500},"countryCode":{"type":"string","allOf":[{"minLength":2},{"maxLength":2}]},"zip":{"type":"string","maxLength":20},"phone":{"type":"string","maxLength":40},"verifiedAddressId":{"$ref":"#/components/schemas/PadId"}},"additionalProperties":false},"DocumentAddress":{"type":"object","properties":{"id":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"label":{"type":"string"},"address":{"$ref":"#/components/schemas/PostalAddress"}},"required":["id"],"additionalProperties":false,"description":"An address a document was issued with: a company location's as it read at issue, a person's by its version id only."},"DocumentParty":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId"},"companyId":{"$ref":"#/components/schemas/CmpId"},"name":{"type":"string","minLength":1},"paymentTermsDays":{"type":"integer","minimum":0},"taxNumber":{"$ref":"#/components/schemas/TaxNumber"},"shipTo":{"$ref":"#/components/schemas/DocumentAddress"},"billTo":{"$ref":"#/components/schemas/DocumentAddress"}},"additionalProperties":false,"description":"The customer or supplier a document is between, as named at issue: ids, the company's name, terms and tax number, the addresses used."},"CatId":{"type":"string","pattern":"^cat_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cat-prefixed uuid, e.g. cat_9f8c1c2e-0000-4000-8000-000000000000"},"Currency":{"type":"string"},"IsoDay":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"A calendar day, e.g. 2026-03-31"},"FxCaptureSource":{"type":"string","enum":["rba","rbnz","ecb","boe","fed","boc","norges-bank","nationalbanken","actual","same"],"description":"Where a captured rate came from: a central bank (`rba`, `rbnz`, `ecb`, `boe`, `fed`, `boc`, `norges-bank`, `nationalbanken`), `actual` (the counterparty's own figure for what the money became) or `same` (the document is in the home currency, rate 1)"},"Currency_1":{"type":"string"},"FxCapture":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency"},"home":{"$ref":"#/components/schemas/Currency"},"rate":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"rateDate":{"$ref":"#/components/schemas/IsoDay"},"source":{"$ref":"#/components/schemas/FxCaptureSource"},"via":{"$ref":"#/components/schemas/Currency_1"}},"required":["currency","home","rate","rateDate","source"],"additionalProperties":false,"description":"The rate a money fact was booked at, captured when it committed: `rate` units of `home` per one unit of the document's `currency`, from `source` for `rateDate` (`via` a cross); `same` is a document in the home currency, rate 1"},"PriceConvention":{"type":"string","enum":["inclusive","exclusive"],"description":"Whether a price already includes tax: `inclusive` (tax is inside the price) or `exclusive` (tax is added on top)"},"TaxTreatment":{"type":"string","enum":["domestic","export","destination"],"description":"Where the goods go, for tax: `domestic` (the tenant's country), `export` (outside it: no tax) or `destination` (another EU member state, at that state's rate)"},"CountryCode":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO 3166-1 alpha-2, upper case"},"TaxClass":{"type":"string","enum":["standard","reduced","zero-rated","exempt","out-of-scope"],"description":"What a SKU is, for tax: `standard` (the standard rate), `reduced` (a reduced rate, e.g. UK 5 %), `zero-rated` (taxable at nothing — AU GST-free, UK/NZ zero-rated), `exempt` (input-taxed / exempt) or `out-of-scope` (not a supply: gift cards, deposits, duties)"},"ChargeTaxClass":{"anyOf":[{"$ref":"#/components/schemas/TaxClass"},{"type":"string","enum":["follows-goods"]}],"description":"How a charge (shipping, a fee) is taxed: at a fixed `TaxClass`, or `follows-goods` — split across the order's lines' classes in proportion to their net (Australia: delivering GST-free goods is GST-free)"},"TaxSource":{"type":"string","enum":["manifold","channel","provider"],"description":"Who worked a tax entry out: `manifold` (the built-in calculator), `channel` (what the sales channel charged, as given) or `provider` (an external tax service, as given)"},"TaxEntry":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"LineTax":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/TaxEntry"},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false},"ChargeTaxBasis":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["calculated"]},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"class":{"$ref":"#/components/schemas/ChargeTaxClass"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["_tag","treatment","country","class","rateBps"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["given"]},"tax":{"$ref":"#/components/schemas/LineTax"}},"required":["_tag","tax"],"additionalProperties":false}],"description":"How a charge is taxed: `calculated` (a fixed class at its rate, or `follows-goods` — split across the lines' classes by their net) or `given` (as the channel charged it)"},"ShippingMethod":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","minLength":1,"maxLength":200}},"required":["title"],"additionalProperties":false},"ChqId":{"type":"string","pattern":"^chq_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A chq-prefixed uuid, e.g. chq_9f8c1c2e-0000-4000-8000-000000000000"},"CurrencyCode":{"type":"string"},"EtaDays":{"type":"object","properties":{"min":{"type":"integer","minimum":0},"max":{"type":"integer","minimum":0}},"required":["min","max"],"additionalProperties":false},"DeliveryWindow":{"type":"object","properties":{"earliest":{"$ref":"#/components/schemas/IsoDay"},"latest":{"$ref":"#/components/schemas/IsoDay"}},"required":["earliest","latest"],"additionalProperties":false},"CarId":{"type":"string","pattern":"^car_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A car-prefixed uuid, e.g. car_9f8c1c2e-0000-4000-8000-000000000000"},"CarrierService":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"carrier":{"type":"string","minLength":1,"maxLength":200}},"required":["code"],"additionalProperties":false},"CheckoutOffer":{"type":"object","properties":{"quoteId":{"$ref":"#/components/schemas/ChqId"},"quotedAt":{"type":"string"},"rates":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"},"priceCents":{"type":"integer","minimum":0},"carrierPriceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"etaDays":{"$ref":"#/components/schemas/EtaDays"},"delivery":{"$ref":"#/components/schemas/DeliveryWindow"},"carrierAccountId":{"$ref":"#/components/schemas/CarId"},"service":{"$ref":"#/components/schemas/CarrierService"}},"required":["code","title","priceCents","currency"],"additionalProperties":false},"maxItems":200},"fallback":{"type":"boolean"},"estimated":{"type":"boolean"}},"required":["quoteId","quotedAt","rates","fallback","estimated"],"additionalProperties":false},"CarId_1":{"type":"string","pattern":"^car_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A car-prefixed uuid, e.g. car_9f8c1c2e-0000-4000-8000-000000000000"},"CarrierService_1":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"carrier":{"type":"string","minLength":1,"maxLength":200}},"required":["code"],"additionalProperties":false},"EtaDays_1":{"type":"object","properties":{"min":{"type":"integer","minimum":0},"max":{"type":"integer","minimum":0}},"required":["min","max"],"additionalProperties":false},"ChosenRate":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":400},"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"title":{"type":"string"},"service":{"$ref":"#/components/schemas/CarrierService_1"},"priceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"etaDays":{"$ref":"#/components/schemas/EtaDays_1"},"quotedAt":{"type":"string"},"estimated":{"type":"boolean"}},"required":["code","carrierAccountId","title","service","priceCents","currency","quotedAt","estimated"],"additionalProperties":false},"PsnId_2":{"type":"string","pattern":"^psn_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A psn-prefixed uuid, e.g. psn_9f8c1c2e-0000-4000-8000-000000000000"},"CmpId_2":{"type":"string","pattern":"^cmp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cmp-prefixed uuid, e.g. cmp_9f8c1c2e-0000-4000-8000-000000000000"},"TaxNumber_1":{"type":"string","minLength":1,"maxLength":60,"pattern":"^\\S(?:.*\\S)?$","description":"A tax registration number (ABN, NZ GST number, VAT number) as the business writes it, up to 60 characters"},"DocumentAddress_1":{"type":"object","properties":{"id":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"label":{"type":"string"},"address":{"$ref":"#/components/schemas/PostalAddress"}},"required":["id"],"additionalProperties":false,"description":"An address a document was issued with: a company location's as it read at issue, a person's by its version id only."},"DocumentAddress_2":{"type":"object","properties":{"id":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"label":{"type":"string"},"address":{"$ref":"#/components/schemas/PostalAddress"}},"required":["id"],"additionalProperties":false,"description":"An address a document was issued with: a company location's as it read at issue, a person's by its version id only."},"DocumentParty_1":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId_2"},"companyId":{"$ref":"#/components/schemas/CmpId_2"},"name":{"type":"string","minLength":1},"paymentTermsDays":{"type":"integer","minimum":0},"taxNumber":{"$ref":"#/components/schemas/TaxNumber_1"},"shipTo":{"$ref":"#/components/schemas/DocumentAddress_1"},"billTo":{"$ref":"#/components/schemas/DocumentAddress_2"}},"additionalProperties":false,"description":"The customer or supplier a document is between, as named at issue: ids, the company's name, terms and tax number, the addresses used."},"LinId":{"type":"string","pattern":"^lin_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A lin-prefixed uuid, e.g. lin_9f8c1c2e-0000-4000-8000-000000000000"},"Sku_1":{"type":"string","minLength":1,"pattern":"^\\s*[A-Z0-9](?:[A-Z0-9 ._/-]*[A-Z0-9._/-])?\\s*$","description":"A-Z 0-9 space - _ . / (trimmed, uppercased)"},"LineName":{"type":"string","minLength":1,"maxLength":300},"ItemKind":{"type":"string","enum":["stock","service","gift-card"],"description":"`stock` — a physical good held at a location; `service`, `gift-card` — sold, never held"},"DiscountBps":{"type":"integer","minimum":0,"maximum":10000,"description":"Percent off in basis points (1000 = 10%), 0–10000"},"LineAttribute":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string","maxLength":1024}},"required":["name","value"],"additionalProperties":false},"DiscountKind":{"type":"string","enum":["percent","amount"],"description":"How a discount is kept: `percent` (of what it comes off, re-taken as that changes) or a fixed `amount`"},"DiscountBps_1":{"type":"integer","minimum":0,"maximum":10000,"description":"Percent off in basis points (1000 = 10%), 0–10000"},"DocumentShipping":{"type":"object","properties":{"shippingCents":{"type":"integer","minimum":0},"shippingDiscountCents":{"type":"integer","minimum":0},"tax":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false}},"required":["shippingCents","shippingDiscountCents","tax"],"additionalProperties":false,"description":"The shipping a document bills, with its tax."},"TaxBreakdownRow":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"exempt":{"type":"boolean"},"taxableCents":{"type":"integer"},"taxCents":{"type":"integer"}},"required":["class","treatment","country","rateBps","exempt","taxableCents","taxCents"],"additionalProperties":false,"description":"One row of a document's tax breakdown: the class, treatment, country, rate and exemption, with the taxable amount and its tax"},"DocumentTax":{"type":"object","properties":{"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"},"breakdown":{"type":"array","items":{"$ref":"#/components/schemas/TaxBreakdownRow"}}},"required":["netCents","taxCents","grossCents","breakdown"],"additionalProperties":false},"ItemKind_1":{"type":"string","enum":["stock","service","gift-card"],"description":"`stock` — a physical good held at a location; `service`, `gift-card` — sold, never held"},"DiscountKind_1":{"type":"string","enum":["percent","amount"],"description":"How a discount is kept: `percent` (of what it comes off, re-taken as that changes) or a fixed `amount`"},"DiscountBps_2":{"type":"integer","minimum":0,"maximum":10000,"description":"Percent off in basis points (1000 = 10%), 0–10000"},"KitComponent":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku_1"},"quantity":{"type":"integer","exclusiveMinimum":0}},"required":["sku","quantity"],"additionalProperties":false},"AppId":{"type":"string","pattern":"^app_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A app-prefixed uuid, e.g. app_9f8c1c2e-0000-4000-8000-000000000000"},"InsId":{"type":"string","pattern":"^ins_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A ins-prefixed uuid, e.g. ins_9f8c1c2e-0000-4000-8000-000000000000"},"CplId":{"type":"string","pattern":"^cpl_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cpl-prefixed uuid, e.g. cpl_9f8c1c2e-0000-4000-8000-000000000000"},"Actor":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["user"]},"id":{"$ref":"#/components/schemas/UsrId"},"impersonatedBy":{"type":"string","minLength":1},"viaPartner":{"type":"string","minLength":1}},"required":["_tag","id"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["system"]},"id":{"type":"string","minLength":1}},"required":["_tag","id"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["app"]},"id":{"$ref":"#/components/schemas/AppId"},"installationId":{"$ref":"#/components/schemas/InsId"}},"required":["_tag","id","installationId"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["customer"]},"id":{"$ref":"#/components/schemas/CplId"}},"required":["_tag","id"],"additionalProperties":false}]},"TaxPartRule":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"weight":{"type":"integer","minimum":0}},"required":["class","rateBps","weight"],"additionalProperties":false,"description":"One class a line is taxed at, as decided at pricing: the class, its rate then, and its weight in the line (a kit, one per component)"},"LineTaxBasis":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["calculated"]},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"parts":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/TaxPartRule"}],"minItems":1,"items":{"$ref":"#/components/schemas/TaxPartRule"}},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["_tag","treatment","country","parts"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["given"]},"tax":{"$ref":"#/components/schemas/LineTax"}},"required":["_tag","tax"],"additionalProperties":false}],"description":"How a line is taxed: `calculated` (treatment, ship-to country, each class with its rate and weight, the exempt buyer — recomputed whenever the line's amount moves) or `given` (the tax a channel charged, as it charged it)"},"OrderRuleBreach":{"type":"string","enum":["below-minimum","not-in-step"],"description":"How a line's quantity breaks its SKU's order rules: `below-minimum` (fewer than `minQuantity`) or `not-in-step` (not `minQuantity + k × step`)"},"CatId_1":{"type":"string","pattern":"^cat_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cat-prefixed uuid, e.g. cat_9f8c1c2e-0000-4000-8000-000000000000"},"GroupRate":{"type":"object","properties":{"groupId":{"$ref":"#/components/schemas/CgrId"},"rateBps":{"$ref":"#/components/schemas/CommissionRateBps"}},"required":["groupId","rateBps"],"additionalProperties":false},"CommissionRule":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["uncommissionable"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["rates"]},"groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupRate"},"minItems":1,"maxItems":100}},"required":["_tag","groups"],"additionalProperties":false}]},"LineCommission":{"type":"object","properties":{"catalogId":{"$ref":"#/components/schemas/CatId_1"},"rule":{"$ref":"#/components/schemas/CommissionRule"}},"additionalProperties":false},"OrderLineEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"name":{"$ref":"#/components/schemas/LineName"},"ordered":{"type":"integer","minimum":0},"removed":{"type":"boolean"},"kind":{"$ref":"#/components/schemas/ItemKind_1"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32},"externalId":{"type":"string","minLength":1},"catalogId":{"$ref":"#/components/schemas/CatId"},"outsideCatalogs":{"type":"boolean","enum":[true]},"assignedLocationId":{"$ref":"#/components/schemas/LocId"},"discountCents":{"type":"integer","minimum":0},"discountKind":{"$ref":"#/components/schemas/DiscountKind_1"},"discountBps":{"$ref":"#/components/schemas/DiscountBps_2"},"discountReason":{"type":"string","maxLength":200},"components":{"type":"array","items":{"$ref":"#/components/schemas/KitComponent"},"minItems":1},"allocated":{"type":"integer","minimum":0},"picked":{"type":"integer","minimum":0},"packed":{"type":"integer","minimum":0},"dispatched":{"type":"integer","minimum":0},"invoiced":{"type":"integer","minimum":0},"returned":{"type":"integer","minimum":0},"unitPriceCents":{"type":"integer","minimum":0},"listPriceCents":{"type":"integer","minimum":0},"priceOverride":{"type":"object","properties":{"fromCents":{"type":"integer","minimum":0},"by":{"$ref":"#/components/schemas/Actor"},"at":{"type":"string"},"reason":{"type":"string","maxLength":500}},"required":["by","at"],"additionalProperties":false},"inclusive":{"type":"boolean"},"taxBasis":{"$ref":"#/components/schemas/LineTaxBasis"},"orderDiscountCents":{"type":"integer","minimum":0},"tax":{"$ref":"#/components/schemas/LineTax"},"ruleBreach":{"type":"object","properties":{"breach":{"$ref":"#/components/schemas/OrderRuleBreach"},"minQuantity":{"type":"integer","exclusiveMinimum":0},"step":{"type":"integer","exclusiveMinimum":0}},"required":["breach","minQuantity","step"],"additionalProperties":false},"commission":{"$ref":"#/components/schemas/LineCommission"}},"required":["id","sku","name","ordered","inclusive","taxBasis","orderDiscountCents","tax"],"additionalProperties":false},"PaymentTermsSource":{"type":"string","enum":["order","customer","tenant","changed"],"description":"Who decided an order's payment terms: `order` — the creator said so (a channel, the API, the admin); `customer` — the customer's company is on trade terms, so it ships on account; `tenant` — the tenant's default; `changed` — someone changed them on the order afterwards"},"ShpId":{"type":"string","pattern":"^shp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A shp-prefixed uuid, e.g. shp_9f8c1c2e-0000-4000-8000-000000000000"},"ShipmentStatus":{"type":"string","enum":["pending","picked","packed","shipped","cancelled"],"description":"A parcel's life: `pending` (created) → `picked` → `packed` → `shipped`, or `cancelled`"},"SerialNumber":{"type":"string","minLength":1,"maxLength":64},"BatchNumber":{"type":"string","minLength":1,"maxLength":64},"DspId":{"type":"string","pattern":"^dsp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A dsp-prefixed uuid, e.g. dsp_9f8c1c2e-0000-4000-8000-000000000000"},"BatchNumber_1":{"type":"string","minLength":1,"maxLength":64},"DspId_1":{"type":"string","pattern":"^dsp_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A dsp-prefixed uuid, e.g. dsp_9f8c1c2e-0000-4000-8000-000000000000"},"ShipmentPart":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku_1"},"quantity":{"type":"integer","exclusiveMinimum":0},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"}},"batchNumber":{"$ref":"#/components/schemas/BatchNumber_1"},"dispatchId":{"$ref":"#/components/schemas/DspId_1"}},"required":["sku","quantity"],"additionalProperties":false},"ShipmentLineEncoded":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"quantity":{"type":"integer","exclusiveMinimum":0},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"}},"batchNumber":{"$ref":"#/components/schemas/BatchNumber"},"dispatchId":{"$ref":"#/components/schemas/DspId"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/ShipmentPart"}}},"required":["lineId","sku","quantity"],"additionalProperties":false},"Packaging":{"type":"string","enum":["carton","satchel","envelope","bag","pallet","item"],"description":"What a parcel is packed in; `item` is the goods in their own packaging"},"BoxId":{"type":"string","pattern":"^box_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A box-prefixed uuid, e.g. box_9f8c1c2e-0000-4000-8000-000000000000"},"Carton":{"type":"object","properties":{"packaging":{"$ref":"#/components/schemas/Packaging"},"boxId":{"$ref":"#/components/schemas/BoxId"},"weightGrams":{"type":"integer","exclusiveMinimum":0},"size":{"type":"object","properties":{"lengthMm":{"type":"integer","exclusiveMinimum":0},"widthMm":{"type":"integer","exclusiveMinimum":0},"heightMm":{"type":"integer","exclusiveMinimum":0}},"required":["lengthMm","widthMm","heightMm"],"additionalProperties":false}},"additionalProperties":false},"ShipmentEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/ShpId"},"number":{"type":"string","minLength":1},"reference":{"type":"string","minLength":1},"status":{"$ref":"#/components/schemas/ShipmentStatus"},"locationId":{"$ref":"#/components/schemas/LocId"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ShipmentLineEncoded"}},"cartons":{"type":"array","items":{"$ref":"#/components/schemas/Carton"}},"carrier":{"type":"string","minLength":1},"service":{"type":"string","minLength":1},"trackingNumber":{"type":"string","minLength":1},"trackingUrl":{"type":"string","minLength":1},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","number","reference","status","lines","createdAt","updatedAt"],"additionalProperties":false},"InvId":{"type":"string","pattern":"^inv_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A inv-prefixed uuid, e.g. inv_9f8c1c2e-0000-4000-8000-000000000000"},"SalesInvoiceLineEncoded":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"kind":{"$ref":"#/components/schemas/ItemKind_1"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"discountCents":{"type":"integer","minimum":0},"tax":{"$ref":"#/components/schemas/LineTax"},"rateMoved":{"type":"boolean"}},"required":["lineId","sku","quantity","unitPriceCents","discountCents","tax"],"additionalProperties":false},"DocumentShipping_1":{"type":"object","properties":{"shippingCents":{"type":"integer","minimum":0},"shippingDiscountCents":{"type":"integer","minimum":0},"tax":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false}},"required":["shippingCents","shippingDiscountCents","tax"],"additionalProperties":false,"description":"The shipping a document bills, with its tax."},"DocumentTax_1":{"type":"object","properties":{"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"},"breakdown":{"type":"array","items":{"$ref":"#/components/schemas/TaxBreakdownRow"}}},"required":["netCents","taxCents","grossCents","breakdown"],"additionalProperties":false},"TaxDocumentKind":{"type":"string","enum":["tax-invoice","invoice","adjustment-note","credit-note"],"description":"What a sales document is titled: a registered seller's `tax-invoice` / `adjustment-note`, an unregistered seller's `invoice` / `credit-note`"},"TaxRegion":{"type":"string","enum":["AU-GST","NZ-GST","UK-VAT","EU-VAT","none"],"description":"The tax system a tenant is registered under: `AU-GST`, `NZ-GST`, `UK-VAT`, `EU-VAT` (in the member state the settings name) or `none` (no tax is charged)"},"TaxDocumentHeader":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/TaxDocumentKind"},"region":{"$ref":"#/components/schemas/TaxRegion"},"sellerTaxNumber":{"$ref":"#/components/schemas/TaxNumber"},"buyerIdentityRequired":{"type":"boolean"},"presentation":{"$ref":"#/components/schemas/PriceConvention"}},"required":["kind","region","buyerIdentityRequired","presentation"],"additionalProperties":false,"description":"A document's tax particulars: its title, the region, the seller's tax number, whether the buyer's identity must appear (AU, A$1,000 or more) and the convention it is presented in"},"SalesInvoiceEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/InvId"},"number":{"type":"string","minLength":1},"customerPo":{"type":"string"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/SalesInvoiceLineEncoded"}},"shipping":{"$ref":"#/components/schemas/DocumentShipping_1"},"tax":{"$ref":"#/components/schemas/DocumentTax_1"},"header":{"$ref":"#/components/schemas/TaxDocumentHeader"},"totalCents":{"type":"integer","minimum":0},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"issuedAt":{"type":"string"}},"required":["id","number","lines","tax","header","totalCents","issuedAt"],"additionalProperties":false},"RfdId":{"type":"string","pattern":"^rfd_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A rfd-prefixed uuid, e.g. rfd_9f8c1c2e-0000-4000-8000-000000000000"},"ReturnCondition":{"type":"string","enum":["sellable","damaged"],"description":"Where returned units land: `sellable` — back on sale; `damaged` — the damaged bucket"},"BatchNumber_2":{"type":"string","minLength":1,"maxLength":64},"RefundPart":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku_1"},"quantity":{"type":"integer","exclusiveMinimum":0},"condition":{"$ref":"#/components/schemas/ReturnCondition"},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"}},"batchNumber":{"$ref":"#/components/schemas/BatchNumber_2"}},"required":["sku","quantity","condition"],"additionalProperties":false},"RefundLineEncoded":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"quantity":{"type":"integer","exclusiveMinimum":0},"restock":{"type":"boolean"},"condition":{"$ref":"#/components/schemas/ReturnCondition"},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"}},"batchNumber":{"$ref":"#/components/schemas/BatchNumber"},"returnReference":{"type":"string","minLength":1},"parts":{"type":"array","items":{"$ref":"#/components/schemas/RefundPart"}},"tax":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false}},"required":["lineId","sku","quantity"],"additionalProperties":false},"TenderHolderId":{"anyOf":[{"$ref":"#/components/schemas/PsnId"},{"$ref":"#/components/schemas/CmpId"}],"description":"A CRM person (`psn_…`) or company (`cmp_…`)"},"GcdId":{"type":"string","pattern":"^gcd_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A gcd-prefixed uuid, e.g. gcd_9f8c1c2e-0000-4000-8000-000000000000"},"GiftCardLast4":{"type":"string","pattern":"^[0-9A-HJKMNP-TV-Z]{4}$","description":"The last four characters of a gift card's code"},"RefundTender":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["money"]},"amountCents":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","amountCents"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["store-credit"]},"holderId":{"$ref":"#/components/schemas/TenderHolderId"},"currency":{"$ref":"#/components/schemas/Currency"},"amountCents":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","holderId","currency","amountCents"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["gift-card"]},"giftCardId":{"$ref":"#/components/schemas/GcdId"},"last4":{"$ref":"#/components/schemas/GiftCardLast4"},"amountCents":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","giftCardId","last4","amountCents"],"additionalProperties":false}]},"CrnId":{"type":"string","pattern":"^crn_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A crn-prefixed uuid, e.g. crn_9f8c1c2e-0000-4000-8000-000000000000"},"OrderRefundEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/RfdId"},"number":{"type":"string","minLength":1},"lines":{"type":"array","items":{"$ref":"#/components/schemas/RefundLineEncoded"}},"amountCents":{"type":"integer","minimum":0},"tenders":{"type":"array","items":{"$ref":"#/components/schemas/RefundTender"}},"tax":{"$ref":"#/components/schemas/DocumentTax_1"},"header":{"$ref":"#/components/schemas/TaxDocumentHeader"},"creditNoteId":{"$ref":"#/components/schemas/CrnId"},"reason":{"type":"string","maxLength":500},"refundedAt":{"type":"string"}},"required":["id","number","lines","amountCents","tax","header","refundedAt"],"additionalProperties":false},"PayId":{"type":"string","pattern":"^pay_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A pay-prefixed uuid, e.g. pay_9f8c1c2e-0000-4000-8000-000000000000"},"PaymentMethod":{"type":"string","enum":["card","cash","bank-transfer","store-credit","gift-card","gateway","other"],"description":"How money arrived: taken by the merchant, a balance drawn, or a channel's `gateway`"},"PaymentTender":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["store-credit"]},"holderId":{"$ref":"#/components/schemas/TenderHolderId"},"currency":{"$ref":"#/components/schemas/Currency"}},"required":["_tag","holderId","currency"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["gift-card"]},"giftCardId":{"$ref":"#/components/schemas/GcdId"},"last4":{"$ref":"#/components/schemas/GiftCardLast4"}},"required":["_tag","giftCardId","last4"],"additionalProperties":false}]},"PaymentProvider":{"type":"string","enum":["channel","paypal","stripe","other"],"description":"The payment provider that moved the money, each settling to a clearing account of its own: `channel` (the sales channel's own payments, as its app reports them), `paypal`, `stripe`, or `other` for a gateway without one yet. Absent on a payment taken by hand."},"PcolId":{"type":"string","pattern":"^pcol_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A pcol-prefixed uuid, e.g. pcol_9f8c1c2e-0000-4000-8000-000000000000"},"FxCapture_1":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency"},"home":{"$ref":"#/components/schemas/Currency"},"rate":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"rateDate":{"$ref":"#/components/schemas/IsoDay"},"source":{"$ref":"#/components/schemas/FxCaptureSource"},"via":{"$ref":"#/components/schemas/Currency"}},"required":["currency","home","rate","rateDate","source"],"additionalProperties":false,"description":"The rate a money fact was booked at, captured when it committed: `rate` units of `home` per one unit of the document's `currency`, from `source` for `rateDate` (`via` a cross); `same` is a document in the home currency, rate 1"},"OrderPaymentEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PayId"},"number":{"type":"string","minLength":1},"amountCents":{"type":"integer","exclusiveMinimum":0},"method":{"$ref":"#/components/schemas/PaymentMethod"},"tender":{"$ref":"#/components/schemas/PaymentTender"},"gateway":{"type":"string","minLength":1},"reference":{"type":"string","minLength":1},"provider":{"$ref":"#/components/schemas/PaymentProvider"},"providerTransactionId":{"type":"string","minLength":1},"collectionId":{"$ref":"#/components/schemas/PcolId"},"note":{"type":"string","maxLength":500},"receivedAt":{"type":"string"},"recordedAt":{"type":"string"},"fx":{"$ref":"#/components/schemas/FxCapture_1"}},"required":["id","number","amountCents","method","receivedAt","recordedAt","fx"],"additionalProperties":false},"NoteId":{"type":"string","pattern":"^note_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A note-prefixed uuid, e.g. note_9f8c1c2e-0000-4000-8000-000000000000"},"OrderNoteBodyEncoded":{"type":"string"},"Actor_1":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["user"]},"id":{"$ref":"#/components/schemas/UsrId"},"impersonatedBy":{"type":"string","minLength":1},"viaPartner":{"type":"string","minLength":1}},"required":["_tag","id"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["system"]},"id":{"type":"string","minLength":1}},"required":["_tag","id"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["app"]},"id":{"$ref":"#/components/schemas/AppId"},"installationId":{"$ref":"#/components/schemas/InsId"}},"required":["_tag","id","installationId"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["customer"]},"id":{"$ref":"#/components/schemas/CplId"}},"required":["_tag","id"],"additionalProperties":false}]},"OrderNoteEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/NoteId"},"reference":{"type":"string","minLength":1},"body":{"$ref":"#/components/schemas/OrderNoteBodyEncoded"},"by":{"$ref":"#/components/schemas/Actor_1"},"postedAt":{"type":"string"}},"required":["id","reference","body","by","postedAt"],"additionalProperties":false},"VcsId":{"type":"string","pattern":"^vcs_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A vcs-prefixed uuid, e.g. vcs_9f8c1c2e-0000-4000-8000-000000000000"},"OrderTranscriptEncoded":{"type":"object","properties":{"sessionId":{"$ref":"#/components/schemas/VcsId"},"personId":{"$ref":"#/components/schemas/PsnId"},"utterances":{"type":"integer","minimum":0},"audioSeconds":{"type":"integer","minimum":0},"bytes":{"type":"integer","minimum":0},"startedAt":{"type":"string"},"by":{"$ref":"#/components/schemas/Actor_1"},"attachedAt":{"type":"string"},"erasedAt":{"type":"string"}},"required":["sessionId","utterances","audioSeconds","bytes","startedAt","by","attachedAt"],"additionalProperties":false},"LineTaxBasis_1":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["calculated"]},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"parts":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/TaxPartRule"}],"minItems":1,"items":{"$ref":"#/components/schemas/TaxPartRule"}},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["_tag","treatment","country","parts"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["given"]},"tax":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false}},"required":["_tag","tax"],"additionalProperties":false}],"description":"How a line is taxed: `calculated` (treatment, ship-to country, each class with its rate and weight, the exempt buyer — recomputed whenever the line's amount moves) or `given` (the tax a channel charged, as it charged it)"},"OrderCharges":{"type":"object","properties":{"shippingCents":{"type":"integer","minimum":0},"shippingDiscountCents":{"type":"integer","minimum":0},"discountCents":{"type":"integer","minimum":0},"discountKind":{"$ref":"#/components/schemas/DiscountKind_1"},"discountBps":{"$ref":"#/components/schemas/DiscountBps_2"}},"additionalProperties":false},"ChargeTaxBasis_1":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["calculated"]},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"class":{"$ref":"#/components/schemas/ChargeTaxClass"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["_tag","treatment","country","class","rateBps"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["given"]},"tax":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false}},"required":["_tag","tax"],"additionalProperties":false}],"description":"How a charge is taxed: `calculated` (a fixed class at its rate, or `follows-goods` — split across the lines' classes by their net) or `given` (as the channel charged it)"},"DiscountTarget":{"type":"string","enum":["lines","shipping","order"],"description":"What a discount application targeted: the `lines` it was entitled to, the `shipping`, or the `order` as a whole"},"OrderDiscount":{"type":"object","properties":{"target":{"$ref":"#/components/schemas/DiscountTarget"},"reason":{"type":"string","maxLength":200},"amountCents":{"type":"integer","minimum":0}},"required":["target","amountCents"],"additionalProperties":false},"ShippingMethod_1":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"code":{"type":"string","minLength":1,"maxLength":200}},"required":["title"],"additionalProperties":false},"CarrierService_2":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"carrier":{"type":"string","minLength":1,"maxLength":200}},"required":["code"],"additionalProperties":false},"EtaDays_2":{"type":"object","properties":{"min":{"type":"integer","minimum":0},"max":{"type":"integer","minimum":0}},"required":["min","max"],"additionalProperties":false},"ChosenRate_1":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":400},"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"title":{"type":"string"},"service":{"$ref":"#/components/schemas/CarrierService_2"},"priceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"etaDays":{"$ref":"#/components/schemas/EtaDays_2"},"quotedAt":{"type":"string"},"estimated":{"type":"boolean"}},"required":["code","carrierAccountId","title","service","priceCents","currency","quotedAt","estimated"],"additionalProperties":false},"PostalAddress_1":{"type":"object","properties":{"firstName":{"type":"string","maxLength":500},"lastName":{"type":"string","maxLength":500},"company":{"type":"string","maxLength":500},"address1":{"type":"string","maxLength":500},"address2":{"type":"string","maxLength":500},"city":{"type":"string","maxLength":500},"province":{"type":"string","maxLength":500},"provinceCode":{"type":"string","maxLength":10},"country":{"type":"string","maxLength":500},"countryCode":{"type":"string","allOf":[{"minLength":2},{"maxLength":2}]},"zip":{"type":"string","maxLength":20},"phone":{"type":"string","maxLength":40},"verifiedAddressId":{"$ref":"#/components/schemas/PadId"}},"additionalProperties":false},"DocumentAddress_3":{"type":"object","properties":{"id":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"label":{"type":"string"},"address":{"$ref":"#/components/schemas/PostalAddress_1"}},"required":["id"],"additionalProperties":false,"description":"An address a document was issued with: a company location's as it read at issue, a person's by its version id only."},"CatId_2":{"type":"string","pattern":"^cat_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cat-prefixed uuid, e.g. cat_9f8c1c2e-0000-4000-8000-000000000000"},"OrderEditedChange":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["line-added"]},"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"name":{"$ref":"#/components/schemas/LineName"},"kind":{"$ref":"#/components/schemas/ItemKind_1"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"listPriceCents":{"type":"integer","minimum":0},"catalogId":{"$ref":"#/components/schemas/CatId"},"outsideCatalogs":{"type":"boolean","enum":[true]},"priceReason":{"type":"string","maxLength":500},"components":{"type":"array","items":{"$ref":"#/components/schemas/KitComponent"},"minItems":1},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32},"externalId":{"type":"string","minLength":1},"discountCents":{"type":"integer","minimum":0},"discountBps":{"$ref":"#/components/schemas/DiscountBps_2"},"discountReason":{"type":"string","maxLength":200},"inclusive":{"type":"boolean"},"taxBasis":{"$ref":"#/components/schemas/LineTaxBasis"},"ruleBreach":{"type":"object","properties":{"breach":{"$ref":"#/components/schemas/OrderRuleBreach"},"minQuantity":{"type":"integer","exclusiveMinimum":0},"step":{"type":"integer","exclusiveMinimum":0}},"required":["breach","minQuantity","step"],"additionalProperties":false},"commission":{"$ref":"#/components/schemas/LineCommission"}},"required":["_tag","lineId","sku","name","quantity","inclusive","taxBasis"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["line-removed"]},"lineId":{"$ref":"#/components/schemas/LinId"}},"required":["_tag","lineId"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["quantity-changed"]},"lineId":{"$ref":"#/components/schemas/LinId"},"quantity":{"type":"integer","exclusiveMinimum":0},"taxBasis":{"$ref":"#/components/schemas/LineTaxBasis_1"},"ruleBreach":{"type":"object","properties":{"breach":{"$ref":"#/components/schemas/OrderRuleBreach"},"minQuantity":{"type":"integer","exclusiveMinimum":0},"step":{"type":"integer","exclusiveMinimum":0}},"required":["breach","minQuantity","step"],"additionalProperties":false}},"required":["_tag","lineId","quantity"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["line-discounted"]},"lineId":{"$ref":"#/components/schemas/LinId"},"discountCents":{"type":"integer","minimum":0},"discountBps":{"$ref":"#/components/schemas/DiscountBps_2"},"discountReason":{"type":"string","maxLength":200},"taxBasis":{"$ref":"#/components/schemas/LineTaxBasis_1"}},"required":["_tag","lineId","discountCents"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["charges-changed"]},"charges":{"$ref":"#/components/schemas/OrderCharges"},"shippingTaxBasis":{"$ref":"#/components/schemas/ChargeTaxBasis_1"}},"required":["_tag","charges"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["discounts-changed"]},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderDiscount"}}},"required":["_tag","discounts"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["shipping-method-changed"]},"shippingMethod":{"$ref":"#/components/schemas/ShippingMethod_1"}},"required":["_tag","shippingMethod"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["shipping-rate-chosen"]},"rate":{"$ref":"#/components/schemas/ChosenRate_1"}},"required":["_tag","rate"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["ship-to-changed"]},"shipTo":{"$ref":"#/components/schemas/DocumentAddress_3"}},"required":["_tag","shipTo"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["customer-changed"]},"customer":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId_1"},"companyId":{"$ref":"#/components/schemas/CmpId_1"},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"billingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]}},"additionalProperties":false},"party":{"$ref":"#/components/schemas/DocumentParty"},"catalogIds":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/CatId"}],"minItems":1,"items":{"$ref":"#/components/schemas/CatId"}},"repriced":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"listPriceCents":{"type":"integer","minimum":0},"catalogId":{"$ref":"#/components/schemas/CatId_2"},"inclusive":{"type":"boolean"},"taxBasis":{"$ref":"#/components/schemas/LineTaxBasis_1"}},"required":["lineId","inclusive","taxBasis"],"additionalProperties":false}}},"required":["_tag","party"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment-location-changed"]},"locationId":{"$ref":"#/components/schemas/LocId"}},"required":["_tag","locationId"],"additionalProperties":false}]},"OrderEditEncoded":{"type":"object","properties":{"editId":{"type":"string","minLength":1},"changes":{"type":"array","items":{"$ref":"#/components/schemas/OrderEditedChange"}},"reason":{"type":"string","maxLength":500},"by":{"$ref":"#/components/schemas/Actor_1"},"editedAt":{"type":"string"}},"required":["editId","changes","by","editedAt"],"additionalProperties":false},"CnsId":{"type":"string","pattern":"^cns_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cns-prefixed uuid, e.g. cns_9f8c1c2e-0000-4000-8000-000000000000"},"ConsignmentStatus":{"type":"string","enum":["requested","booked","refused","voided"],"description":"`requested` — waiting for its app to book it; `booked` — the carrier holds it and its label exists; `refused` — the app could not book it (the reason says why) and the parcel may be requested again; `voided` — a booking cancelled at the carrier, after which the parcel may be requested again"},"QuotedPrice":{"type":"object","properties":{"priceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"}},"required":["priceCents","currency"],"additionalProperties":false},"EtaDays_3":{"type":"object","properties":{"min":{"type":"integer","minimum":0},"max":{"type":"integer","minimum":0}},"required":["min","max"],"additionalProperties":false},"QuoteMiss":{"type":"string","enum":["timeout","refused","failed","currency","no-quote-url"],"description":"Why a carrier account gave no rate: `timeout` — its app did not answer inside the deadline; `refused` — its app (or auth, minting the core-call token) said no; `failed` — the call broke or the answer was unreadable; `currency` — every rate it gave was in another currency, and rates are never converted; `no-quote-url` — its app answers no live rates"},"QuoteUnanswered":{"type":"object","properties":{"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"reason":{"$ref":"#/components/schemas/QuoteMiss"},"detail":{"type":"string"}},"required":["carrierAccountId","reason"],"additionalProperties":false},"ConsignmentQuote":{"type":"object","properties":{"quotedAt":{"type":"string"},"rates":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"title":{"type":"string"},"service":{"$ref":"#/components/schemas/CarrierService_1"},"priceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"etaDays":{"$ref":"#/components/schemas/EtaDays_3"}},"required":["code","carrierAccountId","title","service","priceCents","currency"],"additionalProperties":false},"maxItems":200},"unanswered":{"type":"array","items":{"$ref":"#/components/schemas/QuoteUnanswered"}},"estimated":{"type":"boolean"},"unweighed":{"type":"array","items":{"$ref":"#/components/schemas/Sku_1"},"maxItems":500}},"required":["quotedAt","rates","unanswered","estimated","unweighed"],"additionalProperties":false},"ConsignmentBooking":{"type":"object","properties":{"carrier":{"type":"string","minLength":1,"maxLength":200},"service":{"$ref":"#/components/schemas/CarrierService_1"},"trackingNumbers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":50},"trackingUrl":{"type":"string","maxLength":2000,"pattern":"^https:\\/\\/\\S+$"},"externalId":{"type":"string","minLength":1,"maxLength":200},"cost":{"type":"object","properties":{"priceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"taxCents":{"type":"integer","minimum":0}},"required":["priceCents","currency"],"additionalProperties":false}},"required":["carrier","service","trackingNumbers","externalId"],"additionalProperties":false},"FxCapture_2":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency"},"home":{"$ref":"#/components/schemas/Currency"},"rate":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"rateDate":{"$ref":"#/components/schemas/IsoDay"},"source":{"$ref":"#/components/schemas/FxCaptureSource"},"via":{"$ref":"#/components/schemas/Currency_1"}},"required":["currency","home","rate","rateDate","source"],"additionalProperties":false,"description":"The rate a money fact was booked at, captured when it committed: `rate` units of `home` per one unit of the document's `currency`, from `source` for `rateDate` (`via` a cross); `same` is a document in the home currency, rate 1"},"CpyId":{"type":"string","pattern":"^cpy_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cpy-prefixed uuid, e.g. cpy_9f8c1c2e-0000-4000-8000-000000000000"},"ConsignmentPayment":{"type":"object","properties":{"paymentId":{"$ref":"#/components/schemas/CpyId"},"amountCents":{"type":"integer","minimum":0},"taxCents":{"type":"integer","minimum":0},"reference":{"type":"string","minLength":1,"maxLength":200},"paidAt":{"type":"string"}},"required":["paymentId","amountCents","taxCents","paidAt"],"additionalProperties":false},"ConsignmentRefusalCode":{"type":"string","enum":["needs-service","address","parcel","held","provider"],"description":"`needs-service` — the order names no method the app can map, so an operator picks a service; `address` — the carrier would not take the ship-to or ship-from address; `parcel` — the cartons, weights or contents were refused; `held` — the tenant is read-only, so nothing is booked until it goes live; `provider` — the provider refused for another reason (the message says it)"},"LabelContentType":{"type":"string","enum":["application/pdf","image/png","application/zpl"],"description":"What a label is stored as: `application/pdf`, `image/png`, or `application/zpl` (a thermal printer's own language)"},"ConsignmentLabel":{"type":"object","properties":{"contentType":{"$ref":"#/components/schemas/LabelContentType"},"size":{"type":"integer","exclusiveMinimum":0},"storedAt":{"type":"string"}},"required":["contentType","size","storedAt"],"additionalProperties":false},"TrackingStatus":{"type":"string","enum":["printed","dispatched","in-transit","out-for-delivery","delivered","pickup-in-store","attempted-delivery","awaiting-collection","exception","cancelled"],"description":"Where a parcel has got to, as its carrier last said: `printed` (labelled, not yet with the carrier), `dispatched`, `in-transit`, `out-for-delivery`, `delivered`, `pickup-in-store`, `attempted-delivery`, `awaiting-collection`, `exception` or `cancelled`"},"ConsignmentTracking":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/TrackingStatus"},"at":{"type":"string"},"detail":{"type":"string","maxLength":500}},"required":["status","at"],"additionalProperties":false},"ConsignmentTracking_1":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/TrackingStatus"},"at":{"type":"string"},"detail":{"type":"string","maxLength":500}},"required":["status","at"],"additionalProperties":false},"ConsignmentEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/CnsId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"attempt":{"type":"integer","exclusiveMinimum":0},"status":{"$ref":"#/components/schemas/ConsignmentStatus"},"service":{"$ref":"#/components/schemas/CarrierService_1"},"quoted":{"$ref":"#/components/schemas/QuotedPrice"},"quote":{"$ref":"#/components/schemas/ConsignmentQuote"},"booking":{"$ref":"#/components/schemas/ConsignmentBooking"},"costFx":{"$ref":"#/components/schemas/FxCapture_2"},"payment":{"$ref":"#/components/schemas/ConsignmentPayment"},"refusal":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/ConsignmentRefusalCode"},"reason":{"type":"string","maxLength":500}},"required":["code","reason"],"additionalProperties":false},"label":{"$ref":"#/components/schemas/ConsignmentLabel"},"tracking":{"$ref":"#/components/schemas/ConsignmentTracking"},"trackingHistory":{"type":"array","items":{"$ref":"#/components/schemas/ConsignmentTracking_1"}},"requestedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","shipmentId","carrierAccountId","attempt","status","requestedAt","updatedAt"],"additionalProperties":false},"ChannelCollectionKind":{"type":"string","enum":["capture-authorised","charge-saved-method"],"description":"`capture-authorised` — take money the buyer's card authorised at the channel's checkout (in full or in part); `charge-saved-method` — charge a payment method the buyer saved with the channel for later payments (net terms, deposits, balances)"},"PaymentCollectionTrigger":{"type":"string","enum":["manual","shipped","invoiced","due"],"description":"`manual` — a person (or an agent) asked; `shipped` — a parcel shipped, under the channel's setting to collect on shipping; `invoiced` — an invoice was issued, under the channel's setting to collect on invoicing; `due` — an invoice fell due, under the channel's setting to collect on the due date"},"PaymentCollectionStatus":{"type":"string","enum":["requested","pending","succeeded","refused"],"description":"`requested` — put to the channel, not yet answered; `pending` — the channel's payment system took the charge and has not finished it: it may still take the money, so the collection stays open (no other is asked for) until the channel says how it ended; `succeeded` — the channel's payment system took the money (the payment it records follows, `paymentId` once it has); `refused` — no money moved: declined, nothing to take, or not possible now (`refusal` says which)"},"PaymentCollectionCandidate":{"type":"object","properties":{"transactionId":{"type":"string","minLength":1,"maxLength":255},"kind":{"type":"string","minLength":1,"maxLength":40},"status":{"type":"string","minLength":1,"maxLength":40},"amountCents":{"type":"integer","minimum":0}},"required":["transactionId","kind","status","amountCents"],"additionalProperties":false},"PaymentCollectionCheck":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/PaymentCollectionCandidate"}}},"required":["reason","candidates"],"additionalProperties":false},"PaymentCollectionRefusalCode":{"type":"string","enum":["declined","authorisation-expired","nothing-to-collect","not-permitted","held","cancelled","payment-in-progress","checked-not-collected","error"],"description":"`declined` — the payment system declined the charge (insufficient funds, a card stopped, …); `authorisation-expired` — the card's authorisation lapsed before it was captured: the buyer must pay again; `nothing-to-collect` — the channel holds nothing to take for the order: no authorisation left to capture, or no saved method; `not-permitted` — the channel may not do this for the account yet (a permission still awaiting approval); `held` — nothing leaves Manifold for the organization (read-only), or the channel is set to receive only; `cancelled` — a person stopped the channel's work on it before anything was charged; `payment-in-progress` — another payment on the order is still being processed by the channel, or less is outstanding than was asked: nothing was charged, ask again once it has settled; `checked-not-collected` — the channel could not say whether its charge landed, and a person who checked the channel's own records found it did not: a new collection may be asked for; `error` — the payment system answered with an error the channel could not place: `reason` has its words"},"PaymentCollectionEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PcolId"},"kind":{"$ref":"#/components/schemas/ChannelCollectionKind"},"channelId":{"$ref":"#/components/schemas/ChnId"},"appId":{"$ref":"#/components/schemas/AppId"},"trigger":{"$ref":"#/components/schemas/PaymentCollectionTrigger"},"amountCents":{"type":"integer","exclusiveMinimum":0},"final":{"type":"boolean"},"invoiceId":{"$ref":"#/components/schemas/InvId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"status":{"$ref":"#/components/schemas/PaymentCollectionStatus"},"requestedAt":{"type":"string"},"requestedBy":{"$ref":"#/components/schemas/Actor_1"},"answeredAt":{"type":"string"},"pendingReference":{"type":"string","minLength":1,"maxLength":255},"check":{"$ref":"#/components/schemas/PaymentCollectionCheck"},"transactionId":{"type":"string","minLength":1,"maxLength":255},"collectedCents":{"type":"integer","exclusiveMinimum":0},"refusal":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/PaymentCollectionRefusalCode"},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["code","reason"],"additionalProperties":false},"paymentId":{"$ref":"#/components/schemas/PayId"}},"required":["id","kind","channelId","appId","trigger","amountCents","final","status","requestedAt","requestedBy"],"additionalProperties":false},"CustomerDocument":{"anyOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["quote"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["order"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["invoice"]},"invoiceId":{"$ref":"#/components/schemas/InvId"}},"required":["kind","invoiceId"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["shipment"]},"shipmentId":{"$ref":"#/components/schemas/ShpId"}},"required":["kind","shipmentId"],"additionalProperties":false}],"description":"The one document a customer link opens: the order's `quote`, the `order`, an `invoice` by id, or a parcel's `shipment` by id."},"NtfId":{"type":"string","pattern":"^ntf_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A ntf-prefixed uuid, e.g. ntf_9f8c1c2e-0000-4000-8000-000000000000"},"CustomerLinkEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/CplId"},"document":{"$ref":"#/components/schemas/CustomerDocument"},"issuedAt":{"type":"string"},"issuedBy":{"$ref":"#/components/schemas/Actor_1"},"revokedAt":{"type":"string"},"viewedAt":{"type":"string"},"openedFrom":{"type":"array","items":{"$ref":"#/components/schemas/NtfId"}}},"required":["id","document","issuedAt","issuedBy"],"additionalProperties":false},"CostId":{"type":"string","pattern":"^cost_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A cost-prefixed uuid, e.g. cost_9f8c1c2e-0000-4000-8000-000000000000"},"AccountCodeEncoded":{"anyOf":[{"type":"string"},{"type":"integer"}]},"CostReversal":{"type":"object","properties":{"by":{"$ref":"#/components/schemas/Actor"},"at":{"type":"string"},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["by","at"],"additionalProperties":false},"OrderCostEncoded":{"type":"object","properties":{"costId":{"$ref":"#/components/schemas/CostId"},"amountCents":{"type":"integer","exclusiveMinimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"fx":{"$ref":"#/components/schemas/FxCapture_1"},"reason":{"type":"string","minLength":1,"maxLength":500},"accountCode":{"$ref":"#/components/schemas/AccountCodeEncoded"},"date":{"$ref":"#/components/schemas/IsoDay"},"recordedBy":{"$ref":"#/components/schemas/Actor_1"},"recordedAt":{"type":"string"},"reversal":{"$ref":"#/components/schemas/CostReversal"},"lineId":{"$ref":"#/components/schemas/LinId"}},"required":["costId","amountCents","currency","fx","reason","accountCode","date","recordedBy","recordedAt"],"additionalProperties":false},"AprId":{"type":"string","pattern":"^apr_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A apr-prefixed uuid, e.g. apr_9f8c1c2e-0000-4000-8000-000000000000"},"MarginApprovalStatus":{"type":"string","enum":["pending","approved","declined"],"description":"A margin approval: `pending`, `approved` or `declined`"},"BelowMinimumLine":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"}},"required":["sku"],"additionalProperties":false},"MarginApprovalEncoded":{"type":"object","properties":{"approvalId":{"$ref":"#/components/schemas/AprId"},"status":{"$ref":"#/components/schemas/MarginApprovalStatus"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/BelowMinimumLine"}},"note":{"type":"string","maxLength":500},"requestedBy":{"$ref":"#/components/schemas/Actor_1"},"requestedAt":{"type":"string"},"terms":{"type":"string"},"decidedBy":{"$ref":"#/components/schemas/Actor"},"decidedAt":{"type":"string"},"reason":{"type":"string","maxLength":500}},"required":["approvalId","status","lines","requestedBy","requestedAt","terms"],"additionalProperties":false},"PaymentStatus":{"type":"string","enum":["unpaid","partially-paid","paid","partially-refunded","refunded"],"description":"Where the order stands with the customer's money: `unpaid`, `partially-paid`, `paid` (received covers the total), and once money has gone back `partially-refunded` or `refunded`"},"OrderMoneyEncoded":{"type":"object","properties":{"subtotalCents":{"type":"integer","minimum":0},"charges":{"$ref":"#/components/schemas/OrderCharges"},"discountCents":{"type":"integer","minimum":0},"tax":{"$ref":"#/components/schemas/DocumentTax_1"},"shippingTax":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false},"totalCents":{"type":"integer","minimum":0},"paidCents":{"type":"integer","minimum":0},"refundedCents":{"type":"integer","minimum":0},"balanceCents":{"type":"integer","minimum":0},"refundOwedCents":{"type":"integer","minimum":0},"status":{"$ref":"#/components/schemas/PaymentStatus"}},"required":["subtotalCents","charges","discountCents","tax","totalCents","paidCents","refundedCents","balanceCents","refundOwedCents","status"],"additionalProperties":false},"OrderShortfallEncoded":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku"},"quantity":{"type":"integer","exclusiveMinimum":0}},"required":["sku","quantity"],"additionalProperties":false},"GeoPoint":{"type":"object","properties":{"latitude":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"longitude":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["latitude","longitude"],"additionalProperties":false,"description":"A point on the earth in decimal degrees (WGS 84): where a geocoder placed an address."},"ShipToPlacement":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["located"]},"point":{"$ref":"#/components/schemas/GeoPoint"}},"required":["_tag","point"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unlocated"]},"reason":{"type":"string","maxLength":500}},"required":["_tag","reason"],"additionalProperties":false}],"description":"Where the order's ship-to was placed for nearest-to-the-customer routing: `located` with a point coarsened to about 11 km, or `unlocated` with why, in which case the order routed by priority"},"RoutedBy":{"type":"string","enum":["rank","nearest","stable","channel","ships-from"],"description":"What chose a draw's site: `rank` — the priority order; `nearest` — distance from the customer (`distanceKm` says how far); `stable` — no preference, the sites' own order; `channel` — the site the order's sales channel assigned; `ships-from` — the order's own ships-from site (`fulfillmentLocationId`)"},"AllocationRoutingEncoded":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"locationId":{"$ref":"#/components/schemas/LocId"},"routedBy":{"$ref":"#/components/schemas/RoutedBy"},"distanceKm":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["lineId","locationId","routedBy"],"additionalProperties":false},"FulfillmentOrderEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/OrdId"},"reference":{"type":"string","minLength":1},"source":{"$ref":"#/components/schemas/OrderSource"},"customerPo":{"type":"string"},"salesRepId":{"$ref":"#/components/schemas/UsrId"},"commission":{"$ref":"#/components/schemas/OrderCommission"},"customer":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId_1"},"companyId":{"$ref":"#/components/schemas/CmpId_1"},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"billingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]}},"additionalProperties":false},"party":{"$ref":"#/components/schemas/DocumentParty"},"catalogIds":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/CatId"}],"minItems":1,"items":{"$ref":"#/components/schemas/CatId"}},"currency":{"$ref":"#/components/schemas/Currency"},"fx":{"$ref":"#/components/schemas/FxCapture"},"convention":{"$ref":"#/components/schemas/PriceConvention"},"shippingTaxBasis":{"$ref":"#/components/schemas/ChargeTaxBasis"},"shippingMethod":{"$ref":"#/components/schemas/ShippingMethod"},"fulfillmentLocationId":{"$ref":"#/components/schemas/LocId"},"checkoutQuote":{"$ref":"#/components/schemas/CheckoutOffer"},"shippingRate":{"$ref":"#/components/schemas/ChosenRate"},"number":{"type":"string","minLength":1},"serial":{"type":"integer","exclusiveMinimum":0},"status":{"$ref":"#/components/schemas/FulfillmentOrderStatus"},"quote":{"type":"object","properties":{"createdAt":{"type":"string"},"issuedAt":{"type":"string"},"validUntil":{"type":"string"},"placedAt":{"type":"string"},"declinedAt":{"type":"string"},"declineReason":{"type":"string"},"document":{"type":"object","properties":{"number":{"type":"string","minLength":1},"reference":{"type":"string","minLength":1},"customerPo":{"type":"string"},"currency":{"$ref":"#/components/schemas/Currency"},"party":{"$ref":"#/components/schemas/DocumentParty_1"},"convention":{"$ref":"#/components/schemas/PriceConvention"},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku_1"},"name":{"$ref":"#/components/schemas/LineName"},"kind":{"$ref":"#/components/schemas/ItemKind"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"discountCents":{"type":"integer","minimum":0},"discountBps":{"$ref":"#/components/schemas/DiscountBps"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32},"tax":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false},"rateMoved":{"type":"boolean"}},"required":["lineId","sku","name","quantity","unitPriceCents","discountCents","tax"],"additionalProperties":false}},"charges":{"type":"object","properties":{"shippingCents":{"type":"integer","minimum":0},"shippingDiscountCents":{"type":"integer","minimum":0},"discountCents":{"type":"integer","minimum":0},"discountKind":{"$ref":"#/components/schemas/DiscountKind"},"discountBps":{"$ref":"#/components/schemas/DiscountBps_1"}},"additionalProperties":false},"shipping":{"$ref":"#/components/schemas/DocumentShipping"},"tax":{"$ref":"#/components/schemas/DocumentTax"},"totalCents":{"type":"integer","minimum":0}},"required":["number","reference","currency","party","convention","lines","charges","tax","totalCents"],"additionalProperties":false}},"required":["createdAt"],"additionalProperties":false},"lines":{"type":"array","items":{"$ref":"#/components/schemas/OrderLineEncoded"}},"workflow":{"$ref":"#/components/schemas/WorkflowConfigEncoded"},"paymentTermsBy":{"$ref":"#/components/schemas/PaymentTermsSource"},"createdSequence":{"type":"integer","minimum":0},"shipments":{"type":"array","items":{"$ref":"#/components/schemas/ShipmentEncoded"}},"invoices":{"type":"array","items":{"$ref":"#/components/schemas/SalesInvoiceEncoded"}},"refunds":{"type":"array","items":{"$ref":"#/components/schemas/OrderRefundEncoded"}},"payments":{"type":"array","items":{"$ref":"#/components/schemas/OrderPaymentEncoded"}},"notes":{"type":"array","items":{"$ref":"#/components/schemas/OrderNoteEncoded"}},"transcripts":{"type":"array","items":{"$ref":"#/components/schemas/OrderTranscriptEncoded"}},"erasedCustomer":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId"},"erasedAt":{"type":"string"}},"required":["personId","erasedAt"],"additionalProperties":false},"edits":{"type":"array","items":{"$ref":"#/components/schemas/OrderEditEncoded"}},"consignments":{"type":"array","items":{"$ref":"#/components/schemas/ConsignmentEncoded"}},"collections":{"type":"array","items":{"$ref":"#/components/schemas/PaymentCollectionEncoded"}},"links":{"type":"array","items":{"$ref":"#/components/schemas/CustomerLinkEncoded"}},"costs":{"type":"array","items":{"$ref":"#/components/schemas/OrderCostEncoded"}},"marginApprovals":{"type":"array","items":{"$ref":"#/components/schemas/MarginApprovalEncoded"}},"money":{"$ref":"#/components/schemas/OrderMoneyEncoded"},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderDiscount"}},"shortfalls":{"type":"array","items":{"$ref":"#/components/schemas/OrderShortfallEncoded"}},"shortfallsSince":{"type":"string"},"shipToPlacement":{"$ref":"#/components/schemas/ShipToPlacement"},"routing":{"type":"array","items":{"$ref":"#/components/schemas/AllocationRoutingEncoded"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","reference","source","party","catalogIds","currency","convention","shippingTaxBasis","number","serial","status","lines","workflow","paymentTermsBy","createdSequence","money","createdAt","updatedAt"],"additionalProperties":false},"OrderCountEncoded":{"type":"object","properties":{"total":{"type":"integer","minimum":0}},"required":["total"],"additionalProperties":false},"OrderTalliesEncoded":{"type":"object","properties":{"total":{"type":"integer","minimum":0},"statuses":{"type":"object","properties":{"draft-quote":{"type":"integer","minimum":0},"quote":{"type":"integer","minimum":0},"open":{"type":"integer","minimum":0},"awaiting-stock":{"type":"integer","minimum":0},"partially-shipped":{"type":"integer","minimum":0},"shipped":{"type":"integer","minimum":0},"cancelled":{"type":"integer","minimum":0}},"required":["draft-quote","quote","open","awaiting-stock","partially-shipped","shipped","cancelled"],"additionalProperties":false},"backordered":{"type":"integer","minimum":0}},"required":["total","statuses","backordered"],"additionalProperties":false},"OrderDefaultsEncoded":{"type":"object","properties":{"fulfillmentLocationId":{"$ref":"#/components/schemas/LocId"}},"additionalProperties":false},"CustomerHomeSpend":{"type":"object","properties":{"spentCents":{"type":"integer","minimum":0},"refundedCents":{"type":"integer","minimum":0},"netCents":{"type":"integer","minimum":0}},"required":["spentCents","refundedCents","netCents"],"additionalProperties":false},"CustomerSpend":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency"},"orders":{"type":"integer","minimum":0},"spentCents":{"type":"integer","minimum":0},"refundedCents":{"type":"integer","minimum":0},"netCents":{"type":"integer","minimum":0}},"required":["currency","orders","spentCents","refundedCents","netCents"],"additionalProperties":false},"CustomerOrderSummaryEncoded":{"type":"object","properties":{"orders":{"type":"integer","minimum":0},"liveOrders":{"type":"integer","minimum":0},"historicalOrders":{"type":"integer","minimum":0},"firstOrderAt":{"type":"string"},"lastOrderAt":{"type":"string"},"homeCurrency":{"$ref":"#/components/schemas/Currency"},"home":{"$ref":"#/components/schemas/CustomerHomeSpend"},"unconvertedOrders":{"type":"integer","minimum":0},"totals":{"type":"array","items":{"$ref":"#/components/schemas/CustomerSpend"}}},"required":["orders","liveOrders","historicalOrders","home","unconvertedOrders","totals"],"additionalProperties":false},"CurrencyAmount":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency"},"cents":{"type":"integer","minimum":0}},"required":["currency","cents"],"additionalProperties":false},"AttentionOrder":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"number":{"type":"string"},"currency":{"$ref":"#/components/schemas/Currency"},"amountCents":{"type":"integer","minimum":0},"since":{"type":"string"}},"required":["orderId","number","currency","amountCents","since"],"additionalProperties":false},"AttentionGroup":{"type":"object","properties":{"orders":{"type":"integer","minimum":0},"amounts":{"type":"array","items":{"$ref":"#/components/schemas/CurrencyAmount"}},"oldest":{"type":"array","items":{"$ref":"#/components/schemas/AttentionOrder"}}},"required":["orders","amounts","oldest"],"additionalProperties":false},"OrdersAttentionEncoded":{"type":"object","properties":{"unfulfilled":{"type":"integer","minimum":0},"awaitingStock":{"type":"integer","minimum":0},"shipments":{"type":"object","properties":{"pending":{"type":"integer","minimum":0},"picked":{"type":"integer","minimum":0},"packed":{"type":"integer","minimum":0}},"required":["pending","picked","packed"],"additionalProperties":false},"awaitingPayment":{"$ref":"#/components/schemas/AttentionGroup"},"refundsOwed":{"$ref":"#/components/schemas/AttentionGroup"}},"required":["unfulfilled","awaitingStock","shipments","awaitingPayment","refundsOwed"],"additionalProperties":false},"BoardParcel":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"orderNumber":{"type":"string","minLength":1},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"number":{"type":"string","minLength":1},"since":{"type":"string"}},"required":["orderId","orderNumber","shipmentId","number","since"],"additionalProperties":false},"BoardStageCount":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"oldest":{"type":"array","items":{"$ref":"#/components/schemas/BoardParcel"}}},"required":["count","oldest"],"additionalProperties":false},"BoardOrder":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"number":{"type":"string","minLength":1},"status":{"$ref":"#/components/schemas/FulfillmentOrderStatus"},"since":{"type":"string"}},"required":["orderId","number","status","since"],"additionalProperties":false},"BoardOrderList":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"orders":{"type":"array","items":{"$ref":"#/components/schemas/BoardOrder"}}},"required":["count","orders"],"additionalProperties":false},"BoardRefusedConsignment":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"orderNumber":{"type":"string","minLength":1},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"shipmentNumber":{"type":"string","minLength":1},"locationId":{"$ref":"#/components/schemas/LocId"},"consignmentId":{"$ref":"#/components/schemas/CnsId"},"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"attempt":{"type":"integer","exclusiveMinimum":0},"code":{"$ref":"#/components/schemas/ConsignmentRefusalCode"},"reason":{"type":"string"},"since":{"type":"string"}},"required":["orderId","orderNumber","shipmentId","shipmentNumber","consignmentId","carrierAccountId","attempt","code","reason","since"],"additionalProperties":false},"BoardRefusedConsignments":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"items":{"type":"array","items":{"$ref":"#/components/schemas/BoardRefusedConsignment"}}},"required":["count","items"],"additionalProperties":false},"BoardSite":{"type":"object","properties":{"locationId":{"$ref":"#/components/schemas/LocId"},"pending":{"$ref":"#/components/schemas/BoardStageCount"},"picked":{"$ref":"#/components/schemas/BoardStageCount"},"packed":{"$ref":"#/components/schemas/BoardStageCount"},"shippedToday":{"type":"integer","minimum":0},"shippedYesterday":{"type":"integer","minimum":0},"awaitingPayment":{"$ref":"#/components/schemas/BoardOrderList"},"refusedConsignments":{"$ref":"#/components/schemas/BoardRefusedConsignments"},"stuck":{"$ref":"#/components/schemas/BoardOrderList"}},"required":["pending","picked","packed","shippedToday","shippedYesterday","awaitingPayment","refusedConsignments","stuck"],"additionalProperties":false},"OperationsBoardEncoded":{"type":"object","properties":{"asOf":{"type":"string"},"today":{"type":"string"},"sites":{"type":"array","items":{"$ref":"#/components/schemas/BoardSite"}},"awaitingPayment":{"$ref":"#/components/schemas/BoardOrderList"},"refusedConsignments":{"$ref":"#/components/schemas/BoardRefusedConsignments"},"stuck":{"$ref":"#/components/schemas/BoardOrderList"},"stuckHours":{"type":"integer","exclusiveMinimum":0}},"required":["asOf","today","sites","awaitingPayment","refusedConsignments","stuck","stuckHours"],"additionalProperties":false},"LocId_1":{"type":"string","pattern":"^loc_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"the station's site; parcels naming no site are every site's"},"StationStage":{"type":"string","enum":["pick","pack","ship","held"],"description":"What a parcel waits on at a station: `pick` (pending, picked by a person), `pack` (picked, packed by a person), `ship` (packed, to label and ship) or `held` (packed on a prepaid order not yet paid in full)."},"StationParcelEncoded":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"orderNumber":{"type":"string","minLength":1},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"number":{"type":"string","minLength":1},"stage":{"$ref":"#/components/schemas/StationStage"},"locationId":{"$ref":"#/components/schemas/LocId"},"units":{"type":"integer","minimum":0},"lines":{"type":"integer","minimum":0},"channelId":{"$ref":"#/components/schemas/ChnId"},"carrier":{"type":"string","minLength":1},"urgent":{"type":"boolean"},"openedAt":{"type":"string"}},"required":["orderId","orderNumber","shipmentId","number","stage","units","lines","urgent","openedAt"],"additionalProperties":false},"StationQueueEncoded":{"type":"object","properties":{"parcels":{"type":"array","items":{"$ref":"#/components/schemas/StationParcelEncoded"}},"counts":{"type":"object","properties":{"pick":{"type":"integer","minimum":0},"pack":{"type":"integer","minimum":0},"ship":{"type":"integer","minimum":0},"held":{"type":"integer","minimum":0}},"required":["pick","pack","ship","held"],"additionalProperties":false},"channels":{"type":"array","items":{"type":"string","minLength":1}},"carriers":{"type":"array","items":{"type":"string","minLength":1}},"next":{"type":"string","minLength":1}},"required":["parcels","counts","channels","carriers"],"additionalProperties":false},"FulfillmentOrderNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["FulfillmentOrderNotFound"]},"orderId":{"type":"string"}},"required":["_tag","orderId"],"additionalProperties":false},"LineMarginStatus":{"type":"string","enum":["costed","no-cost","unpriced"],"description":"`costed` — priced, and every SKU it consumes has a cost basis; `no-cost` — priced, but a SKU (or a kit part) has no cost basis; `unpriced` — a draft quote's line with no price yet"},"LineMarginEncoded":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"catalogId":{"$ref":"#/components/schemas/CatId"},"quantity":{"type":"integer","minimum":0},"status":{"$ref":"#/components/schemas/LineMarginStatus"},"revenueCents":{"type":"integer"},"unitCostCents":{"type":"number","minimum":0},"costCents":{"type":"integer"},"marginCents":{"type":"integer"},"marginBps":{"type":"integer"},"minimumMarginBps":{"type":"integer","minimum":0,"maximum":10000},"minimumFrom":{"$ref":"#/components/schemas/CatId"},"belowMinimum":{"type":"boolean"}},"required":["sku","quantity","status","belowMinimum"],"additionalProperties":false},"OrderMarginTotalsEncoded":{"type":"object","properties":{"revenueCents":{"type":"integer"},"costCents":{"type":"integer"},"marginCents":{"type":"integer"},"marginBps":{"type":"integer"},"linesWithoutCost":{"type":"integer","minimum":0},"unpricedLines":{"type":"integer","minimum":0},"linesBelowMinimum":{"type":"integer","minimum":0}},"required":["revenueCents","costCents","marginCents","linesWithoutCost","unpricedLines","linesBelowMinimum"],"additionalProperties":false},"OrderMarginsEncoded":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"currency":{"$ref":"#/components/schemas/Currency"},"costRate":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"lines":{"type":"array","items":{"$ref":"#/components/schemas/LineMarginEncoded"}},"order":{"$ref":"#/components/schemas/OrderMarginTotalsEncoded"}},"required":["currency","lines","order"],"additionalProperties":false},"DraftMarginLine":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"discountCents":{"type":"integer","minimum":0}},"required":["sku","quantity","unitPriceCents"],"additionalProperties":false},"DraftMarginsEncoded":{"type":"object","properties":{"catalogId":{"$ref":"#/components/schemas/CatId"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/DraftMarginLine"},"minItems":1,"maxItems":500},"discountCents":{"type":"integer","minimum":0}},"required":["catalogId","lines"],"additionalProperties":false},"OrderCatalogNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OrderCatalogNotFound"]},"catalogId":{"type":"string"}},"required":["_tag","catalogId"],"additionalProperties":false},"TaxRateMissingEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TaxRateMissing"]},"class":{"$ref":"#/components/schemas/TaxClass"},"at":{"$ref":"#/components/schemas/IsoDay"}},"required":["_tag","class","at"],"additionalProperties":false},"BackorderEntryEncoded":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"number":{"type":"string","minLength":1},"reference":{"type":"string","minLength":1},"status":{"$ref":"#/components/schemas/FulfillmentOrderStatus"},"shortfalls":{"type":"array","items":{"$ref":"#/components/schemas/OrderShortfallEncoded"},"minItems":1},"createdAt":{"type":"string"},"waitingSince":{"type":"string"},"queuePosition":{"type":"integer","exclusiveMinimum":0}},"required":["orderId","number","reference","status","shortfalls","createdAt","waitingSince","queuePosition"],"additionalProperties":false},"BackorderQueuePageEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BackorderEntryEncoded"}},"total":{"type":"integer","minimum":0},"limit":{"type":"integer","exclusiveMinimum":0},"offset":{"type":"integer","minimum":0}},"required":["items","total","offset"],"additionalProperties":false},"OrderStage":{"type":"string","enum":["draft-quote","order"],"description":"What a create makes: an `order` (allocated at once) or a `draft-quote` (priced and numbered, holding nothing)"},"ShippingRateChoice":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":400},"sealed":{"type":"string","minLength":1,"maxLength":200000}},"required":["code","sealed"],"additionalProperties":false},"ChannelTaxLine":{"type":"object","properties":{"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"taxCents":{"type":"integer","minimum":0}},"required":["rateBps","taxCents"],"additionalProperties":false,"description":"One tax line a channel charged: its rate in basis points and what it came to"},"ChannelTaxLines":{"type":"array","items":{"$ref":"#/components/schemas/ChannelTaxLine"},"description":"The tax a channel already charged on a line or charge, as its tax lines; empty, none"},"OrderDiscount_1":{"type":"object","properties":{"target":{"$ref":"#/components/schemas/DiscountTarget"},"reason":{"type":"string","maxLength":200},"amountCents":{"type":"integer","minimum":0}},"required":["target","amountCents"],"additionalProperties":false},"CreateFulfillmentOrderEncoded":{"type":"object","properties":{"reference":{"type":"string","minLength":1},"source":{"$ref":"#/components/schemas/OrderSource"},"salesRepId":{"$ref":"#/components/schemas/UsrId"},"stage":{"$ref":"#/components/schemas/OrderStage"},"paymentTerms":{"$ref":"#/components/schemas/PaymentTerms"},"customer":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId_1"},"companyId":{"$ref":"#/components/schemas/CmpId_1"},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"billingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]}},"additionalProperties":false},"customerPo":{"type":"string"},"catalogId":{"$ref":"#/components/schemas/CatId"},"currency":{"$ref":"#/components/schemas/Currency"},"charges":{"type":"object","properties":{"shippingCents":{"type":"integer","minimum":0},"shippingDiscountCents":{"type":"integer","minimum":0},"discountCents":{"type":"integer","minimum":0},"discountKind":{"$ref":"#/components/schemas/DiscountKind"},"discountBps":{"$ref":"#/components/schemas/DiscountBps_1"}},"additionalProperties":false},"shippingMethod":{"$ref":"#/components/schemas/ShippingMethod"},"shippingRate":{"$ref":"#/components/schemas/ShippingRateChoice"},"fulfillmentLocationId":{"$ref":"#/components/schemas/LocId"},"shipToCountry":{"$ref":"#/components/schemas/CountryCode"},"pricesIncludeTax":{"type":"boolean"},"shippingTax":{"$ref":"#/components/schemas/ChannelTaxLines"},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderDiscount_1"}},"lines":{"type":"array","items":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku"},"name":{"$ref":"#/components/schemas/LineName"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"priceReason":{"type":"string","maxLength":500},"catalogId":{"$ref":"#/components/schemas/CatId"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32},"externalId":{"type":"string","minLength":1},"discountCents":{"type":"integer","minimum":0},"discountBps":{"$ref":"#/components/schemas/DiscountBps_2"},"discountReason":{"type":"string","maxLength":200},"assignedLocationId":{"$ref":"#/components/schemas/LocId"},"channelTax":{"$ref":"#/components/schemas/ChannelTaxLines"}},"required":["sku","quantity"],"additionalProperties":false}}},"required":["reference","lines"],"additionalProperties":false},"ItemNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ItemNotFound"]},"sku":{"type":"string"}},"required":["_tag","sku"],"additionalProperties":false},"CompanyNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CompanyNotFound"]},"companyId":{"type":"string"}},"required":["_tag","companyId"],"additionalProperties":false},"CrmUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CrmUnavailable"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"OrderCatalogCurrencyMismatchEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OrderCatalogCurrencyMismatch"]},"catalogIds":{"type":"array","items":{"type":"string"}},"currencies":{"type":"array","items":{"type":"string"}}},"required":["_tag","catalogIds","currencies"],"additionalProperties":false},"LineUnpricedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LineUnpriced"]},"orderId":{"type":"string"},"lineIds":{"type":"array","items":{"type":"string"}},"skus":{"type":"array","items":{"type":"string"}}},"required":["_tag","orderId","lineIds","skus"],"additionalProperties":false},"LineDiscountRefusedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LineDiscountRefused"]},"lineId":{"type":"string"},"sku":{"type":"string"},"discountCents":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"lineCents":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},{"type":"null"}]},"reason":{"type":"string"}},"required":["_tag","lineId","sku","reason"],"additionalProperties":false},"FulfillmentLocationInvalidEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["FulfillmentLocationInvalid"]},"locationId":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","locationId","reason"],"additionalProperties":false},"LineAttributeRequiredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LineAttributeRequired"]},"sku":{"type":"string"},"name":{"type":"string"}},"required":["_tag","sku","name"],"additionalProperties":false},"BelowMinimumMarginEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["BelowMinimumMargin"]},"orderId":{"type":"string"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/BelowMinimumLine"}},"approval":{"type":"string"},"message":{"type":"string"}},"required":["_tag","lines","message"],"additionalProperties":false},"CustomerRequiredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CustomerRequired"]},"orderId":{"type":"string"},"message":{"type":"string"}},"required":["_tag","message"],"additionalProperties":false},"SkuNotInCatalogsEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["SkuNotInCatalogs"]},"catalogIds":{"type":"array","items":{"type":"string"}},"skus":{"type":"array","items":{"type":"string"}},"message":{"type":"string"}},"required":["_tag","catalogIds","skus","message"],"additionalProperties":false},"QuantityBelowMinimumEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["QuantityBelowMinimum"]},"lineId":{"type":"string"},"sku":{"type":"string"},"quantity":{"type":"integer"},"minQuantity":{"type":"integer"},"reason":{"type":"string"}},"required":["_tag","lineId","sku","quantity","minQuantity","reason"],"additionalProperties":false},"QuantityNotInStepEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["QuantityNotInStep"]},"lineId":{"type":"string"},"sku":{"type":"string"},"quantity":{"type":"integer"},"minQuantity":{"type":"integer"},"step":{"type":"integer"},"reason":{"type":"string"}},"required":["_tag","lineId","sku","quantity","minQuantity","step","reason"],"additionalProperties":false},"OrderCreationPendingEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OrderCreationPending"]},"orderId":{"$ref":"#/components/schemas/OrdId"},"reference":{"type":"string"},"waitedMs":{"type":"integer"}},"required":["_tag","orderId","reference","waitedMs"],"additionalProperties":false},"ChannelSourceForbiddenEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ChannelSourceForbidden"]},"channelId":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","channelId","reason"],"additionalProperties":false},"CatalogNotOpenToRepEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CatalogNotOpenToRep"]},"catalogIds":{"type":"array","items":{"type":"string"}}},"required":["_tag","catalogIds"],"additionalProperties":false},"SalesRepNotYoursEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["SalesRepNotYours"]},"salesRepId":{"type":"string"}},"required":["_tag","salesRepId"],"additionalProperties":false},"ShippingRateInvalidEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ShippingRateInvalid"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"LineAttributeInvalidEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LineAttributeInvalid"]},"sku":{"type":"string"},"name":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","sku","name","reason"],"additionalProperties":false},"IssueQuoteEncoded":{"type":"object","properties":{"validUntil":{"type":"string"}},"additionalProperties":false},"NotAQuoteEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NotAQuote"]},"orderId":{"type":"string"},"status":{"$ref":"#/components/schemas/FulfillmentOrderStatus"}},"required":["_tag","orderId","status"],"additionalProperties":false},"QuoteEmptyEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["QuoteEmpty"]},"orderId":{"type":"string"}},"required":["_tag","orderId"],"additionalProperties":false},"QuotesDisabledEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["QuotesDisabled"]},"orderId":{"type":"string"}},"required":["_tag","orderId"],"additionalProperties":false},"PlaceChannelQuoteEncoded":{"type":"object","properties":{"externalId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"externalId":{"type":"string","minLength":1},"assignedLocationId":{"$ref":"#/components/schemas/LocId"}},"required":["lineId","externalId"],"additionalProperties":false}},"paymentTerms":{"$ref":"#/components/schemas/PaymentTerms"}},"required":["externalId","lines"],"additionalProperties":false},"RequestMarginApprovalEncoded":{"type":"object","properties":{"approvalId":{"$ref":"#/components/schemas/AprId"},"note":{"type":"string","maxLength":500}},"required":["approvalId"],"additionalProperties":false},"NothingBelowMinimumEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NothingBelowMinimum"]},"orderId":{"type":"string"}},"required":["_tag","orderId"],"additionalProperties":false},"MarginApprovalDecision":{"type":"string","enum":["approve","decline"],"description":"A sales manager's answer to a request to sell below the minimum margin: `approve` or `decline`"},"DecideMarginApprovalEncoded":{"type":"object","properties":{"decision":{"$ref":"#/components/schemas/MarginApprovalDecision"},"reason":{"type":"string","maxLength":500}},"required":["decision"],"additionalProperties":false},"MarginApprovalNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["MarginApprovalNotFound"]},"orderId":{"type":"string"},"approvalId":{"type":"string"}},"required":["_tag","orderId","approvalId"],"additionalProperties":false},"MarginApprovalDecidedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["MarginApprovalDecided"]},"approvalId":{"type":"string"},"status":{"$ref":"#/components/schemas/MarginApprovalStatus"}},"required":["_tag","approvalId","status"],"additionalProperties":false},"IssueCustomerLinkEncoded":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/CustomerDocument"},"notificationId":{"$ref":"#/components/schemas/NtfId"}},"required":["document"],"additionalProperties":false},"CustomerLinkIssuedEncoded":{"type":"object","properties":{"link":{"$ref":"#/components/schemas/CustomerLinkEncoded"},"token":{"type":"string","minLength":1},"url":{"type":"string","minLength":1}},"required":["link","token","url"],"additionalProperties":false},"DocumentNotLinkableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["DocumentNotLinkable"]},"orderId":{"$ref":"#/components/schemas/OrdId"},"reason":{"type":"string"}},"required":["_tag","orderId","reason"],"additionalProperties":false},"CustomerLinkNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CustomerLinkNotFound"]}},"required":["_tag"],"additionalProperties":false},"RepriceOrderLineEncoded":{"type":"object","properties":{"unitPriceCents":{"type":"integer","minimum":0},"reason":{"type":"string","maxLength":500}},"required":["unitPriceCents"],"additionalProperties":false},"OrderLineNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OrderLineNotFound"]},"orderId":{"$ref":"#/components/schemas/OrdId"},"lineId":{"$ref":"#/components/schemas/LinId"}},"required":["_tag","orderId","lineId"],"additionalProperties":false},"LineNotRepriceableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LineNotRepriceable"]},"orderId":{"$ref":"#/components/schemas/OrdId"},"lineId":{"$ref":"#/components/schemas/LinId"},"reason":{"type":"string"}},"required":["_tag","orderId","lineId","reason"],"additionalProperties":false},"CancelFulfillmentOrderEncoded":{"type":"object","properties":{"reason":{"type":"string","minLength":1}},"additionalProperties":false},"OrderNotOpenEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OrderNotOpen"]},"orderId":{"type":"string"},"status":{"$ref":"#/components/schemas/FulfillmentOrderStatus"}},"required":["_tag","orderId","status"],"additionalProperties":false},"MoveAllocationEncoded":{"type":"object","properties":{"toLocationId":{"$ref":"#/components/schemas/LocId"},"fromLocationId":{"$ref":"#/components/schemas/LocId"},"quantity":{"type":"integer","exclusiveMinimum":0},"reference":{"type":"string","minLength":1},"reason":{"type":"string","maxLength":500}},"required":["toLocationId","reference"],"additionalProperties":false},"UnknownOrderLineEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["UnknownOrderLine"]},"orderId":{"type":"string"},"lineId":{"type":"string"}},"required":["_tag","orderId","lineId"],"additionalProperties":false},"AllocationNotMovableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["AllocationNotMovable"]},"orderId":{"$ref":"#/components/schemas/OrdId"},"lineId":{"$ref":"#/components/schemas/LinId"},"reason":{"type":"string"}},"required":["_tag","orderId","lineId","reason"],"additionalProperties":false},"CreateShipmentEncoded":{"type":"object","properties":{"reference":{"type":"string","minLength":1},"locationId":{"$ref":"#/components/schemas/LocId"},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"quantity":{"type":"integer","exclusiveMinimum":0}},"required":["lineId","quantity"],"additionalProperties":false},"minItems":1}},"required":["reference","lines"],"additionalProperties":false},"OverDispatchEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OverDispatch"]},"orderId":{"type":"string"},"lineId":{"type":"string"},"sku":{"type":"string"},"ordered":{"type":"integer"},"previouslyDispatched":{"type":"integer"},"requested":{"type":"integer"}},"required":["_tag","orderId","lineId","sku","ordered","previouslyDispatched","requested"],"additionalProperties":false},"StockUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["StockUnavailable"]},"orderId":{"type":"string"},"lineId":{"type":"string"},"sku":{"type":"string"},"requested":{"type":"integer"},"available":{"type":"integer"}},"required":["_tag","orderId","lineId","sku","requested","available"],"additionalProperties":false},"BatchNumber_3":{"type":"string","minLength":1,"maxLength":64},"PickShipmentEncoded":{"type":"object","properties":{"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"quantity":{"type":"integer","exclusiveMinimum":0},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"},"minItems":1},"batchNumber":{"$ref":"#/components/schemas/BatchNumber"},"parts":{"type":"array","items":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku_1"},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"},"minItems":1},"batchNumber":{"$ref":"#/components/schemas/BatchNumber_3"}},"required":["sku"],"additionalProperties":false},"minItems":1}},"required":["lineId","quantity"],"additionalProperties":false},"minItems":1}},"required":["lines"],"additionalProperties":false},"ShipmentNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ShipmentNotFound"]},"orderId":{"type":"string"},"shipmentId":{"type":"string"}},"required":["_tag","orderId","shipmentId"],"additionalProperties":false},"ShipmentNotInStateEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ShipmentNotInState"]},"orderId":{"type":"string"},"shipmentId":{"type":"string"},"status":{"$ref":"#/components/schemas/ShipmentStatus"},"expected":{"type":"array","items":{"$ref":"#/components/schemas/ShipmentStatus"}}},"required":["_tag","orderId","shipmentId","status","expected"],"additionalProperties":false},"Tracking":{"type":"string","enum":["none","serial","batch"],"description":"How a SKU's units are identified: `none` — bare quantities; `serial` — one serial number per unit; `batch` — one batch (lot) number per lot"},"PickTrackingMismatchEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PickTrackingMismatch"]},"sku":{"type":"string"},"tracking":{"$ref":"#/components/schemas/Tracking"},"reason":{"type":"string"}},"required":["_tag","sku","tracking","reason"],"additionalProperties":false},"UnitsNotOnShelfEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["UnitsNotOnShelf"]},"sku":{"type":"string"},"reason":{"type":"string"},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"}}},"required":["_tag","sku","reason"],"additionalProperties":false},"PurchasingUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PurchasingUnavailable"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"Packaging_1":{"type":"string","enum":["carton","satchel","envelope","bag","pallet","item"],"description":"What a parcel is packed in; `item` is the goods in their own packaging"},"BoxId_1":{"type":"string","pattern":"^box_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A box-prefixed uuid, e.g. box_9f8c1c2e-0000-4000-8000-000000000000"},"Carton_1":{"type":"object","properties":{"packaging":{"$ref":"#/components/schemas/Packaging_1"},"boxId":{"$ref":"#/components/schemas/BoxId_1"},"weightGrams":{"type":"integer","exclusiveMinimum":0},"size":{"type":"object","properties":{"lengthMm":{"type":"integer","exclusiveMinimum":0},"widthMm":{"type":"integer","exclusiveMinimum":0},"heightMm":{"type":"integer","exclusiveMinimum":0}},"required":["lengthMm","widthMm","heightMm"],"additionalProperties":false}},"additionalProperties":false},"PackShipmentEncoded":{"type":"object","properties":{"cartons":{"type":"array","items":{"$ref":"#/components/schemas/Carton_1"},"minItems":1,"maxItems":50}},"additionalProperties":false},"ShipShipmentEncoded":{"type":"object","properties":{"carrier":{"type":"string","minLength":1},"service":{"type":"string","minLength":1,"maxLength":200},"trackingNumber":{"type":"string","minLength":1},"trackingUrl":{"type":"string","minLength":1,"maxLength":2000,"pattern":"^https:\\/\\/\\S+$"}},"additionalProperties":false},"OrderUnpaidEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OrderUnpaid"]},"orderId":{"type":"string"},"totalCents":{"type":"integer"},"paidCents":{"type":"integer"}},"required":["_tag","orderId","totalCents","paidCents"],"additionalProperties":false},"InsufficientStockEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["InsufficientStock"]},"sku":{"type":"string"},"available":{"type":"integer"},"requested":{"type":"integer"},"locationId":{"$ref":"#/components/schemas/LocId"}},"required":["_tag","sku","available","requested"],"additionalProperties":false},"MissingUnitPriceEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["MissingUnitPrice"]},"orderId":{"type":"string"},"lineId":{"type":"string"},"sku":{"type":"string"}},"required":["_tag","orderId","lineId","sku"],"additionalProperties":false},"IssueInvoiceEncoded":{"type":"object","properties":{"shipmentId":{"$ref":"#/components/schemas/ShpId"}},"additionalProperties":false},"NothingToInvoiceEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NothingToInvoice"]},"orderId":{"type":"string"}},"required":["_tag","orderId"],"additionalProperties":false},"RecordPaymentEncoded":{"type":"object","properties":{"paymentId":{"$ref":"#/components/schemas/PayId"},"amountCents":{"type":"integer","exclusiveMinimum":0},"method":{"$ref":"#/components/schemas/PaymentMethod"},"giftCardCode":{"type":"string"},"gateway":{"type":"string","minLength":1},"reference":{"type":"string","minLength":1},"provider":{"$ref":"#/components/schemas/PaymentProvider"},"providerTransactionId":{"type":"string","minLength":1},"collectionId":{"$ref":"#/components/schemas/PcolId"},"note":{"type":"string","maxLength":500},"receivedAt":{"type":"string"}},"required":["paymentId","amountCents","method"],"additionalProperties":false},"GiftCardNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["GiftCardNotFound"]},"giftCardId":{"type":"string"}},"required":["_tag"],"additionalProperties":false},"OverPaymentEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OverPayment"]},"orderId":{"type":"string"},"requested":{"type":"integer"},"balanceCents":{"type":"integer"}},"required":["_tag","orderId","requested","balanceCents"],"additionalProperties":false},"InsufficientCreditEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["InsufficientCredit"]},"holderId":{"type":"string"},"currency":{"type":"string"},"requested":{"type":"integer"},"availableCents":{"type":"integer"}},"required":["_tag","holderId","currency","requested","availableCents"],"additionalProperties":false},"CreditHolderMismatchEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CreditHolderMismatch"]},"orderId":{"type":"string"},"holderId":{"type":"string"}},"required":["_tag","orderId"],"additionalProperties":false},"GiftCardRefusal":{"type":"string","enum":["disabled","expired","currency","balance"],"description":"Why a gift card cannot pay: `disabled`, `expired`, in another `currency` than the order, or short of the `balance`"},"GiftCardNotRedeemableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["GiftCardNotRedeemable"]},"giftCardId":{"type":"string"},"last4":{"type":"string"},"reason":{"$ref":"#/components/schemas/GiftCardRefusal"},"balanceCents":{"type":"integer"},"currency":{"type":"string"}},"required":["_tag","giftCardId","last4","reason","balanceCents","currency"],"additionalProperties":false},"GiftCardExpiredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["GiftCardExpired"]},"giftCardId":{"type":"string"},"last4":{"type":"string"},"expiresOn":{"type":"string"}},"required":["_tag","giftCardId","last4","expiresOn"],"additionalProperties":false},"GiftCardAttemptsLockedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["GiftCardAttemptsLocked"]},"retryAfterSeconds":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","retryAfterSeconds"],"additionalProperties":false},"RequestPaymentCollectionEncoded":{"type":"object","properties":{"collectionId":{"$ref":"#/components/schemas/PcolId"},"kind":{"$ref":"#/components/schemas/ChannelCollectionKind"},"amountCents":{"type":"integer","exclusiveMinimum":0},"invoiceId":{"$ref":"#/components/schemas/InvId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"trigger":{"$ref":"#/components/schemas/PaymentCollectionTrigger"}},"required":["collectionId","kind"],"additionalProperties":false},"NothingToCollectEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NothingToCollect"]},"orderId":{"type":"string"}},"required":["_tag","orderId"],"additionalProperties":false},"PaymentCollectionUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PaymentCollectionUnavailable"]},"orderId":{"type":"string"},"kind":{"$ref":"#/components/schemas/ChannelCollectionKind"},"reason":{"type":"string"}},"required":["_tag","orderId","kind","reason"],"additionalProperties":false},"PaymentCollectionOpenEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PaymentCollectionOpen"]},"orderId":{"type":"string"},"collectionId":{"type":"string"}},"required":["_tag","orderId","collectionId"],"additionalProperties":false},"PaymentCollectionSucceeded":{"type":"object","properties":{"_tag":{"type":"string","enum":["succeeded"]},"transactionId":{"type":"string","minLength":1,"maxLength":255},"amountCents":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","transactionId","amountCents"],"additionalProperties":false},"PaymentCollectionPending":{"type":"object","properties":{"_tag":{"type":"string","enum":["pending"]},"reference":{"type":"string","minLength":1,"maxLength":255},"check":{"$ref":"#/components/schemas/PaymentCollectionCheck"}},"required":["_tag","reference"],"additionalProperties":false},"PaymentCollectionRefused":{"type":"object","properties":{"_tag":{"type":"string","enum":["refused"]},"code":{"$ref":"#/components/schemas/PaymentCollectionRefusalCode"},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["_tag","code","reason"],"additionalProperties":false},"AnswerPaymentCollection":{"anyOf":[{"$ref":"#/components/schemas/PaymentCollectionSucceeded"},{"$ref":"#/components/schemas/PaymentCollectionPending"},{"$ref":"#/components/schemas/PaymentCollectionRefused"}]},"PaymentCollectionNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PaymentCollectionNotFound"]},"collectionId":{"type":"string"}},"required":["_tag","collectionId"],"additionalProperties":false},"PaymentCollectionNotYoursEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PaymentCollectionNotYours"]},"collectionId":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","collectionId","reason"],"additionalProperties":false},"PaymentCollectionAnsweredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PaymentCollectionAnswered"]},"collectionId":{"type":"string"},"status":{"$ref":"#/components/schemas/PaymentCollectionStatus"}},"required":["_tag","collectionId","status"],"additionalProperties":false},"PaymentCollectionCollected":{"type":"object","properties":{"_tag":{"type":"string","enum":["collected"]},"transactionId":{"type":"string","minLength":1,"maxLength":255},"amountCents":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","transactionId","amountCents"],"additionalProperties":false},"PaymentCollectionNotCollected":{"type":"object","properties":{"_tag":{"type":"string","enum":["not-collected"]},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["_tag","reason"],"additionalProperties":false},"ResolvePaymentCollection":{"anyOf":[{"$ref":"#/components/schemas/PaymentCollectionCollected"},{"$ref":"#/components/schemas/PaymentCollectionNotCollected"}]},"PaymentCollectionNotInDoubtEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PaymentCollectionNotInDoubt"]},"collectionId":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","collectionId","reason"],"additionalProperties":false},"RecordOrderCostEncoded":{"type":"object","properties":{"costId":{"$ref":"#/components/schemas/CostId"},"amountCents":{"type":"integer","exclusiveMinimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"reason":{"type":"string","minLength":1,"maxLength":500},"accountCode":{"$ref":"#/components/schemas/AccountCodeEncoded"},"date":{"$ref":"#/components/schemas/IsoDay"},"lineId":{"$ref":"#/components/schemas/LinId"}},"required":["costId","amountCents","reason","accountCode"],"additionalProperties":false},"AccountNotPostableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["AccountNotPostable"]},"accountCode":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","accountCode","reason"],"additionalProperties":false},"CostCurrencyRefusedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CostCurrencyRefused"]},"currency":{"type":"string"},"allowed":{"type":"array","items":{"type":"string"}}},"required":["_tag","currency","allowed"],"additionalProperties":false},"ReverseCostEncoded":{"type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"additionalProperties":false},"CostNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CostNotFound"]},"costId":{"type":"string"}},"required":["_tag","costId"],"additionalProperties":false},"SetPaymentTermsEncoded":{"type":"object","properties":{"paymentTerms":{"$ref":"#/components/schemas/PaymentTerms"}},"required":["paymentTerms"],"additionalProperties":false},"SetSalesRepEncoded":{"type":"object","properties":{"salesRepId":{"anyOf":[{"$ref":"#/components/schemas/UsrId"},{"type":"null"}]}},"required":["salesRepId"],"additionalProperties":false},"SetCustomerPoEncoded":{"type":"object","properties":{"customerPo":{"type":"string"}},"additionalProperties":false},"OrderEditChange":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["line-added"]},"sku":{"$ref":"#/components/schemas/Sku"},"name":{"$ref":"#/components/schemas/LineName"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"priceReason":{"type":"string","maxLength":500},"catalogId":{"$ref":"#/components/schemas/CatId"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32},"externalId":{"type":"string","minLength":1},"discountCents":{"type":"integer","minimum":0},"discountBps":{"$ref":"#/components/schemas/DiscountBps_2"},"discountReason":{"type":"string","maxLength":200},"channelTax":{"$ref":"#/components/schemas/ChannelTaxLines"}},"required":["_tag","sku","quantity"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["line-removed"]},"lineId":{"$ref":"#/components/schemas/LinId"}},"required":["_tag","lineId"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["quantity-changed"]},"lineId":{"$ref":"#/components/schemas/LinId"},"quantity":{"type":"integer","exclusiveMinimum":0},"channelTax":{"$ref":"#/components/schemas/ChannelTaxLines"}},"required":["_tag","lineId","quantity"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["line-discounted"]},"lineId":{"$ref":"#/components/schemas/LinId"},"discountCents":{"type":"integer","minimum":0},"discountBps":{"$ref":"#/components/schemas/DiscountBps_2"},"discountReason":{"type":"string","maxLength":200},"channelTax":{"$ref":"#/components/schemas/ChannelTaxLines"}},"required":["_tag","lineId"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["charges-changed"]},"charges":{"$ref":"#/components/schemas/OrderCharges"},"shippingTax":{"$ref":"#/components/schemas/ChannelTaxLines"}},"required":["_tag","charges"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["discounts-changed"]},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderDiscount"}}},"required":["_tag","discounts"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["shipping-method-changed"]},"shippingMethod":{"$ref":"#/components/schemas/ShippingMethod_1"}},"required":["_tag","shippingMethod"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["shipping-rate-chosen"]},"rate":{"$ref":"#/components/schemas/ShippingRateChoice"}},"required":["_tag","rate"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["ship-to-changed"]},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]}},"required":["_tag","shippingAddressId"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["customer-changed"]},"customer":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId_1"},"companyId":{"$ref":"#/components/schemas/CmpId_1"},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"billingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]}},"additionalProperties":false}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment-location-changed"]},"locationId":{"$ref":"#/components/schemas/LocId"}},"required":["_tag","locationId"],"additionalProperties":false}]},"EditOrderEncoded":{"type":"object","properties":{"editId":{"type":"string","minLength":1},"changes":{"type":"array","items":{"$ref":"#/components/schemas/OrderEditChange"},"minItems":1},"reason":{"type":"string","maxLength":500}},"required":["editId","changes"],"additionalProperties":false},"EditNotAllowedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["EditNotAllowed"]},"orderId":{"type":"string"},"lineId":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","orderId","lineId","reason"],"additionalProperties":false},"PostOrderNoteEncoded":{"type":"object","properties":{"reference":{"type":"string","minLength":1},"body":{"$ref":"#/components/schemas/OrderNoteBodyEncoded"}},"required":["reference","body"],"additionalProperties":false},"TranscriptErasedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TranscriptErased"]},"orderId":{"type":"string"},"sessionId":{"type":"string"},"erasedAt":{"type":"string"}},"required":["_tag","orderId","sessionId","erasedAt"],"additionalProperties":false},"TranscriptTooLargeEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TranscriptTooLarge"]},"limit":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"size":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["_tag","limit"],"additionalProperties":false},"TranscriptUnreadableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TranscriptUnreadable"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"TranscriptStoreUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TranscriptStoreUnavailable"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"TranscriptLinkEncoded":{"type":"object","properties":{"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["url","expiresAt"],"additionalProperties":false},"TranscriptNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["TranscriptNotFound"]},"orderId":{"type":"string"},"sessionId":{"type":"string"}},"required":["_tag","orderId","sessionId"],"additionalProperties":false},"RefundDestination":{"type":"string","enum":["original","store-credit"],"description":"`original` or `store-credit`"},"ReturnCondition_1":{"type":"string","enum":["sellable","damaged"],"description":"Where returned units land: `sellable` — back on sale; `damaged` — the damaged bucket"},"BatchNumber_4":{"type":"string","minLength":1,"maxLength":64},"RefundOrderEncoded":{"type":"object","properties":{"refundId":{"$ref":"#/components/schemas/RfdId"},"amountCents":{"type":"integer","minimum":0},"destination":{"$ref":"#/components/schemas/RefundDestination"},"creditNoteId":{"$ref":"#/components/schemas/CrnId"},"reason":{"type":"string","maxLength":500},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"quantity":{"type":"integer","exclusiveMinimum":0},"restock":{"type":"boolean"},"condition":{"$ref":"#/components/schemas/ReturnCondition"},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"},"minItems":1},"batchNumber":{"$ref":"#/components/schemas/BatchNumber"},"returnReference":{"type":"string","minLength":1},"parts":{"type":"array","items":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku_1"},"condition":{"$ref":"#/components/schemas/ReturnCondition_1"},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"},"minItems":1},"batchNumber":{"$ref":"#/components/schemas/BatchNumber_4"}},"required":["sku"],"additionalProperties":false},"minItems":1}},"required":["lineId","quantity"],"additionalProperties":false}}},"required":["refundId","amountCents","lines"],"additionalProperties":false},"OverRefundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OverRefund"]},"orderId":{"type":"string"},"lineId":{"type":"string"},"sku":{"type":"string"},"dispatched":{"type":"integer"},"previouslyReturned":{"type":"integer"},"requested":{"type":"integer"}},"required":["_tag","orderId","lineId","sku","dispatched","previouslyReturned","requested"],"additionalProperties":false},"RefundExceedsPaymentsEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["RefundExceedsPayments"]},"orderId":{"type":"string"},"requested":{"type":"integer"},"refundableCents":{"type":"integer"}},"required":["_tag","orderId","requested","refundableCents"],"additionalProperties":false},"PoId":{"type":"string","pattern":"^po_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A po-prefixed uuid, e.g. po_9f8c1c2e-0000-4000-8000-000000000000"},"RcptId":{"type":"string","pattern":"^rcpt_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A rcpt-prefixed uuid, e.g. rcpt_9f8c1c2e-0000-4000-8000-000000000000"},"ShelfUnitEncoded":{"type":"object","properties":{"sku":{"type":"string"},"quantity":{"type":"integer","minimum":0},"serial":{"type":"string"},"batchNumber":{"type":"string"},"expiresAt":{"type":"string"},"receivedAt":{"type":"string"},"poId":{"$ref":"#/components/schemas/PoId"},"receiptId":{"$ref":"#/components/schemas/RcptId"},"returnedFrom":{"$ref":"#/components/schemas/RfdId"},"pickedFor":{"$ref":"#/components/schemas/ShpId"},"locationId":{"$ref":"#/components/schemas/LocId"}},"required":["sku","quantity","receivedAt"],"additionalProperties":false},"ShelfEntryEncoded":{"type":"object","properties":{"unit":{"$ref":"#/components/schemas/ShelfUnitEncoded"},"expired":{"type":"boolean"}},"required":["unit","expired"],"additionalProperties":false},"WoId":{"type":"string","pattern":"^wo_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A wo-prefixed uuid, e.g. wo_9f8c1c2e-0000-4000-8000-000000000000"},"WriteOffReason":{"type":"string","enum":["damaged","expired","lost"],"description":"Why written-off units are leaving: `damaged`, `expired` or `lost`"},"WriteOffDisposition":{"type":"string","enum":["dispose","keep-damaged"],"description":"What happens to written-off on-hand units: `dispose` — removed from inventory; `keep-damaged` — moved into the damaged bucket"},"DisposeBucket":{"type":"string","enum":["onHand","damaged"],"description":"Which bucket a disposal empties: `onHand` — sellable stock; `damaged` — the damaged bucket"},"WriteOffStockEncoded":{"type":"object","properties":{"writeOffId":{"$ref":"#/components/schemas/WoId"},"sku":{"$ref":"#/components/schemas/Sku"},"locationId":{"$ref":"#/components/schemas/LocId"},"quantity":{"type":"integer","exclusiveMinimum":0},"reason":{"$ref":"#/components/schemas/WriteOffReason"},"disposition":{"$ref":"#/components/schemas/WriteOffDisposition"},"bucket":{"$ref":"#/components/schemas/DisposeBucket"},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"},"minItems":1},"batchNumber":{"$ref":"#/components/schemas/BatchNumber"},"note":{"type":"string","minLength":1}},"required":["writeOffId","sku","quantity","reason"],"additionalProperties":false},"StockWriteOffEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/WoId"},"sku":{"$ref":"#/components/schemas/Sku"},"locationId":{"$ref":"#/components/schemas/LocId"},"quantity":{"type":"integer","exclusiveMinimum":0},"reason":{"$ref":"#/components/schemas/WriteOffReason"},"disposition":{"$ref":"#/components/schemas/WriteOffDisposition"},"bucket":{"$ref":"#/components/schemas/DisposeBucket"},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"}},"batchNumber":{"$ref":"#/components/schemas/BatchNumber"},"note":{"type":"string","minLength":1},"occurredAt":{"type":"string"}},"required":["id","sku","quantity","reason","disposition","bucket","occurredAt"],"additionalProperties":false},"LocationNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LocationNotFound"]},"locationId":{"type":"string"}},"required":["_tag","locationId"],"additionalProperties":false},"LocationArchivedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LocationArchived"]},"locationId":{"type":"string"}},"required":["_tag","locationId"],"additionalProperties":false},"CarrierAccountStatus":{"type":"string","enum":["connected","disconnected"],"description":"`connected` — parcels may be booked with it; `disconnected` — nothing more is booked, consignments already booked keep their record"},"QuoteMissCount":{"type":"object","properties":{"reason":{"$ref":"#/components/schemas/QuoteMiss"},"count":{"type":"integer","exclusiveMinimum":0}},"required":["reason","count"],"additionalProperties":false},"QuotesDegraded":{"type":"object","properties":{"asked":{"type":"integer","exclusiveMinimum":0},"missed":{"type":"integer","exclusiveMinimum":0},"atCheckout":{"type":"integer","minimum":0},"reasons":{"type":"array","items":{"$ref":"#/components/schemas/QuoteMissCount"},"minItems":1},"detail":{"type":"string","maxLength":500},"limitMs":{"type":"integer","exclusiveMinimum":0},"since":{"type":"string"}},"required":["asked","missed","atCheckout","reasons","limitMs","since"],"additionalProperties":false},"CarrierAccountEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/CarId_1"},"appId":{"$ref":"#/components/schemas/AppId"},"externalId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"status":{"$ref":"#/components/schemas/CarrierAccountStatus"},"settingsPath":{"type":"string","maxLength":200,"pattern":"^(\\/[A-Za-z0-9_-]+)+$"},"quoteUrl":{"type":"string","maxLength":2000,"pattern":"^https?:\\/\\/\\S+$"},"installedAt":{"type":"string"},"quotesDegraded":{"$ref":"#/components/schemas/QuotesDegraded"},"connectedAt":{"type":"string"},"disconnectedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","appId","externalId","name","status","connectedAt","updatedAt"],"additionalProperties":false},"CarrierAccountListEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/CarrierAccountEncoded"}}},"required":["items"],"additionalProperties":false},"ConnectCarrierAccountEncoded":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"settingsPath":{"type":"string","maxLength":200,"pattern":"^(\\/[A-Za-z0-9_-]+)+$"},"quoteUrl":{"type":"string","maxLength":2000,"pattern":"^https?:\\/\\/\\S+$"}},"required":["externalId","name"],"additionalProperties":false},"NotACarrierAppEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NotACarrierApp"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"CarrierAccountNotYoursEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CarrierAccountNotYours"]},"carrierAccountId":{"type":"string"}},"required":["_tag","carrierAccountId"],"additionalProperties":false},"UnsafeQuoteUrlEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["UnsafeQuoteUrl"]},"url":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","url","reason"],"additionalProperties":false},"DisconnectCarrierAccountEncoded":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"required":["reason"],"additionalProperties":false},"CarrierAccountNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CarrierAccountNotFound"]},"carrierAccountId":{"type":"string"}},"required":["_tag","carrierAccountId"],"additionalProperties":false},"ConsignmentEntryEncoded":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"consignment":{"$ref":"#/components/schemas/ConsignmentEncoded"}},"required":["orderId","consignment"],"additionalProperties":false},"ConsignmentListEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ConsignmentEntryEncoded"}},"next":{"$ref":"#/components/schemas/CnsId"}},"required":["items"],"additionalProperties":false},"PadId_1":{"type":"string","pattern":"^pad_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A platform address: a pad-prefixed uuid"},"PostalAddress_2":{"type":"object","properties":{"firstName":{"type":"string","maxLength":500},"lastName":{"type":"string","maxLength":500},"company":{"type":"string","maxLength":500},"address1":{"type":"string","maxLength":500},"address2":{"type":"string","maxLength":500},"city":{"type":"string","maxLength":500},"province":{"type":"string","maxLength":500},"provinceCode":{"type":"string","maxLength":10},"country":{"type":"string","maxLength":500},"countryCode":{"type":"string","allOf":[{"minLength":2},{"maxLength":2}]},"zip":{"type":"string","maxLength":20},"phone":{"type":"string","maxLength":40},"verifiedAddressId":{"$ref":"#/components/schemas/PadId_1"}},"additionalProperties":false},"ConsignmentLine":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"name":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"weightGrams":{"type":"integer","exclusiveMinimum":0},"hsCode":{"type":"string"},"countryOfOrigin":{"$ref":"#/components/schemas/CountryCode"}},"required":["lineId","sku","name","quantity"],"additionalProperties":false},"ConsignmentDetailEncoded":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"orderNumber":{"type":"string"},"orderReference":{"type":"string"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"shipmentNumber":{"type":"string"},"consignment":{"$ref":"#/components/schemas/ConsignmentEncoded"},"shippingMethod":{"$ref":"#/components/schemas/ShippingMethod"},"shipTo":{"type":"object","properties":{"label":{"type":"string"},"address":{"anyOf":[{"$ref":"#/components/schemas/PostalAddress_2"},{"type":"null"}]}},"required":["address"],"additionalProperties":false},"shipFrom":{"type":"object","properties":{"locationId":{"$ref":"#/components/schemas/LocId"},"name":{"type":"string"},"address":{"$ref":"#/components/schemas/PostalAddress_1"}},"required":["locationId","name"],"additionalProperties":false},"cartons":{"type":"array","items":{"$ref":"#/components/schemas/Carton"}},"lines":{"type":"array","items":{"$ref":"#/components/schemas/ConsignmentLine"}}},"required":["orderId","orderNumber","orderReference","currency","shipmentId","shipmentNumber","consignment","shipTo","shipFrom","cartons","lines"],"additionalProperties":false},"ConsignmentNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConsignmentNotFound"]},"consignmentId":{"type":"string"}},"required":["_tag","consignmentId"],"additionalProperties":false},"ConsignmentBooking_1":{"type":"object","properties":{"carrier":{"type":"string","minLength":1,"maxLength":200},"service":{"$ref":"#/components/schemas/CarrierService_2"},"trackingNumbers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":50},"trackingUrl":{"type":"string","maxLength":2000,"pattern":"^https:\\/\\/\\S+$"},"externalId":{"type":"string","minLength":1,"maxLength":200},"cost":{"type":"object","properties":{"priceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"taxCents":{"type":"integer","minimum":0}},"required":["priceCents","currency"],"additionalProperties":false}},"required":["carrier","service","trackingNumbers","externalId"],"additionalProperties":false},"ConsignmentBooked":{"type":"object","properties":{"_tag":{"type":"string","enum":["booked"]},"booking":{"$ref":"#/components/schemas/ConsignmentBooking_1"}},"required":["_tag","booking"],"additionalProperties":false},"ConsignmentRefused":{"type":"object","properties":{"_tag":{"type":"string","enum":["refused"]},"code":{"$ref":"#/components/schemas/ConsignmentRefusalCode"},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["_tag","code","reason"],"additionalProperties":false},"AnswerConsignment":{"anyOf":[{"$ref":"#/components/schemas/ConsignmentBooked"},{"$ref":"#/components/schemas/ConsignmentRefused"}]},"ConsignmentNotInStateEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConsignmentNotInState"]},"consignmentId":{"type":"string"},"status":{"$ref":"#/components/schemas/ConsignmentStatus"},"expected":{"type":"array","items":{"$ref":"#/components/schemas/ConsignmentStatus"}}},"required":["_tag","consignmentId","status","expected"],"additionalProperties":false},"TrackConsignmentEncoded":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/TrackingStatus"},"at":{"type":"string"},"detail":{"type":"string","maxLength":500}},"required":["status","at"],"additionalProperties":false},"LabelTooLargeEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LabelTooLarge"]},"limit":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"size":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["_tag","limit"],"additionalProperties":false},"LabelUnreadableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LabelUnreadable"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"LabelStoreUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LabelStoreUnavailable"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"LabelLinkEncoded":{"type":"object","properties":{"url":{"type":"string"},"contentType":{"$ref":"#/components/schemas/LabelContentType"},"expiresAt":{"type":"string"}},"required":["url","contentType","expiresAt"],"additionalProperties":false},"LabelNotStoredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LabelNotStored"]},"consignmentId":{"type":"string"}},"required":["_tag","consignmentId"],"additionalProperties":false},"LabelExpiredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LabelExpired"]},"consignmentId":{"type":"string"},"storedAt":{"type":"string"}},"required":["_tag","consignmentId","storedAt"],"additionalProperties":false},"RequestConsignmentEncoded":{"type":"object","properties":{"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"service":{"$ref":"#/components/schemas/CarrierService_1"},"quoted":{"$ref":"#/components/schemas/QuotedPrice"},"sealedQuote":{"type":"string","maxLength":65536}},"required":["carrierAccountId"],"additionalProperties":false},"CarrierAccountDisconnectedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CarrierAccountDisconnected"]},"carrierAccountId":{"type":"string"}},"required":["_tag","carrierAccountId"],"additionalProperties":false},"ConsignmentOpenEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConsignmentOpen"]},"shipmentId":{"type":"string"},"consignmentId":{"type":"string"},"status":{"$ref":"#/components/schemas/ConsignmentStatus"}},"required":["_tag","shipmentId","consignmentId","status"],"additionalProperties":false},"QuoteTokenInvalidEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["QuoteTokenInvalid"]},"shipmentId":{"type":"string"}},"required":["_tag","shipmentId"],"additionalProperties":false},"VoidConsignmentEncoded":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false},"ConsignmentManifestedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConsignmentManifested"]},"consignmentId":{"type":"string"},"manifestId":{"type":"string"}},"required":["_tag","consignmentId","manifestId"],"additionalProperties":false},"PayCarrierEncoded":{"type":"object","properties":{"paymentId":{"$ref":"#/components/schemas/CpyId"},"amountCents":{"type":"integer","minimum":0},"taxCents":{"type":"integer","minimum":0},"reference":{"type":"string","minLength":1,"maxLength":200}},"required":["paymentId"],"additionalProperties":false},"ConsignmentPaymentProblem":{"type":"string","enum":["not-booked","no-cost","already-paid"],"description":"Why a parcel's carrier charge could not be paid: `not-booked` — it is not a booked consignment; `no-cost` — its booking says no charge, so there is nothing accrued to pay; `already-paid` — another payment paid it"},"ConsignmentNotPayableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ConsignmentNotPayable"]},"consignmentId":{"type":"string"},"problem":{"$ref":"#/components/schemas/ConsignmentPaymentProblem"}},"required":["_tag","consignmentId","problem"],"additionalProperties":false},"MnfId":{"type":"string","pattern":"^mnf_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A mnf-prefixed uuid, e.g. mnf_9f8c1c2e-0000-4000-8000-000000000000"},"ManifestStatus":{"type":"string","enum":["requested","lodged","refused"],"description":"`requested` — waiting for its app to lodge it with the carrier; `lodged` — the carrier has it, and its consignments can no longer be voided; `refused` — the carrier would not take it (the reason says why) and its consignments are free for the next one"},"ManifestEntry":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"consignmentId":{"$ref":"#/components/schemas/CnsId"}},"required":["orderId","consignmentId"],"additionalProperties":false},"ManifestEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/MnfId"},"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"reference":{"type":"string","minLength":1,"maxLength":200},"locationId":{"$ref":"#/components/schemas/LocId"},"status":{"$ref":"#/components/schemas/ManifestStatus"},"consignments":{"type":"array","items":{"$ref":"#/components/schemas/ManifestEntry"}},"externalId":{"type":"string","minLength":1,"maxLength":200},"refusal":{"type":"string","maxLength":500},"document":{"$ref":"#/components/schemas/ConsignmentLabel"},"requestedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","carrierAccountId","reference","status","consignments","requestedAt","updatedAt"],"additionalProperties":false},"ManifestListEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ManifestEncoded"}}},"required":["items"],"additionalProperties":false},"RequestManifestEncoded":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":200},"locationId":{"$ref":"#/components/schemas/LocId"}},"required":["reference"],"additionalProperties":false},"ManifestNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ManifestNotFound"]},"manifestId":{"type":"string"}},"required":["_tag","manifestId"],"additionalProperties":false},"NothingToManifestEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NothingToManifest"]},"carrierAccountId":{"type":"string"}},"required":["_tag","carrierAccountId"],"additionalProperties":false},"ManifestLodged":{"type":"object","properties":{"_tag":{"type":"string","enum":["lodged"]},"externalId":{"type":"string","minLength":1,"maxLength":200}},"required":["_tag"],"additionalProperties":false},"ManifestRefused":{"type":"object","properties":{"_tag":{"type":"string","enum":["refused"]},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["_tag","reason"],"additionalProperties":false},"AnswerManifest":{"anyOf":[{"$ref":"#/components/schemas/ManifestLodged"},{"$ref":"#/components/schemas/ManifestRefused"}]},"ManifestNotInStateEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ManifestNotInState"]},"manifestId":{"type":"string"},"status":{"$ref":"#/components/schemas/ManifestStatus"},"expected":{"type":"array","items":{"$ref":"#/components/schemas/ManifestStatus"}}},"required":["_tag","manifestId","status","expected"],"additionalProperties":false},"ManifestDocumentNotStoredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ManifestDocumentNotStored"]},"manifestId":{"type":"string"}},"required":["_tag","manifestId"],"additionalProperties":false},"PackedSizeEncoded":{"type":"object","properties":{"lengthMm":{"type":"integer","exclusiveMinimum":0},"widthMm":{"type":"integer","exclusiveMinimum":0},"heightMm":{"type":"integer","exclusiveMinimum":0}},"required":["lengthMm","widthMm","heightMm"],"additionalProperties":false},"AllSites":{"type":"object","properties":{"_tag":{"type":"string","enum":["all"]}},"required":["_tag"],"additionalProperties":false},"ListedSites":{"type":"object","properties":{"_tag":{"type":"string","enum":["listed"]},"locationIds":{"type":"array","items":{"$ref":"#/components/schemas/LocId"},"minItems":1,"maxItems":200}},"required":["_tag","locationIds"],"additionalProperties":false},"BoxSites":{"anyOf":[{"$ref":"#/components/schemas/AllSites"},{"$ref":"#/components/schemas/ListedSites"}]},"BoxEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/BoxId"},"name":{"type":"string","minLength":1,"maxLength":200},"inner":{"$ref":"#/components/schemas/PackedSizeEncoded"},"tareGrams":{"type":"integer","minimum":0},"maxWeightGrams":{"type":"integer","exclusiveMinimum":0},"packaging":{"$ref":"#/components/schemas/Packaging"},"sites":{"$ref":"#/components/schemas/BoxSites"},"archived":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","inner","tareGrams","maxWeightGrams","packaging","sites","archived","createdAt","updatedAt"],"additionalProperties":false},"BoxListEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/BoxEncoded"}}},"required":["items"],"additionalProperties":false},"SaveBox":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"inner":{"$ref":"#/components/schemas/PackedSizeEncoded"},"tareGrams":{"type":"integer","minimum":0},"maxWeightGrams":{"type":"integer","exclusiveMinimum":0},"packaging":{"$ref":"#/components/schemas/Packaging"},"sites":{"$ref":"#/components/schemas/BoxSites"}},"required":["name","inner","maxWeightGrams"],"additionalProperties":false},"BoxPackagingInvalidEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["BoxPackagingInvalid"]},"packaging":{"$ref":"#/components/schemas/Packaging"},"reason":{"type":"string"}},"required":["_tag","packaging","reason"],"additionalProperties":false},"LocationNotFulfillableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["LocationNotFulfillable"]},"locationId":{"type":"string"}},"required":["_tag","locationId"],"additionalProperties":false},"BoxNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["BoxNotFound"]},"boxId":{"type":"string"}},"required":["_tag","boxId"],"additionalProperties":false},"PackingSuggestionEncoded":{"type":"object","properties":{"cartons":{"type":"array","items":{"$ref":"#/components/schemas/Carton"},"maxItems":1000},"oversize":{"type":"array","items":{"$ref":"#/components/schemas/Sku"}},"unmeasured":{"type":"array","items":{"$ref":"#/components/schemas/Sku"}}},"required":["cartons","oversize","unmeasured"],"additionalProperties":false},"DraftRateLine":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku_1"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":10000},"unitPriceCents":{"type":"integer","minimum":0}},"required":["sku","quantity"],"additionalProperties":false},"QuoteRatesEncoded":{"type":"object","properties":{"channelId":{"$ref":"#/components/schemas/ChnId"},"orderId":{"$ref":"#/components/schemas/OrdId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"locationId":{"$ref":"#/components/schemas/LocId"},"to":{"$ref":"#/components/schemas/PostalAddress_1"},"cartons":{"type":"array","items":{"$ref":"#/components/schemas/Carton_1"},"minItems":1,"maxItems":50},"valueCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/DraftRateLine"},"minItems":1,"maxItems":500},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"catalogId":{"$ref":"#/components/schemas/CatId"}},"additionalProperties":false},"RateEncoded":{"type":"object","properties":{"code":{"type":"string"},"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"title":{"type":"string"},"service":{"$ref":"#/components/schemas/CarrierService_2"},"priceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"etaDays":{"$ref":"#/components/schemas/EtaDays_2"}},"required":["code","carrierAccountId","title","service","priceCents","currency"],"additionalProperties":false},"QuoteUnanswered_1":{"type":"object","properties":{"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"reason":{"$ref":"#/components/schemas/QuoteMiss"},"detail":{"type":"string"}},"required":["carrierAccountId","reason"],"additionalProperties":false},"QuotedParcel":{"type":"object","properties":{"locationId":{"$ref":"#/components/schemas/LocId"},"cartons":{"type":"array","items":{"$ref":"#/components/schemas/Carton"},"maxItems":50},"valueCents":{"type":"integer","minimum":0}},"required":["locationId","cartons","valueCents"],"additionalProperties":false},"RateQuoteEncoded":{"type":"object","properties":{"rates":{"type":"array","items":{"$ref":"#/components/schemas/RateEncoded"}},"unanswered":{"type":"array","items":{"$ref":"#/components/schemas/QuoteUnanswered_1"}},"estimated":{"type":"boolean"},"unweighed":{"type":"array","items":{"$ref":"#/components/schemas/Sku"},"maxItems":500},"parcels":{"type":"array","items":{"$ref":"#/components/schemas/QuotedParcel"},"maxItems":50},"sealed":{"type":"string"}},"required":["rates"],"additionalProperties":false},"QuoteInputInvalidEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["QuoteInputInvalid"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"NoShipFromEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NoShipFrom"]},"locationId":{"type":"string"}},"required":["_tag","locationId"],"additionalProperties":false},"RateRounding":{"type":"string","enum":["none","up-to-dollar","up-to-99"],"description":"How a marked-up checkout price is rounded, upwards only: `none` — to the cent; `up-to-dollar` — up to the next whole dollar; `up-to-99` — up to the next price ending in .99. A free rate stays free."},"RateAdjust":{"type":"object","properties":{"percentBp":{"type":"integer","minimum":0,"maximum":100000},"fixedCents":{"type":"integer","minimum":-1000000,"maximum":1000000},"rounding":{"$ref":"#/components/schemas/RateRounding"}},"additionalProperties":false},"RateServiceRef":{"type":"object","properties":{"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"serviceCode":{"type":"string","minLength":1,"maxLength":200}},"required":["carrierAccountId","serviceCode"],"additionalProperties":false},"RateCollapse":{"type":"string","enum":["none","cheapest","fastest","cheapest-and-fastest"],"description":"Which rates a checkout shows: `none` — every rate; `cheapest` — the cheapest alone, titled `cheapestTitle`; `fastest` — the fastest alone (shortest ETA; with none known, the dearest), titled `fastestTitle`; `cheapest-and-fastest` — both, once when they are the same. A collapsed option keeps its exact code."},"RateRename":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/RateServiceRef"},"title":{"type":"string","minLength":1,"maxLength":120}},"required":["ref","title"],"additionalProperties":false},"FreeShippingApplies":{"type":"string","enum":["cheapest","listed"],"description":"Which rates a cart at or over the free-shipping threshold gets free: `cheapest` — the cheapest rate shown; `listed` — the services the rule names."},"FreeShipping":{"type":"object","properties":{"overCents":{"type":"integer","minimum":0},"applies":{"$ref":"#/components/schemas/FreeShippingApplies"},"services":{"type":"array","items":{"$ref":"#/components/schemas/RateServiceRef"},"maxItems":200}},"required":["overCents","applies"],"additionalProperties":false},"FallbackRate":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"priceCents":{"type":"integer","minimum":0}},"required":["title","priceCents"],"additionalProperties":false},"TransitDays":{"type":"object","properties":{"ref":{"$ref":"#/components/schemas/RateServiceRef"},"minDays":{"type":"integer","minimum":0,"maximum":60},"maxDays":{"type":"integer","minimum":0,"maximum":60}},"required":["ref","minDays","maxDays"],"additionalProperties":false},"TimeZone":{"type":"string","maxLength":64},"DispatchTimes":{"type":"object","properties":{"handlingDays":{"type":"integer","minimum":0,"maximum":30},"cutoff":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"timeZone":{"$ref":"#/components/schemas/TimeZone"}},"required":["timeZone"],"additionalProperties":false},"RateRulesEncoded":{"type":"object","properties":{"channelId":{"$ref":"#/components/schemas/ChnId"},"adjust":{"$ref":"#/components/schemas/RateAdjust"},"allow":{"type":"array","items":{"$ref":"#/components/schemas/RateServiceRef"},"maxItems":200},"collapse":{"$ref":"#/components/schemas/RateCollapse"},"cheapestTitle":{"type":"string","minLength":1,"maxLength":120},"fastestTitle":{"type":"string","minLength":1,"maxLength":120},"renames":{"type":"array","items":{"$ref":"#/components/schemas/RateRename"},"maxItems":200},"free":{"$ref":"#/components/schemas/FreeShipping"},"fallback":{"$ref":"#/components/schemas/FallbackRate"},"transit":{"type":"array","items":{"$ref":"#/components/schemas/TransitDays"},"maxItems":200},"dispatch":{"$ref":"#/components/schemas/DispatchTimes"}},"required":["channelId"],"additionalProperties":false},"SaveRateRulesEncoded":{"type":"object","properties":{"adjust":{"$ref":"#/components/schemas/RateAdjust"},"allow":{"type":"array","items":{"$ref":"#/components/schemas/RateServiceRef"},"maxItems":200},"collapse":{"$ref":"#/components/schemas/RateCollapse"},"cheapestTitle":{"type":"string","minLength":1,"maxLength":120},"fastestTitle":{"type":"string","minLength":1,"maxLength":120},"renames":{"type":"array","items":{"$ref":"#/components/schemas/RateRename"},"maxItems":200},"free":{"$ref":"#/components/schemas/FreeShipping"},"fallback":{"$ref":"#/components/schemas/FallbackRate"},"transit":{"type":"array","items":{"$ref":"#/components/schemas/TransitDays"},"maxItems":200},"dispatch":{"$ref":"#/components/schemas/DispatchTimes"}},"additionalProperties":false},"RateRulesInvalidEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["RateRulesInvalid"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"ChannelNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ChannelNotFound"]},"channelId":{"type":"string"}},"required":["_tag","channelId"],"additionalProperties":false},"CheckoutLine":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku_1"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":10000},"priceCents":{"type":"integer","minimum":0},"weightGrams":{"type":"integer","minimum":0}},"required":["quantity","priceCents"],"additionalProperties":false},"CheckoutDestination":{"type":"object","properties":{"firstName":{"type":"string","maxLength":500},"lastName":{"type":"string","maxLength":500},"company":{"type":"string","maxLength":500},"address1":{"type":"string","maxLength":500},"address2":{"type":"string","maxLength":500},"city":{"type":"string","maxLength":500},"province":{"type":"string","maxLength":500},"provinceCode":{"type":"string","maxLength":10},"country":{"type":"string","maxLength":500},"countryCode":{"$ref":"#/components/schemas/CountryCode"},"zip":{"type":"string","maxLength":20},"phone":{"type":"string","maxLength":40},"verifiedAddressId":{"$ref":"#/components/schemas/PadId_1"}},"required":["countryCode"],"additionalProperties":false},"CheckoutRateRequestEncoded":{"type":"object","properties":{"lines":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutLine"},"minItems":1,"maxItems":500},"to":{"$ref":"#/components/schemas/CheckoutDestination"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"exchangeRate":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["lines","to","currency"],"additionalProperties":false},"DeliveryWindow_1":{"type":"object","properties":{"earliest":{"$ref":"#/components/schemas/IsoDay"},"latest":{"$ref":"#/components/schemas/IsoDay"}},"required":["earliest","latest"],"additionalProperties":false},"CheckoutRateEncoded":{"type":"object","properties":{"code":{"type":"string"},"title":{"type":"string"},"priceCents":{"type":"integer","minimum":0},"carrierPriceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"etaDays":{"$ref":"#/components/schemas/EtaDays_2"},"delivery":{"$ref":"#/components/schemas/DeliveryWindow_1"},"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"service":{"$ref":"#/components/schemas/CarrierService_1"}},"required":["code","title","priceCents","currency"],"additionalProperties":false},"CheckoutRatesEncoded":{"type":"object","properties":{"rates":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutRateEncoded"}},"quoteId":{"$ref":"#/components/schemas/ChqId"},"fallback":{"type":"boolean"},"estimated":{"type":"boolean"},"unweighed":{"type":"array","items":{"$ref":"#/components/schemas/Sku"},"maxItems":500}},"required":["rates","fallback"],"additionalProperties":false},"ChannelNotYoursEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["ChannelNotYours"]},"channelId":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","channelId","reason"],"additionalProperties":false},"HistoricalOutcome":{"type":"string","enum":["fulfilled","partially-fulfilled","cancelled","refunded","open"],"description":"Where a historical order stands in the system it came from: `fulfilled`, `partially-fulfilled`, `cancelled`, `refunded`, or `open` (still being worked there: mirrored until the tenant goes live, then adopted as a live order)"},"ExternalOrderNumberEncoded":{"type":"string"},"HistoricalLineEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku_1"},"name":{"$ref":"#/components/schemas/LineName"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"discountCents":{"type":"integer","minimum":0},"taxCents":{"type":"integer","minimum":0},"taxLines":{"$ref":"#/components/schemas/ChannelTaxLines"},"externalId":{"type":"string","minLength":1}},"required":["id","name","quantity","unitPriceCents"],"additionalProperties":false},"HistoricalMoney":{"type":"object","properties":{"totalCents":{"type":"integer","minimum":0},"paidCents":{"type":"integer","minimum":0},"refundedCents":{"type":"integer","minimum":0}},"required":["totalCents","paidCents"],"additionalProperties":false},"HistoricalMoney_1":{"type":"object","properties":{"totalCents":{"type":"integer","minimum":0},"paidCents":{"type":"integer","minimum":0},"refundedCents":{"type":"integer","minimum":0}},"required":["totalCents","paidCents"],"additionalProperties":false},"HistoricalRefundLineEncoded":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"quantity":{"type":"integer","exclusiveMinimum":0},"restock":{"type":"boolean"}},"required":["lineId","quantity","restock"],"additionalProperties":false},"HistoricalRefundEncoded":{"type":"object","properties":{"refundId":{"$ref":"#/components/schemas/RfdId"},"number":{"type":"string","minLength":1},"amountCents":{"type":"integer","minimum":0},"taxCents":{"type":"integer","minimum":0},"lines":{"type":"array","items":{"$ref":"#/components/schemas/HistoricalRefundLineEncoded"}},"refundedAt":{"type":"string"}},"required":["refundId","number","amountCents","taxCents","lines","refundedAt"],"additionalProperties":false},"HistoricalOrderEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/OrdId"},"source":{"$ref":"#/components/schemas/OrderSource"},"externalNumber":{"$ref":"#/components/schemas/ExternalOrderNumberEncoded"},"placedAt":{"type":"string"},"customer":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId_1"},"companyId":{"$ref":"#/components/schemas/CmpId_1"},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"billingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]}},"additionalProperties":false},"currency":{"$ref":"#/components/schemas/Currency"},"lines":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/HistoricalLineEncoded"}],"minItems":1,"items":{"$ref":"#/components/schemas/HistoricalLineEncoded"}},"charges":{"$ref":"#/components/schemas/OrderCharges"},"shippingTaxLines":{"$ref":"#/components/schemas/ChannelTaxLines"},"taxesIncluded":{"type":"boolean"},"money":{"$ref":"#/components/schemas/HistoricalMoney"},"outcome":{"$ref":"#/components/schemas/HistoricalOutcome"},"fx":{"$ref":"#/components/schemas/FxCapture_1"},"original":{"$ref":"#/components/schemas/HistoricalMoney_1"},"refunds":{"type":"array","items":{"$ref":"#/components/schemas/HistoricalRefundEncoded"}},"adoptedAs":{"$ref":"#/components/schemas/OrdId"},"recordedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","source","externalNumber","placedAt","currency","lines","charges","money","outcome","fx","recordedAt","updatedAt"],"additionalProperties":false},"HistoricalOrderPageEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/HistoricalOrderEncoded"}},"total":{"type":"integer","minimum":0},"limit":{"type":"integer","exclusiveMinimum":0},"offset":{"type":"integer","minimum":0}},"required":["items","total","offset"],"additionalProperties":false},"HistoricalLineInput":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku_1"},"name":{"$ref":"#/components/schemas/LineName"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"discountCents":{"type":"integer","minimum":0},"taxCents":{"type":"integer","minimum":0},"taxLines":{"$ref":"#/components/schemas/ChannelTaxLines"},"externalId":{"type":"string","minLength":1}},"required":["name","quantity","unitPriceCents"],"additionalProperties":false},"RecordHistoricalOrderEncoded":{"type":"object","properties":{"source":{"$ref":"#/components/schemas/OrderSource"},"externalNumber":{"$ref":"#/components/schemas/ExternalOrderNumberEncoded"},"placedAt":{"type":"string"},"customer":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId_1"},"companyId":{"$ref":"#/components/schemas/CmpId_1"},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"billingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]}},"additionalProperties":false},"currency":{"$ref":"#/components/schemas/Currency"},"lines":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/HistoricalLineInput"}],"minItems":1,"items":{"$ref":"#/components/schemas/HistoricalLineInput"}},"charges":{"$ref":"#/components/schemas/OrderCharges"},"shippingTaxLines":{"$ref":"#/components/schemas/ChannelTaxLines"},"taxesIncluded":{"type":"boolean"},"money":{"$ref":"#/components/schemas/HistoricalMoney"},"outcome":{"$ref":"#/components/schemas/HistoricalOutcome"}},"required":["source","externalNumber","placedAt","currency","lines","money","outcome"],"additionalProperties":false},"OrderNotHistoricalEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["OrderNotHistorical"]},"orderId":{"type":"string"}},"required":["_tag","orderId"],"additionalProperties":false},"CurrencyUnsupportedReason":{"type":"string","enum":["unquoted","no-rate"],"description":"`unquoted`: no bank Manifold keeps rates from publishes the currency; `no-rate`: none published it in the fortnight before the day asked about"},"HistoricalOrderCurrencyUnsupportedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["HistoricalOrderCurrencyUnsupported"]},"orderId":{"type":"string"},"currency":{"type":"string"},"homeCurrency":{"type":"string"},"reason":{"$ref":"#/components/schemas/CurrencyUnsupportedReason"}},"required":["_tag","orderId","currency","homeCurrency","reason"],"additionalProperties":false},"RefundHistoricalOrderEncoded":{"type":"object","properties":{"refundId":{"$ref":"#/components/schemas/RfdId"},"amountCents":{"type":"integer","minimum":0},"reason":{"type":"string","maxLength":500},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"quantity":{"type":"integer","exclusiveMinimum":0},"restock":{"type":"boolean"},"condition":{"$ref":"#/components/schemas/ReturnCondition"}},"required":["lineId","quantity"],"additionalProperties":false}}},"required":["refundId","amountCents"],"additionalProperties":false},"HistoricalRefundRefusal":{"type":"string","enum":["before-go-live","open","restock-without-sku"],"description":"Why a historical order cannot be refunded in Manifold: `before-go-live` (the tenant is still read-only; refunds come from the source), `open` (the source is still working the order) or `restock-without-sku` (a restocked line names no SKU)"},"HistoricalOrderNotRefundableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["HistoricalOrderNotRefundable"]},"orderId":{"type":"string"},"reason":{"$ref":"#/components/schemas/HistoricalRefundRefusal"}},"required":["_tag","orderId","reason"],"additionalProperties":false},"AdoptHistoricalOrderEncoded":{"type":"object","properties":{"liveOrderId":{"$ref":"#/components/schemas/OrdId"}},"required":["liveOrderId"],"additionalProperties":false},"HistoricalOrderNotAdoptableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["HistoricalOrderNotAdoptable"]},"orderId":{"type":"string"},"outcome":{"$ref":"#/components/schemas/HistoricalOutcome"},"adoptedAs":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["_tag","orderId","outcome"],"additionalProperties":false},"PayoutStatus":{"type":"string","enum":["in-transit","paid","failed","reversed"],"description":"Where a payout stands, as its provider says: `in-transit` (scheduled or on its way), `paid` (it arrived), `failed` (the bank refused it), `reversed` (the provider cancelled or clawed it back)"},"PayoutItemKind":{"type":"string","enum":["charge","refund","fee","chargeback","adjustment","reserve","conversion"],"description":"What a payout line is: a `charge` it settles, a `refund` it takes back, the provider's `fee`, a `chargeback`, an `adjustment`, a `reserve` held back or released, a `conversion` between currencies"},"PayoutItemInputEncoded":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/PayoutItemKind"},"amountCents":{"type":"integer"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"providerTransactionId":{"type":"string","minLength":1},"paymentId":{"$ref":"#/components/schemas/PayId"},"refundId":{"$ref":"#/components/schemas/RfdId"},"orderId":{"$ref":"#/components/schemas/OrdId"},"orderReference":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500}},"required":["kind","amountCents","currency"],"additionalProperties":false},"RecordPayoutEncoded":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/PaymentProvider"},"providerPayoutId":{"type":"string","minLength":1},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"netCents":{"type":"integer"},"status":{"$ref":"#/components/schemas/PayoutStatus"},"issuedAt":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PayoutItemInputEncoded"},"maxItems":10000},"note":{"type":"string","maxLength":500}},"required":["provider","providerPayoutId","currency","netCents","status","issuedAt","items"],"additionalProperties":false},"PyoId":{"type":"string","pattern":"^pyo_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A pyo-prefixed uuid, e.g. pyo_9f8c1c2e-0000-4000-8000-000000000000"},"FxCapture_3":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency"},"home":{"$ref":"#/components/schemas/Currency"},"rate":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"rateDate":{"$ref":"#/components/schemas/IsoDay"},"source":{"$ref":"#/components/schemas/FxCaptureSource"},"via":{"$ref":"#/components/schemas/Currency_1"}},"required":["currency","home","rate","rateDate","source"],"additionalProperties":false,"description":"The rate a money fact was booked at, captured when it committed: `rate` units of `home` per one unit of the document's `currency`, from `source` for `rateDate` (`via` a cross); `same` is a document in the home currency, rate 1"},"PayoutLineEncoded":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/PayoutItemKind"},"amountCents":{"type":"integer"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"providerTransactionId":{"type":"string","minLength":1},"paymentId":{"$ref":"#/components/schemas/PayId"},"refundId":{"$ref":"#/components/schemas/RfdId"},"orderId":{"$ref":"#/components/schemas/OrdId"},"orderReference":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"matched":{"type":"boolean"},"homeCents":{"type":"integer"}},"required":["kind","amountCents","currency","matched"],"additionalProperties":false},"PayoutEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PyoId"},"provider":{"$ref":"#/components/schemas/PaymentProvider"},"providerPayoutId":{"type":"string","minLength":1},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"netCents":{"type":"integer"},"status":{"$ref":"#/components/schemas/PayoutStatus"},"issuedAt":{"type":"string"},"note":{"type":"string","maxLength":500},"fx":{"$ref":"#/components/schemas/FxCapture_1"},"itemRates":{"type":"array","items":{"$ref":"#/components/schemas/FxCapture_3"}},"unaccountedCents":{"type":"integer"},"recordedAt":{"type":"string"},"updatedAt":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PayoutLineEncoded"}},"homeNetCents":{"type":"integer"}},"required":["id","provider","providerPayoutId","currency","netCents","status","issuedAt","fx","unaccountedCents","recordedAt","updatedAt","items","homeNetCents"],"additionalProperties":false},"PayoutItemUnknownEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PayoutItemUnknown"]},"id":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","id","reason"],"additionalProperties":false},"PayoutPageEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PayoutEncoded"}},"total":{"type":"integer","minimum":0},"limit":{"type":"integer","exclusiveMinimum":0},"offset":{"type":"integer","minimum":0}},"required":["items","total","offset"],"additionalProperties":false},"UnsettledPaymentEncoded":{"type":"object","properties":{"paymentId":{"$ref":"#/components/schemas/PayId"},"orderId":{"$ref":"#/components/schemas/OrdId"},"amountCents":{"type":"integer","exclusiveMinimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"providerTransactionId":{"type":"string","minLength":1},"receivedAt":{"type":"string"}},"required":["paymentId","orderId","amountCents","currency","receivedAt"],"additionalProperties":false},"UnmatchedPayoutItemEncoded":{"type":"object","properties":{"payoutId":{"$ref":"#/components/schemas/PyoId"},"providerPayoutId":{"type":"string","minLength":1},"kind":{"$ref":"#/components/schemas/PayoutItemKind"},"amountCents":{"type":"integer"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"providerTransactionId":{"type":"string","minLength":1},"orderId":{"$ref":"#/components/schemas/OrdId"},"orderReference":{"type":"string","minLength":1}},"required":["payoutId","providerPayoutId","kind","amountCents","currency"],"additionalProperties":false},"ProviderReconciliationEncoded":{"type":"object","properties":{"provider":{"$ref":"#/components/schemas/PaymentProvider"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"unsettled":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"amountCents":{"type":"integer"},"homeCents":{"type":"integer"},"payments":{"type":"array","items":{"$ref":"#/components/schemas/UnsettledPaymentEncoded"}}},"required":["count","amountCents","payments"],"additionalProperties":false},"unmatched":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"amountCents":{"type":"integer"},"homeCents":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/components/schemas/UnmatchedPayoutItemEncoded"}}},"required":["count","amountCents","items"],"additionalProperties":false},"payouts":{"type":"object","properties":{"count":{"type":"integer","minimum":0},"paidCents":{"type":"integer"},"paidHomeCents":{"type":"integer"},"inTransitCents":{"type":"integer"},"inTransitHomeCents":{"type":"integer"}},"required":["count","paidCents","paidHomeCents","inTransitCents","inTransitHomeCents"],"additionalProperties":false}},"required":["provider","currency","unsettled","unmatched","payouts"],"additionalProperties":false},"PayoutReconciliationEncoded":{"type":"object","properties":{"providers":{"type":"array","items":{"$ref":"#/components/schemas/ProviderReconciliationEncoded"}}},"required":["providers"],"additionalProperties":false},"PayoutNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PayoutNotFound"]},"payoutId":{"type":"string"}},"required":["_tag","payoutId"],"additionalProperties":false},"CreditEntryKind":{"type":"string","enum":["issued","reversed","spent","refunded"],"description":"What moved a credit account: `issued` by hand, `reversed` (an issue taken back), `spent` on an order's payment, or `refunded` onto it from an order's refund"},"CrdId":{"type":"string","pattern":"^crd_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A crd-prefixed uuid, e.g. crd_9f8c1c2e-0000-4000-8000-000000000000"},"CreditEntry":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/CreditEntryKind"},"amountCents":{"type":"integer","exclusiveMinimum":0},"at":{"type":"string"},"creditId":{"$ref":"#/components/schemas/CrdId"},"orderId":{"$ref":"#/components/schemas/OrdId"},"paymentId":{"$ref":"#/components/schemas/PayId"},"refundId":{"$ref":"#/components/schemas/RfdId"},"reason":{"type":"string","maxLength":500}},"required":["kind","amountCents","at"],"additionalProperties":false},"CreditAccountEncoded":{"type":"object","properties":{"holderId":{"$ref":"#/components/schemas/TenderHolderId"},"currency":{"$ref":"#/components/schemas/Currency"},"balanceCents":{"type":"integer","minimum":0},"entries":{"type":"array","items":{"$ref":"#/components/schemas/CreditEntry"}}},"required":["holderId","currency","balanceCents","entries"],"additionalProperties":false},"CreditAccountsEncoded":{"type":"object","properties":{"accounts":{"type":"array","items":{"$ref":"#/components/schemas/CreditAccountEncoded"}}},"required":["accounts"],"additionalProperties":false},"IssueCreditEncoded":{"type":"object","properties":{"creditId":{"$ref":"#/components/schemas/CrdId"},"holderId":{"$ref":"#/components/schemas/TenderHolderId"},"currency":{"$ref":"#/components/schemas/Currency"},"amountCents":{"type":"integer","exclusiveMinimum":0},"reason":{"type":"string"}},"required":["creditId","holderId","currency","amountCents","reason"],"additionalProperties":false},"ReverseCreditEncoded":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false},"CreditNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CreditNotFound"]},"creditId":{"type":"string"}},"required":["_tag","creditId"],"additionalProperties":false},"GiftCardStatus":{"type":"string","enum":["active","disabled","depleted"],"description":"Where a gift card stands: `active`, `disabled` (stopped by staff), or `depleted` (its balance spent)"},"GiftCardEntryKind":{"type":"string","enum":["issued","redeemed","refunded","disabled","enabled"],"description":"What happened to a gift card: `issued`, `redeemed` on a payment, `refunded` onto it, `disabled` or `enabled`"},"GiftCardEntry":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/GiftCardEntryKind"},"amountCents":{"type":"integer","exclusiveMinimum":0},"at":{"type":"string"},"orderId":{"$ref":"#/components/schemas/OrdId"},"paymentId":{"$ref":"#/components/schemas/PayId"},"refundId":{"$ref":"#/components/schemas/RfdId"},"reason":{"type":"string","maxLength":500}},"required":["kind","at"],"additionalProperties":false},"GiftCardEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/GcdId"},"last4":{"$ref":"#/components/schemas/GiftCardLast4"},"currency":{"$ref":"#/components/schemas/Currency"},"initialCents":{"type":"integer","exclusiveMinimum":0},"balanceCents":{"type":"integer","minimum":0},"status":{"$ref":"#/components/schemas/GiftCardStatus"},"expiresOn":{"$ref":"#/components/schemas/IsoDay"},"recipientId":{"$ref":"#/components/schemas/TenderHolderId"},"note":{"type":"string","maxLength":500},"orderId":{"$ref":"#/components/schemas/OrdId"},"issuedAt":{"type":"string"},"entries":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardEntry"}}},"required":["id","last4","currency","initialCents","balanceCents","status","issuedAt","entries"],"additionalProperties":false},"GiftCardPageEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardEncoded"}},"total":{"type":"integer","minimum":0}},"required":["items","total"],"additionalProperties":false},"IssueGiftCardEncoded":{"type":"object","properties":{"giftCardId":{"$ref":"#/components/schemas/GcdId"},"amountCents":{"type":"integer","exclusiveMinimum":0},"currency":{"$ref":"#/components/schemas/Currency"},"expiresOn":{"$ref":"#/components/schemas/IsoDay"},"recipientId":{"$ref":"#/components/schemas/TenderHolderId"},"note":{"type":"string","maxLength":500}},"required":["giftCardId","amountCents","currency"],"additionalProperties":false},"IssuedGiftCardEncoded":{"type":"object","properties":{"card":{"$ref":"#/components/schemas/GiftCardEncoded"},"code":{"type":"string","minLength":1}},"required":["card","code"],"additionalProperties":false},"SetGiftCardStatusEncoded":{"type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false},"GiftCardCodeEncoded":{"type":"string"},"CheckGiftCardEncoded":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/GiftCardCodeEncoded"}},"required":["code"],"additionalProperties":false},"GiftCardBalanceEncoded":{"type":"object","properties":{"giftCardId":{"$ref":"#/components/schemas/GcdId"},"last4":{"$ref":"#/components/schemas/GiftCardLast4"},"currency":{"$ref":"#/components/schemas/Currency"},"balanceCents":{"type":"integer","minimum":0},"status":{"$ref":"#/components/schemas/GiftCardStatus"},"expiresOn":{"$ref":"#/components/schemas/IsoDay"},"refusal":{"$ref":"#/components/schemas/GiftCardRefusal"}},"required":["giftCardId","last4","currency","balanceCents","status"],"additionalProperties":false},"TenantId":{"type":"string","pattern":"^org_(test_)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"An org-prefixed uuid, e.g. org_9f8c1c2e-0000-4000-8000-000000000000; a sandbox tenant is org_test_<uuid>"},"CustomerActions":{"type":"object","properties":{"accept":{"type":"boolean"},"decline":{"type":"boolean"},"held":{"type":"string"}},"required":["accept","decline"],"additionalProperties":false},"CustomerPayable":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"balanceCents":{"type":"integer","exclusiveMinimum":0},"currency":{"$ref":"#/components/schemas/Currency"},"paymentsHeld":{"type":"integer","minimum":0}},"required":["orderId","balanceCents","currency","paymentsHeld"],"additionalProperties":false,"description":"What the customer may pay now: the order, its balance and currency."},"CustomerQuoteStatus":{"type":"string","enum":["revising","open","expired","accepted","declined","cancelled"],"description":"Where a quote stands for its customer: `revising`, `open` (theirs to accept or decline), `expired`, `accepted` (placed), `declined` or `cancelled`"},"TemplateSalesLine":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku_1"},"name":{"type":"string","minLength":1},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"pricesIncludeTax":{"type":"boolean"},"discountCents":{"type":"integer","minimum":0},"discountBps":{"type":"integer"},"totalCents":{"type":"integer","minimum":0},"taxCents":{"type":"integer"},"taxClasses":{"type":"array","items":{"$ref":"#/components/schemas/TaxClass"}},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32}},"required":["sku","name","quantity","unitPriceCents","pricesIncludeTax","discountCents","totalCents","taxCents","taxClasses"],"additionalProperties":false,"description":"One line of an invoice, quote or order as the message shows it, with its tax."},"TemplateTotals":{"type":"object","properties":{"presentation":{"$ref":"#/components/schemas/PriceConvention"},"linesCents":{"type":"integer"},"discountCents":{"type":"integer","minimum":0},"shippingCents":{"type":"integer"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"totalCents":{"type":"integer"},"breakdown":{"type":"array","items":{"$ref":"#/components/schemas/TaxBreakdownRow"}}},"required":["presentation","linesCents","discountCents","shippingCents","netCents","taxCents","totalCents","breakdown"],"additionalProperties":false,"description":"A sales document's lines, discounts, shipping, net, tax, total and tax breakdown, in its presentation."},"DocumentAddress_4":{"type":"object","properties":{"id":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"label":{"type":"string"},"address":{"$ref":"#/components/schemas/PostalAddress"}},"required":["id"],"additionalProperties":false,"description":"An address a document was issued with: a company location's as it read at issue, a person's by its version id only."},"DocumentAddress_5":{"type":"object","properties":{"id":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"label":{"type":"string"},"address":{"$ref":"#/components/schemas/PostalAddress"}},"required":["id"],"additionalProperties":false,"description":"An address a document was issued with: a company location's as it read at issue, a person's by its version id only."},"CustomerQuoteView":{"type":"object","properties":{"kind":{"type":"string","enum":["quote"]},"status":{"$ref":"#/components/schemas/CustomerQuoteStatus"},"number":{"type":"string","minLength":1},"quote":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/TemplateSalesLine"}},"totals":{"$ref":"#/components/schemas/TemplateTotals"},"reference":{"type":"string","minLength":1},"customerPo":{"type":"string"},"issuedAt":{"type":"string"},"validUntil":{"type":"string"},"billTo":{"$ref":"#/components/schemas/DocumentAddress_4"},"shipTo":{"$ref":"#/components/schemas/DocumentAddress_5"},"companyName":{"type":"string"}},"required":["currency","lines","totals","reference","issuedAt"],"additionalProperties":false},"declinedAt":{"type":"string"},"declineReason":{"type":"string"},"acceptedAt":{"type":"string"}},"required":["kind","status","number"],"additionalProperties":false,"description":"A quote as its customer sees it: where it stands, and the document as issued."},"TemplateSalesLine_1":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku"},"name":{"type":"string","minLength":1},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"pricesIncludeTax":{"type":"boolean"},"discountCents":{"type":"integer","minimum":0},"discountBps":{"type":"integer"},"totalCents":{"type":"integer","minimum":0},"taxCents":{"type":"integer"},"taxClasses":{"type":"array","items":{"$ref":"#/components/schemas/TaxClass"}},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32}},"required":["sku","name","quantity","unitPriceCents","pricesIncludeTax","discountCents","totalCents","taxCents","taxClasses"],"additionalProperties":false,"description":"One line of an invoice, quote or order as the message shows it, with its tax."},"CustomerParcel":{"type":"object","properties":{"number":{"type":"string","minLength":1},"status":{"$ref":"#/components/schemas/ShipmentStatus"},"carrier":{"type":"string"},"service":{"type":"string"},"trackingNumbers":{"type":"array","items":{"type":"string"}},"trackingUrl":{"type":"string"},"trackingStatus":{"$ref":"#/components/schemas/TrackingStatus"},"items":{"type":"array","items":{"type":"object","properties":{"sku":{"type":"string"},"name":{"type":"string"},"quantity":{"type":"integer","exclusiveMinimum":0},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32}},"required":["sku","name","quantity"],"additionalProperties":false}},"shippedAt":{"type":"string"}},"required":["number","status","trackingNumbers","items"],"additionalProperties":false,"description":"A parcel as its customer follows it: its number, where it stands, its carrier and tracking, and what is in it."},"CustomerPayment":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PayId"},"number":{"type":"string","minLength":1},"method":{"$ref":"#/components/schemas/PaymentMethod"},"amountCents":{"type":"integer","exclusiveMinimum":0},"receivedAt":{"type":"string"}},"required":["id","number","method","amountCents","receivedAt"],"additionalProperties":false,"description":"One payment as the customer's receipt lists it."},"CustomerPaid":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/PaymentStatus"},"totalCents":{"type":"integer","minimum":0},"paidCents":{"type":"integer","minimum":0},"refundedCents":{"type":"integer","minimum":0},"balanceCents":{"type":"integer","minimum":0},"payments":{"type":"array","items":{"$ref":"#/components/schemas/CustomerPayment"}}},"required":["status","totalCents","paidCents","refundedCents","balanceCents","payments"],"additionalProperties":false,"description":"An order's total, what was paid and refunded, what is still owed, and the payments."},"CustomerOrderView":{"type":"object","properties":{"kind":{"type":"string","enum":["order"]},"number":{"type":"string","minLength":1},"reference":{"type":"string","minLength":1},"customerPo":{"type":"string"},"status":{"$ref":"#/components/schemas/FulfillmentOrderStatus"},"placedAt":{"type":"string"},"currency":{"$ref":"#/components/schemas/Currency"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/TemplateSalesLine_1"}},"totals":{"$ref":"#/components/schemas/TemplateTotals"},"shipTo":{"$ref":"#/components/schemas/DocumentAddress"},"parcels":{"type":"array","items":{"$ref":"#/components/schemas/CustomerParcel"}},"paid":{"$ref":"#/components/schemas/CustomerPaid"}},"required":["kind","number","reference","status","placedAt","currency","lines","totals","parcels","paid"],"additionalProperties":false,"description":"An order as its customer sees it: status, lines and totals, parcels and money."},"CustomerInvoiceView":{"type":"object","properties":{"kind":{"type":"string","enum":["invoice"]},"number":{"type":"string","minLength":1},"orderNumber":{"type":"string","minLength":1},"orderReference":{"type":"string","minLength":1},"customerPo":{"type":"string"},"issuedAt":{"type":"string"},"dueOn":{"$ref":"#/components/schemas/IsoDay"},"currency":{"$ref":"#/components/schemas/Currency"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/TemplateSalesLine_1"}},"totals":{"$ref":"#/components/schemas/TemplateTotals"},"header":{"$ref":"#/components/schemas/TaxDocumentHeader"},"companyName":{"type":"string"},"taxNumber":{"type":"string"},"billTo":{"$ref":"#/components/schemas/DocumentAddress"},"paid":{"$ref":"#/components/schemas/CustomerPaid"}},"required":["kind","number","orderNumber","orderReference","issuedAt","currency","lines","totals","header","paid"],"additionalProperties":false,"description":"An invoice as issued, with the order's payments for its receipt."},"CustomerShipmentView":{"type":"object","properties":{"kind":{"type":"string","enum":["shipment"]},"orderNumber":{"type":"string","minLength":1},"parcel":{"$ref":"#/components/schemas/CustomerParcel"},"events":{"type":"array","items":{"$ref":"#/components/schemas/ConsignmentTracking_1"}},"shipTo":{"$ref":"#/components/schemas/DocumentAddress"}},"required":["kind","orderNumber","parcel","events"],"additionalProperties":false,"description":"A parcel and its carrier's tracking events."},"CustomerDocumentBody":{"anyOf":[{"$ref":"#/components/schemas/CustomerQuoteView"},{"$ref":"#/components/schemas/CustomerOrderView"},{"$ref":"#/components/schemas/CustomerInvoiceView"},{"$ref":"#/components/schemas/CustomerShipmentView"}]},"CustomerDocumentViewEncoded":{"type":"object","properties":{"tenantId":{"$ref":"#/components/schemas/TenantId"},"linkId":{"$ref":"#/components/schemas/CplId"},"orderId":{"$ref":"#/components/schemas/OrdId"},"country":{"$ref":"#/components/schemas/CountryCode"},"timeZone":{"$ref":"#/components/schemas/TimeZone"},"actions":{"$ref":"#/components/schemas/CustomerActions"},"payable":{"$ref":"#/components/schemas/CustomerPayable"},"document":{"$ref":"#/components/schemas/CustomerDocumentBody"}},"required":["tenantId","linkId","orderId","actions","document"],"additionalProperties":false},"CustomerLinkThrottledEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CustomerLinkThrottled"]},"retryAfterSeconds":{"type":"integer","exclusiveMinimum":0}},"required":["_tag","retryAfterSeconds"],"additionalProperties":false},"QuoteNotAnswerableReason":{"type":"string","enum":["not-issued","expired","declined","placed","cancelled","needs-review"],"description":"Why a quote cannot be accepted or declined through its link: `not-issued` (being revised), `expired`, `declined`, `placed` (a decline only), `cancelled`, or `needs-review` (an accept only: a price or order rule moved since it was issued, so the business must look first)"},"QuoteNotAnswerableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["QuoteNotAnswerable"]},"reason":{"$ref":"#/components/schemas/QuoteNotAnswerableReason"}},"required":["_tag","reason"],"additionalProperties":false},"CustomerActionHeldEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["CustomerActionHeld"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"DeclineQuoteEncoded":{"type":"object","properties":{"reason":{"type":"string"}},"additionalProperties":false},"PrnId":{"type":"string","pattern":"^prn_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A prn-prefixed uuid, e.g. prn_9f8c1c2e-0000-4000-8000-000000000000"},"PagId":{"type":"string","pattern":"^pag_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A pag-prefixed uuid, e.g. pag_9f8c1c2e-0000-4000-8000-000000000000"},"PrinterLanguage":{"type":"string","enum":["zpl","pdf"],"description":"What a printer is sent: `zpl` (Zebra and compatible thermal printers) or `pdf` (any printer the agent's operating system prints to)."},"PrinterDpi":{"type":"number","enum":[203,300,600],"description":"A printer's resolution in dots per inch: 203, 300 or 600 (a ZPL label is laid out in its dots)."},"LabelMedia":{"type":"object","properties":{"widthMm":{"type":"integer","exclusiveMinimum":0,"maximum":300},"heightMm":{"type":"integer","exclusiveMinimum":0,"maximum":1000},"dpi":{"$ref":"#/components/schemas/PrinterDpi"}},"required":["widthMm","heightMm"],"additionalProperties":false},"NetworkRawConnection":{"type":"object","properties":{"_tag":{"type":"string","enum":["network-raw"]},"host":{"type":"string","minLength":1,"maxLength":253,"pattern":"^[A-Za-z0-9]([A-Za-z0-9.:-]*[A-Za-z0-9])?$"},"port":{"type":"integer","minimum":1,"maximum":65535}},"required":["_tag","host"],"additionalProperties":false},"OsPrinterConnection":{"type":"object","properties":{"_tag":{"type":"string","enum":["os-printer"]},"queue":{"type":"string","minLength":1,"maxLength":200}},"required":["_tag","queue"],"additionalProperties":false},"PrinterConnection":{"anyOf":[{"$ref":"#/components/schemas/NetworkRawConnection"},{"$ref":"#/components/schemas/OsPrinterConnection"}]},"PrintPurpose":{"type":"string","enum":["shipping-label","sku-label","bin-label","packing-slip"],"description":"What a document is printed for: `shipping-label`, `sku-label`, `bin-label` or `packing-slip` — a printer is the default for some."},"PrinterEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PrnId"},"name":{"type":"string","minLength":1,"maxLength":200},"locationId":{"$ref":"#/components/schemas/LocId"},"agentId":{"$ref":"#/components/schemas/PagId"},"language":{"$ref":"#/components/schemas/PrinterLanguage"},"media":{"$ref":"#/components/schemas/LabelMedia"},"connection":{"$ref":"#/components/schemas/PrinterConnection"},"defaultFor":{"type":"array","items":{"$ref":"#/components/schemas/PrintPurpose"},"maxItems":4},"removed":{"type":"boolean"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","name","locationId","agentId","language","media","connection","defaultFor","removed","createdAt","updatedAt"],"additionalProperties":false},"PrinterListEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PrinterEncoded"}}},"required":["items"],"additionalProperties":false},"PrintAgentOnlyEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PrintAgentOnly"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"SavePrinter":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"locationId":{"$ref":"#/components/schemas/LocId"},"agentId":{"$ref":"#/components/schemas/PagId"},"language":{"$ref":"#/components/schemas/PrinterLanguage"},"media":{"$ref":"#/components/schemas/LabelMedia"},"connection":{"$ref":"#/components/schemas/PrinterConnection"},"defaultFor":{"type":"array","items":{"$ref":"#/components/schemas/PrintPurpose"},"maxItems":4}},"required":["name","locationId","agentId","language","media","connection"],"additionalProperties":false},"PrintAgentNotAtSiteEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PrintAgentNotAtSite"]},"agentId":{"type":"string"},"locationId":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","agentId","locationId","reason"],"additionalProperties":false},"PrintAgentsUnavailableEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PrintAgentsUnavailable"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"PrinterNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PrinterNotFound"]},"printerId":{"type":"string"}},"required":["_tag","printerId"],"additionalProperties":false},"PjbId":{"type":"string","pattern":"^pjb_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A pjb-prefixed uuid, e.g. pjb_9f8c1c2e-0000-4000-8000-000000000000"},"ConsignmentLabelDocument":{"type":"object","properties":{"_tag":{"type":"string","enum":["consignment-label"]},"orderId":{"$ref":"#/components/schemas/OrdId"},"consignmentId":{"$ref":"#/components/schemas/CnsId"}},"required":["_tag","orderId","consignmentId"],"additionalProperties":false},"SkuLabelsDocument":{"type":"object","properties":{"_tag":{"type":"string","enum":["sku-labels"]},"sku":{"$ref":"#/components/schemas/Sku"},"copies":{"type":"integer","exclusiveMinimum":0,"maximum":999}},"required":["_tag","sku","copies"],"additionalProperties":false},"PrintDocument":{"anyOf":[{"$ref":"#/components/schemas/ConsignmentLabelDocument"},{"$ref":"#/components/schemas/SkuLabelsDocument"}]},"RequestPrint":{"type":"object","properties":{"jobId":{"$ref":"#/components/schemas/PjbId"},"locationId":{"$ref":"#/components/schemas/LocId"},"printerId":{"$ref":"#/components/schemas/PrnId"},"document":{"$ref":"#/components/schemas/PrintDocument"}},"required":["jobId","locationId","document"],"additionalProperties":false},"SkuLabelContent":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"barcode":{"type":"string","minLength":1,"maxLength":64}},"required":["name"],"additionalProperties":false},"PrintJobStatus":{"type":"string","enum":["queued","sent","printed","failed"],"description":"Where a print job has got to: `queued`, `sent` (its agent took it), `printed` or `failed` (with the reason)."},"PrintJobEncoded":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/PjbId"},"locationId":{"$ref":"#/components/schemas/LocId"},"printerId":{"$ref":"#/components/schemas/PrnId"},"agentId":{"$ref":"#/components/schemas/PagId"},"purpose":{"$ref":"#/components/schemas/PrintPurpose"},"document":{"$ref":"#/components/schemas/PrintDocument"},"content":{"$ref":"#/components/schemas/SkuLabelContent"},"status":{"$ref":"#/components/schemas/PrintJobStatus"},"failure":{"type":"string","minLength":1,"maxLength":500},"requestedAt":{"type":"string"},"sentAt":{"type":"string"},"finishedAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","locationId","printerId","agentId","purpose","document","status","requestedAt","updatedAt"],"additionalProperties":false},"NoPrinterForJobEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["NoPrinterForJob"]},"locationId":{"type":"string"},"purpose":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","locationId","purpose","reason"],"additionalProperties":false},"PrinterCannotPrintEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PrinterCannotPrint"]},"printerId":{"type":"string"},"reason":{"type":"string"}},"required":["_tag","printerId","reason"],"additionalProperties":false},"PrintDocumentMissingEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PrintDocumentMissing"]},"reason":{"type":"string"}},"required":["_tag","reason"],"additionalProperties":false},"PrintJobIdTakenEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PrintJobIdTaken"]},"jobId":{"type":"string"}},"required":["_tag","jobId"],"additionalProperties":false},"PrintJobListEncoded":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/PrintJobEncoded"}}},"required":["items"],"additionalProperties":false},"PrintJobNotFoundEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PrintJobNotFound"]},"jobId":{"type":"string"}},"required":["_tag","jobId"],"additionalProperties":false},"InlinePrintContent":{"type":"object","properties":{"_tag":{"type":"string","enum":["inline"]},"contentType":{"$ref":"#/components/schemas/LabelContentType"},"body":{"type":"string","maxLength":1048576}},"required":["_tag","contentType","body"],"additionalProperties":false},"LinkedPrintContent":{"type":"object","properties":{"_tag":{"type":"string","enum":["link"]},"contentType":{"$ref":"#/components/schemas/LabelContentType"},"url":{"type":"string"},"expiresAt":{"type":"string"}},"required":["_tag","contentType","url","expiresAt"],"additionalProperties":false},"PrintContent":{"anyOf":[{"$ref":"#/components/schemas/InlinePrintContent"},{"$ref":"#/components/schemas/LinkedPrintContent"}]},"ClaimedPrintJobEncoded":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/PrintJobEncoded"},"printer":{"$ref":"#/components/schemas/PrinterEncoded"},"content":{"$ref":"#/components/schemas/PrintContent"}},"required":["job","printer","content"],"additionalProperties":false},"PrintJobNotOpenEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["PrintJobNotOpen"]},"jobId":{"type":"string"},"status":{"type":"string"}},"required":["_tag","jobId","status"],"additionalProperties":false},"PrintJobPrinted":{"type":"object","properties":{"_tag":{"type":"string","enum":["printed"]}},"required":["_tag"],"additionalProperties":false},"PrintJobFailed":{"type":"object","properties":{"_tag":{"type":"string","enum":["failed"]},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["_tag","reason"],"additionalProperties":false},"ReportPrintOutcome":{"anyOf":[{"$ref":"#/components/schemas/PrintJobPrinted"},{"$ref":"#/components/schemas/PrintJobFailed"}]},"EvtId":{"type":"string","pattern":"^evt_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A evt-prefixed uuid, e.g. evt_9f8c1c2e-0000-4000-8000-000000000000"},"TxId":{"type":"string","pattern":"^tx_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$","description":"A tx-prefixed uuid, e.g. tx_9f8c1c2e-0000-4000-8000-000000000000"},"fulfillment.order-createdEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.order-created"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"fx":{"$ref":"#/components/schemas/FxCapture_1"},"orderId":{"$ref":"#/components/schemas/OrdId"},"number":{"type":"string","minLength":1},"serial":{"type":"integer","exclusiveMinimum":0},"reference":{"type":"string","minLength":1},"source":{"$ref":"#/components/schemas/OrderSource"},"customerPo":{"type":"string"},"salesRepId":{"$ref":"#/components/schemas/UsrId"},"commission":{"$ref":"#/components/schemas/OrderCommission"},"customer":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId_1"},"companyId":{"$ref":"#/components/schemas/CmpId_1"},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"billingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]}},"additionalProperties":false},"party":{"$ref":"#/components/schemas/DocumentParty"},"catalogIds":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/CatId"}],"minItems":1,"items":{"$ref":"#/components/schemas/CatId"}},"currency":{"$ref":"#/components/schemas/Currency"},"convention":{"$ref":"#/components/schemas/PriceConvention"},"charges":{"$ref":"#/components/schemas/OrderCharges"},"shippingTaxBasis":{"$ref":"#/components/schemas/ChargeTaxBasis"},"shippingMethod":{"$ref":"#/components/schemas/ShippingMethod"},"fulfillmentLocationId":{"$ref":"#/components/schemas/LocId"},"checkoutQuote":{"$ref":"#/components/schemas/CheckoutOffer"},"shippingRate":{"$ref":"#/components/schemas/ChosenRate"},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderDiscount"}},"tax":{"$ref":"#/components/schemas/DocumentTax_1"},"totalCents":{"type":"integer","minimum":0},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"name":{"$ref":"#/components/schemas/LineName"},"kind":{"$ref":"#/components/schemas/ItemKind_1"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"listPriceCents":{"type":"integer","minimum":0},"catalogId":{"$ref":"#/components/schemas/CatId"},"outsideCatalogs":{"type":"boolean","enum":[true]},"priceReason":{"type":"string","maxLength":500},"components":{"type":"array","items":{"$ref":"#/components/schemas/KitComponent"},"minItems":1},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32},"externalId":{"type":"string","minLength":1},"discountCents":{"type":"integer","minimum":0},"discountBps":{"$ref":"#/components/schemas/DiscountBps_2"},"discountReason":{"type":"string","maxLength":200},"assignedLocationId":{"$ref":"#/components/schemas/LocId"},"inclusive":{"type":"boolean"},"taxBasis":{"$ref":"#/components/schemas/LineTaxBasis"},"ruleBreach":{"type":"object","properties":{"breach":{"$ref":"#/components/schemas/OrderRuleBreach"},"minQuantity":{"type":"integer","exclusiveMinimum":0},"step":{"type":"integer","exclusiveMinimum":0}},"required":["breach","minQuantity","step"],"additionalProperties":false},"commission":{"$ref":"#/components/schemas/LineCommission"}},"required":["lineId","sku","name","quantity","unitPriceCents","inclusive","taxBasis"],"additionalProperties":false}},"workflow":{"$ref":"#/components/schemas/WorkflowConfigEncoded"},"paymentTermsBy":{"$ref":"#/components/schemas/PaymentTermsSource"}},"required":["fx","orderId","number","serial","reference","source","party","catalogIds","currency","convention","charges","shippingTaxBasis","discounts","tax","totalCents","lines","workflow","paymentTermsBy"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.line-repricedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.line-repriced"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"unitPriceCents":{"type":"integer","minimum":0},"reason":{"type":"string","maxLength":500}},"required":["orderId","lineId","sku","unitPriceCents"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.payment-terms-changedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.payment-terms-changed"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"paymentTerms":{"$ref":"#/components/schemas/PaymentTerms"}},"required":["orderId","paymentTerms"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.customer-po-changedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.customer-po-changed"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"customerPo":{"type":"string"}},"required":["orderId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"SalesRepSnapshot_1":{"type":"object","properties":{"userId":{"$ref":"#/components/schemas/UsrId"},"groupId":{"$ref":"#/components/schemas/CgrId"},"groupName":{"type":"string","minLength":1,"maxLength":80},"baseRateBps":{"$ref":"#/components/schemas/CommissionRateBps"}},"required":["userId","groupId","groupName","baseRateBps"],"additionalProperties":false},"OrderCommission_1":{"type":"object","properties":{"earnedOn":{"$ref":"#/components/schemas/CommissionEarnedOn"},"earner":{"$ref":"#/components/schemas/CommissionEarner"},"earnedBy":{"$ref":"#/components/schemas/SalesRepSnapshot_1"}},"required":["earnedOn","earner"],"additionalProperties":false},"CommissionRule_1":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["uncommissionable"]}},"required":["_tag"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["rates"]},"groups":{"type":"array","items":{"$ref":"#/components/schemas/GroupRate"},"minItems":1,"maxItems":100}},"required":["_tag","groups"],"additionalProperties":false}]},"LineCommission_1":{"type":"object","properties":{"catalogId":{"$ref":"#/components/schemas/CatId"},"rule":{"$ref":"#/components/schemas/CommissionRule_1"}},"additionalProperties":false},"fulfillment.sales-rep-changedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.sales-rep-changed"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"salesRepId":{"anyOf":[{"$ref":"#/components/schemas/UsrId"},{"type":"null"}]},"commission":{"$ref":"#/components/schemas/OrderCommission_1"},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"commission":{"$ref":"#/components/schemas/LineCommission_1"}},"required":["lineId","commission"],"additionalProperties":false}}},"required":["orderId","salesRepId","commission","lines"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.payment-recordedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.payment-recorded"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"paymentId":{"$ref":"#/components/schemas/PayId"},"number":{"type":"string","minLength":1},"serial":{"type":"integer","exclusiveMinimum":0},"amountCents":{"type":"integer","exclusiveMinimum":0},"method":{"$ref":"#/components/schemas/PaymentMethod"},"tender":{"$ref":"#/components/schemas/PaymentTender"},"gateway":{"type":"string","minLength":1},"reference":{"type":"string","minLength":1},"provider":{"$ref":"#/components/schemas/PaymentProvider"},"providerTransactionId":{"type":"string","minLength":1},"collectionId":{"$ref":"#/components/schemas/PcolId"},"note":{"type":"string","maxLength":500},"receivedAt":{"type":"string"},"fx":{"$ref":"#/components/schemas/FxCapture_1"}},"required":["orderId","paymentId","number","serial","amountCents","method","receivedAt","fx"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.cost-recordedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.cost-recorded"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"costId":{"$ref":"#/components/schemas/CostId"},"amountCents":{"type":"integer","exclusiveMinimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"fx":{"$ref":"#/components/schemas/FxCapture_1"},"reason":{"type":"string","minLength":1,"maxLength":500},"accountCode":{"$ref":"#/components/schemas/AccountCodeEncoded"},"date":{"$ref":"#/components/schemas/IsoDay"},"lineId":{"$ref":"#/components/schemas/LinId"}},"required":["orderId","costId","amountCents","currency","fx","reason","accountCode","date"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.cost-reversedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.cost-reversed"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"costId":{"$ref":"#/components/schemas/CostId"},"reason":{"type":"string","minLength":1,"maxLength":500},"amountCents":{"type":"integer","exclusiveMinimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"fx":{"$ref":"#/components/schemas/FxCapture_1"},"accountCode":{"$ref":"#/components/schemas/AccountCodeEncoded"},"lineId":{"$ref":"#/components/schemas/LinId"}},"required":["orderId","costId","amountCents","currency","fx","accountCode"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.virtual-fulfilledEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.virtual-fulfilled"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"kind":{"$ref":"#/components/schemas/ItemKind_1"},"quantity":{"type":"integer","exclusiveMinimum":0}},"required":["lineId","sku","kind","quantity"],"additionalProperties":false},"minItems":1}},"required":["orderId","lines"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.note-postedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.note-posted"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"noteId":{"$ref":"#/components/schemas/NoteId"},"reference":{"type":"string","minLength":1},"body":{"$ref":"#/components/schemas/OrderNoteBodyEncoded"}},"required":["orderId","noteId","reference","body"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.transcript-attachedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.transcript-attached"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"sessionId":{"$ref":"#/components/schemas/VcsId"},"personId":{"$ref":"#/components/schemas/PsnId"},"utterances":{"type":"integer","minimum":0},"audioSeconds":{"type":"integer","minimum":0},"bytes":{"type":"integer","minimum":0},"startedAt":{"type":"string"}},"required":["orderId","sessionId","utterances","audioSeconds","bytes","startedAt"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.customer-erasedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.customer-erased"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"personId":{"$ref":"#/components/schemas/PsnId"},"sessionIds":{"type":"array","items":{"$ref":"#/components/schemas/VcsId"}}},"required":["orderId","personId","sessionIds"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.order-editedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.order-edited"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"editId":{"type":"string","minLength":1},"changes":{"type":"array","items":{"$ref":"#/components/schemas/OrderEditedChange"},"minItems":1},"reason":{"type":"string","maxLength":500},"fx":{"$ref":"#/components/schemas/FxCapture_1"}},"required":["orderId","editId","changes","fx"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.quote-createdEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.quote-created"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"number":{"type":"string","minLength":1},"serial":{"type":"integer","exclusiveMinimum":0},"reference":{"type":"string","minLength":1},"source":{"$ref":"#/components/schemas/OrderSource"},"customerPo":{"type":"string"},"salesRepId":{"$ref":"#/components/schemas/UsrId"},"commission":{"$ref":"#/components/schemas/OrderCommission"},"customer":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId_1"},"companyId":{"$ref":"#/components/schemas/CmpId_1"},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"billingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]}},"additionalProperties":false},"party":{"$ref":"#/components/schemas/DocumentParty"},"catalogIds":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/CatId"}],"minItems":1,"items":{"$ref":"#/components/schemas/CatId"}},"currency":{"$ref":"#/components/schemas/Currency"},"convention":{"$ref":"#/components/schemas/PriceConvention"},"charges":{"$ref":"#/components/schemas/OrderCharges"},"shippingTaxBasis":{"$ref":"#/components/schemas/ChargeTaxBasis"},"shippingMethod":{"$ref":"#/components/schemas/ShippingMethod"},"fulfillmentLocationId":{"$ref":"#/components/schemas/LocId"},"checkoutQuote":{"$ref":"#/components/schemas/CheckoutOffer"},"shippingRate":{"$ref":"#/components/schemas/ChosenRate"},"discounts":{"type":"array","items":{"$ref":"#/components/schemas/OrderDiscount"}},"tax":{"$ref":"#/components/schemas/DocumentTax_1"},"totalCents":{"type":"integer","minimum":0},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"name":{"$ref":"#/components/schemas/LineName"},"kind":{"$ref":"#/components/schemas/ItemKind_1"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"listPriceCents":{"type":"integer","minimum":0},"catalogId":{"$ref":"#/components/schemas/CatId"},"outsideCatalogs":{"type":"boolean","enum":[true]},"priceReason":{"type":"string","maxLength":500},"components":{"type":"array","items":{"$ref":"#/components/schemas/KitComponent"},"minItems":1},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32},"externalId":{"type":"string","minLength":1},"discountCents":{"type":"integer","minimum":0},"discountBps":{"$ref":"#/components/schemas/DiscountBps_2"},"discountReason":{"type":"string","maxLength":200},"assignedLocationId":{"$ref":"#/components/schemas/LocId"},"inclusive":{"type":"boolean"},"taxBasis":{"$ref":"#/components/schemas/LineTaxBasis"},"ruleBreach":{"type":"object","properties":{"breach":{"$ref":"#/components/schemas/OrderRuleBreach"},"minQuantity":{"type":"integer","exclusiveMinimum":0},"step":{"type":"integer","exclusiveMinimum":0}},"required":["breach","minQuantity","step"],"additionalProperties":false},"commission":{"$ref":"#/components/schemas/LineCommission"}},"required":["lineId","sku","name","quantity","inclusive","taxBasis"],"additionalProperties":false}},"workflow":{"$ref":"#/components/schemas/WorkflowConfigEncoded"},"paymentTermsBy":{"$ref":"#/components/schemas/PaymentTermsSource"}},"required":["orderId","number","serial","reference","source","party","catalogIds","currency","convention","charges","shippingTaxBasis","discounts","tax","totalCents","lines","workflow","paymentTermsBy"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"DocumentLine":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"name":{"$ref":"#/components/schemas/LineName"},"kind":{"$ref":"#/components/schemas/ItemKind_1"},"quantity":{"type":"integer","exclusiveMinimum":0},"unitPriceCents":{"type":"integer","minimum":0},"discountCents":{"type":"integer","minimum":0},"discountBps":{"$ref":"#/components/schemas/DiscountBps_2"},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/LineAttribute"},"minItems":1,"maxItems":32},"tax":{"$ref":"#/components/schemas/LineTax"},"rateMoved":{"type":"boolean"}},"required":["lineId","sku","name","quantity","unitPriceCents","discountCents","tax"],"additionalProperties":false},"QuoteDocument":{"type":"object","properties":{"number":{"type":"string","minLength":1},"reference":{"type":"string","minLength":1},"customerPo":{"type":"string"},"currency":{"$ref":"#/components/schemas/Currency"},"party":{"$ref":"#/components/schemas/DocumentParty"},"convention":{"$ref":"#/components/schemas/PriceConvention"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/DocumentLine"}},"charges":{"$ref":"#/components/schemas/OrderCharges"},"shipping":{"$ref":"#/components/schemas/DocumentShipping_1"},"tax":{"$ref":"#/components/schemas/DocumentTax_1"},"totalCents":{"type":"integer","minimum":0}},"required":["number","reference","currency","party","convention","lines","charges","tax","totalCents"],"additionalProperties":false},"fulfillment.quote-issuedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.quote-issued"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"validUntil":{"type":"string"},"document":{"$ref":"#/components/schemas/QuoteDocument"}},"required":["orderId","document"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.quote-reopenedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.quote-reopened"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"}},"required":["orderId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.quote-declinedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.quote-declined"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"reason":{"type":"string"}},"required":["orderId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.margin-approval-requestedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.margin-approval-requested"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"approvalId":{"$ref":"#/components/schemas/AprId"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/BelowMinimumLine"}},"note":{"type":"string","maxLength":500},"terms":{"type":"string"}},"required":["orderId","approvalId","lines","terms"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.margin-approval-decidedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.margin-approval-decided"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"approvalId":{"$ref":"#/components/schemas/AprId"},"decision":{"$ref":"#/components/schemas/MarginApprovalDecision"},"reason":{"type":"string","maxLength":500}},"required":["orderId","approvalId","decision"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.customer-link-issuedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.customer-link-issued"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"linkId":{"$ref":"#/components/schemas/CplId"},"document":{"$ref":"#/components/schemas/CustomerDocument"}},"required":["orderId","linkId","document"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.customer-link-revokedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.customer-link-revoked"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"linkId":{"$ref":"#/components/schemas/CplId"}},"required":["orderId","linkId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.customer-link-viewedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.customer-link-viewed"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"linkId":{"$ref":"#/components/schemas/CplId"},"notificationId":{"$ref":"#/components/schemas/NtfId"}},"required":["orderId","linkId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"ShipToPlacement_1":{"anyOf":[{"type":"object","properties":{"_tag":{"type":"string","enum":["located"]},"point":{"$ref":"#/components/schemas/GeoPoint"}},"required":["_tag","point"],"additionalProperties":false},{"type":"object","properties":{"_tag":{"type":"string","enum":["unlocated"]},"reason":{"type":"string","maxLength":500}},"required":["_tag","reason"],"additionalProperties":false}],"description":"Where the order's ship-to was placed for nearest-to-the-customer routing: `located` with a point coarsened to about 11 km, or `unlocated` with why, in which case the order routed by priority"},"fulfillment.stock-allocatedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.stock-allocated"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"quantity":{"type":"integer","minimum":0},"locationId":{"$ref":"#/components/schemas/LocId"},"routedBy":{"$ref":"#/components/schemas/RoutedBy"},"distanceKm":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]}},"required":["lineId","sku","quantity","locationId","routedBy"],"additionalProperties":false}},"shipTo":{"$ref":"#/components/schemas/ShipToPlacement_1"},"shortfalls":{"type":"array","items":{"type":"object","properties":{"sku":{"$ref":"#/components/schemas/Sku"},"requested":{"type":"integer","exclusiveMinimum":0},"available":{"type":"integer","minimum":0}},"required":["sku","requested","available"],"additionalProperties":false}}},"required":["orderId","lines","shortfalls"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.allocation-movedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.allocation-moved"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"fromLocationId":{"$ref":"#/components/schemas/LocId"},"toLocationId":{"$ref":"#/components/schemas/LocId"},"quantity":{"type":"integer","exclusiveMinimum":0},"fromShipmentId":{"$ref":"#/components/schemas/ShpId"},"toShipmentId":{"$ref":"#/components/schemas/ShpId"},"opened":{"type":"object","properties":{"number":{"type":"string","minLength":1},"serial":{"type":"integer","exclusiveMinimum":0}},"required":["number","serial"],"additionalProperties":false},"reference":{"type":"string","minLength":1},"reason":{"type":"string"}},"required":["orderId","lineId","sku","fromLocationId","toLocationId","quantity","fromShipmentId","toShipmentId","reference"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.shipment-createdEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.shipment-created"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"number":{"type":"string","minLength":1},"serial":{"type":"integer","exclusiveMinimum":0},"reference":{"type":"string","minLength":1},"locationId":{"$ref":"#/components/schemas/LocId"},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"quantity":{"type":"integer","exclusiveMinimum":0}},"required":["lineId","sku","quantity"],"additionalProperties":false}}},"required":["orderId","shipmentId","number","serial","reference","lines"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.shipment-pickedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.shipment-picked"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"quantity":{"type":"integer","exclusiveMinimum":0},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"}},"batchNumber":{"$ref":"#/components/schemas/BatchNumber"},"parts":{"type":"array","items":{"$ref":"#/components/schemas/ShipmentPart"}}},"required":["lineId","sku","quantity"],"additionalProperties":false}}},"required":["orderId","shipmentId","lines"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.shipment-packedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.shipment-packed"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"cartons":{"type":"array","items":{"$ref":"#/components/schemas/Carton_1"}}},"required":["orderId","shipmentId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.dispatchedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.dispatched"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"dispatchId":{"$ref":"#/components/schemas/DspId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"quantity":{"type":"integer","exclusiveMinimum":0},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"}},"batchNumber":{"$ref":"#/components/schemas/BatchNumber"},"kitSku":{"$ref":"#/components/schemas/Sku_1"},"kitQuantity":{"type":"integer","exclusiveMinimum":0}},"required":["orderId","dispatchId","shipmentId","lineId","sku","quantity"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.shipment-shippedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.shipment-shipped"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"carrier":{"type":"string","minLength":1},"service":{"type":"string","minLength":1},"trackingNumber":{"type":"string","minLength":1},"trackingUrl":{"type":"string","minLength":1}},"required":["orderId","shipmentId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.invoice-issuedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.invoice-issued"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"invoiceId":{"$ref":"#/components/schemas/InvId"},"number":{"type":"string","minLength":1},"serial":{"type":"integer","exclusiveMinimum":0},"orderNumber":{"type":"string","minLength":1},"orderReference":{"type":"string","minLength":1},"customerPo":{"type":"string"},"currency":{"$ref":"#/components/schemas/Currency"},"party":{"$ref":"#/components/schemas/DocumentParty"},"dueOn":{"$ref":"#/components/schemas/IsoDay"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/DocumentLine"}},"shipping":{"$ref":"#/components/schemas/DocumentShipping_1"},"tax":{"$ref":"#/components/schemas/DocumentTax_1"},"header":{"$ref":"#/components/schemas/TaxDocumentHeader"},"totalCents":{"type":"integer","minimum":0},"fx":{"$ref":"#/components/schemas/FxCapture_1"}},"required":["orderId","invoiceId","number","serial","orderNumber","orderReference","currency","party","lines","tax","header","totalCents","fx"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.refundedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.refunded"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"refundId":{"$ref":"#/components/schemas/RfdId"},"number":{"type":"string","minLength":1},"serial":{"type":"integer","exclusiveMinimum":0},"creditNoteId":{"$ref":"#/components/schemas/CrnId"},"reason":{"type":"string","maxLength":500},"amountCents":{"type":"integer","minimum":0},"tenders":{"type":"array","items":{"$ref":"#/components/schemas/RefundTender"}},"fx":{"$ref":"#/components/schemas/FxCapture_1"},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku"},"quantity":{"type":"integer","exclusiveMinimum":0},"restock":{"type":"boolean"},"condition":{"$ref":"#/components/schemas/ReturnCondition"},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"}},"batchNumber":{"$ref":"#/components/schemas/BatchNumber"},"returnReference":{"type":"string","minLength":1},"parts":{"type":"array","items":{"$ref":"#/components/schemas/RefundPart"}},"tax":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false}},"required":["lineId","sku","quantity","restock","condition"],"additionalProperties":false}},"rest":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false},"tax":{"$ref":"#/components/schemas/DocumentTax_1"},"header":{"$ref":"#/components/schemas/TaxDocumentHeader"}},"required":["orderId","refundId","number","serial","amountCents","fx","lines","tax","header"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.order-cancelledEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.order-cancelled"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"reason":{"type":"string","minLength":1}},"required":["orderId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.consignment-requestedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.consignment-requested"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"},"consignmentId":{"$ref":"#/components/schemas/CnsId"},"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"appId":{"$ref":"#/components/schemas/AppId"},"attempt":{"type":"integer","exclusiveMinimum":0},"service":{"$ref":"#/components/schemas/CarrierService_1"},"quoted":{"$ref":"#/components/schemas/QuotedPrice"},"quote":{"$ref":"#/components/schemas/ConsignmentQuote"}},"required":["orderId","shipmentId","consignmentId","carrierAccountId","appId","attempt"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"FxCapture_4":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency"},"home":{"$ref":"#/components/schemas/Currency"},"rate":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"rateDate":{"$ref":"#/components/schemas/IsoDay"},"source":{"$ref":"#/components/schemas/FxCaptureSource"},"via":{"$ref":"#/components/schemas/Currency_1"}},"required":["currency","home","rate","rateDate","source"],"additionalProperties":false,"description":"The rate a money fact was booked at, captured when it committed: `rate` units of `home` per one unit of the document's `currency`, from `source` for `rateDate` (`via` a cross); `same` is a document in the home currency, rate 1"},"fulfillment.consignment-bookedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.consignment-booked"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"consignmentId":{"$ref":"#/components/schemas/CnsId"},"booking":{"$ref":"#/components/schemas/ConsignmentBooking_1"},"fx":{"$ref":"#/components/schemas/FxCapture_4"}},"required":["orderId","consignmentId","booking"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.payment-collection-requestedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.payment-collection-requested"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"collectionId":{"$ref":"#/components/schemas/PcolId"},"kind":{"$ref":"#/components/schemas/ChannelCollectionKind"},"channelId":{"$ref":"#/components/schemas/ChnId"},"appId":{"$ref":"#/components/schemas/AppId"},"externalOrderId":{"type":"string","minLength":1},"trigger":{"$ref":"#/components/schemas/PaymentCollectionTrigger"},"amountCents":{"type":"integer","exclusiveMinimum":0},"final":{"type":"boolean"},"invoiceId":{"$ref":"#/components/schemas/InvId"},"shipmentId":{"$ref":"#/components/schemas/ShpId"}},"required":["orderId","collectionId","kind","channelId","appId","externalOrderId","trigger","amountCents","final"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.payment-collection-answeredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.payment-collection-answered"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"collectionId":{"$ref":"#/components/schemas/PcolId"},"answer":{"$ref":"#/components/schemas/AnswerPaymentCollection"}},"required":["orderId","collectionId","answer"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.consignment-refusedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.consignment-refused"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"consignmentId":{"$ref":"#/components/schemas/CnsId"},"code":{"$ref":"#/components/schemas/ConsignmentRefusalCode"},"reason":{"type":"string","maxLength":500}},"required":["orderId","consignmentId","code","reason"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"FxCapture_5":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency"},"home":{"$ref":"#/components/schemas/Currency"},"rate":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"rateDate":{"$ref":"#/components/schemas/IsoDay"},"source":{"$ref":"#/components/schemas/FxCaptureSource"},"via":{"$ref":"#/components/schemas/Currency_1"}},"required":["currency","home","rate","rateDate","source"],"additionalProperties":false,"description":"The rate a money fact was booked at, captured when it committed: `rate` units of `home` per one unit of the document's `currency`, from `source` for `rateDate` (`via` a cross); `same` is a document in the home currency, rate 1"},"fulfillment.consignment-voidedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.consignment-voided"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"consignmentId":{"$ref":"#/components/schemas/CnsId"},"appId":{"$ref":"#/components/schemas/AppId"},"reason":{"type":"string","maxLength":500},"cost":{"type":"object","properties":{"priceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"taxCents":{"type":"integer","minimum":0}},"required":["priceCents","currency"],"additionalProperties":false},"fx":{"$ref":"#/components/schemas/FxCapture_5"}},"required":["orderId","consignmentId","appId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"ConsignmentPayment_1":{"type":"object","properties":{"paymentId":{"$ref":"#/components/schemas/CpyId"},"amountCents":{"type":"integer","minimum":0},"taxCents":{"type":"integer","minimum":0},"reference":{"type":"string","minLength":1,"maxLength":200},"paidAt":{"type":"string"}},"required":["paymentId","amountCents","taxCents","paidAt"],"additionalProperties":false},"CarrierCost":{"type":"object","properties":{"priceCents":{"type":"integer","minimum":0},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"taxCents":{"type":"integer","minimum":0}},"required":["priceCents","currency"],"additionalProperties":false},"FxCapture_6":{"type":"object","properties":{"currency":{"$ref":"#/components/schemas/Currency"},"home":{"$ref":"#/components/schemas/Currency"},"rate":{"anyOf":[{"type":"number"},{"type":"string","enum":["Infinity","-Infinity","NaN"]}]},"rateDate":{"$ref":"#/components/schemas/IsoDay"},"source":{"$ref":"#/components/schemas/FxCaptureSource"},"via":{"$ref":"#/components/schemas/Currency_1"}},"required":["currency","home","rate","rateDate","source"],"additionalProperties":false,"description":"The rate a money fact was booked at, captured when it committed: `rate` units of `home` per one unit of the document's `currency`, from `source` for `rateDate` (`via` a cross); `same` is a document in the home currency, rate 1"},"fulfillment.consignment-paidEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.consignment-paid"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"consignmentId":{"$ref":"#/components/schemas/CnsId"},"payment":{"$ref":"#/components/schemas/ConsignmentPayment_1"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"fx":{"$ref":"#/components/schemas/FxCapture_1"},"booked":{"$ref":"#/components/schemas/CarrierCost"},"bookedFx":{"$ref":"#/components/schemas/FxCapture_6"}},"required":["orderId","consignmentId","payment","currency","fx","booked"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.consignment-trackedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.consignment-tracked"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"consignmentId":{"$ref":"#/components/schemas/CnsId"},"tracking":{"$ref":"#/components/schemas/ConsignmentTracking_1"}},"required":["orderId","consignmentId","tracking"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.consignment-labelledEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.consignment-labelled"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"consignmentId":{"$ref":"#/components/schemas/CnsId"},"contentType":{"$ref":"#/components/schemas/LabelContentType"},"size":{"type":"integer","exclusiveMinimum":0}},"required":["orderId","consignmentId","contentType","size"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.historical-order-recordedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.historical-order-recorded"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"source":{"$ref":"#/components/schemas/OrderSource"},"externalNumber":{"$ref":"#/components/schemas/ExternalOrderNumberEncoded"},"placedAt":{"type":"string"},"customer":{"type":"object","properties":{"personId":{"$ref":"#/components/schemas/PsnId_1"},"companyId":{"$ref":"#/components/schemas/CmpId_1"},"shippingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]},"billingAddressId":{"anyOf":[{"$ref":"#/components/schemas/AdrId"},{"$ref":"#/components/schemas/ClocId"}]}},"additionalProperties":false},"currency":{"$ref":"#/components/schemas/Currency"},"lines":{"type":"array","prefixItems":[{"$ref":"#/components/schemas/HistoricalLineEncoded"}],"minItems":1,"items":{"$ref":"#/components/schemas/HistoricalLineEncoded"}},"charges":{"$ref":"#/components/schemas/OrderCharges"},"shippingTaxLines":{"$ref":"#/components/schemas/ChannelTaxLines"},"taxesIncluded":{"type":"boolean"},"money":{"$ref":"#/components/schemas/HistoricalMoney"},"outcome":{"$ref":"#/components/schemas/HistoricalOutcome"},"fx":{"$ref":"#/components/schemas/FxCapture_1"},"original":{"$ref":"#/components/schemas/HistoricalMoney_1"}},"required":["orderId","source","externalNumber","placedAt","currency","lines","money","outcome","fx"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.historical-order-refundedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.historical-order-refunded"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"refundId":{"$ref":"#/components/schemas/RfdId"},"number":{"type":"string","minLength":1},"serial":{"type":"integer","exclusiveMinimum":0},"reason":{"type":"string","maxLength":500},"amountCents":{"type":"integer","minimum":0},"lines":{"type":"array","items":{"type":"object","properties":{"lineId":{"$ref":"#/components/schemas/LinId"},"sku":{"$ref":"#/components/schemas/Sku_1"},"quantity":{"type":"integer","exclusiveMinimum":0},"restock":{"type":"boolean"},"condition":{"$ref":"#/components/schemas/ReturnCondition"},"tax":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false}},"required":["lineId","quantity","restock","condition"],"additionalProperties":false}},"rest":{"type":"object","properties":{"inclusive":{"type":"boolean"},"amountCents":{"type":"integer"},"entries":{"type":"array","items":{"type":"object","properties":{"class":{"$ref":"#/components/schemas/TaxClass"},"treatment":{"$ref":"#/components/schemas/TaxTreatment"},"country":{"$ref":"#/components/schemas/CountryCode"},"rateBps":{"type":"integer","minimum":0,"maximum":10000,"description":"A rate in basis points (1000 = 10 %)"},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"source":{"$ref":"#/components/schemas/TaxSource"},"exemptBy":{"anyOf":[{"$ref":"#/components/schemas/CmpId"},{"$ref":"#/components/schemas/PsnId"}]}},"required":["class","treatment","country","rateBps","netCents","taxCents","source"],"additionalProperties":false},"minItems":1},"netCents":{"type":"integer"},"taxCents":{"type":"integer"},"grossCents":{"type":"integer"}},"required":["inclusive","amountCents","entries","netCents","taxCents","grossCents"],"additionalProperties":false},"tax":{"$ref":"#/components/schemas/DocumentTax_1"},"header":{"$ref":"#/components/schemas/TaxDocumentHeader"},"fx":{"$ref":"#/components/schemas/FxCapture_1"}},"required":["orderId","refundId","number","serial","amountCents","lines","tax","header","fx"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.historical-order-adoptedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.historical-order-adopted"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"liveOrderId":{"$ref":"#/components/schemas/OrdId"}},"required":["orderId","liveOrderId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"PayoutItemEncoded":{"type":"object","properties":{"kind":{"$ref":"#/components/schemas/PayoutItemKind"},"amountCents":{"type":"integer"},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"providerTransactionId":{"type":"string","minLength":1},"paymentId":{"$ref":"#/components/schemas/PayId"},"refundId":{"$ref":"#/components/schemas/RfdId"},"orderId":{"$ref":"#/components/schemas/OrdId"},"orderReference":{"type":"string","minLength":1},"description":{"type":"string","maxLength":500},"matched":{"type":"boolean"}},"required":["kind","amountCents","currency","matched"],"additionalProperties":false},"fulfillment.payout-recordedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.payout-recorded"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"payoutId":{"$ref":"#/components/schemas/PyoId"},"provider":{"$ref":"#/components/schemas/PaymentProvider"},"providerPayoutId":{"type":"string","minLength":1},"currency":{"$ref":"#/components/schemas/CurrencyCode"},"netCents":{"type":"integer"},"status":{"$ref":"#/components/schemas/PayoutStatus"},"issuedAt":{"type":"string"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PayoutItemEncoded"}},"note":{"type":"string","maxLength":500},"fx":{"$ref":"#/components/schemas/FxCapture_1"},"itemRates":{"type":"array","items":{"$ref":"#/components/schemas/FxCapture_3"}}},"required":["payoutId","provider","providerPayoutId","currency","netCents","status","issuedAt","items","fx"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.credit-issuedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.credit-issued"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"creditId":{"$ref":"#/components/schemas/CrdId"},"holderId":{"$ref":"#/components/schemas/TenderHolderId"},"currency":{"$ref":"#/components/schemas/Currency"},"amountCents":{"type":"integer","exclusiveMinimum":0},"reason":{"type":"string","maxLength":500},"fx":{"$ref":"#/components/schemas/FxCapture_1"}},"required":["creditId","holderId","currency","amountCents","reason","fx"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.credit-reversedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.credit-reversed"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"creditId":{"$ref":"#/components/schemas/CrdId"},"holderId":{"$ref":"#/components/schemas/TenderHolderId"},"currency":{"$ref":"#/components/schemas/Currency"},"amountCents":{"type":"integer","exclusiveMinimum":0},"reason":{"type":"string","maxLength":500},"fx":{"$ref":"#/components/schemas/FxCapture_1"}},"required":["creditId","holderId","currency","amountCents","fx"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.gift-card-issuedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.gift-card-issued"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"giftCardId":{"$ref":"#/components/schemas/GcdId"},"last4":{"$ref":"#/components/schemas/GiftCardLast4"},"codeHash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"currency":{"$ref":"#/components/schemas/Currency"},"amountCents":{"type":"integer","exclusiveMinimum":0},"expiresOn":{"$ref":"#/components/schemas/IsoDay"},"recipientId":{"$ref":"#/components/schemas/TenderHolderId"},"note":{"type":"string","maxLength":500},"source":{"type":"object","properties":{"orderId":{"$ref":"#/components/schemas/OrdId"},"lineId":{"$ref":"#/components/schemas/LinId"},"unit":{"type":"integer","exclusiveMinimum":0}},"required":["orderId","lineId","unit"],"additionalProperties":false},"fx":{"$ref":"#/components/schemas/FxCapture_1"}},"required":["giftCardId","last4","codeHash","currency","amountCents","fx"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.gift-card-disabledEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.gift-card-disabled"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"giftCardId":{"$ref":"#/components/schemas/GcdId"},"reason":{"type":"string","maxLength":500}},"required":["giftCardId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.gift-card-enabledEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.gift-card-enabled"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"giftCardId":{"$ref":"#/components/schemas/GcdId"},"reason":{"type":"string","maxLength":500}},"required":["giftCardId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.stock-written-offEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.stock-written-off"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"writeOffId":{"$ref":"#/components/schemas/WoId"},"sku":{"$ref":"#/components/schemas/Sku"},"locationId":{"$ref":"#/components/schemas/LocId"},"quantity":{"type":"integer","exclusiveMinimum":0},"reason":{"$ref":"#/components/schemas/WriteOffReason"},"disposition":{"$ref":"#/components/schemas/WriteOffDisposition"},"bucket":{"$ref":"#/components/schemas/DisposeBucket"},"serials":{"type":"array","items":{"$ref":"#/components/schemas/SerialNumber"}},"batchNumber":{"$ref":"#/components/schemas/BatchNumber"},"note":{"type":"string","minLength":1}},"required":["writeOffId","sku","quantity","reason","disposition","bucket"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.workflow-configuredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.workflow-configured"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"workflow":{"$ref":"#/components/schemas/WorkflowConfigEncoded"}},"required":["workflow"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.numbering-configuredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.numbering-configured"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"numbering":{"$ref":"#/components/schemas/DocumentNumberingEncoded"}},"required":["numbering"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.line-properties-configuredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.line-properties-configured"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"properties":{"$ref":"#/components/schemas/LinePropertiesEncoded"}},"required":["properties"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.carrier-account-connectedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.carrier-account-connected"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"appId":{"$ref":"#/components/schemas/AppId"},"externalId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"settingsPath":{"type":"string","maxLength":200,"pattern":"^(\\/[A-Za-z0-9_-]+)+$"},"quoteUrl":{"type":"string","maxLength":2000,"pattern":"^https?:\\/\\/\\S+$"},"installedAt":{"type":"string"}},"required":["carrierAccountId","appId","externalId","name"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.carrier-account-updatedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.carrier-account-updated"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"appId":{"$ref":"#/components/schemas/AppId"},"externalId":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"settingsPath":{"type":"string","maxLength":200,"pattern":"^(\\/[A-Za-z0-9_-]+)+$"},"quoteUrl":{"type":"string","maxLength":2000,"pattern":"^https?:\\/\\/\\S+$"},"installedAt":{"type":"string"}},"required":["carrierAccountId","appId","externalId","name"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.carrier-account-disconnectedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.carrier-account-disconnected"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"reason":{"type":"string","maxLength":500}},"required":["carrierAccountId","reason"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.carrier-quotes-degradedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.carrier-quotes-degraded"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"name":{"type":"string","minLength":1,"maxLength":200},"settingsPath":{"type":"string","maxLength":200,"pattern":"^(\\/[A-Za-z0-9_-]+)+$"},"asked":{"type":"integer","exclusiveMinimum":0},"missed":{"type":"integer","exclusiveMinimum":0},"atCheckout":{"type":"integer","minimum":0},"reasons":{"type":"array","items":{"$ref":"#/components/schemas/QuoteMissCount"},"minItems":1},"detail":{"type":"string","maxLength":500},"limitMs":{"type":"integer","exclusiveMinimum":0}},"required":["carrierAccountId","name","asked","missed","atCheckout","reasons","limitMs"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.carrier-quotes-recoveredEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.carrier-quotes-recovered"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"answered":{"type":"integer","exclusiveMinimum":0}},"required":["carrierAccountId","answered"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.manifest-requestedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.manifest-requested"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"manifestId":{"$ref":"#/components/schemas/MnfId"},"carrierAccountId":{"$ref":"#/components/schemas/CarId_1"},"appId":{"$ref":"#/components/schemas/AppId"},"reference":{"type":"string","minLength":1,"maxLength":200},"locationId":{"$ref":"#/components/schemas/LocId"},"consignments":{"type":"array","items":{"$ref":"#/components/schemas/ManifestEntry"}}},"required":["manifestId","carrierAccountId","appId","reference","consignments"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.manifest-lodgedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.manifest-lodged"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"manifestId":{"$ref":"#/components/schemas/MnfId"},"externalId":{"type":"string","minLength":1,"maxLength":200}},"required":["manifestId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.manifest-refusedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.manifest-refused"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"manifestId":{"$ref":"#/components/schemas/MnfId"},"reason":{"type":"string","maxLength":500}},"required":["manifestId","reason"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.manifest-documentedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.manifest-documented"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"manifestId":{"$ref":"#/components/schemas/MnfId"},"contentType":{"$ref":"#/components/schemas/LabelContentType"},"size":{"type":"integer","exclusiveMinimum":0}},"required":["manifestId","contentType","size"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.box-savedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.box-saved"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"boxId":{"$ref":"#/components/schemas/BoxId"},"name":{"type":"string","minLength":1,"maxLength":200},"inner":{"$ref":"#/components/schemas/PackedSizeEncoded"},"tareGrams":{"type":"integer","minimum":0},"maxWeightGrams":{"type":"integer","exclusiveMinimum":0},"packaging":{"$ref":"#/components/schemas/Packaging"},"sites":{"$ref":"#/components/schemas/BoxSites"}},"required":["boxId","name","inner","tareGrams","maxWeightGrams","packaging","sites"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.box-archivedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.box-archived"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"boxId":{"$ref":"#/components/schemas/BoxId"}},"required":["boxId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.rate-rules-savedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.rate-rules-saved"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"channelId":{"$ref":"#/components/schemas/ChnId"},"adjust":{"$ref":"#/components/schemas/RateAdjust"},"allow":{"type":"array","items":{"$ref":"#/components/schemas/RateServiceRef"},"maxItems":200},"collapse":{"$ref":"#/components/schemas/RateCollapse"},"cheapestTitle":{"type":"string","minLength":1,"maxLength":120},"fastestTitle":{"type":"string","minLength":1,"maxLength":120},"renames":{"type":"array","items":{"$ref":"#/components/schemas/RateRename"},"maxItems":200},"free":{"$ref":"#/components/schemas/FreeShipping"},"fallback":{"$ref":"#/components/schemas/FallbackRate"},"transit":{"type":"array","items":{"$ref":"#/components/schemas/TransitDays"},"maxItems":200},"dispatch":{"$ref":"#/components/schemas/DispatchTimes"}},"required":["channelId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.printer-savedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.printer-saved"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"printerId":{"$ref":"#/components/schemas/PrnId"},"name":{"type":"string","minLength":1,"maxLength":200},"locationId":{"$ref":"#/components/schemas/LocId"},"agentId":{"$ref":"#/components/schemas/PagId"},"language":{"$ref":"#/components/schemas/PrinterLanguage"},"media":{"$ref":"#/components/schemas/LabelMedia"},"connection":{"$ref":"#/components/schemas/PrinterConnection"},"defaultFor":{"type":"array","items":{"$ref":"#/components/schemas/PrintPurpose"},"maxItems":4}},"required":["printerId","name","locationId","agentId","language","media","connection","defaultFor"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.printer-removedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.printer-removed"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"printerId":{"$ref":"#/components/schemas/PrnId"}},"required":["printerId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.print-job-requestedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.print-job-requested"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"jobId":{"$ref":"#/components/schemas/PjbId"},"locationId":{"$ref":"#/components/schemas/LocId"},"printerId":{"$ref":"#/components/schemas/PrnId"},"agentId":{"$ref":"#/components/schemas/PagId"},"purpose":{"$ref":"#/components/schemas/PrintPurpose"},"document":{"$ref":"#/components/schemas/PrintDocument"},"content":{"$ref":"#/components/schemas/SkuLabelContent"}},"required":["jobId","locationId","printerId","agentId","purpose","document"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.print-job-sentEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.print-job-sent"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"jobId":{"$ref":"#/components/schemas/PjbId"},"locationId":{"$ref":"#/components/schemas/LocId"},"agentId":{"$ref":"#/components/schemas/PagId"}},"required":["jobId","locationId","agentId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.print-job-printedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.print-job-printed"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"jobId":{"$ref":"#/components/schemas/PjbId"},"locationId":{"$ref":"#/components/schemas/LocId"},"agentId":{"$ref":"#/components/schemas/PagId"}},"required":["jobId","locationId","agentId"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"fulfillment.print-job-failedEncoded":{"type":"object","properties":{"_tag":{"type":"string","enum":["fulfillment.print-job-failed"]},"eventId":{"$ref":"#/components/schemas/EvtId"},"txId":{"$ref":"#/components/schemas/TxId"},"tenantId":{"$ref":"#/components/schemas/TenantId"},"sequence":{"type":"integer","minimum":0},"occurredAt":{"type":"string"},"source":{"type":"string","minLength":1},"version":{"type":"number","enum":[1]},"actor":{"$ref":"#/components/schemas/Actor_1"},"correlationId":{"type":"string","minLength":1},"causationId":{"type":"string","minLength":1},"payload":{"type":"object","properties":{"jobId":{"$ref":"#/components/schemas/PjbId"},"locationId":{"$ref":"#/components/schemas/LocId"},"agentId":{"$ref":"#/components/schemas/PagId"},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["jobId","locationId","agentId","reason"],"additionalProperties":false}},"required":["_tag","eventId","txId","tenantId","sequence","occurredAt","source","version","actor","correlationId","payload"],"additionalProperties":false},"JournalHead":{"type":"object","properties":{"at":{"type":"string"},"sequence":{"type":"integer","minimum":0}},"required":["at"],"additionalProperties":false,"description":"Where a tenant's journal stood at a moment."}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"A tenant JWT: sign in through the auth service, choose the organization, then `GET /api/auth/token`. Tokens last 15 minutes."}}},"security":[],"tags":[{"name":"workflow","description":"The tenant's configurable order pipeline."},{"name":"lineProperties","description":"The names an order line's personalisation may carry, and what each means."},{"name":"numbering","description":"How orders, shipments, invoices, payments and refunds are numbered."},{"name":"orders","description":"The order pipeline: create, confirm, allocate, ship in parcels, invoice, refund."},{"name":"shelf","description":"The batch/serial/expiry registry's shelf view."},{"name":"writeOffs","description":"Stock write-offs: the damaged/expired/lost exit path."},{"name":"shipping","description":"Carrier accounts and the consignments booked with them: labels, tracking, manifests, and the boxes parcels are packed in (`docs/shipping-apps.md`)."},{"name":"rates","description":"Live rates: what a parcel would cost with each of the tenant's carrier accounts (`docs/shipping-apps.md` §4)."},{"name":"history","description":"History: orders from before Manifold, kept for the record, mirrored while their source still works them (`docs/historical-orders.md`)."},{"name":"payouts","description":"Payouts: what payment providers sent the merchant, settling the orders' payments (`docs/multi-currency.md` › §5)."},{"name":"tenders","description":"Store credit and gift cards: balances customers hold, spent and given back by an order's payments and refunds."},{"name":"customer","description":"What a tenant's customer reaches through a signed link: one document, and the quote's answer (`docs/customer-pages.md`)."},{"name":"printing","description":"Label printing: the printers at each site, and print jobs taken and reported by the site's print agent (`docs/label-printing.md`)."},{"name":"events","description":"The fulfillment append-only event log."}],"servers":[{"url":"https://fulfillment.getmanifold.io","description":"Production"}]}