Checkout for a specific product via DirectOrder or Punchout
The method initiates a checkout for a specific product. If DirectOrder is enable, a reservation will be returned. Otherwise a Punchout will be initialized, the caller will get a redirect URL that the user can simply follow to initiate the punchout into Amazon. The caller must pass a callback URL in the request. That callback URL will later be used to send back the shopping cart in compliance with the SAP OCI protocol. Optionally, the caller can pass a shipment address in the request. The caller is strongly encouraged to do so. Otherwise, Amazon might fall back to the default address of the organization, and the delivery might be delayed or fail altogether.
Path Parameters
ID of the product to retrieve.
Request Body required
URL to be used when returning data to the caller. This URL will always be used, even in failure cases. In other words, we try everything to pass control back to the caller.
Name of the user initiating the punchout request. This value is used in various places by Amazon, e.g. shipping notifications.
shipTo object
ShipTo address for Amazon. It is advised to pass an address here. If the caller doesn't pass an address here, Amazon may fallback to using the default address for the organization, which more often than not is a bad idea.
Specifies an ID for the address. This attribute is used to support address codes for relationships that require ID references. It should not be the name of a company or person. It is intended for application-to-application integration.
Specifies a code that represents the agency or organization responsible for the addressId numbering, e.g. DUNS or ILN. This code is required if there is a value in the addressId attribute.
Specifies the street of the shipTo address.
Specifies a code for the city of the shipTo address. Notice that this is NOT the zip code! Find the zip code in the postalCode property.
Specifies the city name of the shipTo address.
Specifies the state code of the shipTo address.
Specifies the state of the shipTo address.
Specifies the postal code of the shipTo address.
Specifies the country code of the shipTo address.
Specifies the country of the shipTo address.
- 201
- 400
- 401
- 429
- default
Response to a checkout request.
Schema
Possible values: [cxml-punchout, direct-order]
Type of the checkout.
punchout object
Response in case of type is cxml-punchout
Redirect URL to follow for further processing.
{
"type": "cxml-punchout",
"punchout": {
"redirectUrl": "string"
}
}
Bad request
Schema
Code to indentify the type of error, typically the HTTP status code.
Summary of the error in one sentence.
More details, e.g. validation errors on individual fields.
{
"code": 400,
"message": "Bad request parameters. Please check the parameters for this API request.",
"details": [
"Name is missing.",
"Price is negative."
]
}
Unauthorized
Schema
Code to indentify the type of error, typically the HTTP status code.
Summary of the error in one sentence.
More details, e.g. validation errors on individual fields.
{
"code": 400,
"message": "Bad request parameters. Please check the parameters for this API request.",
"details": [
"Name is missing.",
"Price is negative."
]
}
Too many requests
Schema
Code to indentify the type of error, typically the HTTP status code.
Summary of the error in one sentence.
More details, e.g. validation errors on individual fields.
{
"code": 400,
"message": "Bad request parameters. Please check the parameters for this API request.",
"details": [
"Name is missing.",
"Price is negative."
]
}
General error
Schema
Code to indentify the type of error, typically the HTTP status code.
Summary of the error in one sentence.
More details, e.g. validation errors on individual fields.
{
"code": 400,
"message": "Bad request parameters. Please check the parameters for this API request.",
"details": [
"Name is missing.",
"Price is negative."
]
}