Once items are in the cart, the next step is to gather customer details and determine available shipping methods.
This section covers:
- Setting customer information
- Retrieving shipping rates
- Selecting a shipping rate
πNote: Full request/response schemas are available in the API reference.
π€ Set Customer Information
Attach the buyerβs identity and shipping address to the cart. This information is used to calculate shipping rates in the next step.
Endpoint: POST /cart/customer
json
JavaScript Example:
javascript
π Retrieve Shipping Rates
Once customer info is attached, use this endpoint to fetch available shipping methods.
Endpoint: GET /cart/shipping-rates/:id
JavaScript Example:
javascript
π¦ Select Shipping Method(s)
Assign selected shipping methods to the cart. This step is required before checkout.
π‘ If your cart includes items from multiple stores, include one shipping option per store.
Endpoint: POST /cart/shipping-method
json
π΄Error Handling: Each step in this flow validates required fields and returns descriptive messages. For handling unavailable shipping states, see Error Handling.