shipping_zones
Create a shipping zone
Changed onCreate a shipping zone
post/shipping_zones
Request
- Base URLhttps://{your_organization_slug}.commercelayer.io/api
- URLhttps://{your_organization_slug}.commercelayer.io/api/shipping_zones
- AuthHTTP bearer
Request body
Example request
{
"data": {
"attributes": {
"name": "Europe (main countries)",
"country_code_regex": "AT|BE|BG|CZ|DK|EE|DE|HU|LV|LT",
"not_country_code_regex": "AT|BE|BG|CZ|DK|EE|DE",
"state_code_regex": "A[KLRZ]|C[AOT]|D[CE]|FL",
"not_state_code_regex": "A[KLRZ]|C[AOT]",
"zip_code_regex": "(?i)(JE1|JE2|JE3|JE4|JE5)",
"not_zip_code_regex": "(?i)(JE1|JE2|JE3)",
"reference": "ANY-EXTERNAL-REFEFERNCE",
"reference_origin": "ANY-EXTERNAL-REFEFERNCE-ORIGIN",
"metadata": {
"foo": "bar"
}
}
}
}Response
The created shipping zone object
Changes
- breaking
request property
/was restricted to a list of enum values - info
the
request property default valueshipping_zoneswas removed - info
added the new
shipping_zonesenum value to the request property/ - info
added the media type
application/vnd.api+jsonfor the response with the status
- breaking