order.document.attach
Attach an already-issued document (fiscal invoice, shipping label, packing slip, …) to an order, by external url or ASSETS reference. Idempotent by state: re-attaching the same document is a success no-op; a wrong attachment is corrected by attaching the right one (there is no remove).
- Scope:
order.write - System: no
- Reachable from:
POST /v1/commands/order.document.attach(tenant credential) · MCP toolorder.document.attach· SDKclient.call('order.document.attach', …) - Events:
order.document.attached
Input (JSON Schema)
Section titled “Input (JSON Schema)”{ "properties": { "asset_id": { "type": "string" }, "file_url": { "type": "string" }, "kind": { "enum": [ "fiscal_invoice", "shipping_label", "packing_slip", "content_declaration", "delivery_proof", "other" ], "type": "string" }, "metadata": { "additionalProperties": {}, "propertyNames": { "type": "string" }, "type": "object" }, "name": { "type": "string" }, "order_id": { "minLength": 1, "type": "string" }, "shipment_id": { "type": "string" } }, "required": [ "order_id", "kind" ], "type": "object"}Result (200)
Section titled “Result (200)”{ "additionalProperties": false, "properties": { "attached": { "type": "boolean" }, "document_id": { "type": "string" }, "kind": { "type": "string" }, "order_id": { "type": "string" } }, "required": [ "document_id", "order_id", "kind", "attached" ], "type": "object"}Errors
Section titled “Errors”validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)