Shipping
Private Shipping API endpoints: shipping rules (zones with countries, regions and excluded zip patterns), the shipping options priced inside them, local pickups, local deliveries, and a read-only list of shipping methods. Money is in cents, in the shop base currency. Each option, pickup and delivery has one shipping method, whose id is the shipping_method_id used by subscriptions, orders and carts. Everything is created unpublished and is offered at checkout once published; an option only once its rule is published.
- GET/shipping_rules
- POST/shipping_rules
- GET/shipping_rules/{shipping_rule_id}
- PATCH/shipping_rules/{shipping_rule_id}
- DELETE/shipping_rules/{shipping_rule_id}
- POST/shipping_rules/{shipping_rule_id}/publish
- POST/shipping_rules/{shipping_rule_id}/unpublish
- GET/shipping_rules/{shipping_rule_id}/options
- POST/shipping_rules/{shipping_rule_id}/options
- GET/shipping_rules/{shipping_rule_id}/options/{option_id}
- PATCH/shipping_rules/{shipping_rule_id}/options/{option_id}
- DELETE/shipping_rules/{shipping_rule_id}/options/{option_id}
- POST/shipping_rules/{shipping_rule_id}/options/{option_id}/publish
- POST/shipping_rules/{shipping_rule_id}/options/{option_id}/unpublish
- GET/local_pickups
- POST/local_pickups
- GET/local_pickups/{local_pickup_id}
- PATCH/local_pickups/{local_pickup_id}
- DELETE/local_pickups/{local_pickup_id}
- POST/local_pickups/{local_pickup_id}/publish
- POST/local_pickups/{local_pickup_id}/unpublish
- GET/local_deliveries
- POST/local_deliveries
- GET/local_deliveries/{local_delivery_id}
- PATCH/local_deliveries/{local_delivery_id}
- DELETE/local_deliveries/{local_delivery_id}
- POST/local_deliveries/{local_delivery_id}/publish
- POST/local_deliveries/{local_delivery_id}/unpublish
- GET/shipping_methods
- GET/shipping_methods/{shipping_method_id}
A paginated list of the shop's shipping rules (zones), published or not.
Query parameters
ids[]optionalinteger[]Filter by shipping rule IDs. Values must be unique.
queryoptionalstringCase-insensitive substring match on the rule name
publishedoptionalintegerFilter by published status (0 or 1)
Possible values: 0, 1.
country_idoptionalintegerOnly the rules that cover this shipping country (see GET /countries), whole or by some of its regions
sort[field]optionalstringSort field; name ignores letter case. Without sort the list is newest first (id desc), with it the direction defaults to asc and id breaks ties
Possible values: id, name, created_at.
sort[direction]optionalstringSort direction; defaults to asc.
Possible values: asc, desc.
Defaults to "asc".
pageoptionalintegerPage number
per_pageoptionalintegerItems per page
Defaults to 10.
Returnsobject
Shipping rules list response
Error responses
422objectA query parameter is invalid: a wrong type, a repeated ID, a value outside its enum or range, an unknown shipping country, or sort without sort[field]. errors lists the messages per parameter.
Create a shipping zone: a name, the countries it covers and optional zip patterns to exclude. Options are added separately through POST /shipping_rules/{shipping_rule_id}/options. The rule is created unpublished; publish it through POST /shipping_rules/{shipping_rule_id}/publish.
Request body
nameRequiredstringcountriesRequiredobjectThe countries of the zone, as { create: [...] }.
excluded_zip_patternsoptionalobjectZip patterns to exclude, as { create: [...] }; each matches ^([A-Za-z\s\d])+([\*]+)?$. Each * matches exactly one character and the pattern covers the whole zip, ignoring case. A pattern may be sent once, in any letter case.
createoptionalstring[]ReturnsShippingRule
The created shipping rule
Error responses
422objectA field is missing or invalid: a malformed countries or excluded_zip_patterns set, an unknown or repeated country or region, regions that do not fit the country, a country or region another rule of the shop already has, or a zip pattern that is malformed or repeated. errors lists the messages per field.
Get a single shipping rule by its ID.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
ReturnsShippingRule
Shipping rule object response
Error responses
404objectNo shipping rule exists with this ID in the shop, or the rule is deleted.
Partial update: only the keys present in the body are applied. countries and excluded_zip_patterns are change sets; a set left out, or sent as an empty object, changes nothing. published changes only through the publish and unpublish endpoints.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
Request body
nameoptionalstringcountriesoptionalShippingRuleCountriesChangeSetCountries keyed by country id: create countries must not be on the rule yet, update and delete countries must be, an id may appear in only one of create, update and delete, and at least one country must remain.
excluded_zip_patternsoptionalZipPatternsChangeSetZip patterns keyed by the pattern itself, compared ignoring letter case: create patterns must not be listed yet, delete patterns must be (deleting ab1 removes a stored AB1), and a pattern may appear only once, in one of create and delete. Each * matches exactly one character and the pattern covers the whole zip, ignoring case: 946** matches every zip from 94600 to 94699.
ReturnsShippingRule
The updated shipping rule
Error responses
404objectNo shipping rule exists with this ID in the shop, or the rule is deleted.
422objectA field fails the create rules, or a change set is malformed, lists an entry in two operations, creates an entry already on the rule, updates or deletes one that is not, or would leave the rule without a country or a country with regions without a region. errors lists the messages per field.
Delete the rule with its options and their shipping methods, and return the rule as it was.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
ReturnsShippingRule
The deleted shipping rule, serialised as it was just before the delete.
Error responses
400objectA subscription, whatever its status, or a cart in checkout still uses one of the rule's options (shipping_rule_in_use).
404objectNo shipping rule exists with this ID in the shop, or the rule is already deleted.
Sets the rule's published flag. Its options keep their own flag: an option unpublished earlier stays unpublished. Publishing a published rule answers 200 and changes nothing.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
ReturnsShippingRule
The published shipping rule
Error responses
400objectThe rule stays unpublished: the publish is refused with no_active_plan or shipping_plan_limit_exceeded.
404objectNo shipping rule exists with this ID in the shop, or the rule is deleted.
Clears the rule's published flag and unpublishes every option of the rule, so none of them is offered at checkout any more. Unpublishing an unpublished rule answers 200 and changes nothing.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
ReturnsShippingRule
The unpublished shipping rule
Error responses
404objectNo shipping rule exists with this ID in the shop, or the rule is deleted.
A paginated list of the rule's shipping options, published or not.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
Query parameters
ids[]optionalinteger[]Filter by shipping option IDs. Values must be unique.
types[]optionalstring[]Filter by option types, e.g. types[]=price&types[]=weight
publishedoptionalintegerFilter by published status (0 or 1)
Possible values: 0, 1.
queryoptionalstringCase-insensitive substring match on the option name
sort[field]optionalstringSort field; name ignores letter case. Without sort the list is newest first (id desc), with it the direction defaults to asc and id breaks ties
Possible values: id, name, created_at.
sort[direction]optionalstringSort direction; defaults to asc.
Possible values: asc, desc.
Defaults to "asc".
pageoptionalintegerPage number
per_pageoptionalintegerItems per page
Defaults to 10.
Returnsobject
Shipping options list response
Error responses
404objectNo shipping rule exists with this ID in the shop, or the rule is deleted.
422objectA query parameter is invalid: a wrong type, a repeated ID, or a value outside its enum or range. errors lists the messages per parameter.
Create an option under the rule; the fields each type takes are listed on the request schema. The option gets its own shipping method and starts unpublished; publish it through POST /shipping_rules/{shipping_rule_id}/options/{option_id}/publish once its rule is published.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
Request body
nameRequiredstringtypeRequiredstringPossible values: flat_price, price, weight, product, collection, dynamic.
durationoptionalstring | nullpriceoptionalinteger | nullCents: the fee of a flat_price option, or the price per product of a product or collection option for products outside its product_groups or collections. null is the same as leaving it out.
rangesoptionalShippingOptionRange[]product_groupsoptionalShippingOptionProductGroup[]collectionsoptionalShippingOptionCollection[]aggregated_price_typeoptionalstring | nullRequired for product and collection options; refused for other types. null is the same as leaving it out.
Possible values: min, max, sum.
max_shipping_feeoptionalinteger | nullCents; null or 0 means no cap.
free_shipping_fee_amountoptionalinteger | nullCents; null turns free shipping off, 0 makes shipping always free. Not used by dynamic options.
multiply_price_by_shipment_numberoptionalbooleanUsed by flat_price, price and weight options only.
Defaults to false.
handling_feeoptionalintegerCents, added once per shipment. dynamic only; refused on other types, null included.
Defaults to 0.
provideroptionalstring | nullnull is the same as leaving it out.
Possible values: flavorcloud.
carriersoptionalShippingOptionCarrierInput[]ReturnsShippingOption
The created shipping option
Error responses
404objectNo shipping rule exists with this ID in the shop, or the rule is deleted.
422objectA field is missing or invalid for the option's type: a field the type does not take or needs, a negative or non-integer amount, a malformed or repeated list entry, an unknown, archived or parent product, an unknown collection, carrier or service code, or a second option of the provider in the rule. errors lists the messages per field.
Get a single shipping option by its ID.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
option_idRequiredintegerShipping option ID
ReturnsShippingOption
Shipping option object response
Error responses
404objectNo shipping rule exists with this ID in the shop or the rule is deleted (ShippingRule not found with ID: 22), or the rule has no option with this ID.
Partial update: only the keys present in the body are applied, against the stored type. A list sent replaces the stored one. type and provider are set on create; published changes only through the publish and unpublish endpoints.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
option_idRequiredintegerShipping option ID
Request body
nameoptionalstringdurationoptionalstring | nullpriceoptionalinteger | nullNot null on flat_price, product and collection options; refused on other types, where null is accepted.
rangesoptionalShippingOptionRange[]2 to 10 ranges on price and weight options; [] on other types.
product_groupsoptionalShippingOptionProductGroup[]At least one group on product options; [] on other types.
collectionsoptionalShippingOptionCollection[]At least one collection on collection options; [] on other types.
aggregated_price_typeoptionalstring | nullNot null on product and collection options; refused on other types, where null is accepted.
Possible values: min, max, sum.
max_shipping_feeoptionalinteger | nullfree_shipping_fee_amountoptionalinteger | nullmultiply_price_by_shipment_numberoptionalbooleanhandling_feeoptionalinteger | nullNot null on dynamic options; refused on other types, where null is accepted.
carriersoptionalShippingOptionCarrierInput[]At least one carrier on dynamic options; [] on other types.
ReturnsShippingOption
The updated shipping option
Error responses
404objectNo shipping rule exists with this ID in the shop or the rule is deleted (ShippingRule not found with ID: 22), or the rule has no option with this ID.
422objectA field fails the create rules for the stored type, or the type's own list is sent as [] or one of its required values as null. errors lists the messages per field.
Delete the option with its list and its shipping method, and return the option as it was.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
option_idRequiredintegerShipping option ID
ReturnsShippingOption
The deleted shipping option, serialised as it was just before the delete.
Error responses
400objectA subscription, whatever its status, or a cart in checkout still uses the option (shipping_method_in_use).
404objectNo shipping rule exists with this ID in the shop or the rule is deleted (ShippingRule not found with ID: 22), or the rule has no option with this ID.
Publishes the option, which makes it available at checkout. The rule must be published first. Publishing a published option answers 200 and changes nothing.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
option_idRequiredintegerShipping option ID
ReturnsShippingOption
The published shipping option
Error responses
400objectThe rule is not published (shipping_rule_not_published), or the publish is refused with no_active_plan or shipping_plan_limit_exceeded.
404objectNo shipping rule exists with this ID in the shop or the rule is deleted (ShippingRule not found with ID: 22), or the rule has no option with this ID.
Unpublishes the option, so it is no longer offered at checkout. Unpublishing an unpublished option answers 200 and changes nothing.
Path parameters
shipping_rule_idRequiredintegerShipping rule ID
option_idRequiredintegerShipping option ID
ReturnsShippingOption
The unpublished shipping option
Error responses
404objectNo shipping rule exists with this ID in the shop or the rule is deleted (ShippingRule not found with ID: 22), or the rule has no option with this ID.
A paginated list of the shop's local pickup points (pickup) and Mondial Relay points (mondial_relay), published or not.
Query parameters
ids[]optionalinteger[]Filter by local pickup IDs. Values must be unique.
types[]optionalstring[]Filter by pickup types
publishedoptionalintegerFilter by published status (0 or 1)
Possible values: 0, 1.
country_idoptionalintegerOnly the pickups in this shipping country
queryoptionalstringCase-insensitive substring match on the pickup name
sort[field]optionalstringSort field; name ignores letter case. Without sort the list is newest first (id desc), with it the direction defaults to asc and id breaks ties
Possible values: id, name, created_at.
sort[direction]optionalstringSort direction; defaults to asc.
Possible values: asc, desc.
Defaults to "asc".
pageoptionalintegerPage number
per_pageoptionalintegerItems per page
Defaults to 10.
Returnsobject
Local pickups list response
Error responses
422objectA query parameter is invalid: a wrong type, a repeated ID, a value outside its enum or range, or an unknown country. errors lists the messages per parameter.
Create a pickup point: a pickup carries an address, a mondial_relay point a country and a price (the customer picks the relay at checkout). The pickup gets its own shipping method and starts unpublished; publish it through POST /local_pickups/{local_pickup_id}/publish.
Request body
typeRequiredstringPossible values: pickup, mondial_relay.
nameRequiredstringpriceRequiredintegerCents.
country_idRequiredintegerShipping country id (see GET /countries). For mondial_relay, one of FR, ES, BE, NL, LU, DE, AT, PT (local_pickup_type=mondial_relay lists them).
region_idoptionalintegerA region of country_id, for a country with regions (see GET /countries).
regionoptionalstringThe region as free text, for a country without regions.
working_hoursoptionalstringcommentoptionalstring | nullAt most 65535 bytes in UTF-8.
cityoptionalstringaddress_oneoptionalstringaddress_twooptionalstring | nullzipoptionalstringphoneoptionalstringA valid international phone number, e.g. +14155552671.
multiply_price_by_shipment_numberoptionalbooleanDefaults to false.
ReturnsLocalPickup
The created local pickup
Error responses
422objectA field is missing or invalid for the pickup's type: a field the type does not take or needs, a country Mondial Relay does not serve, a region that does not fit the country, an invalid phone number, or a value of the wrong type, too long or out of range. errors lists the messages per field.
Get a single local pickup by its ID.
Path parameters
local_pickup_idRequiredintegerLocal pickup ID
ReturnsLocalPickup
Local pickup object response
Error responses
404objectNo local pickup exists with this ID in the shop.
Partial update: only the keys present in the body are applied, against the stored type. type is set on create; published changes only through the publish and unpublish endpoints.
Path parameters
local_pickup_idRequiredintegerLocal pickup ID
Request body
nameoptionalstringpriceoptionalintegercountry_idoptionalintegerregion_idoptionalintegerregionoptionalstringworking_hoursoptionalstringcommentoptionalstring | nullAt most 65535 bytes in UTF-8.
cityoptionalstringaddress_oneoptionalstringaddress_twooptionalstring | nullzipoptionalstringphoneoptionalstringmultiply_price_by_shipment_numberoptionalbooleanReturnsLocalPickup
The updated local pickup
Error responses
404objectNo local pickup exists with this ID in the shop.
422objectA field fails the create rules for the stored type. errors lists the messages per field.
Delete the pickup and its shipping method, and return the pickup as it was.
Path parameters
local_pickup_idRequiredintegerLocal pickup ID
ReturnsLocalPickup
The deleted local pickup, serialised as it was just before the delete.
Error responses
400objectA subscription, whatever its status, or a cart in checkout still uses the pickup (shipping_method_in_use).
404objectNo local pickup exists with this ID in the shop.
Publishes the pickup, which makes it available at checkout. Publishing a published pickup answers 200 and changes nothing.
Path parameters
local_pickup_idRequiredintegerLocal pickup ID
ReturnsLocalPickup
The published local pickup
Error responses
400objectThe pickup stays unpublished: the publish is refused with no_active_plan or shipping_plan_limit_exceeded.
404objectNo local pickup exists with this ID in the shop.
Unpublishes the pickup, so it is no longer offered at checkout. Unpublishing an unpublished pickup answers 200 and changes nothing.
Path parameters
local_pickup_idRequiredintegerLocal pickup ID
ReturnsLocalPickup
The unpublished local pickup
Error responses
404objectNo local pickup exists with this ID in the shop.
A paginated list of the shop's local deliveries (own-courier delivery to a set of zip patterns), published or not. Each entry embeds its areas.
Query parameters
ids[]optionalinteger[]Filter by local delivery IDs. Values must be unique.
publishedoptionalintegerFilter by published status (0 or 1)
Possible values: 0, 1.
queryoptionalstringCase-insensitive substring match on the delivery name
sort[field]optionalstringSort field; name ignores letter case. Without sort the list is newest first (id desc), with it the direction defaults to asc and id breaks ties
Possible values: id, name, created_at.
sort[direction]optionalstringSort direction; defaults to asc.
Possible values: asc, desc.
Defaults to "asc".
pageoptionalintegerPage number
per_pageoptionalintegerItems per page
Defaults to 10.
Returnsobject
Local deliveries list response
Error responses
422objectA query parameter is invalid: a wrong type, a repeated ID, or a value outside its enum or range. errors lists the messages per parameter.
Create a local delivery: a name, a price and the zip patterns it serves. The delivery gets its own shipping method and starts unpublished; publish it through POST /local_deliveries/{local_delivery_id}/publish.
Request body
nameRequiredstringdurationoptionalstring | nullpriceRequiredintegerCents.
commentoptionalstring | nullAt most 65535 bytes in UTF-8.
areasRequiredobjectZip patterns as { create: [...] }, each matching ^([A-Za-z\s\d])+([\*]+)?$ (letters, digits and spaces with optional trailing *s), e.g. 946** or SW1A 1AA. Each * matches exactly one character and the pattern covers the whole zip, ignoring case. A pattern may be sent once, in any letter case.
createRequiredstring[]multiply_price_by_shipment_numberoptionalbooleanDefaults to false.
ReturnsLocalDelivery
The created local delivery
Error responses
422objectA field is missing or invalid: a value of the wrong type, too long or out of range, a malformed areas set, or a zip pattern that is malformed or repeated. errors lists the messages per field.
Get a single local delivery by its ID.
Path parameters
local_delivery_idRequiredintegerLocal delivery ID
ReturnsLocalDelivery
Local delivery object response
Error responses
404objectNo local delivery exists with this ID in the shop.
Partial update: only the keys present in the body are applied. areas is a { create, delete } change set on the stored patterns. published changes only through the publish and unpublish endpoints.
Path parameters
local_delivery_idRequiredintegerLocal delivery ID
Request body
nameoptionalstringdurationoptionalstring | nullpriceoptionalintegercommentoptionalstring | nullAt most 65535 bytes in UTF-8.
areasoptionalZipPatternsChangeSetZip patterns keyed by the pattern itself, compared ignoring letter case: create patterns must not be listed yet, delete patterns must be (deleting ab1 removes a stored AB1), and a pattern may appear only once, in one of create and delete. Each * matches exactly one character and the pattern covers the whole zip, ignoring case: 946** matches every zip from 94600 to 94699.
multiply_price_by_shipment_numberoptionalbooleanReturnsLocalDelivery
The updated local delivery
Error responses
404objectNo local delivery exists with this ID in the shop.
422objectA field fails the create rules, or areas is malformed, lists a pattern in both operations, creates a pattern already listed, deletes one that is not, or would leave the delivery without a pattern. errors lists the messages per field.
Delete the delivery with its areas and its shipping method, and return the delivery as it was.
Path parameters
local_delivery_idRequiredintegerLocal delivery ID
ReturnsLocalDelivery
The deleted local delivery, serialised as it was just before the delete.
Error responses
400objectA subscription, whatever its status, or a cart in checkout still uses the delivery (shipping_method_in_use).
404objectNo local delivery exists with this ID in the shop.
Publishes the delivery, which makes it available at checkout. Publishing a published delivery answers 200 and changes nothing.
Path parameters
local_delivery_idRequiredintegerLocal delivery ID
ReturnsLocalDelivery
The published local delivery
Error responses
400objectThe delivery stays unpublished: the publish is refused with no_active_plan or shipping_plan_limit_exceeded.
404objectNo local delivery exists with this ID in the shop.
Unpublishes the delivery, so it is no longer offered at checkout. Unpublishing an unpublished delivery answers 200 and changes nothing.
Path parameters
local_delivery_idRequiredintegerLocal delivery ID
ReturnsLocalDelivery
The unpublished local delivery
Error responses
404objectNo local delivery exists with this ID in the shop.
A paginated, read-only list of the shop's shipping methods, published or not, each with its shipping option, local pickup or local delivery embedded as method.
Query parameters
ids[]optionalinteger[]Filter by shipping method IDs. Values must be unique.
types[]optionalstring[]Filter by kind; several values are combined with OR.
publishedoptionalintegerFilter by published status (0 or 1)
Possible values: 0, 1.
queryoptionalstringSearch by the method name across the three kinds, case-insensitive.
product_idoptionalintegerOnly the methods this plan or variant can use: the methods linked to it, or every method of the shop when it has no links. Plan or variant ID, not the parent product ID.
sort[field]optionalstringSort field; without sort the list is newest first (id desc), with it the direction defaults to asc and id breaks ties
Possible values: id, created_at.
sort[direction]optionalstringSort direction; defaults to asc.
Possible values: asc, desc.
Defaults to "asc".
pageoptionalintegerPage number
per_pageoptionalintegerItems per page
Defaults to 10.
Returnsobject
Shipping methods list response
Error responses
422objectA query parameter is invalid: a wrong type, a repeated ID, a value outside its enum or range, or a product_id that is not a plan or variant of the shop. errors lists the messages per parameter.
A single shipping method of the shop, published or not, with its shipping option, local pickup or local delivery embedded as method.
Path parameters
shipping_method_idRequiredintegerShipping method ID
ReturnsShippingMethod
The shipping method
Error responses
404objectNo shipping method exists with this ID in the shop.