Attach a design to an order
order_attach_designPin a design to an existing order ahead of checkout.
Usually unnecessary: order_create_payment_link attaches the session's
design itself. Prefer that — attaching locks that item's design, and the
payment link will not replace it, so an early attach freezes the order
onto a version the customer may still be editing. Call this only when the customer explicitly wants a design locked
to the order now. On an order with several items, each item keeps its own
design, and the payment link attaches each one. An attached design is
final for its item: design_chat then fails with DesignAttachedError.
Normally omit design_snapshot_id: Compass attaches
the design's latest snapshot automatically (resolved from RendReal 360,
retried briefly to let it sync after resolve),
raising NoSnapshotError when the design still has no snapshot after
those retries. A design_snapshot_id you pass in is accepted only when
it matches that resolved latest snapshot — it can't inject an arbitrary
snapshot — so there is rarely a reason to pass one. Once the order's
artwork is settled, call order_create_payment_link only when the
customer asks to pay.
Pass item_id to attach to one item; it is required when the order has
several items (OrderItemRequiredError lists them). The session's active
design goes to the item it was made for when item_id is omitted, and
another item fails with DesignItemMismatchError. An item whose uploaded
file has a submitted page mapping fails with UploadMappingSubmittedError,
because that file prints. Only valid for orders
created in this session (OrderItemsUnknownError otherwise — item ids
exist nowhere else). Returns a job — poll until SUCCEEDED for the order's
new status.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"order_id": "<order_id>",
"design_id": "<design_id>"
},
"name": "order_attach_design"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| item_id | No | ||
| order_id | Yes | ||
| design_id | Yes | ||
| session_id | Yes | ||
| design_snapshot_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |