Invoices API model

{
  "swagger": "2.0",
  "info": {
    "title": "Amazon Business API for Invoices",
    "version": "2026-02-01",
    "description": "The Amazon Business API for Invoices provides comprehensive capabilities for searching, retrieving, and viewing detailed invoice data. Key features include:\n\n- Invoice search by date range and region\n- Detailed invoice retrieval by invoice number\n- Support for multiple invoice types (STANDARD, CREDIT_MEMO)\n- Support for Periodic Consolidation)\n- Invoice status filtering (Issued, Closed)\n- Billing details breakdown (subtotals, shipping, discounts, taxes, amount due)\n- Tax breakdowns by issuer type (qualified and other issuers)\n- Pagination support for handling large datasets\n- Comprehensive error handling and status reporting\n\nThese capabilities facilitate in-depth analysis and reporting of invoice activities, helping businesses track billing, manage payments, and optimize their financial processes.\n\n**Current scope:**\n- Available regions: JP\n- Payment method: Business Credit Account (BCA)\n- Order types: Physical products and digital orders\n- Seller types: All sellers (with and without Japan Consumption Tax (JCT) registration number)",
    "contact": {
      "name": "AB Support",
      "url": "https://developer-docs.amazon.com/amazon-business/"
    },
    "license": {
      "name": "Amazon Software License",
      "url": "https://aws.amazon.com/asl/"
    }
  },
  "externalDocs": {
    "description": "Learn more about the Amazon Business API.",
    "url": "http://business.amazon.com"
  },
  "host": "api.business.amazon.com",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/ab-invoice/2026-02-01/invoices": {
      "get": {
        "description": "Returns a paginated list of invoices within the specified date range. This endpoint searches for invoices from all legal entities associated with the caller based on specified search criteria.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 0.5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation. For questions about your usage plan, reach out to your Amazon Business technical contact.",
        "operationId": "getInvoices",
        "parameters": [
          {
            "name": "invoiceIssueStartDate",
            "in": "query",
            "description": "The start of the invoice issue date range to search for invoices, in ISO 8601 format. Must not be more than 366 days before invoiceIssueEndDate.",
            "required": true,
            "type": "string",
            "format": "date-time"
          },
          {
            "name": "invoiceIssueEndDate",
            "in": "query",
            "description": "The end of the invoice issue date range to search for invoices, in ISO 8601 format. Must not be in the future and must not be more than 366 days after invoiceIssueStartDate.",
            "required": true,
            "type": "string",
            "format": "date-time"
          },
          {
            "description": "The region to filter invoices by. If provided, the API returns invoices in the specified region. Any invoices not in the specified region are not returned. For example, if the invoice is in JP and you search for MX, then the API returns an empty result. If not provided, the API returns invoices from all marketplaces in the region of the API request.",
            "enum": [
              "AU",
              "CA",
              "DE",
              "ES",
              "FR",
              "IN",
              "IT",
              "JP",
              "MX",
              "UK",
              "US"
            ],
            "x-docgen-enum-table-extension": [
              {
                "value": "AU",
                "description": "Australia"
              },
              {
                "value": "CA",
                "description": "Canada"
              },
              {
                "value": "DE",
                "description": "Germany"
              },
              {
                "value": "ES",
                "description": "Spain"
              },
              {
                "value": "FR",
                "description": "France"
              },
              {
                "value": "IN",
                "description": "India"
              },
              {
                "value": "IT",
                "description": "Italy"
              },
              {
                "value": "JP",
                "description": "Japan"
              },
              {
                "value": "MX",
                "description": "Mexico"
              },
              {
                "value": "UK",
                "description": "United Kingdom"
              },
              {
                "value": "US",
                "description": "United States of America"
              }
            ],
            "in": "query",
            "name": "region",
            "required": false,
            "type": "string"
          },
          {
            "name": "paymentMethodTypes",
            "in": "query",
            "description": "Filters the invoice results to a specified payment method type. The supported value is `BCA` (Business Credit Account). If you do not specify this parameter, the results include all invoices regardless of payment method.",
            "required": false,
            "type": "array",
            "items": {
              "type": "string"
            },
            "collectionFormat": "csv",
            "minItems": 1
          },
          {
            "name": "nextPageToken",
            "in": "query",
            "description": "A page token returned in the response to your previous request when the number of results exceed the page size. Must be used with the same query parameters as the original request. Changing parameters will result in an error. To get the next page of results, include nextPageToken as a parameter. There are no more pages to return when the response returns no nextPageToken.",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Invoices were successfully retrieved.",
            "schema": {
              "$ref": "#/definitions/GetInvoicesResponse"
            },
            "headers": {
              "x-amzn-RateLimit-Limit": {
                "type": "string",
                "description": "Your rate limit (requests per second) for this operation."
              },
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "x-amzn-api-sandbox": {
              "static": [
                {
                  "request": {
                    "parameters": {
                      "invoiceIssueStartDate": {
                        "value": "2024-10-08T00:40:56Z"
                      },
                      "invoiceIssueEndDate": {
                        "value": "2025-10-07T15:47:56Z"
                      },
                      "region": {
                        "value": "JP"
                      }
                    }
                  },
                  "response": {
                    "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="
                  }
                }
              ]
            },
            "x-amzn-api-launch-status": "PRIVATE_BETA"
          },
          "400": {
            "description": "Request has missing or invalid parameters and cannot be parsed.",
            "headers": {
              "x-amzn-RateLimit-Limit": {
                "type": "string",
                "description": "Your rate limit (requests per second) for this operation."
              },
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "x-amzn-api-sandbox": {
              "static": [
                {
                  "request": {
                    "parameters": {
                      "invoiceIssueEndDate": {
                        "value": "2025-10-07T15:47:56Z"
                      },
                      "region": {
                        "value": "JP"
                      }
                    }
                  },
                  "response": {
                    "errors": [
                      {
                        "code": "INVALID_REQUEST_PARAMETER",
                        "message": "The required parameter invoiceIssueStartDate is missing.",
                        "details": "Please provide the required parameter invoiceIssueStartDate in the request."
                      }
                    ]
                  }
                },
                {
                  "request": {
                    "parameters": {
                      "invoiceIssueStartDate": {
                        "value": "2025-10-08T00:40:56Z"
                      },
                      "invoiceIssueEndDate": {
                        "value": "2024-10-07T15:47:56Z"
                      },
                      "region": {
                        "value": "JP"
                      }
                    }
                  },
                  "response": {
                    "errors": [
                      {
                        "code": "INVALID_REQUEST_PARAMETER",
                        "message": "The invoiceIssueStartDate must be before or equal to invoiceIssueEndDate.",
                        "details": "Please ensure invoiceIssueStartDate is chronologically before invoiceIssueEndDate."
                      }
                    ]
                  }
                },
                {
                  "request": {
                    "parameters": {
                      "invoiceIssueStartDate": {
                        "value": "2024-01-01T00:00:00Z"
                      },
                      "invoiceIssueEndDate": {
                        "value": "2025-10-07T15:47:56Z"
                      },
                      "region": {
                        "value": "JP"
                      }
                    }
                  },
                  "response": {
                    "errors": [
                      {
                        "code": "INVALID_REQUEST_PARAMETER",
                        "message": "The date range exceeds the maximum allowed period of 366 days.",
                        "details": "Please ensure the date range between invoiceIssueStartDate and invoiceIssueEndDate does not exceed 366 days."
                      }
                    ]
                  }
                },
                {
                  "request": {
                    "parameters": {
                      "invoiceIssueStartDate": {
                        "value": "2024-10-08T00:40:56Z"
                      },
                      "invoiceIssueEndDate": {
                        "value": "2025-10-07T15:47:56Z"
                      },
                      "region": {
                        "value": "JP"
                      },
                      "nextPageToken": {
                        "value": "expiredToken123"
                      }
                    }
                  },
                  "response": {
                    "errors": [
                      {
                        "code": "INVALID_REQUEST_PARAMETER",
                        "message": "The pagination token has expired.",
                        "details": "Pagination tokens expire after 15 minutes. Please restart your search from the beginning."
                      }
                    ]
                  }
                }
              ]
            }
          },
          "403": {
            "description": "Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "404": {
            "description": "The resource specified does not exist.",
            "headers": {
              "x-amzn-RateLimit-Limit": {
                "type": "string",
                "description": "Your rate limit (requests per second) for this operation."
              },
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "413": {
            "description": "The request size exceeded the maximum accepted size.",
            "headers": {
              "x-amzn-RequestId": {
                "description": "Unique request reference identifier.",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "415": {
            "description": "The request payload is in an unsupported format.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "429": {
            "description": "The frequency of requests was greater than allowed.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "500": {
            "description": "An unexpected condition occurred that prevented the server from fulfilling the request.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "503": {
            "description": "Temporary overloading or maintenance of the server.",
            "headers": {
              "x-amzn-RequestId": {
                "description": "Unique request reference identifier.",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          }
        }
      }
    },
    "/ab-invoice/2026-02-01/invoices/{invoiceNumber}/detail": {
      "get": {
        "description": "Returns detailed information for a specific invoice identified by its invoice number.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 0.5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation. For questions about your usage plan, reach out to your Amazon Business technical contact.",
        "operationId": "getInvoiceDetailByInvoiceNumber",
        "parameters": [
          {
            "name": "invoiceNumber",
            "in": "path",
            "description": "The unique identifier for the invoice.",
            "required": true,
            "type": "string"
          },
          {
            "name": "region",
            "in": "query",
            "description": "The region where the invoice was issued.",
            "required": true,
            "type": "string",
            "enum": [
              "AU",
              "CA",
              "DE",
              "ES",
              "FR",
              "IN",
              "IT",
              "JP",
              "MX",
              "UK",
              "US"
            ],
            "x-docgen-enum-table-extension": [
              {
                "value": "AU",
                "description": "Australia"
              },
              {
                "value": "CA",
                "description": "Canada"
              },
              {
                "value": "DE",
                "description": "Germany"
              },
              {
                "value": "ES",
                "description": "Spain"
              },
              {
                "value": "FR",
                "description": "France"
              },
              {
                "value": "IN",
                "description": "India"
              },
              {
                "value": "IT",
                "description": "Italy"
              },
              {
                "value": "JP",
                "description": "Japan"
              },
              {
                "value": "MX",
                "description": "Mexico"
              },
              {
                "value": "UK",
                "description": "United Kingdom"
              },
              {
                "value": "US",
                "description": "United States of America"
              }
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice details were successfully retrieved.",
            "schema": {
              "$ref": "#/definitions/GetInvoiceDetailResponse"
            },
            "headers": {
              "x-amzn-RateLimit-Limit": {
                "type": "string",
                "description": "Your rate limit (requests per second) for this operation."
              },
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "x-amzn-api-sandbox": {
              "static": [
                {
                  "request": {
                    "parameters": {
                      "invoiceNumber": {
                        "value": "14XH-NW7L-7N1N"
                      },
                      "region": {
                        "value": "JP"
                      }
                    }
                  },
                  "response": {
                    "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.0
                      },
                      "artifacts": [
                        {
                          "artifactType": "BillingDetails",
                          "amountDetails": [
                            {
                              "type": "itemSubtotal",
                              "amount": {
                                "currencyCode": "JPY",
                                "amount": 10000.0
                              }
                            },
                            {
                              "type": "shippingAndHandling",
                              "amount": {
                                "currencyCode": "JPY",
                                "amount": 99.0
                              }
                            },
                            {
                              "type": "promosAndDiscounts",
                              "amount": {
                                "currencyCode": "JPY",
                                "amount": 0.0
                              }
                            },
                            {
                              "type": "refund",
                              "amount": {
                                "currencyCode": "JPY",
                                "amount": 0.0
                              }
                            },
                            {
                              "type": "giftWrapping",
                              "amount": {
                                "currencyCode": "JPY",
                                "amount": 0.0
                              }
                            },
                            {
                              "type": "salesTax",
                              "amount": {
                                "currencyCode": "JPY",
                                "amount": 1000.0
                              }
                            },
                            {
                              "type": "amountDue",
                              "amount": {
                                "currencyCode": "JPY",
                                "amount": 11099.0
                              }
                            }
                          ]
                        },
                        {
                          "artifactType": "PurchaseFromQualifiedIssuer",
                          "taxBreakdown": [
                            {
                              "taxRate": "0.1",
                              "inclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 2910.0
                              },
                              "exclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 2646.0
                              },
                              "taxAmount": {
                                "currencyCode": "JPY",
                                "amount": 264.0
                              }
                            },
                            {
                              "taxRate": "0.08",
                              "inclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 1800.0
                              },
                              "exclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 1000.0
                              },
                              "taxAmount": {
                                "currencyCode": "JPY",
                                "amount": 800.0
                              }
                            },
                            {
                              "taxRate": "0",
                              "inclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 0.0
                              },
                              "exclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 0.0
                              },
                              "taxAmount": {
                                "currencyCode": "JPY",
                                "amount": 0.0
                              }
                            }
                          ]
                        },
                        {
                          "artifactType": "PurchaseFromOtherIssuer",
                          "taxBreakdown": [
                            {
                              "taxRate": "0.1",
                              "inclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 2910.0
                              },
                              "exclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 2646.0
                              },
                              "taxAmount": {
                                "currencyCode": "JPY",
                                "amount": 2640.0
                              }
                            },
                            {
                              "taxRate": "0.08",
                              "inclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 1800.0
                              },
                              "exclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 1000.0
                              },
                              "taxAmount": {
                                "currencyCode": "JPY",
                                "amount": 800.0
                              }
                            },
                            {
                              "taxRate": "0",
                              "inclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 0.0
                              },
                              "exclusiveTotal": {
                                "currencyCode": "JPY",
                                "amount": 0.0
                              },
                              "taxAmount": {
                                "currencyCode": "JPY",
                                "amount": 0.0
                              }
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              ]
            },
            "x-amzn-api-launch-status": "PRIVATE_BETA"
          },
          "400": {
            "description": "Request has missing or invalid parameters and cannot be parsed.",
            "headers": {
              "x-amzn-RateLimit-Limit": {
                "type": "string",
                "description": "Your rate limit (requests per second) for this operation."
              },
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "x-amzn-api-sandbox": {
              "static": [
                {
                  "request": {
                    "parameters": {
                      "invoiceNumber": {
                        "value": ""
                      },
                      "region": {
                        "value": "JP"
                      }
                    }
                  },
                  "response": {
                    "errors": [
                      {
                        "code": "INVALID_REQUEST_PARAMETER",
                        "message": "The required parameter invoiceNumber is missing or invalid.",
                        "details": "Please provide a valid invoiceNumber in the request."
                      }
                    ]
                  }
                }
              ]
            }
          },
          "403": {
            "description": "Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "404": {
            "description": "The resource specified does not exist.",
            "headers": {
              "x-amzn-RateLimit-Limit": {
                "type": "string",
                "description": "Your rate limit (requests per second) for this operation."
              },
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "413": {
            "description": "The request size exceeded the maximum accepted size.",
            "headers": {
              "x-amzn-RequestId": {
                "description": "Unique request reference identifier.",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "415": {
            "description": "The request payload is in an unsupported format.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "429": {
            "description": "The frequency of requests was greater than allowed.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "500": {
            "description": "An unexpected condition occurred that prevented the server from fulfilling the request.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "503": {
            "description": "Temporary overloading or maintenance of the server.",
            "headers": {
              "x-amzn-RequestId": {
                "description": "Unique request reference identifier.",
                "type": "string"
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          }
        }
      }
    },
    "/ab-invoice/2026-02-01/invoices/{invoiceNumber}/lineItems": {
      "get": {
        "description": "Returns paginated line items for a given invoice number. Returns both invoice line items and reversal units (credit memos). Invoice line items are returned first, then reversal units, maintaining order across pages.\n\n**Usage Plan:**\n\n| Rate (requests per second) | Burst |\n| ---- | ---- |\n| 0.5 | 10 |\n\nThe `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation. For questions about your usage plan, reach out to your Amazon Business technical contact.",
        "operationId": "getInvoiceLineItemsByInvoiceNumber",
        "parameters": [
          {
            "name": "invoiceNumber",
            "in": "path",
            "description": "The invoice or credit memo ID number.",
            "required": true,
            "type": "string"
          },
          {
            "name": "region",
            "in": "query",
            "description": "The marketplace region identifier.",
            "required": true,
            "type": "string",
            "enum": [
              "AU",
              "CA",
              "DE",
              "ES",
              "FR",
              "IN",
              "IT",
              "JP",
              "MX",
              "UK",
              "US"
            ],
            "x-docgen-enum-table-extension": [
              {
                "value": "AU",
                "description": "Australia"
              },
              {
                "value": "CA",
                "description": "Canada"
              },
              {
                "value": "DE",
                "description": "Germany"
              },
              {
                "value": "ES",
                "description": "Spain"
              },
              {
                "value": "FR",
                "description": "France"
              },
              {
                "value": "IN",
                "description": "India"
              },
              {
                "value": "IT",
                "description": "Italy"
              },
              {
                "value": "JP",
                "description": "Japan"
              },
              {
                "value": "MX",
                "description": "Mexico"
              },
              {
                "value": "UK",
                "description": "United Kingdom"
              },
              {
                "value": "US",
                "description": "United States of America"
              }
            ]
          },
          {
            "name": "nextPageToken",
            "in": "query",
            "description": "A page token returned in the response to your previous request. Tokens expire after 15 minutes.",
            "required": false,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice line items were successfully retrieved.",
            "schema": {
              "$ref": "#/definitions/GetInvoiceLineItemsResponse"
            },
            "headers": {
              "x-amzn-RateLimit-Limit": {
                "type": "string",
                "description": "Your rate limit (requests per second) for this operation."
              },
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "x-amzn-api-sandbox": {
              "static": [
                {
                  "request": {
                    "parameters": {
                      "invoiceNumber": {
                        "value": "1PT9-NQ7H-T16W"
                      },
                      "region": {
                        "value": "JP"
                      }
                    }
                  },
                  "response": {
                    "lineItems": [
                      {
                        "invoiceNumber": "1PT9-NQ7H-T16W",
                        "transactionType": "CHARGE",
                        "orderMetadata": {
                          "orderId": "123-4567890-1234567",
                          "orderDate": {
                            "date": "2026-01-10T00:00:00Z"
                          }
                        },
                        "lineItemMetadata": {
                          "orderLineItemId": "12345678901234"
                        },
                        "shipmentMetadata": {
                          "shipmentDate": {
                            "date": "2026-01-12T00:00:00Z"
                          },
                          "shipmentId": "SHP123456789"
                        },
                        "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,
                        "charges": [
                          {
                            "category": "SUBTOTAL",
                            "type": "PRINCIPAL",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 1980.0
                            }
                          },
                          {
                            "category": "SUBTOTAL",
                            "type": "TAX",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 198.0
                            }
                          },
                          {
                            "category": "SHIPPING_AND_HANDLING",
                            "type": "PRINCIPAL",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 500.0
                            }
                          },
                          {
                            "category": "SHIPPING_AND_HANDLING",
                            "type": "TAX",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 50.0
                            }
                          },
                          {
                            "category": "DISCOUNT",
                            "type": "PRINCIPAL",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": -100.0
                            }
                          },
                          {
                            "category": "GIFT_WRAP",
                            "type": "PRINCIPAL",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 50.0
                            }
                          },
                          {
                            "category": "GIFT_WRAP",
                            "type": "TAX",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 5.0
                            }
                          },
                          {
                            "category": "OTHER_FEE",
                            "type": "PRINCIPAL",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 30.0
                            }
                          },
                          {
                            "category": "OTHER_FEE",
                            "type": "TAX",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 3.0
                            }
                          }
                        ],
                        "unitPrice": {
                          "currencyCode": "JPY",
                          "amount": 990.0
                        },
                        "unitTax": {
                          "currencyCode": "JPY",
                          "amount": 99.0
                        },
                        "unitPriceIncludingTax": {
                          "currencyCode": "JPY",
                          "amount": 1089.0
                        },
                        "totalTaxAmount": {
                          "currencyCode": "JPY",
                          "amount": 256.0
                        },
                        "netTotal": {
                          "currencyCode": "JPY",
                          "amount": 2716.0
                        },
                        "taxRate": "10.0",
                        "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": {
                          "shipmentDate": {
                            "date": "2026-01-12T00:00:00Z"
                          },
                          "shipmentId": "SHP123456789"
                        },
                        "productDetails": {
                          "asin": "B08GQ9M1NM",
                          "title": "Sample Product Name",
                          "unspsc": {
                            "code": "43211500"
                          }
                        },
                        "seller": {
                          "name": "Sample Seller",
                          "taxRegistrationNumber": "T0000000000000"
                        },
                        "taxInvoiceNumber": "123242342342",
                        "quantity": 1,
                        "charges": [
                          {
                            "category": "SUBTOTAL",
                            "type": "PRINCIPAL",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": -990.0
                            }
                          },
                          {
                            "category": "SUBTOTAL",
                            "type": "TAX",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": -99.0
                            }
                          },
                          {
                            "category": "RESTOCKING_FEE",
                            "type": "PRINCIPAL",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 30.0
                            }
                          },
                          {
                            "category": "RESTOCKING_FEE",
                            "type": "TAX",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 3.0
                            }
                          },
                          {
                            "category": "RETURN_SHIPPING_FEE",
                            "type": "PRINCIPAL",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 30.0
                            }
                          },
                          {
                            "category": "RETURN_SHIPPING_FEE",
                            "type": "TAX",
                            "amount": {
                              "currencyCode": "JPY",
                              "amount": 3.0
                            }
                          }
                        ],
                        "unitPrice": {
                          "currencyCode": "JPY",
                          "amount": 990.0
                        },
                        "unitTax": {
                          "currencyCode": "JPY",
                          "amount": 99.0
                        },
                        "unitPriceIncludingTax": {
                          "currencyCode": "JPY",
                          "amount": 1089.0
                        },
                        "totalTaxAmount": {
                          "currencyCode": "JPY",
                          "amount": -93.0
                        },
                        "netTotal": {
                          "currencyCode": "JPY",
                          "amount": -1023.0
                        },
                        "taxRate": "10.0",
                        "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"
                  }
                }
              ]
            }
          },
          "400": {
            "description": "Request has missing or invalid parameters and cannot be parsed.",
            "headers": {
              "x-amzn-RateLimit-Limit": {
                "type": "string",
                "description": "Your rate limit (requests per second) for this operation."
              },
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "x-amzn-api-sandbox": {
              "static": [
                {
                  "request": {
                    "parameters": {
                      "invoiceNumber": {
                        "value": ""
                      },
                      "region": {
                        "value": "JP"
                      }
                    }
                  },
                  "response": {
                    "errors": [
                      {
                        "code": "INVALID_INVOICE_NUMBER",
                        "message": "Invoice number must not be empty.",
                        "details": "Please provide a valid invoice number."
                      }
                    ]
                  }
                },
                {
                  "request": {
                    "parameters": {
                      "invoiceNumber": {
                        "value": "1PT9-NQ7H-T16W"
                      },
                      "region": {
                        "value": "INVALID"
                      }
                    }
                  },
                  "response": {
                    "errors": [
                      {
                        "code": "INVALID_REGION",
                        "message": "Invalid or missing region.",
                        "details": "Region must be one of: AU, CA, DE, ES, FR, IN, IT, JP, MX, UK, US."
                      }
                    ]
                  }
                },
                {
                  "request": {
                    "parameters": {
                      "invoiceNumber": {
                        "value": "1PT9-NQ7H-T16W"
                      },
                      "region": {
                        "value": "JP"
                      },
                      "nextPageToken": {
                        "value": "expiredToken123"
                      }
                    }
                  },
                  "response": {
                    "errors": [
                      {
                        "code": "INVALID_PAGE_TOKEN",
                        "message": "The pagination token has expired or is invalid.",
                        "details": "Pagination tokens expire after 15 minutes. To continue, send a new request without a nextPageToken value."
                      }
                    ]
                  }
                }
              ]
            }
          },
          "401": {
            "description": "The request's authorization is missing or invalid.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "403": {
            "description": "Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "404": {
            "description": "The resource specified does not exist.",
            "headers": {
              "x-amzn-RateLimit-Limit": {
                "type": "string",
                "description": "Your rate limit (requests per second) for this operation."
              },
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "413": {
            "description": "The request size exceeded the maximum accepted size.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "415": {
            "description": "The request payload is in an unsupported format.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "429": {
            "description": "The frequency of requests was greater than allowed.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "500": {
            "description": "An unexpected condition occurred that prevented the server from fulfilling the request.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          },
          "503": {
            "description": "Temporary overloading or maintenance of the server.",
            "headers": {
              "x-amzn-RequestId": {
                "type": "string",
                "description": "Unique request reference identifier."
              }
            },
            "schema": {
              "$ref": "#/definitions/ErrorList"
            }
          }
        }
      }
    }
  },
  "definitions": {
    "GetInvoicesResponse": {
      "type": "object",
      "description": "The response schema for the getInvoices operation. Returns up to 100 invoices per page.",
      "properties": {
        "invoices": {
          "type": "array",
          "description": "The list of invoices matching the search criteria. Maximum 100 invoices per page.",
          "items": {
            "$ref": "#/definitions/Invoice"
          }
        },
        "nextPageToken": {
          "type": "string",
          "description": "A token to retrieve the next page of results."
        }
      },
      "required": [
        "invoices"
      ]
    },
    "InvoiceMetadata": {
      "type": "object",
      "description": "Common invoice identification fields shared across invoice operations.",
      "properties": {
        "invoiceNumber": {
          "type": "string",
          "description": "The unique identifier for the invoice."
        },
        "issueDate": {
          "type": "string",
          "format": "date-time",
          "description": "The date when the invoice was issued, in ISO 8601 format with UTC timezone. The format is YYYY-MM-DDThh:mm:ssZ. For example, 2025-01-15T10:30:00Z represents January 15, 2025 at 10:30 AM UTC."
        },
        "type": {
          "type": "string",
          "description": "The type of invoice.\n\n**Possible values:**\n- `STANDARD` : Standard invoice for purchases.\n- `CREDIT_MEMO` : Credit memo for returns."
        },
        "region": {
          "type": "string",
          "description": "The region where the invoice was issued.\n\n**Possible values:**\n- `DE` : Germany\n- `FR` : France\n- `UK` : United Kingdom\n- `IT` : Italy\n- `ES` : Spain\n- `IN` : India\n- `US` : United States of America\n- `CA` : Canada\n- `MX` : Mexico\n- `JP` : Japan\n- `AU` : Australia"
        }
      },
      "required": [
        "invoiceNumber",
        "issueDate",
        "type",
        "region"
      ]
    },
    "Invoice": {
      "type": "object",
      "description": "Key attributes of an invoice.",
      "properties": {
        "invoiceMetadata": {
          "description": "Common invoice identification fields.",
          "$ref": "#/definitions/InvoiceMetadata"
        },
        "consolidationType": {
          "type": "string",
          "description": "The type of invoice consolidation.\n\n**Possible values:**\n- `PERIODIC` : Invoices generated on a regular schedule (e.g., monthly).\n- `PURCHASE` : Invoices consolidated by purchase order.\n- `SHIPMENT` : Invoices consolidated by shipment."
        },
        "status": {
          "type": "string",
          "description": "The current status of the invoice.\n\n**Possible values:**\n- `Closed` : The invoice has been paid and closed.\n- `Past Due` : The invoice payment is overdue.\n- `Issued` : The invoice has been issued and is awaiting payment.\n- `Payment Processing` : The invoice payment is currently being processed."
        },
        "dueDate": {
          "description": "The date by which payment is due.",
          "$ref": "#/definitions/DateTime"
        }
      },
      "required": [
        "invoiceMetadata"
      ]
    },
    "GetInvoiceDetailResponse": {
      "type": "object",
      "description": "The response schema for the getInvoiceDetailByInvoiceNumber operation.",
      "properties": {
        "invoiceDetail": {
          "description": "The detailed invoice information.",
          "$ref": "#/definitions/InvoiceDetail"
        }
      },
      "required": [
        "invoiceDetail"
      ]
    },
    "InvoiceDetail": {
      "type": "object",
      "description": "Detailed information about an invoice.",
      "properties": {
        "invoiceMetadata": {
          "description": "Common invoice identification fields.",
          "$ref": "#/definitions/InvoiceMetadata"
        },
        "associatedInvoiceNumber": {
          "type": "string",
          "description": "The invoice number of the associated invoice. For a CREDIT_MEMO, this is the invoice number of the original STANDARD invoice. Null if not applicable."
        },
        "period": {
          "description": "The billing period covered by this invoice.",
          "$ref": "#/definitions/InvoicePeriod"
        },
        "issuer": {
          "description": "The entity that issued the invoice.",
          "$ref": "#/definitions/InvoiceIssuer"
        },
        "billToAddress": {
          "description": "The billing address for this invoice.",
          "$ref": "#/definitions/BillToAddress"
        },
        "customer": {
          "description": "The customer associated with this invoice.",
          "$ref": "#/definitions/Customer"
        },
        "dueDate": {
          "description": "The date by which payment is due.",
          "$ref": "#/definitions/DateTime"
        },
        "paymentMethod": {
          "type": "string",
          "description": "The payment method used for this invoice. For example, `Business Credit Account`."
        },
        "totalAmount": {
          "description": "The total amount due for this invoice.",
          "$ref": "#/definitions/Money"
        },
        "artifacts": {
          "type": "array",
          "description": "Additional invoice artifacts providing billing details and tax breakdowns.",
          "items": {
            "$ref": "#/definitions/InvoiceArtifact"
          }
        }
      },
      "required": [
        "invoiceMetadata"
      ]
    },
    "InvoicePeriod": {
      "type": "object",
      "description": "The billing period covered by the invoice.",
      "properties": {
        "startDate": {
          "type": "string",
          "format": "date-time",
          "description": "The start date of the invoice billing period, in ISO 8601 format with UTC timezone. The format is YYYY-MM-DDThh:mm:ssZ."
        },
        "endDate": {
          "type": "string",
          "format": "date-time",
          "description": "The end date of the invoice billing period, in ISO 8601 format with UTC timezone. The format is YYYY-MM-DDThh:mm:ssZ."
        }
      },
      "required": [
        "startDate",
        "endDate"
      ]
    },
    "InvoiceIssuer": {
      "type": "object",
      "description": "The entity that issued the invoice.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The legal name of the invoice issuer."
        },
        "registrationNumber": {
          "type": "string",
          "description": "The tax registration number of the invoice issuer (e.g., JCT registration number for Japan)."
        }
      },
      "required": [
        "name"
      ]
    },
    "BillToAddress": {
      "type": "object",
      "description": "The billing address associated with the invoice.",
      "properties": {
        "fullName": {
          "type": "string",
          "description": "The full name of the billing contact.",
          "minLength": 1
        },
        "phoneNumber": {
          "type": "string",
          "description": "The phone number of the billing contact.",
          "minLength": 1
        },
        "addressLine1": {
          "type": "string",
          "description": "The first line of the billing address.",
          "minLength": 1
        },
        "addressLine2": {
          "type": "string",
          "description": "The second line of the billing address.",
          "maxLength": 60
        },
        "city": {
          "type": "string",
          "description": "The city of the billing address.",
          "minLength": 1
        },
        "stateOrRegion": {
          "type": "string",
          "description": "The state or region of the billing address."
        },
        "postalCode": {
          "type": "string",
          "description": "The postal code of the billing address.",
          "minLength": 1
        },
        "countryCode": {
          "type": "string",
          "description": "The two-letter ISO 3166-1 alpha-2 country code of the billing address.",
          "pattern": "^[A-Z]{2}$"
        }
      },
      "required": [
        "addressLine1",
        "countryCode"
      ]
    },
    "Customer": {
      "type": "object",
      "description": "The customer associated with the invoice.",
      "properties": {
        "legalEntityId": {
          "type": "string",
          "description": "The legal entity identifier for the customer."
        },
        "legalEntityName": {
          "type": "string",
          "description": "The legal entity name of the customer."
        }
      },
      "required": [
        "legalEntityId"
      ]
    },
    "DateTime": {
      "type": "object",
      "description": "The date format based on ISO 8601.",
      "required": [
        "date"
      ],
      "properties": {
        "date": {
          "description": "The date and time in ISO 8601 format with UTC timezone. The format is YYYY-MM-DDThh:mm:ssZ. For example, 2025-01-15T10:30:00Z represents January 15, 2025 at 10:30 AM UTC.",
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "Money": {
      "type": "object",
      "description": "Representation of a monetary value.",
      "properties": {
        "currencyCode": {
          "type": "string",
          "description": "The currency code in ISO 4217 format.",
          "pattern": "^[A-Z]{3}$"
        },
        "amount": {
          "type": "number",
          "description": "The monetary amount."
        }
      },
      "required": [
        "currencyCode",
        "amount"
      ]
    },
    "InvoiceArtifact": {
      "type": "object",
      "description": "The base type for an invoice artifact. The artifactType field identifies the specific subtype.\n\n**Possible artifactType values:**\n- `BillingDetails` : A breakdown of billing charges including subtotals, shipping, discounts, taxes, and amount due.\n- `PurchaseFromQualifiedIssuer` : Tax breakdown for purchases from sellers with a JCT registration number.\n- `PurchaseFromOtherIssuer` : Tax breakdown for purchases from sellers without a JCT registration number.",
      "required": [
        "artifactType"
      ],
      "properties": {
        "artifactType": {
          "type": "string",
          "description": "The schema name for a subtype."
        }
      },
      "discriminator": "artifactType"
    },
    "BillingDetails": {
      "type": "object",
      "description": "A breakdown of billing charges including subtotals, shipping, discounts, taxes, and amount due. This artifact appears in the artifacts list.",
      "allOf": [
        {
          "$ref": "#/definitions/InvoiceArtifact"
        },
        {
          "properties": {
            "amountDetails": {
              "type": "array",
              "description": "The list of billing charge line items.",
              "items": {
                "$ref": "#/definitions/BillingDetail"
              }
            }
          },
          "required": [
            "amountDetails"
          ]
        }
      ]
    },
    "PurchaseFromQualifiedIssuer": {
      "type": "object",
      "description": "Tax breakdown for purchases from sellers with a JCT registration number. This artifact appears in the artifacts list.",
      "allOf": [
        {
          "$ref": "#/definitions/InvoiceArtifact"
        },
        {
          "properties": {
            "taxBreakdown": {
              "type": "array",
              "description": "The tax breakdown by tax rate for purchases from sellers with a JCT registration number.",
              "items": {
                "$ref": "#/definitions/TaxBreakdown"
              }
            }
          },
          "required": [
            "taxBreakdown"
          ]
        }
      ]
    },
    "PurchaseFromOtherIssuer": {
      "type": "object",
      "description": "Tax breakdown for purchases from sellers without a JCT registration number. This artifact appears in the artifacts list.",
      "allOf": [
        {
          "$ref": "#/definitions/InvoiceArtifact"
        },
        {
          "properties": {
            "taxBreakdown": {
              "type": "array",
              "description": "The tax breakdown by tax rate for purchases from sellers without a JCT registration number.",
              "items": {
                "$ref": "#/definitions/TaxBreakdown"
              }
            }
          },
          "required": [
            "taxBreakdown"
          ]
        }
      ]
    },
    "BillingDetail": {
      "type": "object",
      "description": "A single billing charge line item.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of billing charge.\n\n**Possible values:**\n- `itemSubtotal` : The subtotal for all items before shipping, discounts, and taxes.\n- `shippingAndHandling` : The shipping and handling charges.\n- `promosAndDiscounts` : The total promotions and discounts applied.\n- `refund` : The total refund amount.\n- `giftWrapping` : The gift wrapping charges.\n- `salesTax` : The total sales tax charged.\n- `amountDue` : The final total amount due."
        },
        "amount": {
          "description": "The monetary amount for this billing charge.",
          "$ref": "#/definitions/Money"
        }
      },
      "required": [
        "type",
        "amount"
      ]
    },
    "TaxBreakdown": {
      "type": "object",
      "description": "A tax breakdown entry for a specific tax rate.",
      "properties": {
        "taxRate": {
          "type": "string",
          "description": "The tax rate as a decimal string (e.g., '0.1' for 10%, '0.08' for 8%, and '0' for tax-exempt)."
        },
        "inclusiveTotal": {
          "description": "The total amount including tax at this tax rate.",
          "$ref": "#/definitions/Money"
        },
        "exclusiveTotal": {
          "description": "The total amount excluding tax at this tax rate.",
          "$ref": "#/definitions/Money"
        },
        "taxAmount": {
          "description": "The tax amount at this tax rate.",
          "$ref": "#/definitions/Money"
        }
      },
      "required": [
        "taxRate",
        "inclusiveTotal",
        "exclusiveTotal",
        "taxAmount"
      ]
    },
    "ErrorList": {
      "type": "object",
      "description": "A list of error responses returned when a request is unsuccessful.",
      "properties": {
        "errors": {
          "type": "array",
          "description": "A list of errors.",
          "items": {
            "$ref": "#/definitions/Error"
          }
        }
      },
      "required": [
        "errors"
      ]
    },
    "Error": {
      "type": "object",
      "description": "Error response returned when the request is unsuccessful.",
      "properties": {
        "code": {
          "type": "string",
          "description": "An error code that identifies the type of error that occurred."
        },
        "message": {
          "type": "string",
          "description": "A message that describes the error condition."
        },
        "details": {
          "type": "string",
          "description": "Additional details that can help the caller understand or fix the issue."
        }
      },
      "required": [
        "code",
        "message"
      ]
    },
    "GetInvoiceLineItemsResponse": {
      "type": "object",
      "description": "The response schema for the getInvoiceLineItemsByInvoiceNumber operation. Returns up to 35 line items per page.",
      "properties": {
        "lineItems": {
          "type": "array",
          "description": "List of invoice line items and reversal units. Maximum 35 items per page.",
          "items": {
            "$ref": "#/definitions/InvoiceLineItem"
          }
        },
        "nextPageToken": {
          "type": "string",
          "description": "A token to retrieve the next page of results. Null if this is the last page."
        }
      },
      "required": [
        "lineItems"
      ]
    },
    "InvoiceLineItem": {
      "type": "object",
      "description": "A line item or reversal unit within an invoice.",
      "properties": {
        "invoiceNumber": {
          "type": "string",
          "description": "The invoice or credit memo number for which line items were requested."
        },
        "transactionType": {
          "type": "string",
          "description": "The transaction type.\n\n**Possible values:**\n- `CHARGE` : Standard invoice line item.\n- `REFUND` : Credit memo / reversal unit."
        },
        "orderMetadata": {
          "$ref": "#/definitions/OrderMetadata",
          "description": "Metadata about an order including order ID and order date."
        },
        "lineItemMetadata": {
          "$ref": "#/definitions/LineItemMetadata",
          "description": "Metadata specific to this line item."
        },
        "shipmentMetadata": {
          "$ref": "#/definitions/ShipmentMetadata",
          "description": "Metadata about a shipment including shipment ID and shipment date."
        },
        "purchaseOrderDetails": {
          "$ref": "#/definitions/PurchaseOrderDetails",
          "description": "Purchase order information for this line item."
        },
        "productDetails": {
          "$ref": "#/definitions/ProductDetails",
          "description": "Details about the product in this line item."
        },
        "seller": {
          "$ref": "#/definitions/Seller",
          "description": "Information about the seller of this line item."
        },
        "taxInvoiceNumber": {
          "type": "string",
          "description": "The tax qualified invoice number for this line item."
        },
        "quantity": {
          "type": "integer",
          "description": "The quantity of items.",
          "minimum": 0
        },
        "taxRate": {
          "type": "string",
          "description": "The tax rate applied to this line item."
        },
        "charges": {
          "type": "array",
          "description": "List of charges associated with this line item.",
          "items": {
            "$ref": "#/definitions/Charge"
          }
        },
        "unitPrice": {
          "$ref": "#/definitions/Money",
          "description": "The unit price for this line item, excluding tax."
        },
        "unitTax": {
          "$ref": "#/definitions/Money",
          "description": "The tax amount per unit for this line item."
        },
        "unitPriceIncludingTax": {
          "$ref": "#/definitions/Money",
          "description": "The unit price for this line item, including tax."
        },
        "totalTaxAmount": {
          "$ref": "#/definitions/Money",
          "description": "Total tax amount for this line item."
        },
        "netTotal": {
          "$ref": "#/definitions/Money",
          "description": "The total of all charges for this line item, including tax."
        },
        "businessOrderInfo": {
          "type": "object",
          "description": "Additional business-specific information about the order.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "shippingAddress": {
          "$ref": "#/definitions/ShippingAddress",
          "description": "The shipping address for the shipment."
        },
        "reversalDetails": {
          "$ref": "#/definitions/ReversalDetails",
          "description": "Reversal details for credit memo line items. Null for invoice line items."
        },
        "buyingCustomer": {
          "$ref": "#/definitions/BuyingCustomer",
          "description": "The customer who placed the order."
        },
        "buyerGroup": {
          "$ref": "#/definitions/BuyerGroup",
          "description": "The buyer group associated with the order."
        }
      },
      "required": [
        "invoiceNumber",
        "transactionType",
        "orderMetadata",
        "productDetails",
        "seller",
        "quantity",
        "charges",
        "unitPrice",
        "unitTax",
        "netTotal"
      ]
    },
    "OrderMetadata": {
      "type": "object",
      "description": "Metadata about an order including order ID and order date.",
      "properties": {
        "orderId": {
          "type": "string",
          "description": "The unique identifier for the order."
        },
        "orderDate": {
          "$ref": "#/definitions/DateTime",
          "description": "The date when the order was placed."
        }
      },
      "required": [
        "orderId",
        "orderDate"
      ]
    },
    "LineItemMetadata": {
      "type": "object",
      "description": "Metadata specific to a line item.",
      "properties": {
        "orderLineItemId": {
          "type": "string",
          "description": "The unique identifier assigned to this specific line item in the order."
        }
      },
      "required": [
        "orderLineItemId"
      ]
    },
    "ShipmentMetadata": {
      "type": "object",
      "description": "Metadata about a shipment including shipment ID and shipment date.",
      "properties": {
        "shipmentId": {
          "type": "string",
          "description": "The unique identifier for the shipment."
        },
        "shipmentDate": {
          "$ref": "#/definitions/DateTime",
          "description": "The date when the shipment was made."
        }
      },
      "required": [
        "shipmentId",
        "shipmentDate"
      ]
    },
    "PurchaseOrderDetails": {
      "type": "object",
      "description": "Purchase order information for a line item.",
      "properties": {
        "purchaseOrderNumber": {
          "type": "string",
          "description": "The purchase order number associated with this line item."
        },
        "purchaseOrderLineItemNumber": {
          "type": "string",
          "description": "The reference number that identifies this line item on the purchase order."
        }
      },
      "required": [
        "purchaseOrderNumber"
      ]
    },
    "ProductDetails": {
      "type": "object",
      "description": "Information about a product.",
      "properties": {
        "asin": {
          "type": "string",
          "description": "The Amazon Standard Identification Number (ASIN) of the product."
        },
        "title": {
          "type": "string",
          "description": "The title of the product."
        },
        "unspsc": {
          "$ref": "#/definitions/Unspsc",
          "description": "The United Nations Standard Products and Services Code (UNSPSC) for the product."
        }
      },
      "required": [
        "asin",
        "title"
      ]
    },
    "Seller": {
      "type": "object",
      "description": "Information about the seller of a line item.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the seller."
        },
        "taxRegistrationNumber": {
          "type": "string",
          "description": "The seller's tax registration number (e.g., JCT qualified invoice issuer registration number)."
        }
      },
      "required": [
        "name"
      ]
    },
    "Charge": {
      "type": "object",
      "description": "A charge associated with a line item.",
      "properties": {
        "category": {
          "type": "string",
          "description": "The category of charge.\n\n**Possible values:**\n- `SUBTOTAL` : Subtotal charge.\n- `SHIPPING_AND_HANDLING` : Shipping and handling charge.\n- `PROMOTION` : Promotional discount.\n- `GIFT_WRAP` : Gift wrap charge.\n- `DISCOUNT` : Discount applied.\n- `OTHER_FEE` : Other fee.\n- `RESTOCKING_FEE` : Restocking fee (refund reduced due to item return reason).\n- `RETURN_SHIPPING_FEE` : Return shipping fee."
        },
        "type": {
          "type": "string",
          "description": "The type of the charge amount.\n\n**Possible values:**\n- `PRINCIPAL` : The principal amount.\n- `TAX` : The tax amount."
        },
        "amount": {
          "$ref": "#/definitions/Money",
          "description": "The monetary amount for this charge."
        }
      },
      "required": [
        "category",
        "type",
        "amount"
      ]
    },
    "ShippingAddress": {
      "type": "object",
      "description": "A detailed shipping address with recipient information.",
      "properties": {
        "fullName": {
          "type": "string",
          "description": "The full name of the recipient.",
          "minLength": 1
        },
        "addressLine1": {
          "type": "string",
          "description": "The primary address line.",
          "minLength": 1
        },
        "addressLine2": {
          "type": "string",
          "description": "The secondary address line.",
          "maxLength": 60
        },
        "city": {
          "type": "string",
          "description": "The city name.",
          "minLength": 1
        },
        "stateOrRegion": {
          "type": "string",
          "description": "The state or region. Mandatory for addresses in the US."
        },
        "postalCode": {
          "type": "string",
          "description": "The postal code.",
          "minLength": 1
        },
        "countryCode": {
          "type": "string",
          "description": "The country code in ISO 3166-1 alpha-2 format.",
          "pattern": "^[A-Z]{2}$"
        }
      },
      "required": [
        "fullName",
        "addressLine1",
        "city",
        "postalCode",
        "countryCode"
      ]
    },
    "Unspsc": {
      "type": "object",
      "description": "United Nations Standard Products and Services Code (UNSPSC).",
      "properties": {
        "code": {
          "type": "string",
          "description": "The UNSPSC code.",
          "pattern": "^[0-9]{8}$"
        }
      },
      "required": [
        "code"
      ]
    },
    "ReversalDetails": {
      "type": "object",
      "description": "Details about a reversal for credit memo line items.",
      "properties": {
        "originalInvoiceNumber": {
          "type": "string",
          "description": "The invoice number of the original invoice that this credit memo reverses."
        },
        "reversalDate": {
          "$ref": "#/definitions/DateTime",
          "description": "The date of the reversal."
        },
        "reversalReason": {
          "type": "string",
          "description": "The reason for the reversal."
        }
      },
      "required": [
        "originalInvoiceNumber",
        "reversalDate",
        "reversalReason"
      ]
    },
    "BuyingCustomer": {
      "type": "object",
      "description": "The customer who placed the order.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the customer."
        },
        "email": {
          "type": "string",
          "description": "The email address of the customer."
        }
      },
      "required": [
        "name",
        "email"
      ]
    },
    "BuyerGroup": {
      "type": "object",
      "description": "The buyer group associated with the order.",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the buyer group."
        }
      },
      "required": [
        "name"
      ]
    }
  },
  "x-amzn-api-launch-status": "PRIVATE_BETA"
}



Did this page help you?