Call Query Delivery Profiles to understand the site's delivery setup — profiles, regions, carriers, and backup rates.
Endpoint: POST https://www.wixapis.com/ecom/v1/delivery-profiles/query
Request:
Response:
Save the profile id, revision, and each region's id and active status. Identify which regions have carriers with missing backup rates (backupRate absent or backupRate.active: false).
Endpoint: POST https://www.wixapis.com/ecom/v1/shipping-options/query
Request:
Response:
Note: The response uses deliveryRegionId (singular) as the primary field linking an option to a region.
When the recommendation action is create_shipping_option, create a new option linked to a specific delivery region.
Endpoint: POST https://www.wixapis.com/ecom/v1/shipping-options
Request — flat rate example:
Response:
Request — free shipping with price threshold:
Key field rules:
| Field | Required | Notes |
|---|---|---|
title | Yes | Display name at checkout |
estimatedDeliveryTime | Yes | Free text shown to customers |
deliveryRegionId | Yes | Region UUID from Step 1. Must use singular field, not deliveryRegionIds |
rates | Yes | Array of rate objects |
rates[].amount | Yes | Decimal string ("5.99", "0" for free) |
rates[].multiplyByQuantity | Yes | Almost always false |
rates[].conditions | Yes | Empty array for flat rate; see condition types below |
Condition types (for tiered/conditional rates):
| Type | Description | Example |
|---|---|---|
BY_TOTAL_PRICE | Cart total threshold | "operator": "GTE", "value": "75" |
BY_TOTAL_WEIGHT | Weight threshold | "operator": "LTE", "value": "10" |
BY_TOTAL_QUANTITY | Item count threshold | "operator": "GTE", "value": "3" |
Operators: EQ, GT, GTE, LT, LTE
When the recommendation action is update_shipping_option, update an existing option's title, delivery time, or rates.
Endpoint: PATCH https://www.wixapis.com/ecom/v1/shipping-options/{shippingOptionId}
Replace {shippingOptionId} with the option's id from Step 2.
Request:
Response:
The revision field is required and must match the current revision. The response returns the incremented revision.
After applying recommendations, query shipping options again (Step 2) to confirm the changes took effect. Verify:
deliveryRegionId| Error | Cause | Fix |
|---|---|---|
deliveryRegionId is not a valid GUID | Used deliveryRegionIds (plural) instead of deliveryRegionId (singular) in create request | Use the singular deliveryRegionId field |
SHIPPING_OPTION_NOT_FOUND | The shipping option ID doesn't exist | Re-query shipping options to get current IDs |
REVISION_MISMATCH | The revision doesn't match the current version | Re-fetch the option to get the latest revision, then retry |