Punchout
Punchout API enables users to initiate an OCI punchout to a product on Amazon.
Endpoint
POST /api/v1/amazon/product/{id}/punchout HTTP/1.1
Accept: application/json
Initiate an OCI punchout to a specific product on Amazon Business.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | true | ID of the product to punchout |
Request Body
The request body is a JSON object.
| Parameter | Type | Required | Description |
|---|---|---|---|
| callbackUrl | string | true | HOOK_URL of the OCI punchout process. This URL will always be used, even in failure; in other words, we try everything to pass control back to the caller. |
| name | string | false | Full name of the requester, e.g. "Joe Average". It is being used e.g. in shipping notifications |
| shipTo | object(Address) | false | Shipment address (see below). If it is not specified here, Amazon may fallback to using the default address of the group/organization, which more often than not is a bad idea. |
Example:
{
"callbackUrl": "https://example.com/oci/callback",
"name": "Joe Average",
"shipTo": {
"street": "525 Market St",
"city": "San Francisco",
"postalCode": "94105",
"state": "CA",
"countryCode": "US",
"country": "United States of America"
}
}
Shipment address
The parameters of the shipment address are the same as those in the cXML specification.
| Parameter | Description |
|---|---|
addressId | (optional) ID of the address. |
addressIdDomain | (optional) Domain of the address ID. |
street | (optional) Street. |
cityCode | (optional) City code. |
city | (optional) City name. |
stateCode | (optional) State code. |
state | (optional) State. |
postalCode | (optional) Postal code. |
countryCode | (optional) Country code, e.g. US. |
country | (optional) Country name. |
Response
Overview
| Status | Meaning | Description |
|---|---|---|
| 201 | Created | A response structure to use for OCI punchout. |
| 400 | Bad Request | The server understood your request but is unable to complete it, e.g. because a required parameter is missing. |
| 401 | Unauthorized | You sent invalid or expired credentials. |
| 404 | Not Found | The product, catalog, or vendor wasn't found. |
| 429 | Too Many Requests | The server received too many requests in a given amount of time; you should throttle down and retry later. |
| 500 | Internal Server Error | Something went wrong on our side. |
Response schema
Status Code 201
| Name | Type | Required | Description |
|---|---|---|---|
| redirectUrl | string | true | The URL to start the OCI punchout process |
Examples
201 response
{
"redirectUrl": "https://www.amazon.com/eprocurement/initiate-clean-punchout/123-4567890-1234567"
}