Overview
The Shipping service enables you to manage the shipping rates for zones. The zone, in the context of the Shipping service, is a group of countries to which shipping costs are the same.
API Reference
/{tenant}/{site}
/{tenant}/{site}/zones
Maintains zones of countries to which products can be shipped
Returns all defined zones
Adds a new zone.
Requires scope hybris.shipping_manage
.
get /{tenant}/{site}/zones
Returns all defined zones
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
Headers
- Accept-Language: (string - repeat: true)
The value of the locale identifier of the language in which the attribute should be returned. Provide several values separated by comma, in order to specify fallback languages.
Example:
pl
- hybris-languages: (string - repeat: true)
Comma separated list of language identifiers for which the localization for an attribute should be provided.
Example:
en,pl,it
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- activeMethods: (boolean)
Accepts boolean value. If set to true, only active methods are returned. If set to false, only inactive methods are returned. If no value is set, both active and inactive methods are returned.
- expand: (string)
Controls which elements of a shipping zone are expanded (included) in the returned shipping zone/s. Available elements are:
methods
- includes shipping methods of the zone/s,fees
- includes fees of the included shipping methods
Example:
methods,fees
HTTP status code 200
Resource successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"title": "Shipping Zone",
"description": "A list of defined zones",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Shipping Zone",
"description": "A collection of countries to which a shipping method delivers to.",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the zone."
},
"name": {
"$ref": "https://api.yaas.io/patterns/v1/schema-localized.json",
"description": "Localized name of the zone."
},
"default": {
"type": "boolean",
"description": "Flag marking the zone as the default one."
},
"shipTo": {
"type": "array",
"description": "A list of countries the zone consists of.",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "2-letter ISO code of the country."
}
}
},
"required": [
"id",
"name",
"default",
"shipTo"
]
}
}
Example:
[
{
"id": "europe",
"name": "Europe",
"default": true,
"shipTo": [
"DE",
"AT",
"FR",
"PL"
]
},
{
"id": "north-america",
"name": "North America",
"default": false,
"shipTo": [
"US",
"CA",
"MX"
]
}
]
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "Accept-Language",
"message": "not a language",
"type": "invalid_header"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
post /{tenant}/{site}/zones
Adds a new zone.
Requires scope hybris.shipping_manage
.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
Headers
- Content-Language: (string)
The locale identifier of the language of the updated attribute.
Example:
pl
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Shipping Zone",
"description": "A collection of countries to which a shipping method delivers to.",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the zone."
},
"name": {
"$ref": "https://api.yaas.io/patterns/v1/schema-localized.json",
"description": "Localized name of the zone."
},
"default": {
"type": "boolean",
"description": "Flag marking the zone as the default one."
},
"shipTo": {
"type": "array",
"description": "A list of countries the zone consists of.",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "2-letter ISO code of the country."
}
}
},
"required": [
"id",
"name",
"default",
"shipTo"
]
}
Example:
{
"id": "germany",
"name": "Germany",
"default": true,
"shipTo": [
"DE"
]
}
HTTP status code 201
The collection resource has been successfully created.
Headers
- Location: required (string)
The Location of the new resource which was created by the request. The value consists of a single absolute URI.
Example:
http://www.hybris.com/items/myItem
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Resource Location",
"description": "Schema for showing location of the new resource.",
"properties": {
"id": {
"description": "The identifier of the created resource",
"type": "string"
},
"link": {
"description": "The link to the created resource",
"type": "string",
"format": "uri"
}
},
"required": [
"id",
"link"
]
}
Example:
{
"id": "europe",
"link": "https://${apigee.proxy.target}/shipping/v1/tenant/eu/zones/europe"
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be created due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/{tenant}/{site}/zones/{zoneId}
Manages a single zone.
Retrieves details for the zone.
Updates details for the zone.
Requires scope hybris.shipping_manage
.
Deletes the zone.
Requires scope hybris.shipping_manage
.
get /{tenant}/{site}/zones/{zoneId}
Retrieves details for the zone.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
- zoneId: required (string)
Identifier for the zone.
Headers
- Accept-Language: (string - repeat: true)
The value of the locale identifier of the language in which the attribute should be returned. Provide several values separated by comma, in order to specify fallback languages.
Example:
pl
- hybris-languages: (string - repeat: true)
Comma separated list of language identifiers for which the localization for an attribute should be provided.
Example:
en,pl,it
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- activeMethods: (boolean)
Accepts boolean value. If set to true, only active methods are returned. If set to false, only inactive methods are returned. If no value is set, both active and inactive methods are returned.
- expand: (string)
Controls which elements of a shipping zone are expanded (included) in the returned shipping zone/s. Available elements are:
methods
- includes shipping methods of the zone/s,fees
- includes fees of the included shipping methods
Example:
methods,fees
HTTP status code 200
zone successfully retrieved.
Body
Type: application/json
Schema:
rate
Example:
{
"id": "germany",
"name": "Germany",
"default": true,
"shipTo": [
"DE"
]
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "Accept-Language",
"message": "not a language",
"type": "invalid_header"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
put /{tenant}/{site}/zones/{zoneId}
Updates details for the zone.
Requires scope hybris.shipping_manage
.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
- zoneId: required (string)
Identifier for the zone.
Headers
- Content-Language: (string)
The locale identifier of the language of the updated attribute.
Example:
pl
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- partial: (boolean)
If true, a partial update will be supported, otherwise the full object replacement will be performed.
Example:
true
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Shipping Zone",
"description": "A collection of countries to which a shipping method delivers to.",
"properties": {
"id": {
"type": "string",
"description": "Identifier of the zone."
},
"name": {
"$ref": "https://api.yaas.io/patterns/v1/schema-localized.json",
"description": "Localized name of the zone."
},
"default": {
"type": "boolean",
"description": "Flag marking the zone as the default one."
},
"shipTo": {
"type": "array",
"description": "A list of countries the zone consists of.",
"items": {
"type": "string",
"pattern": "^[A-Z]{2}$",
"description": "2-letter ISO code of the country."
}
}
},
"required": [
"id",
"name",
"default",
"shipTo"
]
}
Example:
{
"id": "germany",
"name": "Germany",
"default": true,
"shipTo": [
"DE"
]
}
HTTP status code 200
The resource has been successfully updated
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be updated due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
delete /{tenant}/{site}/zones/{zoneId}
Deletes the zone.
Requires scope hybris.shipping_manage
.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
- zoneId: required (string)
Identifier for the zone.
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 204
The resource has been successfully deleted.
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/{tenant}/{site}/zones/{zoneId}/methods
Maintains collections of shipping methods. A shipping method is the representation of a logistics company, allowing to specify delivery fees.
Returns all defined shipping methods.
Adds a new shipping method.
Requires scope hybris.shipping_manage
.
get /{tenant}/{site}/zones/{zoneId}/methods
Returns all defined shipping methods.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
- zoneId: required (string)
Identifier for the zone.
Headers
- Accept-Language: (string - repeat: true)
The value of the locale identifier of the language in which the attribute should be returned. Provide several values separated by comma, in order to specify fallback languages.
Example:
pl
- hybris-languages: (string - repeat: true)
Comma separated list of language identifiers for which the localization for an attribute should be provided.
Example:
en,pl,it
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- expand: (string)
Controls which elements of a shipping method are expanded (included) in the returned shipping method. Available elements are:
fees
- includes fees information,
Example:
fees
- active: (boolean)
Accepts boolean value. If set to true, only active methods are returned. If set to false, only inactive methods are returned. If no value is set, both active and inactive methods are returned.
HTTP status code 200
Resource successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"title": "Shipping Methods",
"description": "A list of all shipping methods.",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Shipping Method",
"description": "A representation of a logistics company, allowing to specify delivery fees.",
"properties": {
"id": {
"type": "string"
},
"name": {
"$ref": "https://api.yaas.io/patterns/v1/schema-localized.json",
"description": "The (localized) name of the shipping method."
},
"maxOrderValue": {
"description": "Schema defining monetary amount in given currency.",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Monetary Amount",
"properties": {
"amount": {
"type": "number",
"description": "The amount in the specified currency."
},
"currency": {
"type": "string",
"pattern": "^[a-zA-Z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF."
}
},
"required": [
"amount",
"currency"
]
},
"active": {
"type": "boolean",
"description": "The flag of the method that enables/disables the method.",
"default": true
},
"fees": {
"type": "array",
"items": {
"$ref": "fee"
}
}
},
"required": [
"id",
"name"
]
}
}
Example:
[
{
"id": "fedex-2dayground",
"name": "FedEx 2Day",
"active": true,
"maxOrderValue": {
"amount": 5000,
"currency": "EUR"
},
"fees": [
{
"minOrderValue": {
"amount": 0,
"currency": "EUR"
},
"cost": {
"amount": 10,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 50,
"currency": "EUR"
},
"cost": {
"amount": 9,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 200,
"currency": "EUR"
},
"cost": {
"amount": 8,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 500,
"currency": "EUR"
},
"cost": {
"amount": 5,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 1000,
"currency": "EUR"
},
"cost": {
"amount": 1,
"currency": "EUR"
}
}
]
},
{
"id": "ups-standard",
"name": "UPS Standard",
"fees": [
{
"minOrderValue": {
"amount": 0,
"currency": "EUR"
},
"cost": {
"amount": 5,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 50,
"currency": "EUR"
},
"cost": {
"amount": 2,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 200,
"currency": "EUR"
},
"cost": {
"amount": 0,
"currency": "EUR"
}
}
]
}
]
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "Accept-Language",
"message": "not a language",
"type": "invalid_header"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
post /{tenant}/{site}/zones/{zoneId}/methods
Adds a new shipping method.
Requires scope hybris.shipping_manage
.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
- zoneId: required (string)
Identifier for the zone.
Headers
- Content-Language: (string)
The locale identifier of the language of the updated attribute.
Example:
pl
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Shipping Method",
"description": "A representation of a logistics company, allowing to specify delivery fees.",
"properties": {
"id": {
"type": "string"
},
"name": {
"$ref": "https://api.yaas.io/patterns/v1/schema-localized.json",
"description": "The (localized) name of the shipping method."
},
"maxOrderValue": {
"description": "Schema defining monetary amount in given currency.",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Monetary Amount",
"properties": {
"amount": {
"type": "number",
"description": "The amount in the specified currency."
},
"currency": {
"type": "string",
"pattern": "^[a-zA-Z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF."
}
},
"required": [
"amount",
"currency"
]
},
"active": {
"type": "boolean",
"description": "The flag of the method that enables/disables the method.",
"default": true
},
"fees": {
"type": "array",
"items": {
"$ref": "fee"
}
}
},
"required": [
"id",
"name",
"fees"
]
}
Example:
{
"id": "fedex-2dayground",
"name": "FedEx 2Day",
"active": true,
"maxOrderValue": {
"amount": 200,
"currency": "EUR"
},
"fees": [
{
"minOrderValue": {
"amount": 0,
"currency": "EUR"
},
"cost": {
"amount": 10,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 50,
"currency": "EUR"
},
"cost": {
"amount": 5,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 100,
"currency": "EUR"
},
"cost": {
"amount": 1,
"currency": "EUR"
}
}
]
}
HTTP status code 201
The collection resource has been successfully created.
Headers
- Location: required (string)
The Location of the new resource which was created by the request. The value consists of a single absolute URI.
Example:
http://www.hybris.com/items/myItem
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Resource Location",
"description": "Schema for showing location of the new resource.",
"properties": {
"id": {
"description": "The identifier of the created resource",
"type": "string"
},
"link": {
"description": "The link to the created resource",
"type": "string",
"format": "uri"
}
},
"required": [
"id",
"link"
]
}
Example:
{
"id": "fedex-2dayground",
"link": "https://${apigee.proxy.target}/shipping/v1/tenant/eu/zones/europe/methods/fedex-2dayground"
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be created due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/{tenant}/{site}/zones/{zoneId}/methods/{methodId}
Manages a single shipping method.
Retrieves details for the shipping method.
Updates details for the shipping method.
Requires scope hybris.shipping_manage
.
Deletes the shipping method.
Requires scope hybris.shipping_manage
.
get /{tenant}/{site}/zones/{zoneId}/methods/{methodId}
Retrieves details for the shipping method.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
- zoneId: required (string)
Identifier for the zone.
- methodId: required (string)
The identifier for the shipping method.
Headers
- Accept-Language: (string - repeat: true)
The value of the locale identifier of the language in which the attribute should be returned. Provide several values separated by comma, in order to specify fallback languages.
Example:
pl
- hybris-languages: (string - repeat: true)
Comma separated list of language identifiers for which the localization for an attribute should be provided.
Example:
en,pl,it
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 200
method successfully retrieved.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Shipping Method",
"description": "A representation of a logistics company, allowing to specify delivery fees.",
"properties": {
"id": {
"type": "string"
},
"name": {
"$ref": "https://api.yaas.io/patterns/v1/schema-localized.json",
"description": "The (localized) name of the shipping method."
},
"maxOrderValue": {
"description": "Schema defining monetary amount in given currency.",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Monetary Amount",
"properties": {
"amount": {
"type": "number",
"description": "The amount in the specified currency."
},
"currency": {
"type": "string",
"pattern": "^[a-zA-Z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF."
}
},
"required": [
"amount",
"currency"
]
},
"active": {
"type": "boolean",
"description": "The flag of the method that enables/disables the method.",
"default": true
},
"fees": {
"type": "array",
"items": {
"$ref": "fee"
}
}
},
"required": [
"id",
"name",
"fees"
]
}
Example:
{
"id": "fedex-2dayground",
"name": "FedEx 2Day",
"active": true,
"maxOrderValue": {
"amount": 200,
"currency": "EUR"
},
"fees": [
{
"minOrderValue": {
"amount": 0,
"currency": "EUR"
},
"cost": {
"amount": 10,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 50,
"currency": "EUR"
},
"cost": {
"amount": 5,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 100,
"currency": "EUR"
},
"cost": {
"amount": 1,
"currency": "EUR"
}
}
]
}
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "Accept-Language",
"message": "not a language",
"type": "invalid_header"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
put /{tenant}/{site}/zones/{zoneId}/methods/{methodId}
Updates details for the shipping method.
Requires scope hybris.shipping_manage
.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
- zoneId: required (string)
Identifier for the zone.
- methodId: required (string)
The identifier for the shipping method.
Headers
- Content-Language: (string)
The locale identifier of the language of the updated attribute.
Example:
pl
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Query Parameters
- partial: (boolean)
If true, a partial update will be supported, otherwise the full object replacement will be performed.
Example:
true
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Shipping Method",
"description": "A representation of a logistics company, allowing to specify delivery fees.",
"properties": {
"id": {
"type": "string"
},
"name": {
"$ref": "https://api.yaas.io/patterns/v1/schema-localized.json",
"description": "The (localized) name of the shipping method."
},
"maxOrderValue": {
"description": "Schema defining monetary amount in given currency.",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Monetary Amount",
"properties": {
"amount": {
"type": "number",
"description": "The amount in the specified currency."
},
"currency": {
"type": "string",
"pattern": "^[a-zA-Z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF."
}
},
"required": [
"amount",
"currency"
]
},
"active": {
"type": "boolean",
"description": "The flag of the method that enables/disables the method.",
"default": true
},
"fees": {
"type": "array",
"items": {
"$ref": "fee"
}
}
},
"required": [
"id",
"name",
"fees"
]
}
Example:
{
"id": "fedex-2dayground",
"name": "FedEx 2Day",
"active": true,
"maxOrderValue": {
"amount": 200,
"currency": "EUR"
},
"fees": [
{
"minOrderValue": {
"amount": 0,
"currency": "EUR"
},
"cost": {
"amount": 10,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 50,
"currency": "EUR"
},
"cost": {
"amount": 5,
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": 100,
"currency": "EUR"
},
"cost": {
"amount": 1,
"currency": "EUR"
}
}
]
}
HTTP status code 200
The resource has been successfully updated
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "The request payload has incorrect syntax.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "bad_payload_syntax"
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 409
Creation failed because there was a conflict with another resource. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 409,
"message": "The requested resource could not be updated due to server-side validation.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "conflict_resource"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
delete /{tenant}/{site}/zones/{zoneId}/methods/{methodId}
Deletes the shipping method.
Requires scope hybris.shipping_manage
.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
- zoneId: required (string)
Identifier for the zone.
- methodId: required (string)
The identifier for the shipping method.
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
HTTP status code 204
The resource has been successfully deleted.
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
HTTP status code 404
The requested resource does not exist.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 404,
"message": "The requested URI does not map to a single element resource.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "element_resource_non_existing"
}
HTTP status code 500
Some server side error occurred.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 500,
"message": "Something went wrong while processing the request. Please contact the administrator.",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "internal_service_error"
}
/{tenant}/{site}/quote
Returns a full quote.
Returns a full quote.
post /{tenant}/{site}/quote
Returns a full quote.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
Headers
- Accept-Language: (string - repeat: true)
The value of the locale identifier of the language in which the attribute should be returned. Provide several values separated by comma, in order to specify fallback languages.
Example:
pl
- hybris-languages: (string - repeat: true)
Comma separated list of language identifiers for which the localization for an attribute should be provided.
Example:
en,pl,it
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
quote
Example:
{
"cartTotal": {
"amount": 100.34,
"currency": "USD"
},
"shipFromAddress": {
"street": "Patterson Fork Road",
"streetNumber": "2095",
"zipCode": "60606",
"city": "Chicago",
"country": "US",
"state": "IL"
},
"shipToAddress": {
"street": "Cheng Xiang Zhen Guan Tang Lu",
"streetNumber": "1031",
"extraLine1": "No. 2058",
"extraLine2": "Suzhou City",
"zipCode": "201202",
"city": "Taicang City",
"state": "Jiangsu Province",
"country": "CN"
},
"items": [
{
"product": {
"name": "Effective Java (2nd Edition)",
"sku": "860-1300201986",
"id": "0321356683"
},
"quantity": 2,
"weight": {
"value": 820,
"unit": "g"
},
"dimensions": {
"length": {
"value": 0.185,
"unit": "m"
},
"width": {
"value": 0.228,
"unit": "m"
},
"height": {
"value": 0.03,
"unit": "m"
}
},
"price": {
"amount": 38.88,
"currency": "USD"
},
"requireShipping": true,
"taxable": true
},
{
"product": {
"name": "Hadoop: The Definitive Guide, Kindle Edition",
"sku": "978-1491901632",
"id": "B00V7B1IZC"
},
"quantity": 1,
"price": {
"amount": 22.58,
"currency": "USD"
},
"requireShipping": false,
"taxable": false
}
]
}
HTTP status code 200
Body
Type: application/json
Schema:
quote-response
Example:
[
{
"zone": {
"id": "europe",
"name": {
"en": "Europe",
"de": "Europa"
}
},
"methods": [
{
"id": "fedex-2dayground",
"name": {
"en": "FedEx 2Day",
"de": "FedEx 2 Tage"
},
"fee": {
"amount": 4.99,
"currency": "EUR"
}
},
{
"id": "dhl",
"name": "DHL",
"fee": {
"amount": 2.99,
"currency": "EUR"
}
}
]
}
]
HTTP status code 400
Request syntactically incorrect. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 400,
"message": "There are validation problems, see details section for more information",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html",
"type": "validation_violation",
"details": [
{
"field": "Accept-Language",
"message": "not a language",
"type": "invalid_header"
}
]
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
/{tenant}/{site}/quote/minimum
Returns a minimum quote.
Returns a minimum quote.
post /{tenant}/{site}/quote/minimum
Returns a minimum quote.
URI Parameters
- tenant: required (string)
The tenant string is the project's Identifier from the Builder.
- site: required (string)
Headers
- Authorization: required (string)
Used to send a valid OAuth2 access token.
Example:
Bearer access_token
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Quote",
"description": "A request for a shipping quote.",
"properties": {
"cartTotal": {
"description": "Schema defining monetary amount in given currency.",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Monetary Amount",
"properties": {
"amount": {
"type": "number",
"description": "The amount in the specified currency."
},
"currency": {
"type": "string",
"pattern": "^[a-zA-Z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF."
}
},
"required": [
"amount",
"currency"
]
},
"shipFromAddress": {
"$ref": "address",
"description": "The address the items will be shipped from."
},
"shipToAddress": {
"$ref": "address",
"description": "The address the items will be shipped to."
},
"items": {
"type": "array",
"description": "The list of purchased items which will be shipped.",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Order Item",
"description": "A description of a single order item which will be shipped.",
"type": "object",
"properties": {
"product": {
"type": "object",
"description": "Simple product description.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"description": "The product name."
},
"sku": {
"type": "string",
"description": "The product SKU."
},
"id": {
"type": "string",
"description": "The product id."
}
},
"required": [
"id",
"sku"
]
},
"quantity": {
"type": "integer",
"description": "The number of shipped items.",
"minimum": 1
},
"weight": {
"description": "Schema defining quantitative value in given measurement unit.",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Quantitative Value",
"properties": {
"value": {
"type": "number",
"description": "The value of the item characteristic."
},
"unit": {
"type": "string",
"description": "The unit of measurement given using SI unit."
}
},
"required": [
"value",
"unit"
]
},
"dimensions": {
"type": "object",
"description": "The dimensions of single item. The only accepted unit is 'm' (meter).",
"additionalProperties": false,
"properties": {
"length": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Quantitative Value",
"description": "Schema defining quantitative value in given measurement unit.",
"properties": {
"value": {
"type": "number",
"description": "The value of the item characteristic."
},
"unit": {
"type": "string",
"description": "The unit of measurement given using SI unit."
}
},
"required": [
"value",
"unit"
]
},
"width": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Quantitative Value",
"description": "Schema defining quantitative value in given measurement unit.",
"properties": {
"value": {
"type": "number",
"description": "The value of the item characteristic."
},
"unit": {
"type": "string",
"description": "The unit of measurement given using SI unit."
}
},
"required": [
"value",
"unit"
]
},
"height": {
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Quantitative Value",
"description": "Schema defining quantitative value in given measurement unit.",
"properties": {
"value": {
"type": "number",
"description": "The value of the item characteristic."
},
"unit": {
"type": "string",
"description": "The unit of measurement given using SI unit."
}
},
"required": [
"value",
"unit"
]
}
}
},
"price": {
"description": "Schema defining monetary amount in given currency.",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Monetary Amount",
"properties": {
"amount": {
"type": "number",
"description": "The amount in the specified currency."
},
"currency": {
"type": "string",
"pattern": "^[a-zA-Z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF."
}
},
"required": [
"amount",
"currency"
]
},
"requiresShipping": {
"type": "boolean",
"description": "Does the item require shipping? Digitally delivered items do not for example.",
"default": true
},
"taxable": {
"type": "boolean",
"description": "Is tax applied to the item?",
"default": true
}
},
"required": [
"product",
"quantity",
"price"
]
}
}
},
"required": [
"cartTotal"
]
}
Example:
{
"cartTotal": {
"amount": 100.34,
"currency": "USD"
},
"shipFromAddress": {
"street": "Patterson Fork Road",
"streetNumber": "2095",
"zipCode": "60606",
"city": "Chicago",
"country": "US",
"state": "IL"
},
"shipToAddress": {
"street": "Cheng Xiang Zhen Guan Tang Lu",
"streetNumber": "1031",
"extraLine1": "No. 2058",
"extraLine2": "Suzhou City",
"zipCode": "201202",
"city": "Taicang City",
"state": "Jiangsu Province",
"country": "CN"
},
"items": [
{
"product": {
"name": "Effective Java (2nd Edition)",
"sku": "860-1300201986",
"id": "0321356683"
},
"quantity": 2,
"weight": {
"value": 820,
"unit": "g"
},
"dimensions": {
"length": {
"value": 0.185,
"unit": "m"
},
"width": {
"value": 0.228,
"unit": "m"
},
"height": {
"value": 0.03,
"unit": "m"
}
},
"price": {
"amount": 38.88,
"currency": "USD"
},
"requireShipping": true,
"taxable": true
},
{
"product": {
"name": "Hadoop: The Definitive Guide, Kindle Edition",
"sku": "978-1491901632",
"id": "B00V7B1IZC"
},
"quantity": 1,
"price": {
"amount": 22.58,
"currency": "USD"
},
"requireShipping": false,
"taxable": false
}
]
}
HTTP status code 200
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Minimum fee",
"description": "The response containing calculated minimum fee for a given quote request by the service.",
"properties": {
"fee": {
"description": "Schema defining monetary amount in given currency.",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"title": "Monetary Amount",
"properties": {
"amount": {
"type": "number",
"description": "The amount in the specified currency."
},
"currency": {
"type": "string",
"pattern": "^[a-zA-Z]{3}$",
"description": "ISO 4217 currency code, e.g.: USD, EUR, CHF."
}
},
"required": [
"amount",
"currency"
]
}
},
"required": [
"fee"
]
}
Example:
{
"fee": {
"amount": 4.99,
"currency": "USD"
}
}
HTTP status code 401
Given request is unauthorized. Bad or expired token. Reauthenticate the user. Any details will be provided within the response payload.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 401,
"message": "Authorization: Unauthorized. Bearer TOKEN is invalid",
"type": "insufficient_credentials",
"moreInfo": "https://api.yaas.io/patterns/errortypes.html"
}
HTTP status code 403
Evaluated request scopes in access token are not sufficient and do not match required scopes.
Body
Type: application/json
Schema:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "error",
"description": "Schema for API specified errors.",
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "original HTTP error code, should be consistent with the response HTTP code",
"minimum": 100,
"maximum": 599
},
"type": {
"type": "string",
"description": "classification of the error type, lower case with underscore eg validation_failure",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support"
},
"details": {
"type": "array",
"description": "list of problems causing this error",
"items": {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "errorDetail",
"description": "schema for specific error cause",
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "a bean notation expression specifying the element in request data causing the error, eg product.variants[3].name, this can be empty if violation was not field specific"
},
"type": {
"type": "string",
"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.",
"pattern": "[a-z]+[a-z_]*[a-z]+"
},
"message": {
"type": "string",
"description": "descriptive error detail message for debugging"
},
"moreInfo": {
"type": "string",
"format": "uri",
"description": "link to documentation to investigate further and finding support for error detail"
}
},
"required": [
"type"
]
}
}
},
"required": [
"status",
"type"
]
}
Example:
{
"status": 403,
"message": "Given request does not have required scopes in access token. It is not authorized to perform this operation.",
"type": "insufficient_permissions"
}
Scopes in Shipping Service
Scopes let you specify exactly what type of permissions you need to access resources and operations in the Shipping service.
The following table includes all of the scopes supported by the Shipping service. You provide these scopes in the hybris-scopes header upon request.
Scope | Description |
---|---|
hybris.shipping_manage | Use this scope to perform all operations that use the POST, PUT, or DELETE methods to modify the data by updating or deleting the information. |
For more information about the authorization and authentication used in SAP Hybris services, see Authorization. For more information about scopes, see Scopes.
Shipping Zones
A zone is a group of countries for which shipping costs are the same. As each zone belongs to a certain site, we use the {siteCode} parameter in the request URL to provide the site.
Zones can be managed through the https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{siteCode}/zones
endpoint:
- A GET returns all zones and results paging is supported.
- A POST creates a new zone.
Following is a definition of a zone that groups three countries:
{
"id": "europe",
"name": {"en": "Europe", "de": "Europa" },
"default": true,
"shipTo": ["DE", "AT", "PL"]
}
Individual zones are managed via the https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{siteCode}/zones/{zoneId}
endpoint. The {siteCode} parameter in the request URL refers to the site with which the current zone is associated.
- A GET returns the specified zone.
- A PUT updates the zone. Partial updates are supported using the
partial=true
query parameter. - A DELETE deletes the zone.
Default zone
There is always only one default zone per site. You can change the default zone by:
- Updating a non-default zone and setting the
default=true
field. - Creating a new zone and setting the
default=true
field.
In both cases, the former default zone becomes a non-default zone.
Localization elements
The name field is a localized field. It can hold values for several languages. As a result, you can use headers to specify a language for a particular operation:
- Accept-Language and hybris-languages: For requesting content using the GET method.
- Content-Language: For creating or updating the payload using the POST or PUT method.
Shipping Methods
The fees (shipping rates), are defined in methods of a zone. Each method can have multiple fees. For each fee, it is required to specify a minimum order value along with a cost.
Methods can be managed through the https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{site}/zones/{zoneId}/methods
endpoint:
- A GET returns all methods.
- A POST creates a new method.
Individual methods are managed by the https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{site}/zones/{zoneId}/methods/{methodId}
endpoint:
- A GET returns a specified method.
- A PUT updates the method. Partial updates are supported using the
partial=true
query parameter. - A DELETE deletes the method.
Localized attributes
The name attribute of a shipping method is localized. That means that it supports multiple translations and requires special treatment.
When you retrieve by performing a GET on https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{site}/zones/{zoneId}/methods
or https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{site}/zones/{zoneId}/methods/{methodId}
, you can request that attribute in one of two ways:
The hybris-languages header, which contains a list of languages or an asterisk
*
character.
The value is returned as a complex object with an attribute for each translation{ ... "name": { "en": "UPS Standard 3-5 days", "de": "UPS Standard 3-5 Tage" } ... }
The Accept-Language header.
The value is returned as a simple string containing requested translation, if available.{ ... "name": "UPS Standard 3-5 days" ... }
Manage Shipping Zones
A zone is a group of countries for which shipping costs are the same. Managing zones involves creating, updating, and deleting zones.
Creating shipping zone
To create a zone, use the POST method on the https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{siteCode}/zones
endpoint. For example:
{
"id": "europe",
"name": {
"en": "Europe",
"de": "Europa"
},
"default": true,
"shipTo": ["DE", "AT", "PL"]
}
The outcome of this request, based on the payload data, will be a new zone that consists of few elements:
- id: This is a unique zone identifier, in this case europe.
- link: The link to the created zone. The resource part of the URL in this example would be
/{tenant}/siteCode/zones/europe
. This link will be appended to the URL part that defines a particular server and port, such ashttps://api.beta.yaas.io/hybris/shipping/v1/{tenant}/siteCode/zones/europe
, where siteCode is the code of the particular site.
Retrieving shipping zones
You can retrieve all zones, or you can retrieve one specific zone identified by its id.
Retrieve all zones
To retrieve all zones, use the GET method on the https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{siteCode}/zones
endpoint. Additionally, you can use URL query parameters:
- activeMethods:
- If this is not sent, then all expanded shipping methods will be included.
- If
activeMethods=true
, then only active methods will be included. - If
activeMethods=false
, then only inactive methods will be included.
- expand: For example,
?expand=methods,fees
- methods: To return zones with expanded shipping methods.
- fees: To expand the configured fees for those shipping methods.
If you have certain zones defined, they will be retrieved by that request, such as if you have two zones and retrieve them all:
[
{
"id": "europe",
"name": {
"en": "Europe",
"de": "Europa"
},
"default": true,
"shipTo": ["DE", "AT", "PL"]
},
{
"id": "poland",
"name": {
"en": "Poland",
"pl": "Polska"
},
"default": false,
"shipTo": ["PL"]
}
]
If you try to retrieve the zones without having any zones defined, the response will be an empty message with the status code 200 OK
.
Retrieve a specific zone
To retrieve a specific zone, you need to know its id. Use the GET method on the https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{siteCode}/zones/{zoneId}
endpoint. The zoneId URL parameter should be replaced by the real id value identifying the requested zone, such as https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{siteCode}/zones/europe
.
Additionally, you can use the URL query parameters activeMethods and expand. See the previous section for a description of these parameters.
The response includes a status code of 200 OK
, and the message body contains the requested zone:
{
"id": "europe",
"name": {
"en": "Europe",
"de": "Europa"
},
"default": true,
"shipTo": ["DE", "AT", "PL"]
}
Updating shipping zones
To update a shipping zone, use the PUT method on the https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{siteCode}/zones/{zoneId}
endpoint. It is possible to make a partial update with the help of the partial query parameter, such as https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{siteCode}/zones/europe?partial=true
. If you perform a partial update, only the attributes provided in the payload will be modified, while other attributes remain the same.
A country cannot be included in multiple zones in a shipping method. If a country is included in multiple zones, an error code of 409 Conflict
is returned.
Deleting shipping zones
To delete a shipping zone, you need to know its id. Use the DELETE method on the https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{siteCode}/zones/{zoneId}
endpoint. The zoneId URL parameter should be replaced by the real id value identifying the requested zone, such as https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{siteCode}/zones/europe
.
You cannot delete a shipping zone that is referenced in a shipping method. If you try to delete a referenced zone, an error code of 409 Conflict
is returned. You must first remove the reference in the shipping method and then delete a zone.
Manage Shipping Methods
Managing the shipping methods involves creating, updating, and deleting methods.
Creating shipping methods
To create a shipping method, you need:
- Method: POST
- Request URL:
https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{site}/zones/{zoneId}/methods
- Headers:
- Authorization: You must provide a proper scope that enables users to perform these operations. The scopes should be granted in an access token from OAuth 2.0 service. For more information about the authorization and authentication used in hybris services, see Authorization. For more information about the scopes in the Shipping service, see the Scopes in the Shipping Service section.
- URL Path Parameters
- {tenant}: The name of the current tenant.
- {site}: The site name.
- {zoneId}: The id of the zone.
The name can be localized and in case we want to provide multiple translations, there is no need to provide the language information in the headers. The payload should contain all the necessary properties. For example:
{
"id": "fedex-2dayground",
"name": {
"en": "FedEx 2Day",
"de": "FedEx 2Tage"
},
"maxOrderValue": {
"amount": "200",
"currency": "EUR"
},
"fees": [
{
"minOrderValue": {
"amount": "0",
"currency": "EUR"
},
"cost": {
"amount": "10",
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": "50",
"currency": "EUR"
},
"cost": {
"amount": "5",
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": "100",
"currency": "EUR"
},
"cost": {
"amount": "1",
"currency": "EUR"
}
}
]
}
You can create and store multiple methods in a zone. Some of these methods can be set as inactive, which is done by modifying the active property. A successful response includes:
- status code:
201
- A JSON-formatted response that contains the id of the method and the link to the method. For example:
{
"id": "fedex-2dayground",
"link": "https://api.beta.yaas.io/shipping/v1/tenant/eu/zones/westerneurope/methods/fedex-2dayground"
}
A few notes:
- The range of order values in the above example would be:
- Orders of 0 - 49.99 have a shipping cost of 10 EUR.
- Orders of 50 - 99.99 have a shipping cost of 5 EUR.
- Orders of 100 - 200 have a shipping cost of 1 EUR.
- If maxOrderValue is not set, the maximum limit would be infinite, such as 100 - inf.
- The minOrderValue in a fee may not exceed the maxOrderValue in a method.
- Fees in a method are sorted by minOrderValue, no matter how they have been entered.
Another way of creating a shipping method is to use a non-localized name attribute in the payload. The request is still using the POST method, and the endpoint remains the same as in the example above. However, since the language is not provided within the payload attributes, that information is taken from the Content-Language header, such as Content-Language: en
.
{
"id": "ups-standard",
"name": "UPS Standard",
"fees":
...
}
Retrieving all methods of a zone
To retrieve the methods of a zone, you need:
- Method: GET
- Request URL:
https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{site}/zones/{zoneId}/methods
- Headers:
- Authorization: You must provide a proper scope that enables users to perform these operations. The scopes should be granted in an access token from OAuth 2.0 service. For more information about the authorization and authentication used in hybris services, see Authorization. For more information about the scopes in the Shipping service, see the Scopes in the Shipping Service section.
- URL Path Parameters:
- {tenant}: The name of the current tenant.
- {site}: The site name.
- {zoneId}: The id of the zone.
- URL Query Parameters
- active: If set to
true
, only active methods are returned. If set tofalse
, only the inactive methods are returned. If not set, both active and inactive methods are returned. - expand: Use this query parameter to get additional data, including information about fees of the method using the
?expand=fees
parameter.
- active: If set to
The successful response includes a status code of 200
. For example:
[
{
"id": "fedex-2dayground",
"name": "FedEx 2Day",
"active": true,
"maxOrderValue": {
"amount": "5000",
"currency": "EUR"
},
"fees": [
{
"minOrderValue": {
"amount": "0",
"currency": "EUR"
},
"cost": {
"amount": "10",
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": "50",
"currency": "EUR"
},
"cost": {
"amount": "9",
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": "200",
"currency": "EUR"
},
"cost": {
"amount": "8",
"currency": "EUR"
}
}
]
},
{
"id": "ups-standard",
"name": "UPS Standard",
"fees": [
{
"minOrderValue": {
"amount": "0",
"currency": "EUR"
},
"cost": {
"amount": "5",
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": "50",
"currency": "EUR"
},
"cost": {
"amount": "2",
"currency": "EUR"
}
}
]
}
]
If the shipping method has localized attributes, you can retrieve them all, or you can choose to retrieve only those in the required language:
- Use the hybris-languages header to retrieve all available translations, such as hybris-languages:
*
. This will return all language versions for the name attributes in the response payload. - Use the Accept-Language header to retrieve only those translations you need. For example:
- Accept-Language:
en,de,pl
- Accept-Language:
de
- Accept-Language:
As there can be many languages, you may have some preferences and influence regarding which translation would be returned in the response payload. The values of the Accept-Language header can be complex. This enables you to apply the concept of weight to all languages listed in the header or to the selected ones, such as Accept-Language: de,fr:q=0.5,en:q=0.7
. If weights are specified, greater numbers are used before lower numbers, when available. Here is what happens if the value from this header example is used:
- If there are German-localized attributes, then only translations in German are returned.
- If there are no German-localized attributes, then the English-localized attributes are returned, since the weight used for English is 0.7, which is greater than the 0.5 used for French.
- If no German or English translations are found, then the French-localized attributes are returned in the response payload.
Retrieving a single method
To retrieve a single method of a zone, you need:
- Method: GET
- Request URL:
https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{site}/zones/{zoneId}/methods/{methodId}
- Headers:
- Authorization: You must provide a proper scope that enables users to perform these operations. The scopes should be granted in an access token from OAuth 2.0 service. For more information about the authorization and authentication used in hybris services, see Authorization. For more information about the scopes in the Shipping service, see the Scopes in the Shipping Service section.
- URL Path Parameters:
- {tenant}: The name of the current tenant.
- {site}: The site name.
- {zoneId}: The id of the zone.
- {methodId}: The unique identifier of the method. Each method in a zone has its own unique identifier.
Response example:
{
"id": "fedex-2dayground",
"name": "FedEx 2Day",
"active": true,
"maxOrderValue": {
"amount": "200",
"currency": "EUR"
},
"fees": [
{
"minOrderValue": {
"amount": "0",
"currency": "EUR"
},
"cost": {
"amount": "10",
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": "50",
"currency": "EUR"
},
"cost": {
"amount": "5",
"currency": "EUR"
}
},
{
"minOrderValue": {
"amount": "100",
"currency": "EUR"
},
"cost": {
"amount": "1",
"currency": "EUR"
}
}
]
}
Updating a shipping method
To update a shipping method, you need:
- Method: PUT
- Request URL:
https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{site}/zones/{zoneId}/methods/{methodId}
- Headers:
- Authorization: You must provide a proper scope that enables users to perform these operations. The scopes should be granted in an access token from OAuth 2.0 service. For more information about the authorization and authentication used in hybris services, see Authorization. For more information about the scopes in the Shipping service, see the Scopes in the Shipping Service section.
- URL Path Parameters:
- {tenant}: The name of the current tenant.
- {site}: The site name.
- {zoneId}: The id of the zone.
- {methodId}: The unique identifier/code of the method. Each method in a zone has its own unique identifier.
- Query Parameter:
- partial: If the partial query parameter is set to
true
, a partial update is performed.
- partial: If the partial query parameter is set to
The successful response includes the status code 200
.
You can perform a partial update using the partial query parameter, for example https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/methods/post-standard?partial=true
. In this case, the partial update will add the attributes of the post-standard method.
Deleting a shipping method
To delete a method, you need:
- Method: DELETE
- Request URL:
https://api.beta.yaas.io/hybris/shipping/v1/{tenant}/{site}/zones/{zoneId}/methods/{methodId}
- Headers:
- Authorization: You must provide a proper scope that enables users to perform these operations. The scopes should be granted in an access token from OAuth 2.0 service. For more information about the authorization and authentication used in hybris services, see Authorization. For more information about the scopes in the Shipping service, see the Scopes in the Shipping Service section.
- URL Path Parameters:
- {tenant}: The name of the current tenant.
- {site}: The site name.
- {zoneId}: The id of the zone.
- {methodId}: The unique identifier code of the method. Each method in a zone has its own unique identifier.
Retrieve Shipping Cost for a Cart
If you have a cart, you can find out how much it would cost to ship the products in the cart to a defined destination.
Request
To calculate the shipping fee, you must include some required information with your request:
- Method: POST
- Request URL:
https://api.beta.yaas.io/hybris/site/v1{tenant}/{site}/quote/minimum
There are a few things to be aware of:
- If a country is not set in the destination shipping address, then the lowest cost will be calculated from the default zone.
- If a country is set in the destination shipping address, then the lowest cost will be calculated among all the methods of all zones that contain the specified destination country.
- The cartTotal property in the payload is the sum which should be used for shipping options calculation. Usually it should be the subtotal of the cart plus the tax and minus discount(s). When using the Cart Calculation service the easiest way to calculate this value would be to use the totalPrice value minus the shipping cost estimation. For more details on cart calculations, see the Cart Calculation document.
For example:
{
"cartTotal": {
"amount": 100.34,
"currency": "USD"
},
"shipFromAddress": {
"street": "Patterson Fork Road",
"streetNumber": "2095",
"zipCode": "60606",
"city": "Chicago",
"country": "US",
"state": "IL"
},
"shipToAddress": {
"street": "Cheng Xiang Zhen Guan Tang Lu",
"streetNumber": "1031",
"extraLine1": "No. 2058",
"extraLine2": "Suzhou City",
"zipCode": "201202",
"city": "Taicang City",
"state": "Jiangsu Province",
"country": "CN"
},
"items": [
{
"product": {
"name": "Effective Java (2nd Edition)",
"sku": "860-1300201986",
"id": "0321356683"
},
"quantity": 2,
"weight": {
"value": 820,
"unit": "g"
},
"dimensions": {
"length": {
"value": 0.185,
"unit": "m"
},
"width": {
"value": 0.228,
"unit": "m"
},
"height": {
"value": 0.03,
"unit": "m"
}
},
"price": {
"amount": 38.88,
"currency": "USD"
},
"requireShipping": true,
"taxable": true
},
{
"product": {
"name": "Hadoop: The Definitive Guide, Kindle Edition",
"sku": "978-1491901632",
"id": "B00V7B1IZC"
},
"quantity": 1,
"price": {
"amount": 22.58,
"currency": "USD"
},
"requireShipping": false,
"taxable": false
}
]
}
Response
The response contains information about the fee and its currency:
{
"fee": {
"amount": 4.99,
"currency": "USD"
}
}
The example presented above only comes if everything is correct with the request, its payload, and also other data. However, there can be situations when you would not see such a response, but rather a bad request exception with a custom key and a message. For example:
- If the cart value exceeds the maximum allowed order value method:
cart_total_too_high
- If the cart currency does not match the maximum order value currency:
method_currency_mismatch
- If the cart currency does not match the fee currency or the cart value is less than the lowest minimum order value of fees in a method/methods:
cart_total_too_low_or_fee_currency_mismatch
Retrieve Shipping Cost for a Checkout
While customers add items to the cart, they also receive a rough estimate of the shipping cost. At some point during the order process, however, customers come to the checkout phase and want to know more exact shipment costs. This tutorial demonstrates how to fully calculate shipping cost details.
Request
To calculate the shipping fee, you need:
- Method: POST
- Request URL:
https://api.beta.yaas.io/hybris/site/v1/{tenant}/{site}/quote
A few notes to be aware of:
- The destination shipping address must always have a country defined. The shipping methods, which contain the matching fee, and zones will be returned.
- The cartTotal property in the payload is the sum which should be used for shipping options calculation. Usually it should be the subtotal of the cart plus the tax and minus discount(s). When using the Cart Calculation service the easiest way to calculate this value would be to use the totalPrice value minus the shipping cost estimation. For more details on cart calculations, see the Cart Calculation document.
For example:
{
"cartTotal": {
"amount": 100.34,
"currency": "USD"
},
"shipFromAddress": {
"street": "Patterson Fork Road",
"streetNumber": "2095",
"zipCode": "60606",
"city": "Chicago",
"country": "US",
"state": "IL"
},
"shipToAddress": {
"street": "Cheng Xiang Zhen Guan Tang Lu",
"streetNumber": "1031",
"extraLine1": "No. 2058",
"extraLine2": "Suzhou City",
"zipCode": "201202",
"city": "Taicang City",
"state": "Jiangsu Province",
"country": "CN"
},
"items": [
{
"product": {
"name": "Effective Java (2nd Edition)",
"sku": "860-1300201986",
"id": "0321356683"
},
"quantity": 2,
"weight": {
"value": 820,
"unit": "g"
},
"dimensions": {
"length": {
"value": 0.185,
"unit": "m"
},
"width": {
"value": 0.228,
"unit": "m"
},
"height": {
"value": 0.03,
"unit": "m"
}
},
"price": {
"amount": 38.88,
"currency": "USD"
},
"requireShipping": true,
"taxable": true
},
{
"product": {
"name": "Hadoop: The Definitive Guide, Kindle Edition",
"sku": "978-1491901632",
"id": "B00V7B1IZC"
},
"quantity": 1,
"price": {
"amount": 22.58,
"currency": "USD"
},
"requireShipping": false,
"taxable": false
}
]
}
Response
The response contains all the shipping information, including the shipping method, fee, and currency. The response can be localized, such as the zone name or method name.
[
{
"zone": {
"id": "europe",
"name": {
"en": "Europe",
"de": "Europa"
}
},
"methods": [
{
"id": "fedex-2dayground",
"name": {
"en": "FedEx 2Day",
"de": "FedEx 2 Tage"
},
"fee": {
"amount": 4.99,
"currency": "EUR"
}
},
{
"id": "dhl",
"name": "DHL",
"fee": {
"amount": 2.99,
"currency": "EUR"
}
}
]
},
{
"zone": {
"id": "northamerica",
"name": {
"en": "North America",
"de": "Nord Amerika"
}
},
"methods": [
{
"id": "dhl-air",
"name": {
"en": "DHL Air",
"de": "DHL Flug"
},
"fee": {
"amount": 9.99,
"currency": "EUR"
}
},
{
"id": "dhl-normal",
"name": "DHL Normal",
"fee": {
"amount": 5.99,
"currency": "EUR"
}
}
]
}
]
The example above comes only if everything is correct with the request, its payload, and also other data. However, there can be situations when you would not see such a response, but rather a bad request exception with a custom key and a message. For example:
- If the cart value exceeds the maximum allowed order value method:
cart_total_too_high
- If the cart currency does not match the maximum order value currency:
method_currency_mismatch
- If the cart currency does not match the fee currency or the cart value is less than lowest minimum order value of fees in a method/methods:
cart_total_too_low_or_fee_currency_mismatch
Glossary
Term | Description |
---|---|
tenant | A tenant is a group of users on a project sharing common access, with specific privileges to a service. |
If you find any information that is unclear or incorrect, please let us know so that we can improve the Dev Portal content.
Use our private help channel. Receive updates over email and contact our specialists directly.
If you need more information about this topic, visit hybris Experts to post your own question and interact with our community and experts.