Fit a design to its size
design_adaptPut a design made before the product was chosen onto its cart line, fitted to the size the customer chose, and show it before paying.
Call this once the customer chose a delivery option for a line whose design_id
came from catalog_configure_product: pass the line_id and the chosen
offer_ids, one per cart line. When the size differs, the design is laid out
again, which takes about a minute. adapted: false means it already fitted and
nothing changed. If catalog_configure_product reported an Unmet Constraint for a
line, the call fails with UnmetConstraintUnansweredError until the customer
answers; if they accept the line as configured, call again with
unmet_accepted=true. The payment link refuses a line whose design still needs
this step (AdaptStepRequiredError).
The result shows the design on its size (product_label, thumbnails,
design_url). Share design_url as a markdown hyperlink and the thumbnails. When
the design card is displayed, it shows the previews with "Looks good" and "Change
something", so don't paste the link or describe the images. Ask whether it looks good; for a change, call
design_chat with design_id.
Returns a job — poll until SUCCEEDED.
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>",
"line_id": "<line_id>"
},
"name": "design_adapt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line_id | Yes | ||
| offer_ids | No | ||
| session_id | Yes | ||
| unmet_accepted | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |