Cart API static sandbox guide
The Cart API supports the Amazon Business API static sandbox. The static sandbox uses pattern matching to return static, mocked responses.
You can use the sandbox environment to securely test your integration with the Cart API before moving to production. By sending requests to the sandbox endpoints instead of production endpoints, you can test standard workflows without triggering real-world events.
Prerequisites
Before calling the Cart API static sandbox, complete the steps in Accessing the Amazon Business API sandbox environment to create a sandbox app and generate a sandbox API access token.
Once you've generated the access token, direct each sandbox call to the appropriate Amazon Business API sandbox endpoint for your region.
Sandbox scenarios
Path: GET /cart/2025-04-30/carts
Scenario: Calling listCarts operation successfully to retrieve cart summaries.
GET https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts?region=US
Response: Returns a list of cart summaries for the specified region.
Status code: 200
{
"cartDetailsList": [
{
"id": "cart-123",
"cartType": "AMAZON_WEBSITE_CART",
"region": "US"
},
{
"id": "cart-456",
"cartType": "DEFAULT",
"region": "US"
}
]
}
Scenario: Calling listCarts operation with missing required parameter.
GET https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts
Response: Returns an error for missing required parameter.
Status code: 400
{
"errors": [
{
"code": "INVALID_REQUEST_PARAMETER",
"message": "The required request parameter is missing: region.",
"details": "Please provide the required parameter (region) in the request."
}
]
}
Path: GET /cart/2025-04-30/carts/{cartId}
Scenario: Calling getCart operation successfully to retrieve cart details.
GET https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts/cart-123?region=US
Response: Returns details of the specified cart.
Status code: 200
{
"id": "cart-123",
"cartType": "AMAZON_WEBSITE_CART",
"region": "US",
"attributes": [
{
"attributeType": "SubTotal",
"amount": {
"currencyCode": "USD",
"amount": 70
}
}
]
}
Scenario: Calling getCart operation with missing cartId.
GET https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts?region=US
Response: Returns an error for missing cartId.
Status code: 400
{
"errors": [
{
"code": "INVALID_REQUEST_PARAMETER",
"message": "The required request parameter is missing: cartId.",
"details": "Please provide the required parameter (cartId) in the request."
}
]
}
Path: POST /cart/2025-04-30/carts/{cartId}/totalPurchaseCostEstimations
Scenario: Calling getEstimatedTotalPurchaseCost operation successfully.
POST https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts/cart-123/totalPurchaseCostEstimations?region=US
{
"address": {
"addressType": "PhysicalAddress",
"fullName": "cart user",
"addressLine1": "307 Boren Ave",
"city": "Seattle",
"stateOrRegion": "WA",
"postalCode": "98101",
"countryCode": "US"
}
}
Response: Returns estimated total purchase cost breakdown.
Status code: 200
{
"charges": [
{
"type": "PRINCIPAL",
"category": "SUBTOTAL",
"amount": {
"currencyCode": "USD",
"amount": 123
}
},
{
"type": "PRINCIPAL",
"category": "SHIPPING",
"amount": {
"currencyCode": "USD",
"amount": 10
}
},
{
"type": "TAX",
"category": "SUBTOTAL",
"amount": {
"currencyCode": "USD",
"amount": 12.3
}
},
{
"type": "TAX",
"category": "SHIPPING",
"amount": {
"currencyCode": "USD",
"amount": 1.2
}
}
],
"rejectionArtifacts": []
}
Scenario: Calling getEstimatedTotalPurchaseCost operation with missing address.
POST https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts/cart-123/totalPurchaseCostEstimations?region=US
{
"address": {
"addressType": "PhysicalAddress",
"addressLine1": "307 Boren Ave",
"city": "Seattle",
"stateOrRegion": "WA",
"postalCode": "98101",
"countryCode": "US"
}
}
Response: Returns an error for missing required field.
Status code: 400
{
"errors": [
{
"code": "INVALID_REQUEST_PARAMETER",
"message": "The required request parameter is missing: address.",
"details": "Please provide the required parameter (address) in the request."
}
]
}
Path: GET /cart/2025-04-30/carts/{cartId}/items
Scenario: Calling getItems operation successfully to retrieve cart items.
GET https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts/cart-123/items?region=US
Response: Returns a list of items in the cart.
Status code: 200
{
"items": [
{
"asin": "Asin1",
"itemId": "Id1",
"offerId": "OId1",
"quantity": 2,
"isItemAvailable": true,
"price": {
"currencyCode": "USD",
"amount": 30
},
"addedToCartDate": "2024-07-10T15:00:00.000Z",
"modifiedDate": "2024-07-10T15:00:00.000Z"
},
{
"asin": "Asin2",
"itemId": "Id2",
"offerId": "OId2",
"quantity": 2,
"isItemAvailable": true,
"price": {
"currencyCode": "USD",
"amount": 40
},
"addedToCartDate": "2024-07-10T15:00:00.000Z",
"modifiedDate": "2024-07-15T20:00:00.000Z"
}
]
}
Scenario: Calling getItems operation with missing cartId parameter.
GET https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts//items?region=US
Response: Returns an error for missing required parameter.
Status code: 400
{
"errors": [
{
"code": "INVALID_REQUEST_PARAMETER",
"message": "The required request parameter is missing: cartId.",
"details": "Please provide the required parameter (cartId) in the request."
}
]
}
Path: PUT /cart/2025-04-30/carts/{cartId}/items
Scenario: Calling modifyItems operation successfully to update cart item quantities.
PUT https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts/cart-123/items?region=US
{
"items": [
{
"itemId": "cId1",
"quantity": 3
}
]
}
Response: Returns updated cart items after modification.
Status code: 200
{
"items": [
{
"asin": "Asin1",
"itemId": "cId1",
"offerId": "OId1",
"quantity": 3,
"isItemAvailable": true,
"price": {
"currencyCode": "USD",
"amount": 30
},
"addedToCartDate": "2024-07-10T15:00:00.000Z",
"modifiedDate": "2024-07-10T15:00:00.000Z"
}
],
"rejectedItems": []
}
Scenario: Calling modifyItems operation with missing quantity parameter.
PUT https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts/cart-123/items?region=US
{
"items": [
{
"itemId": "cId1"
}
]
}
Response: Returns an error for missing required parameter.
Status code: 400
{
"errors": [
{
"code": "INVALID_REQUEST_PARAMETER",
"message": "The required request parameter is missing: quantity.",
"details": "Please provide the required parameter (quantity) in the modify items request."
}
]
}
Path: POST /cart/2025-04-30/carts/{cartId}/items
Scenario: Calling addItems operation successfully to add items to cart.
POST https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts/cart-123/items?region=US
{
"items": [
{
"asin": "Asin1",
"offerId": "OId1",
"quantity": 1,
"externalId": "client-item-001"
}
]
}
Response: Returns updated cart items after addition.
Status code: 200
{
"items": [
{
"asin": "Asin1",
"itemId": "Id1",
"offerId": "OId1",
"quantity": 1,
"isItemAvailable": true,
"price": {
"currencyCode": "USD",
"amount": 30
},
"addedToCartDate": "2024-07-10T15:00:00.000Z",
"modifiedDate": "2024-07-10T15:00:00.000Z"
}
],
"rejectedItems": []
}
Scenario: Calling addItems operation with missing ASIN parameter.
POST https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts/cart-123/items?region=US
{
"items": [
{
"offerId": "OId1",
"quantity": 1
}
]
}
Response: Returns an error for missing required parameter.
Status code: 400
{
"errors": [
{
"code": "INVALID_REQUEST_PARAMETER",
"message": "The required request parameter is missing: asin.",
"details": "Please provide the required parameter (asin) in the add items request."
}
]
}
Path: DELETE /cart/2025-04-30/carts/{cartId}/items
Scenario: Calling deleteItems operation successfully to remove all items from cart.
DELETE https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts/cart-123/items?region=US
Response: Returns empty response on successful deletion.
Status code: 204
Scenario: Calling deleteItems operation with missing cartId parameter.
DELETE https://sandbox.na.business-api.amazon.com/cart/2025-04-30/carts//items?region=US
Response: Returns an error for missing required parameter.
Status code: 400
{
"errors": [
{
"code": "INVALID_REQUEST_PARAMETER",
"message": "The required request parameter is missing: cartId.",
"details": "Please provide the required parameter (cartId) in the request."
}
]
}
Updated about 23 hours ago