cart.set_delivery
Set where the order goes and how: the shipping address plus the chosen delivery method. Get the valid method ids from the read shipping_options (it quotes them for this cart and postal code) — a method the quote does not offer is refused here.
- Scope:
public - System: no
- Reachable from: an ANONYMOUS face — no credential, and never
/v1/commands/*. Which path serves it is not derivable from the registry; see the anonymous faces. - Events: none — A checkout step on session state, read back no-store on the next step.
Input (JSON Schema)
Section titled “Input (JSON Schema)”{ "properties": { "cart_id": { "minLength": 1, "type": "string" }, "shipping_address": { "properties": { "city": { "minLength": 1, "type": "string" }, "country_code": { "minLength": 1, "type": "string" }, "line1": { "minLength": 1, "type": "string" }, "line2": { "type": "string" }, "neighborhood": { "type": "string" }, "number": { "type": "string" }, "postal_code": { "minLength": 1, "type": "string" }, "recipient": { "type": "string" }, "region": { "minLength": 1, "type": "string" } }, "required": [ "line1", "city", "region", "postal_code", "country_code" ], "type": "object" }, "shipping_method_id": { "minLength": 1, "type": "string" } }, "required": [ "cart_id", "shipping_address", "shipping_method_id" ], "type": "object"}Result (200)
Section titled “Result (200)”{ "additionalProperties": false, "properties": { "cart_id": { "type": "string" } }, "required": [ "cart_id" ], "type": "object"}Errors
Section titled “Errors”validation_failed (400) · unauthorized (401) · forbidden (403) · conflict (409) · internal (500)