# Shipping Zones

Manage shipping zones

## Retrieving shipping zones

> Retrieves shipping zones for the specified site.

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Shipping Zones","description":"Manage shipping zones"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":[]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"parameters":{"tenant":{"name":"tenant","in":"path","required":true,"description":"Your Emporix tenant name.\n\n**Note**: The tenant should always be written in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}},"site":{"description":"Site unique identifier. A site is a specific shop.\n\nIf the tenant owns only one shop, the value should be set to `main`.\n","name":"site","in":"path","required":true,"schema":{"type":"string"}},"activeMethods":{"description":"* If set to `true`, only active methods are included.\n* If set to `false`, only inactive methods are included.\n* If not specified, all expanded shipping methods are included.","name":"activeMethods","in":"query","required":false,"schema":{"type":"string"}},"expand":{"description":"* **methods**: To return zones with expanded shipping methods.\n* **fees**: To expand the configured fees for those shipping methods.","name":"expand","in":"query","required":false,"schema":{"type":"string"}},"accept-language":{"in":"header","name":"Accept-Language","required":false,"description":"The Accept-Language request HTTP header defines which languages the client is able to understand, and which locale variant is preferred.\nIt can be a priority list working as a fallback mechanism.\nIf the Accept-Language header is empty, all languages for localized fields are returned in a map format where the key is language code and the value is a translation.","schema":{"type":"string"}}},"schemas":{"Zones":{"title":"Collection of zones","type":"array","items":{"$ref":"#/components/schemas/Zone"}},"Zone":{"title":"Zone","description":"The zone is an area where shipments can be delivered.","type":"object","properties":{"id":{"description":"Delivery zone's unique identifier.","type":"string"},"default":{"description":"Flag indicating whether the zone is the default delivery zone for the site.","type":"boolean"},"name":{"$ref":"#/components/schemas/LocalizedValue"},"shipTo":{"$ref":"#/components/schemas/ShipTo"},"methods":{"$ref":"#/components/schemas/Methods"}},"required":["id","name","shipTo"]},"LocalizedValue":{"oneOf":[{"type":"string","description":"String value in the specified language."},{"type":"object","additionalProperties":{"type":"string"},"description":"Map of translations in form of language:translation pairs.\nThe keys (languages) should be ISO language codes."}]},"ShipTo":{"title":"ShipTo","description":"Collection of shipping destinations","type":"array","items":{"$ref":"#/components/schemas/ShipToItem"}},"ShipToItem":{"title":"shipToItem","description":"Shipping destination containing country and postal code.","type":"object","properties":{"country":{"type":"string","description":"ISO2 or ISO3 formatted country code."},"postalCode":{"type":"string","description":"PostalCode containing numbers and/or letters. Can be incomplete and followed by single '*' to match all the postalCodes starting with the same numbers/letters."}},"required":["country"]},"Methods":{"title":"Collection of shipping methods","type":"array","items":{"$ref":"#/components/schemas/Method"}},"Method":{"title":"Shipping method","description":"Shipping methods define the types of deliveries and properties such as delivery fees.","type":"object","properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/LocalizedValue"},"maxOrderValue":{"$ref":"#/components/schemas/MonetaryAmount"},"active":{"description":"Flag indicating whether the shipping method is active.","type":"boolean"},"fees":{"$ref":"#/components/schemas/Fees"},"shippingTaxCode":{"description":"Shipping method's tax code.","type":"string"},"shippingGroupId":{"description":"Shipping groups unique identifier.","type":"string"}},"required":["id","name","fees"]},"MonetaryAmount":{"title":"Monetary amount","description":"Amount of money in a given currency.","type":"object","properties":{"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"amount":{"type":"number","minimum":0,"description":"Amount in specified currency."}},"required":["currency","amount"]},"Fees":{"title":"Collection of fees","type":"array","items":{"$ref":"#/components/schemas/Fee"}},"Fee":{"title":"Fee","description":"Fee is a shipping cost for a given shipping method and parameters.","type":"object","properties":{"cost":{"$ref":"#/components/schemas/MonetaryAmount"},"minOrderValue":{"$ref":"#/components/schemas/MonetaryAmount"},"shippingGroupId":{"description":"Shipping group unique identifier.","type":"string"}},"required":["cost","minOrderValue"]},"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]}},"responses":{"zone_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/shipping/{tenant}/{site}/zones":{"get":{"tags":["Shipping Zones"],"summary":"Retrieving shipping zones","operationId":"GET-shipping-list-shipping-zones","description":"Retrieves shipping zones for the specified site.","parameters":[{"$ref":"#/components/parameters/tenant"},{"$ref":"#/components/parameters/site"},{"$ref":"#/components/parameters/activeMethods"},{"$ref":"#/components/parameters/expand"},{"$ref":"#/components/parameters/accept-language"}],"responses":{"200":{"description":"Resource successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zones"}}}},"400":{"$ref":"#/components/responses/zone_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"500":{"$ref":"#/components/responses/internalError_500"}}}}}}
```

## Creating a shipping zone

> Creates a new shipping zone for the specified site.

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Shipping Zones","description":"Manage shipping zones"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_manage"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"schemas":{"Zone":{"title":"Zone","description":"The zone is an area where shipments can be delivered.","type":"object","properties":{"id":{"description":"Delivery zone's unique identifier.","type":"string"},"default":{"description":"Flag indicating whether the zone is the default delivery zone for the site.","type":"boolean"},"name":{"$ref":"#/components/schemas/LocalizedValue"},"shipTo":{"$ref":"#/components/schemas/ShipTo"},"methods":{"$ref":"#/components/schemas/Methods"}},"required":["id","name","shipTo"]},"LocalizedValue":{"oneOf":[{"type":"string","description":"String value in the specified language."},{"type":"object","additionalProperties":{"type":"string"},"description":"Map of translations in form of language:translation pairs.\nThe keys (languages) should be ISO language codes."}]},"ShipTo":{"title":"ShipTo","description":"Collection of shipping destinations","type":"array","items":{"$ref":"#/components/schemas/ShipToItem"}},"ShipToItem":{"title":"shipToItem","description":"Shipping destination containing country and postal code.","type":"object","properties":{"country":{"type":"string","description":"ISO2 or ISO3 formatted country code."},"postalCode":{"type":"string","description":"PostalCode containing numbers and/or letters. Can be incomplete and followed by single '*' to match all the postalCodes starting with the same numbers/letters."}},"required":["country"]},"Methods":{"title":"Collection of shipping methods","type":"array","items":{"$ref":"#/components/schemas/Method"}},"Method":{"title":"Shipping method","description":"Shipping methods define the types of deliveries and properties such as delivery fees.","type":"object","properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/LocalizedValue"},"maxOrderValue":{"$ref":"#/components/schemas/MonetaryAmount"},"active":{"description":"Flag indicating whether the shipping method is active.","type":"boolean"},"fees":{"$ref":"#/components/schemas/Fees"},"shippingTaxCode":{"description":"Shipping method's tax code.","type":"string"},"shippingGroupId":{"description":"Shipping groups unique identifier.","type":"string"}},"required":["id","name","fees"]},"MonetaryAmount":{"title":"Monetary amount","description":"Amount of money in a given currency.","type":"object","properties":{"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"amount":{"type":"number","minimum":0,"description":"Amount in specified currency."}},"required":["currency","amount"]},"Fees":{"title":"Collection of fees","type":"array","items":{"$ref":"#/components/schemas/Fee"}},"Fee":{"title":"Fee","description":"Fee is a shipping cost for a given shipping method and parameters.","type":"object","properties":{"cost":{"$ref":"#/components/schemas/MonetaryAmount"},"minOrderValue":{"$ref":"#/components/schemas/MonetaryAmount"},"shippingGroupId":{"description":"Shipping group unique identifier.","type":"string"}},"required":["cost","minOrderValue"]},"ResourceCreatedResponse":{"title":"Resource created","description":"Link to created resource with unique resource identifier.","type":"object","properties":{"id":{"type":"string","description":"Created resource’s unique identifier."}}},"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]}},"parameters":{"tenant":{"name":"tenant","in":"path","required":true,"description":"Your Emporix tenant name.\n\n**Note**: The tenant should always be written in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}},"site":{"description":"Site unique identifier. A site is a specific shop.\n\nIf the tenant owns only one shop, the value should be set to `main`.\n","name":"site","in":"path","required":true,"schema":{"type":"string"}},"content-language":{"in":"header","name":"Content-Language","required":false,"description":"The Content-Language request HTTP header defines language of the payload.\nWhen the Content-Language header is empty, all localized fields in a payload should be in a map format,\nwhere the key is a language code and the value is a translation.","schema":{"type":"string"}}},"responses":{"zone_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"notFound_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"zone_409":{"description":"Creation failed because there was a conflict with another resource. Details of the error are included in the response payload.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/shipping/{tenant}/{site}/zones":{"post":{"tags":["Shipping Zones"],"summary":"Creating a shipping zone","operationId":"POST-shipping-create-shipping-zone","description":"Creates a new shipping zone for the specified site.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}},"parameters":[{"$ref":"#/components/parameters/tenant"},{"$ref":"#/components/parameters/site"},{"$ref":"#/components/parameters/content-language"}],"responses":{"201":{"description":"Resource successfully created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResourceCreatedResponse"}}}},"400":{"$ref":"#/components/responses/zone_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"404":{"$ref":"#/components/responses/notFound_404"},"409":{"$ref":"#/components/responses/zone_409"},"500":{"$ref":"#/components/responses/internalError_500"}}}}}}
```

## Retrieving a shipping zone

> Retrieves the specified shipping zone's details.

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Shipping Zones","description":"Manage shipping zones"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":[]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"parameters":{"tenant":{"name":"tenant","in":"path","required":true,"description":"Your Emporix tenant name.\n\n**Note**: The tenant should always be written in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}},"site":{"description":"Site unique identifier. A site is a specific shop.\n\nIf the tenant owns only one shop, the value should be set to `main`.\n","name":"site","in":"path","required":true,"schema":{"type":"string"}},"zoneId":{"description":"Shipping zone's unique identifier.","name":"zoneId","in":"path","required":true,"schema":{"type":"string"}},"activeMethods":{"description":"* If set to `true`, only active methods are included.\n* If set to `false`, only inactive methods are included.\n* If not specified, all expanded shipping methods are included.","name":"activeMethods","in":"query","required":false,"schema":{"type":"string"}},"expand":{"description":"* **methods**: To return zones with expanded shipping methods.\n* **fees**: To expand the configured fees for those shipping methods.","name":"expand","in":"query","required":false,"schema":{"type":"string"}},"accept-language":{"in":"header","name":"Accept-Language","required":false,"description":"The Accept-Language request HTTP header defines which languages the client is able to understand, and which locale variant is preferred.\nIt can be a priority list working as a fallback mechanism.\nIf the Accept-Language header is empty, all languages for localized fields are returned in a map format where the key is language code and the value is a translation.","schema":{"type":"string"}}},"schemas":{"Zone":{"title":"Zone","description":"The zone is an area where shipments can be delivered.","type":"object","properties":{"id":{"description":"Delivery zone's unique identifier.","type":"string"},"default":{"description":"Flag indicating whether the zone is the default delivery zone for the site.","type":"boolean"},"name":{"$ref":"#/components/schemas/LocalizedValue"},"shipTo":{"$ref":"#/components/schemas/ShipTo"},"methods":{"$ref":"#/components/schemas/Methods"}},"required":["id","name","shipTo"]},"LocalizedValue":{"oneOf":[{"type":"string","description":"String value in the specified language."},{"type":"object","additionalProperties":{"type":"string"},"description":"Map of translations in form of language:translation pairs.\nThe keys (languages) should be ISO language codes."}]},"ShipTo":{"title":"ShipTo","description":"Collection of shipping destinations","type":"array","items":{"$ref":"#/components/schemas/ShipToItem"}},"ShipToItem":{"title":"shipToItem","description":"Shipping destination containing country and postal code.","type":"object","properties":{"country":{"type":"string","description":"ISO2 or ISO3 formatted country code."},"postalCode":{"type":"string","description":"PostalCode containing numbers and/or letters. Can be incomplete and followed by single '*' to match all the postalCodes starting with the same numbers/letters."}},"required":["country"]},"Methods":{"title":"Collection of shipping methods","type":"array","items":{"$ref":"#/components/schemas/Method"}},"Method":{"title":"Shipping method","description":"Shipping methods define the types of deliveries and properties such as delivery fees.","type":"object","properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/LocalizedValue"},"maxOrderValue":{"$ref":"#/components/schemas/MonetaryAmount"},"active":{"description":"Flag indicating whether the shipping method is active.","type":"boolean"},"fees":{"$ref":"#/components/schemas/Fees"},"shippingTaxCode":{"description":"Shipping method's tax code.","type":"string"},"shippingGroupId":{"description":"Shipping groups unique identifier.","type":"string"}},"required":["id","name","fees"]},"MonetaryAmount":{"title":"Monetary amount","description":"Amount of money in a given currency.","type":"object","properties":{"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"amount":{"type":"number","minimum":0,"description":"Amount in specified currency."}},"required":["currency","amount"]},"Fees":{"title":"Collection of fees","type":"array","items":{"$ref":"#/components/schemas/Fee"}},"Fee":{"title":"Fee","description":"Fee is a shipping cost for a given shipping method and parameters.","type":"object","properties":{"cost":{"$ref":"#/components/schemas/MonetaryAmount"},"minOrderValue":{"$ref":"#/components/schemas/MonetaryAmount"},"shippingGroupId":{"description":"Shipping group unique identifier.","type":"string"}},"required":["cost","minOrderValue"]},"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]}},"responses":{"zone_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"zone_notFound_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/shipping/{tenant}/{site}/zones/{zoneId}":{"get":{"tags":["Shipping Zones"],"summary":"Retrieving a shipping zone","operationId":"GET-shipping-retrieve-shipping-zone","description":"Retrieves the specified shipping zone's details.","parameters":[{"$ref":"#/components/parameters/tenant"},{"$ref":"#/components/parameters/site"},{"$ref":"#/components/parameters/zoneId"},{"$ref":"#/components/parameters/activeMethods"},{"$ref":"#/components/parameters/expand"},{"$ref":"#/components/parameters/accept-language"}],"responses":{"200":{"description":"Resource successfully retrieved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}},"400":{"$ref":"#/components/responses/zone_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"404":{"$ref":"#/components/responses/zone_notFound_404"},"500":{"$ref":"#/components/responses/internalError_500"}}}}}}
```

## Updating a shipping zone

> Fully updates the specified shipping zone.

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Shipping Zones","description":"Manage shipping zones"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_manage"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"parameters":{"tenant":{"name":"tenant","in":"path","required":true,"description":"Your Emporix tenant name.\n\n**Note**: The tenant should always be written in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}},"site":{"description":"Site unique identifier. A site is a specific shop.\n\nIf the tenant owns only one shop, the value should be set to `main`.\n","name":"site","in":"path","required":true,"schema":{"type":"string"}},"zoneId":{"description":"Shipping zone's unique identifier.","name":"zoneId","in":"path","required":true,"schema":{"type":"string"}},"content-language":{"in":"header","name":"Content-Language","required":false,"description":"The Content-Language request HTTP header defines language of the payload.\nWhen the Content-Language header is empty, all localized fields in a payload should be in a map format,\nwhere the key is a language code and the value is a translation.","schema":{"type":"string"}}},"schemas":{"Zone":{"title":"Zone","description":"The zone is an area where shipments can be delivered.","type":"object","properties":{"id":{"description":"Delivery zone's unique identifier.","type":"string"},"default":{"description":"Flag indicating whether the zone is the default delivery zone for the site.","type":"boolean"},"name":{"$ref":"#/components/schemas/LocalizedValue"},"shipTo":{"$ref":"#/components/schemas/ShipTo"},"methods":{"$ref":"#/components/schemas/Methods"}},"required":["id","name","shipTo"]},"LocalizedValue":{"oneOf":[{"type":"string","description":"String value in the specified language."},{"type":"object","additionalProperties":{"type":"string"},"description":"Map of translations in form of language:translation pairs.\nThe keys (languages) should be ISO language codes."}]},"ShipTo":{"title":"ShipTo","description":"Collection of shipping destinations","type":"array","items":{"$ref":"#/components/schemas/ShipToItem"}},"ShipToItem":{"title":"shipToItem","description":"Shipping destination containing country and postal code.","type":"object","properties":{"country":{"type":"string","description":"ISO2 or ISO3 formatted country code."},"postalCode":{"type":"string","description":"PostalCode containing numbers and/or letters. Can be incomplete and followed by single '*' to match all the postalCodes starting with the same numbers/letters."}},"required":["country"]},"Methods":{"title":"Collection of shipping methods","type":"array","items":{"$ref":"#/components/schemas/Method"}},"Method":{"title":"Shipping method","description":"Shipping methods define the types of deliveries and properties such as delivery fees.","type":"object","properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/LocalizedValue"},"maxOrderValue":{"$ref":"#/components/schemas/MonetaryAmount"},"active":{"description":"Flag indicating whether the shipping method is active.","type":"boolean"},"fees":{"$ref":"#/components/schemas/Fees"},"shippingTaxCode":{"description":"Shipping method's tax code.","type":"string"},"shippingGroupId":{"description":"Shipping groups unique identifier.","type":"string"}},"required":["id","name","fees"]},"MonetaryAmount":{"title":"Monetary amount","description":"Amount of money in a given currency.","type":"object","properties":{"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"amount":{"type":"number","minimum":0,"description":"Amount in specified currency."}},"required":["currency","amount"]},"Fees":{"title":"Collection of fees","type":"array","items":{"$ref":"#/components/schemas/Fee"}},"Fee":{"title":"Fee","description":"Fee is a shipping cost for a given shipping method and parameters.","type":"object","properties":{"cost":{"$ref":"#/components/schemas/MonetaryAmount"},"minOrderValue":{"$ref":"#/components/schemas/MonetaryAmount"},"shippingGroupId":{"description":"Shipping group unique identifier.","type":"string"}},"required":["cost","minOrderValue"]},"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]}},"responses":{"zone_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"zone_notFound_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/shipping/{tenant}/{site}/zones/{zoneId}":{"put":{"tags":["Shipping Zones"],"summary":"Updating a shipping zone","operationId":"PUT-shipping-update-shipping-zone","description":"Fully updates the specified shipping zone.","parameters":[{"$ref":"#/components/parameters/tenant"},{"$ref":"#/components/parameters/site"},{"$ref":"#/components/parameters/zoneId"},{"$ref":"#/components/parameters/content-language"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}},"responses":{"200":{"description":"Resource successfully updated."},"400":{"$ref":"#/components/responses/zone_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"404":{"$ref":"#/components/responses/zone_notFound_404"},"500":{"$ref":"#/components/responses/internalError_500"}}}}}}
```

## Deleting a shipping zone

> Deletes the specified shipping zone.

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Shipping Zones","description":"Manage shipping zones"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_manage"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"parameters":{"tenant":{"name":"tenant","in":"path","required":true,"description":"Your Emporix tenant name.\n\n**Note**: The tenant should always be written in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}},"site":{"description":"Site unique identifier. A site is a specific shop.\n\nIf the tenant owns only one shop, the value should be set to `main`.\n","name":"site","in":"path","required":true,"schema":{"type":"string"}},"zoneId":{"description":"Shipping zone's unique identifier.","name":"zoneId","in":"path","required":true,"schema":{"type":"string"}}},"responses":{"yaasAware_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"zone_notFound_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}},"schemas":{"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]}}},"paths":{"/shipping/{tenant}/{site}/zones/{zoneId}":{"delete":{"tags":["Shipping Zones"],"summary":"Deleting a shipping zone","operationId":"DELETE-shipping-remove-shipping-zone","description":"Deletes the specified shipping zone.","parameters":[{"$ref":"#/components/parameters/tenant"},{"$ref":"#/components/parameters/site"},{"$ref":"#/components/parameters/zoneId"}],"responses":{"204":{"description":"Resource successfully deleted."},"400":{"$ref":"#/components/responses/yaasAware_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"404":{"$ref":"#/components/responses/zone_notFound_404"},"500":{"$ref":"#/components/responses/internalError_500"}}}}}}
```

## Partially updating a shipping zone

> Partially updates the specified shipping zone.

```json
{"openapi":"3.0.0","info":{"title":"Shipping Service","version":"0.0.1"},"tags":[{"name":"Shipping Zones","description":"Manage shipping zones"}],"servers":[{"url":"https://api.emporix.io"}],"security":[{"oAuth2":["shipping.shipping_manage"]}],"components":{"securitySchemes":{"oAuth2":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.emporix.io/oauth/token","scopes":{"shipping.shipping_manage":"Needed to manage shipping settings.","shipping.shipping_read":"Needed to read shipping settings."}}}}},"parameters":{"tenant":{"name":"tenant","in":"path","required":true,"description":"Your Emporix tenant name.\n\n**Note**: The tenant should always be written in lowercase.\n","schema":{"pattern":"^[a-z][a-z0-9]+$","minLength":3,"maxLength":16,"type":"string"}},"site":{"description":"Site unique identifier. A site is a specific shop.\n\nIf the tenant owns only one shop, the value should be set to `main`.\n","name":"site","in":"path","required":true,"schema":{"type":"string"}},"zoneId":{"description":"Shipping zone's unique identifier.","name":"zoneId","in":"path","required":true,"schema":{"type":"string"}},"content-language":{"in":"header","name":"Content-Language","required":false,"description":"The Content-Language request HTTP header defines language of the payload.\nWhen the Content-Language header is empty, all localized fields in a payload should be in a map format,\nwhere the key is a language code and the value is a translation.","schema":{"type":"string"}}},"schemas":{"Zone":{"title":"Zone","description":"The zone is an area where shipments can be delivered.","type":"object","properties":{"id":{"description":"Delivery zone's unique identifier.","type":"string"},"default":{"description":"Flag indicating whether the zone is the default delivery zone for the site.","type":"boolean"},"name":{"$ref":"#/components/schemas/LocalizedValue"},"shipTo":{"$ref":"#/components/schemas/ShipTo"},"methods":{"$ref":"#/components/schemas/Methods"}},"required":["id","name","shipTo"]},"LocalizedValue":{"oneOf":[{"type":"string","description":"String value in the specified language."},{"type":"object","additionalProperties":{"type":"string"},"description":"Map of translations in form of language:translation pairs.\nThe keys (languages) should be ISO language codes."}]},"ShipTo":{"title":"ShipTo","description":"Collection of shipping destinations","type":"array","items":{"$ref":"#/components/schemas/ShipToItem"}},"ShipToItem":{"title":"shipToItem","description":"Shipping destination containing country and postal code.","type":"object","properties":{"country":{"type":"string","description":"ISO2 or ISO3 formatted country code."},"postalCode":{"type":"string","description":"PostalCode containing numbers and/or letters. Can be incomplete and followed by single '*' to match all the postalCodes starting with the same numbers/letters."}},"required":["country"]},"Methods":{"title":"Collection of shipping methods","type":"array","items":{"$ref":"#/components/schemas/Method"}},"Method":{"title":"Shipping method","description":"Shipping methods define the types of deliveries and properties such as delivery fees.","type":"object","properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/LocalizedValue"},"maxOrderValue":{"$ref":"#/components/schemas/MonetaryAmount"},"active":{"description":"Flag indicating whether the shipping method is active.","type":"boolean"},"fees":{"$ref":"#/components/schemas/Fees"},"shippingTaxCode":{"description":"Shipping method's tax code.","type":"string"},"shippingGroupId":{"description":"Shipping groups unique identifier.","type":"string"}},"required":["id","name","fees"]},"MonetaryAmount":{"title":"Monetary amount","description":"Amount of money in a given currency.","type":"object","properties":{"currency":{"description":"Three-letter currency code, compliant with the ISO 4217 standard.","type":"string"},"amount":{"type":"number","minimum":0,"description":"Amount in specified currency."}},"required":["currency","amount"]},"Fees":{"title":"Collection of fees","type":"array","items":{"$ref":"#/components/schemas/Fee"}},"Fee":{"title":"Fee","description":"Fee is a shipping cost for a given shipping method and parameters.","type":"object","properties":{"cost":{"$ref":"#/components/schemas/MonetaryAmount"},"minOrderValue":{"$ref":"#/components/schemas/MonetaryAmount"},"shippingGroupId":{"description":"Shipping group unique identifier.","type":"string"}},"required":["cost","minOrderValue"]},"errorMessage":{"title":"error","description":"Schema for API specified errors.","type":"object","properties":{"status":{"minimum":100,"maximum":599,"description":"original HTTP error code, should be consistent with the response HTTP code","type":"integer"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error type, lower case with underscore eg validation_failure","type":"string"},"message":{"description":"descriptive error message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support"},"errorCode":{"type":"string","description":"The error code which specify the problem"},"details":{"description":"list of problems causing this error","type":"array","items":{"title":"errorDetail","description":"schema for specific error cause","anyOf":[{"type":"string"},{"type":"object","properties":{"field":{"description":"a bean notation expression specifying the element in request data causing the error, eg shipTo[0].country, this can be empty if violation was not field specific","type":"string"},"type":{"pattern":"[a-z]+[a-z_]*[a-z]+","description":"classification of the error detail type, lower case with underscore eg missing_value, this value must be always interpreted in context of the general error type.","type":"string"},"message":{"description":"descriptive error detail message for debugging","type":"string"},"moreInfo":{"type":"string","description":"link to documentation to investigate further and finding support for error detail"}}}]}}},"required":["status","type"]}},"responses":{"zone_400":{"description":"Request syntactically incorrect. Details of the error are included in the response payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"unauthorized_401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"fault":{"type":"object","properties":{"faultstring":{"type":"string"},"detail":{"type":"object","properties":{"errorcode":{"type":"string"}}}}}}}}}},"yaasAware_403":{"description":"Given authorization scopes are not sufficient and do not match required scopes.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"zone_notFound_404":{"description":"The requested resource does not exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}},"internalError_500":{"description":"Some server side error occurred.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorMessage"}}}}}},"paths":{"/shipping/{tenant}/{site}/zones/{zoneId}":{"patch":{"tags":["Shipping Zones"],"summary":"Partially updating a shipping zone","operationId":"PATCH-shipping-update-shipping-zone","description":"Partially updates the specified shipping zone.","parameters":[{"$ref":"#/components/parameters/tenant"},{"$ref":"#/components/parameters/site"},{"$ref":"#/components/parameters/zoneId"},{"$ref":"#/components/parameters/content-language"}],"requestBody":{"description":"Partial update operation will update only fields which are in the payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Zone"}}}},"responses":{"200":{"description":"Resource successfully updated."},"400":{"$ref":"#/components/responses/zone_400"},"401":{"$ref":"#/components/responses/unauthorized_401"},"403":{"$ref":"#/components/responses/yaasAware_403"},"404":{"$ref":"#/components/responses/zone_notFound_404"},"500":{"$ref":"#/components/responses/internalError_500"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.emporix.io/api-references-1/readme/api-reference-35/shipping-zones.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
