Invoices API static sandbox guide
The Amazon Business Invoices 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 Amazon Business Invoices API before moving to production. By sending requests to the sandbox endpoints instead of production endpoints, you can test standard processes without triggering real-world events.
Prerequisites
Before calling the Amazon Business Invoices 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 have generated the access token, direct each sandbox call to the appropriate Amazon Business API sandbox endpoint for your region.
Sandbox scenarios
Use the following sample requests to test the success scenarios in the Amazon Business Invoices API static sandbox. If you use input parameters other than the sample values below, an error will occur.
Path: GET /ab-invoice/2026-02-01/invoices
Scenario: Calling Amazon Business Invoices API sandbox getInvoices operation to return a list of invoices between invoiceIssueStartDate of 2024-10-08T00:40:56Z and invoiceIssueEndDate of 2025-10-07T15:47:56Z in the JP region:
GET https://sandbox.jp.business-api.amazon.com/ab-invoice/2026-02-01/invoices?invoiceIssueStartDate=2024-10-08T00:40:56Z&invoiceIssueEndDate=2025-10-07T15:47:56Z®ion=JP
Response: A successful request returns a 200 response code with an invoices array containing one STANDARD and one CREDIT_MEMO invoice, along with a nextPageToken, in the response body.
Status code: 200 OK
{
"invoices": [
{
"invoiceMetadata": {
"invoiceNumber": "14XH-NW7L-7N1N",
"issueDate": "2025-02-01T00:00:00Z",
"type": "STANDARD",
"region": "JP"
},
"consolidationType": "PERIODIC",
"status": "Issued"
},
{
"invoiceMetadata": {
"invoiceNumber": "14XH-NW7L-7N1B",
"issueDate": "2025-02-01T00:00:00Z",
"type": "CREDIT_MEMO",
"region": "JP"
},
"consolidationType": "PERIODIC",
"status": "Closed"
}
],
"nextPageToken": "eyJvZmZzZXQiOjM1LCJmaWx0ZXJzIjp7fX0="
}
Path: GET /ab-invoice/2026-02-01/invoices/{invoiceNumber}/detail
Scenario: Calling Amazon Business Invoices API sandbox getInvoiceDetailByInvoiceNumber operation to return detailed information for invoice 14XH-NW7L-7N1N in the JP region:
GET https://sandbox.jp.business-api.amazon.com/ab-invoice/2026-02-01/invoices/14XH-NW7L-7N1N/detail?region=JP
Response: A successful request returns a 200 response code with an invoiceDetail object containing invoice metadata, billing period, issuer details, bill-to address, customer information, due date, payment method, total amount, and tax artifacts in the response body.
Status code: 200 OK
{
"invoiceDetail": {
"invoiceMetadata": {
"invoiceNumber": "14XH-NW7L-7N1N",
"issueDate": "2025-02-01T00:00:00Z",
"type": "STANDARD",
"region": "JP"
},
"period": {
"startDate": "2025-01-01T00:00:00Z",
"endDate": "2025-01-31T00:00:00Z"
},
"issuer": {
"name": "サンプル販売株式会社",
"registrationNumber": "T0000000000000"
},
"billToAddress": {
"fullName": "TestTJ",
"phoneNumber": "03-6367-4000",
"addressLine1": "test1",
"addressLine2": "test2",
"city": "目黒区",
"stateOrRegion": "東京都",
"postalCode": "000-0000",
"countryCode": "JP"
},
"customer": {
"legalEntityId": "A11LQS3XX3AN99",
"legalEntityName": "TestTJ"
},
"dueDate": {
"date": "2025-02-28T00:00:00Z"
},
"paymentMethod": "Business Credit Account",
"totalAmount": {
"currencyCode": "JPY",
"amount": 11099
},
"artifacts": [
{
"artifactType": "BillingDetails",
"amountDetails": [
{ "type": "itemSubtotal",
"amount": { "currencyCode": "JPY", "amount": 10000 } },
{ "type": "shippingAndHandling",
"amount": { "currencyCode": "JPY", "amount": 99 } },
{ "type": "promosAndDiscounts",
"amount": { "currencyCode": "JPY", "amount": 0 } },
{ "type": "refund",
"amount": { "currencyCode": "JPY", "amount": 0 } },
{ "type": "giftWrapping",
"amount": { "currencyCode": "JPY", "amount": 0 } },
{ "type": "salesTax",
"amount": { "currencyCode": "JPY", "amount": 1000 } },
{ "type": "amountDue",
"amount": { "currencyCode": "JPY", "amount": 11099 } }
]
},
{
"artifactType": "PurchaseFromQualifiedIssuer",
"taxBreakdown": [
{ "taxRate": "0.1",
"inclusiveTotal": { "currencyCode": "JPY", "amount": 2910 },
"exclusiveTotal": { "currencyCode": "JPY", "amount": 2646 },
"taxAmount": { "currencyCode": "JPY", "amount": 264 } },
{ "taxRate": "0.08",
"inclusiveTotal": { "currencyCode": "JPY", "amount": 1800 },
"exclusiveTotal": { "currencyCode": "JPY", "amount": 1000 },
"taxAmount": { "currencyCode": "JPY", "amount": 800 } },
{ "taxRate": "0",
"inclusiveTotal": { "currencyCode": "JPY", "amount": 0 },
"exclusiveTotal": { "currencyCode": "JPY", "amount": 0 },
"taxAmount": { "currencyCode": "JPY", "amount": 0 } }
]
},
{
"artifactType": "PurchaseFromOtherIssuer",
"taxBreakdown": [
{ "taxRate": "0.1",
"inclusiveTotal": { "currencyCode": "JPY", "amount": 2910 },
"exclusiveTotal": { "currencyCode": "JPY", "amount": 2646 },
"taxAmount": { "currencyCode": "JPY", "amount": 2640 } },
{ "taxRate": "0.08",
"inclusiveTotal": { "currencyCode": "JPY", "amount": 1800 },
"exclusiveTotal": { "currencyCode": "JPY", "amount": 1000 },
"taxAmount": { "currencyCode": "JPY", "amount": 800 } },
{ "taxRate": "0",
"inclusiveTotal": { "currencyCode": "JPY", "amount": 0 },
"exclusiveTotal": { "currencyCode": "JPY", "amount": 0 },
"taxAmount": { "currencyCode": "JPY", "amount": 0 } }
]
}
]
}
}
Path: GET /ab-invoice/2026-02-01/invoices/{invoiceNumber}/lineItems
Scenario:Calling Amazon Business Invoices API sandbox getInvoiceLineItemsByInvoiceNumber operation to return line items for invoice 1PT9-NQ7H-T16W in the JP region:
GET https://sandbox.jp.business-api.amazon.com/ab-invoice/2026-02-01/invoices/1PT9-NQ7H-T16W/lineItems?region=JP
Response: A successful request returns a 200 response code with a lineItems array containing one CHARGE line item and one REFUND line item, along with a nextPageToken, in the response body.
Status code: 200 OK
{
"lineItems": [
{
"invoiceNumber": "1PT9-NQ7H-T16W",
"transactionType": "CHARGE",
"orderMetadata": {
"orderId": "123-4567890-1234567",
"orderDate": { "date": "2026-01-10T00:00:00Z" }
},
"lineItemMetadata": { "orderLineItemId": "12345678901234" },
"shipmentMetadata": {
"shipmentId": "SHP123456789",
"shipmentDate": { "date": "2026-01-12T00:00:00Z" }
},
"purchaseOrderDetails": {
"purchaseOrderNumber": "NCPROD00000006",
"purchaseOrderLineItemNumber": "1"
},
"productDetails": {
"asin": "B08GQ9M1NM",
"title": "Sample Product Name",
"unspsc": { "code": "43211500" }
},
"seller": {
"name": "Sample Seller",
"taxRegistrationNumber": "T0000000000000"
},
"taxInvoiceNumber": "123242342342",
"quantity": 2,
"taxRate": "10.0",
"charges": [
{ "category": "SUBTOTAL", "type": "PRINCIPAL",
"amount": { "currencyCode": "JPY", "amount": 1980 } },
{ "category": "SUBTOTAL", "type": "TAX",
"amount": { "currencyCode": "JPY", "amount": 198 } },
{ "category": "SHIPPING_AND_HANDLING", "type": "PRINCIPAL",
"amount": { "currencyCode": "JPY", "amount": 500 } },
{ "category": "SHIPPING_AND_HANDLING", "type": "TAX",
"amount": { "currencyCode": "JPY", "amount": 50 } },
{ "category": "DISCOUNT", "type": "PRINCIPAL",
"amount": { "currencyCode": "JPY", "amount": -100 } },
{ "category": "GIFT_WRAP", "type": "PRINCIPAL",
"amount": { "currencyCode": "JPY", "amount": 50 } },
{ "category": "GIFT_WRAP", "type": "TAX",
"amount": { "currencyCode": "JPY", "amount": 5 } },
{ "category": "OTHER_FEE", "type": "PRINCIPAL",
"amount": { "currencyCode": "JPY", "amount": 30 } },
{ "category": "OTHER_FEE", "type": "TAX",
"amount": { "currencyCode": "JPY", "amount": 3 } }
],
"unitPrice": { "currencyCode": "JPY", "amount": 990 },
"unitTax": { "currencyCode": "JPY", "amount": 99 },
"unitPriceIncludingTax": { "currencyCode": "JPY", "amount": 1089 },
"totalTaxAmount": { "currencyCode": "JPY", "amount": 256 },
"netTotal": { "currencyCode": "JPY", "amount": 2716 },
"businessOrderInfo": {
"glCode": "GL-12345",
"costCenter": "CC-67890",
"projectCode": "PROJ-001"
},
"shippingAddress": {
"fullName": "John Doe",
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "Tokyo",
"stateOrRegion": "Tokyo",
"postalCode": "100-0001",
"countryCode": "JP"
},
"reversalDetails": null,
"buyingCustomer": { "name": "John Doe", "email": "[email protected]" },
"buyerGroup": { "name": "Engineering" }
},
{
"invoiceNumber": "1PT9-NQ7H-T16W",
"transactionType": "REFUND",
"orderMetadata": {
"orderId": "123-4567890-1234567",
"orderDate": { "date": "2026-01-10T00:00:00Z" }
},
"lineItemMetadata": { "orderLineItemId": "12345678901234" },
"shipmentMetadata": {
"shipmentId": "SHP123456789",
"shipmentDate": { "date": "2026-01-12T00:00:00Z" }
},
"productDetails": {
"asin": "B08GQ9M1NM",
"title": "Sample Product Name",
"unspsc": { "code": "43211500" }
},
"seller": {
"name": "Sample Seller",
"taxRegistrationNumber": "T0000000000000"
},
"taxInvoiceNumber": "123242342342",
"quantity": 1,
"taxRate": "10.0",
"charges": [
{ "category": "SUBTOTAL", "type": "PRINCIPAL",
"amount": { "currencyCode": "JPY", "amount": -990 } },
{ "category": "SUBTOTAL", "type": "TAX",
"amount": { "currencyCode": "JPY", "amount": -99 } },
{ "category": "RESTOCKING_FEE", "type": "PRINCIPAL",
"amount": { "currencyCode": "JPY", "amount": 30 } },
{ "category": "RESTOCKING_FEE", "type": "TAX",
"amount": { "currencyCode": "JPY", "amount": 3 } },
{ "category": "RETURN_SHIPPING_FEE", "type": "PRINCIPAL",
"amount": { "currencyCode": "JPY", "amount": 30 } },
{ "category": "RETURN_SHIPPING_FEE", "type": "TAX",
"amount": { "currencyCode": "JPY", "amount": 3 } }
],
"unitPrice": { "currencyCode": "JPY", "amount": 990 },
"unitTax": { "currencyCode": "JPY", "amount": 99 },
"unitPriceIncludingTax": { "currencyCode": "JPY", "amount": 1089 },
"totalTaxAmount": { "currencyCode": "JPY", "amount": -93 },
"netTotal": { "currencyCode": "JPY", "amount": -1023 },
"reversalDetails": {
"originalInvoiceNumber": "JP-PDCON-2026-01-002",
"reversalDate": { "date": "2026-01-15T00:00:00Z" },
"reversalReason": "CUSTOMER_RETURN"
},
"buyingCustomer": { "name": "John Doe", "email": "[email protected]" },
"buyerGroup": { "name": "Engineering" },
"businessOrderInfo": {
"glCode": "GL-12345",
"costCenter": "CC-67890",
"projectCode": "PROJ-001"
},
"shippingAddress": {
"fullName": "John Doe",
"addressLine1": "123 Main St",
"addressLine2": "Apt 4B",
"city": "Tokyo",
"stateOrRegion": "Tokyo",
"postalCode": "100-0001",
"countryCode": "JP"
}
}
],
"nextPageToken": "eyJka2V5IjoiLi4uIiwiZXhwIjoxMjM0NTY3ODkwLCJuZXh0UmVzb3VyY2UiOiJMaW5lSXRlbSJ9"
}
Updated about 9 hours ago