Set Shipping Method
Select a shipping method for the order.
Endpoint
POST /api/shop/checkout/shipping-methodRequest Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
X-STOREFRONT-KEY | Yes | Your storefront API key |
Authorization | Yes | Bearer token (customer login required) |
Request Body
json
{
"shippingMethodCode": "flatrate_flatrate",
"shippingMethod": "flat_rate"
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
shippingMethodCode | string | Yes | Code of the shipping method |
shippingMethod | string | Yes | Shipping method type |
Response Fields (200 OK)
| Field | Type | Description |
|---|---|---|
shippingMethod | object | Selected shipping method details |
cartTotal | decimal | Updated cart total with shipping |
message | string | Success message |
Shipping Method Fields
| Field | Type | Description |
|---|---|---|
code | string | Shipping method code |
method | string | Shipping method type |
title | string | Display name |
price | decimal | Shipping cost |
carrier | string | Carrier name |
Use Cases
- Select standard shipping
- Choose express shipping
- Apply overnight delivery
- Calculate final total
- Proceed to payment
Important Notes
- Must set shipping address first
- Different methods available per location
- Cost varies by location and weight
- Some methods may have time restrictions

