{ "swagger": "2.0", "info": { "description": "Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.", "version": "2024-06-19", "title": "The Selling Partner API for Invoices.", "contact": { "name": "Selling Partner API Developer Support", "url": "https://sellercentral.amazon.com/gp/mws/contactus.html" }, "license": { "name": "Apache License 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0" } }, "host": "sellingpartnerapi-na.amazon.com", "schemes": [ "https" ], "paths": { "/tax/invoices/2024-06-19/attributes": { "get": { "x-amzn-api-internal": "INTERNAL_AND_EXTERNAL", "tags": [ "invoices" ], "description": "Returns marketplace-dependent schemas and their respective set of possible values.", "operationId": "getInvoicesAttributes", "produces": [ "application/json" ], "parameters": [ { "description": "The marketplace identifier.", "type": "string", "name": "marketplaceId", "in": "query", "required": true }, { "description": "The Warehouse code included in the invoice issued on behalf of the vendor. Check the warehouse code under your WarehouseSettings in VendorCentral.", "type": "string", "name": "warehouseCode", "in": "query" } ], "responses": { "200": { "description": "Success.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/GetInvoicesAttributesResponse" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "marketplaceId": { "value": "A2Q3Y263D00KWC" } } }, "response": { "invoicesAttributes": { "invoiceStatusOptions": [ { "description": "The government authorized the invoice.", "value": "AUTHORIZED" }, { "description": "The government rejected the invoice.", "value": "REJECTED" }, { "description": "The invoice is canceled.", "value": "CANCELED" } ], "invoiceTypeOptions": [], "transactionIdentifierNameOptions": [], "transactionTypeOptions": [] } } }, { "request": { "parameters": { "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "warehouseCode": { "value": "ABCD" } } }, "response": { "invoicesAttributes": { "invoiceStatusOptions": [ { "description": "The government authorized the invoice.", "value": "AUTHORIZED" }, { "description": "The government rejected the invoice.", "value": "REJECTED" }, { "description": "The invoice is canceled.", "value": "CANCELED" } ], "invoiceTypeOptions": [], "transactionIdentifierNameOptions": [], "transactionTypeOptions": [] } } } ] } }, "400": { "description": "Request has missing or invalid parameters and cannot be parsed.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": {} }, "response": { "errors": [ { "code": "400", "details": "Missing required parameter: 'marketplaceId'", "message": "Invalid Request." } ] } } ] } }, "401": { "description": "A list of error responses returned when a request is unsuccessful.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "404": { "description": "The resource specified does not exist.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "429": { "description": "The frequency of requests was greater than allowed.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "500": { "description": "An unexpected condition occurred that prevented the server from fulfilling the request.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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" } } } } }, "/tax/invoices/2024-06-19/documents/{invoicesDocumentId}": { "get": { "x-amzn-api-internal": "INTERNAL_AND_EXTERNAL", "tags": [ "invoices" ], "description": "Returns the invoice document's ID and URL. Use the URL to download the ZIP file, which contains the invoices from the corresponding `createInvoicesExport` request.", "operationId": "getInvoicesDocument", "produces": [ "application/json" ], "parameters": [ { "description": "The export document identifier.", "type": "string", "name": "invoicesDocumentId", "in": "path", "required": true }, { "description": "The Warehouse code included in the invoice issued on behalf of the vendor. Check the warehouse code under your WarehouseSettings in VendorCentral.", "type": "string", "name": "warehouseCode", "in": "query" } ], "responses": { "200": { "description": "Success.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/GetInvoicesDocumentResponse" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "invoicesDocumentId": { "value": "18c598f5-75db-4c1a-bd3e-4c64b36781c5" } } }, "response": { "invoicesDocument": { "invoicesDocumentId": "18c598f5-75db-4c1a-bd3e-4c64b36781c5", "invoicesDocumentUrl": "https://invoicesdocumentbucket.s3.eu-east-1.amazonaws.com/18c598f5-75db-4c1a-bd3e-4c64b36781c5.xml?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=&X-Amz-Date=20240710T171315Z&X-Amz-Expires=300&X-Amz-Signature=&X-Amz-SignedHeaders=host" } } }, { "request": { "parameters": { "invoicesDocumentId": { "value": "18c598f5-75db-4c1a-bd3e-4c64b36781c5" }, "warehouseCode": { "value": "ABCD" } } }, "response": { "invoicesDocument": { "invoicesDocumentId": "18c598f5-75db-4c1a-bd3e-4c64b36781c5", "invoicesDocumentUrl": "https://invoicesdocumentbucket.s3.eu-east-1.amazonaws.com/18c598f5-75db-4c1a-bd3e-4c64b36781c5.xml?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=&X-Amz-Date=20240710T171315Z&X-Amz-Expires=300&X-Amz-Signature=&X-Amz-SignedHeaders=host" } } } ] } }, "400": { "description": "Request has missing or invalid parameters and cannot be parsed.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": {} }, "response": { "errors": [ { "code": "400", "details": "Missing required parameter 'invoiceId'", "message": "Invalid Request." } ] } } ] } }, "401": { "description": "A list of error responses returned when a request is unsuccessful.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "404": { "description": "The resource specified does not exist.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "429": { "description": "The frequency of requests was greater than allowed.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "500": { "description": "An unexpected condition occurred that prevented the server from fulfilling the request.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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" } } } } }, "/tax/invoices/2024-06-19/exports": { "post": { "x-amzn-api-internal": "INTERNAL_AND_EXTERNAL", "tags": [ "invoices" ], "description": "Creates an invoice export request.", "operationId": "createInvoicesExport", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "description": "Information required to create the export request.", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ExportInvoicesRequest" } } ], "responses": { "202": { "description": "Success.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ExportInvoicesResponse" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "body": { "value": { "dateEnd": "2024-07-30T23:59:59", "dateStart": "2024-07-01T00:00:00", "externalInvoiceId": "1283743", "fileFormat": "XML", "invoiceType": "SYMBOLIC_RETURN", "marketplaceId": "A2Q3Y263D00KWC", "series": "32", "statuses": [ "AUTHORIZED" ], "transactionIdentifier": { "name": "BUSINESS_TRANSACTION_ID", "id": "94cd4e1a-5cc5-486d-b592-045a95a168e1" }, "transactionType": "CUSTOMER_SALES" } } } }, "response": { "exportId": "4bdd8293-0cd7-4208-bed5-78b2c6ecefef" } } ] } }, "400": { "description": "Request has missing or invalid parameters and cannot be parsed.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": {} }, "response": { "errors": [ { "code": "400", "details": "Missing required attribute(s): 'marketplaceId'.", "message": "Request has missing or invalid parameters and cannot be parsed." } ] } } ] } }, "401": { "description": "A list of error responses returned when a request is unsuccessful.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "404": { "description": "The resource specified does not exist.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "429": { "description": "The frequency of requests was greater than allowed.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "500": { "description": "An unexpected condition occurred that prevented the server from fulfilling the request.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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" } } } }, "get": { "x-amzn-api-internal": "INTERNAL_AND_EXTERNAL", "tags": [ "invoices" ], "description": "Returns invoice exports details for exports that match the filters that you specify.", "operationId": "getInvoicesExports", "produces": [ "application/json" ], "parameters": [ { "description": "The returned exports match the specified marketplace.", "type": "string", "name": "marketplaceId", "in": "query", "required": true }, { "description": "The earliest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 30 days ago.", "type": "string", "name": "dateStart", "in": "query", "format": "date-time" }, { "description": "The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.", "type": "string", "name": "nextToken", "in": "query" }, { "description": "The maximum number of invoices to return in a single call.\n\nMinimum: 1\n\nMaximum: 100", "type": "integer", "name": "pageSize", "in": "query" }, { "description": "The latest export creation date and time for exports that you want to include in the response. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default value is the time of the request.", "type": "string", "name": "dateEnd", "in": "query", "format": "date-time" }, { "description": "Return exports matching the status specified. ", "type": "string", "name": "status", "in": "query", "enum": [ "REQUESTED", "PROCESSING", "DONE", "ERROR" ], "x-docgen-enum-table-extension": [ { "description": "The export request was created, but has not started yet.", "value": "REQUESTED" }, { "description": "The export request is being processed", "value": "PROCESSING" }, { "description": "The export request is finished with success. Use the document IDs to download the output documents.", "value": "DONE" }, { "description": "The export request resulted in an error. Check the `errorMessage` attribute for more details.", "value": "ERROR" } ] }, { "description": "The Warehouse code included in the invoice issued on behalf of the vendor. Check the warehouse code under your WarehouseSettings in VendorCentral.", "type": "string", "name": "warehouseCode", "in": "query" } ], "responses": { "200": { "description": "Success.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/GetInvoicesExportsResponse" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "dateEnd": { "value": "2024-07-10T23:59:59.000Z" }, "dateStart": { "value": "2024-07-10T00:00:00.000Z" }, "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "pageSize": { "value": 1 }, "status": { "value": "DONE" } } }, "response": { "exports": [ { "errorMessage": "", "exportId": "4bdd8293-0cd7-4208-bed5-78b2c6ecefef", "generateExportFinishedAt": "2024-07-10T16:00:00.000Z", "generateExportStartedAt": "2024-07-10T15:00:00.000Z", "invoicesDocumentIds": [ "18c598f5-75db-4c1a-bd3e-4c64b36781c5" ], "status": "DONE" } ], "nextToken": "WTtGLzlBkat22iOI5C1yrpSPqMpz9UHYxdvm5U4DqEVJL5hqxv9xMuXe3eg35i17" } }, { "request": { "parameters": { "dateEnd": { "value": "2024-07-10T23:59:59.000Z" }, "dateStart": { "value": "2024-07-10T00:00:00.000Z" }, "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "pageSize": { "value": 1 }, "status": { "value": "DONE" }, "warehouseCode": { "value": "ABCD" } } }, "response": { "exports": [ { "errorMessage": "", "exportId": "4bdd8293-0cd7-4208-bed5-78b2c6ecefef", "generateExportFinishedAt": "2024-07-10T16:00:00.000Z", "generateExportStartedAt": "2024-07-10T15:00:00.000Z", "invoicesDocumentIds": [ "18c598f5-75db-4c1a-bd3e-4c64b36781c5" ], "status": "DONE" } ], "nextToken": "WTtGLzlBkat22iOI5C1yrpSPqMpz9UHYxdvm5U4DqEVJL5hqxv9xMuXe3eg35i17" } } ] } }, "400": { "description": "Request has missing or invalid parameters and cannot be parsed.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "nextToken": { "value": "WTtGLzlBkat22iOI5C1yrpSPqMpz9UHYxdvm5U4DqEVJL5hqxv9xMuXe3eg35i17" }, "status": { "value": "DONE" } } }, "response": { "errors": [ { "code": "400", "details": "Specifying nextToken with any other parameters will cause the request to fail.", "message": "Invalid Request." } ] } } ] } }, "401": { "description": "A list of error responses returned when a request is unsuccessful.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "404": { "description": "The resource specified does not exist.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "429": { "description": "The frequency of requests was greater than allowed.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "500": { "description": "An unexpected condition occurred that prevented the server from fulfilling the request.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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" } } } } }, "/tax/invoices/2024-06-19/exports/{exportId}": { "get": { "x-amzn-api-internal": "INTERNAL_AND_EXTERNAL", "tags": [ "invoices" ], "description": "Returns invoice export details (including the `exportDocumentId`, if available) for the export that you specify.", "operationId": "getInvoicesExport", "produces": [ "application/json" ], "parameters": [ { "description": "The unique identifier for the export.", "type": "string", "name": "exportId", "in": "path", "required": true }, { "description": "The Warehouse code included in the invoice issued on behalf of the vendor. Check the warehouse code under your WarehouseSettings in VendorCentral.", "type": "string", "name": "warehouseCode", "in": "query" } ], "responses": { "200": { "description": "Success.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/GetInvoicesExportResponse" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "exportId": { "value": "4bdd8293-0cd7-4208-bed5-78b2c6ecefef" } } }, "response": { "export": { "errorMessage": "", "exportId": "4bdd8293-0cd7-4208-bed5-78b2c6ecefef", "generateExportFinishedAt": "2024-07-10T16:00:00.000Z", "generateExportStartedAt": "2024-07-10T15:00:00.000Z", "invoicesDocumentIds": [ "18c598f5-75db-4c1a-bd3e-4c64b36781c5" ], "status": "DONE" } } }, { "request": { "parameters": { "exportId": { "value": "4bdd8293-0cd7-4208-bed5-78b2c6ecefef" }, "warehouseCode": { "value": "ABCD" } } }, "response": { "export": { "errorMessage": "", "exportId": "4bdd8293-0cd7-4208-bed5-78b2c6ecefef", "generateExportFinishedAt": "2024-07-10T16:00:00.000Z", "generateExportStartedAt": "2024-07-10T15:00:00.000Z", "invoicesDocumentIds": [ "18c598f5-75db-4c1a-bd3e-4c64b36781c5" ], "status": "DONE" } } } ] } }, "400": { "description": "Request has missing or invalid parameters and cannot be parsed.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": {} }, "response": { "errors": [ { "code": "400", "details": "Missing required parameter 'exportId'", "message": "Invalid Request." } ] } } ] } }, "401": { "description": "A list of error responses returned when a request is unsuccessful.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "404": { "description": "The resource specified does not exist.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "429": { "description": "The frequency of requests was greater than allowed.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "500": { "description": "An unexpected condition occurred that prevented the server from fulfilling the request.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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" } } } } }, "/tax/invoices/2024-06-19/governmentInvoiceRequests": { "post": { "tags": [ "invoices" ], "description": "Submit an asynchronous request to create a government invoice.", "operationId": "createGovernmentInvoice", "consumes": [ "application/json" ], "produces": [ "application/json" ], "parameters": [ { "description": "Information required to create the government invoice.", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/GovernmentInvoiceRequest" } } ], "responses": { "204": { "description": "Successfully submitted a government invoice creation request.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "body": { "value": { "contexts": [ { "name": "testCarrier", "address": "An address", "contextType": "CarrierDetailsContext", "federalTaxId": "46204217000177", "regionCode": "SP", "regionTaxId": "503348865972", "vehicleLicensePlate": "AAA0A00", "vehicleRegistrationRegionCode": "SP" } ], "inboundPlanId": "wf44e473-3f4d-4c6d-a80b-230e644b0c39", "invoiceType": "REMITTANCE", "marketplaceId": "A2Q3Y263D00KWC", "shipmentId": "sh109b72-7b27-4e97-9fd1-3b56915fbc95", "transactionType": "INBOUND_SHIPMENT" } } } }, "response": {} } ] } }, "400": { "description": "Request has missing or invalid parameters and cannot be parsed.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": {} }, "response": { "errors": [ { "code": "400", "details": "Missing required attribute(s): 'marketplaceId'.", "message": "Request has missing or invalid parameters and cannot be parsed." } ] } } ] } }, "401": { "description": "A list of error responses returned when a request is unsuccessful.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "404": { "description": "The resource specified does not exist.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "429": { "description": "The frequency of requests was greater than allowed.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "500": { "description": "An unexpected condition occurred that prevented the server from fulfilling the request.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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" } } } }, "get": { "tags": [ "invoices" ], "description": "Retrieve the status of an invoice generation request.", "operationId": "getGovernmentInvoiceStatus", "produces": [ "application/json" ], "parameters": [ { "description": "The marketplace of the invoice request.", "type": "string", "name": "marketplaceId", "in": "query", "required": true }, { "description": "The marketplace-specific classification of the transaction type that originated the invoice. Check `transactionType` options using the `getInvoicesAttributes` operation.", "type": "string", "name": "transactionType", "in": "query", "required": true }, { "description": "The unique shipment identifier for which to get an invoice.", "type": "string", "name": "shipmentId", "in": "query", "required": true }, { "description": "The marketplace-specific classification of the invoice type. Check `invoiceType` options using the `getInvoicesAttributes` operation.", "type": "string", "name": "invoiceType", "in": "query", "required": true }, { "description": "The unique inbound plan identifier in which the shipment is contained and for which the invoice will be created.", "type": "string", "name": "inboundPlanId", "in": "query" } ], "responses": { "200": { "description": "Success.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/GovernmentInvoiceStatusResponse" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "inboundPlanId": { "value": "wf44e473-3f4d-4c6d-a80b-230e644b0c39" }, "invoiceType": { "value": "REMITTANCE" }, "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "shipmentId": { "value": "sh109b72-7b27-4e97-9fd1-3b56915fbc95" }, "transactionType": { "value": "INBOUND_SHIPMENT" } } }, "response": { "invoiceExternalDocumentId": "35230948404147000173550010000001961", "status": "SUCCESS" } }, { "request": { "parameters": { "inboundPlanId": { "value": "wfa8d9de-67a7-4e59-bb5f-a47de029e7bd" }, "invoiceType": { "value": "REMITTANCE" }, "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "shipmentId": { "value": "sh762cac-15f1-4d74-a03f-02f3197e4238" }, "transactionType": { "value": "INBOUND_SHIPMENT" } } }, "response": { "invoiceErrors": [ { "description": "Rejeição: Código Regime Tributário do emitente diverge do cadastro na SEFAZ", "errorCode": "481" } ], "status": "ERROR" } } ] } }, "400": { "description": "Request has missing or invalid parameters and cannot be parsed.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": {} }, "response": { "errors": [ { "code": "400", "details": "Missing required attribute(s): 'marketplaceId'.", "message": "Request has missing or invalid parameters and cannot be parsed." } ] } } ] } }, "401": { "description": "A list of error responses returned when a request is unsuccessful.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "404": { "description": "The resource specified does not exist.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "429": { "description": "The frequency of requests was greater than allowed.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "500": { "description": "An unexpected condition occurred that prevented the server from fulfilling the request.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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" } } } } }, "/tax/invoices/2024-06-19/governmentInvoiceRequests/{shipmentId}": { "get": { "tags": [ "invoices" ], "description": "Retrieve the URL of an invoice document.", "operationId": "getGovernmentInvoiceDocument", "produces": [ "application/json" ], "parameters": [ { "description": "The marketplace of the invoice.", "type": "string", "name": "marketplaceId", "in": "query", "required": true }, { "description": "The marketplace-specific classification of the transaction type that originated the invoice. Check `transactionType` options using the `getInvoicesAttributes` operation.", "type": "string", "name": "transactionType", "in": "query", "required": true }, { "description": "The unique shipment identifier for which to get an invoice.", "type": "string", "name": "shipmentId", "in": "path", "required": true }, { "description": "The marketplace-specific classification of the invoice type. Check `invoiceType` options using the `getInvoicesAttributes` operation.", "type": "string", "name": "invoiceType", "in": "query", "required": true }, { "description": "The unique inbound plan identifier in which the shipment is contained and for which the invoice will be created.", "type": "string", "name": "inboundPlanId", "in": "query" }, { "description": "The file format of the invoice. The default is XML.", "type": "string", "name": "fileFormat", "in": "query" } ], "responses": { "200": { "description": "Success.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/GovtInvoiceDocumentResponse" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "fileFormat": { "value": "PDF" }, "inboundPlanId": { "value": "wfa8d9de-67a7-4e59-bb5f-a47de029e7bd" }, "invoiceType": { "value": "REMITTANCE" }, "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "shipmentId": { "value": "sh762cac-15f1-4d74-a03f-02f3197e4238" }, "transactionType": { "value": "INBOUND_SHIPMENT" } } }, "response": { "invoiceDocument": { "invoiceDocumentUrl": "https://invoicesdocumentbucket.s3.eu-east-1.amazonaws.com/18c598f5-75db-4c1a-bd3e-4c64b36781c5.xml?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=&X-Amz-Date=20240710T171315Z&X-Amz-Expires=300&X-Amz-Signature=&X-Amz-SignedHeaders=host" } } } ] } }, "400": { "description": "Request has missing or invalid parameters and cannot be parsed.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": {} }, "response": { "errors": [ { "code": "400", "details": "Missing required attribute(s): 'marketplaceId'.", "message": "Request has missing or invalid parameters and cannot be parsed." } ] } } ] } }, "401": { "description": "A list of error responses returned when a request is unsuccessful.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "404": { "description": "The resource specified does not exist.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "429": { "description": "The frequency of requests was greater than allowed.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "500": { "description": "An unexpected condition occurred that prevented the server from fulfilling the request.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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" } } } } }, "/tax/invoices/2024-06-19/invoices": { "get": { "x-amzn-api-internal": "INTERNAL_AND_EXTERNAL", "tags": [ "invoices" ], "description": "Returns invoice details for the invoices that match the filters that you specify.", "operationId": "getInvoices", "produces": [ "application/json" ], "parameters": [ { "description": "The name of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierId` field.Use the `getInvoicesAttributes` operation to check `transactionIdentifierName` options.", "type": "string", "name": "transactionIdentifierName", "in": "query" }, { "description": "The maximum number of invoices you want to return in a single call.\n\nMinimum: 1\n\nMaximum: 200", "type": "integer", "name": "pageSize", "in": "query" }, { "description": "The latest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the current date-time.", "type": "string", "name": "dateEnd", "in": "query", "format": "date-time" }, { "description": "The response includes only the invoices that match the specified marketplace.", "type": "string", "name": "marketplaceId", "in": "query", "required": true }, { "description": "The marketplace-specific classification of the transaction type for which the invoice was created. Use the `getInvoicesAttributes` operation to check `transactionType` options.", "type": "string", "name": "transactionType", "in": "query" }, { "description": "The ID of the transaction identifier filter. If you provide a value for this field, you must also provide a value for the `transactionIdentifierName` field.", "type": "string", "name": "transactionIdentifierId", "in": "query" }, { "description": "The earliest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 24 hours prior to the time of the request.", "type": "string", "name": "dateStart", "in": "query", "format": "date-time" }, { "description": "Return invoices with the specified series number.", "type": "string", "name": "series", "in": "query" }, { "description": "The response includes `nextToken` when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the operation with this token and include the same arguments as the call that produced the token. To get a complete list, call this operation until `nextToken` is null. Note that this operation can return empty pages.", "type": "string", "name": "nextToken", "in": "query" }, { "description": "Sort the invoices in the response in ascending or descending order.", "type": "string", "name": "sortOrder", "in": "query", "enum": [ "DESC", "ASC" ], "x-docgen-enum-table-extension": [ { "description": "Sort in descending order.", "value": "DESC" }, { "description": "Sort in ascending order.", "value": "ASC" } ] }, { "description": "The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.", "type": "string", "name": "invoiceType", "in": "query" }, { "description": "A list of statuses that you can use to filter invoices. Use the `getInvoicesAttributes` operation to check invoice status options.\n\nMin count: 1", "type": "array", "name": "statuses", "in": "query", "collectionFormat": "csv", "items": { "type": "string" }, "minItems": 1 }, { "description": "Return invoices that match this external ID. This is typically the Government Invoice ID.", "type": "string", "name": "externalInvoiceId", "in": "query" }, { "description": "The attribute by which you want to sort the invoices in the response.", "type": "string", "name": "sortBy", "in": "query", "enum": [ "START_DATE_TIME" ], "x-docgen-enum-table-extension": [ { "description": "Sort by date time.", "value": "START_DATE_TIME" } ] }, { "description": "The Warehouse code included in the invoice issued on behalf of the vendor. Check the warehouse code under your WarehouseSettings in VendorCentral.", "type": "string", "name": "warehouseCode", "in": "query" } ], "responses": { "200": { "description": "Success.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/GetInvoicesResponse" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "dateEnd": { "value": "2024-07-20T23:59:59" }, "dateStart": { "value": "2024-07-01T00:00:00" }, "invoiceType": { "value": "SYMBOLIC_RETURN" }, "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "pageSize": { "value": 1 }, "sortBy": { "value": "START_DATE_TIME" }, "sortOrder": { "value": "DESC" }, "transactionIdentifierId": { "value": "94cd4e1a-5cc5-486d-b592-045a95a168e1" }, "transactionIdentifierName": { "value": "BUSINESS_TRANSACTION_ID" }, "transactionType": { "value": "CUSTOMER_SALES" } } }, "response": { "invoices": [ { "date": "2024-07-10T15:00:00.000Z", "errorCode": "", "externalInvoiceId": "1283743", "govResponse": "", "id": "ad5b9dcd-6981-4dc4-a3d7-dd2568298a94", "invoiceType": "SYMBOLIC_RETURN", "series": "32", "status": "AUTHORIZED", "transactionIds": [ { "name": "BUSINESS_TRANSACTION_ID", "id": "94cd4e1a-5cc5-486d-b592-045a95a168e1" } ], "transactionType": "CUSTOMER_SALES" } ], "nextToken": "WTtGLzlBkat22iOI5C1yrpSPqMpz9UHYxdvm5U4DqEVJL5hqxv9xMuXe3eg35i17" } }, { "request": { "parameters": { "externalInvoiceId": { "value": "1283743" }, "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "series": { "value": "32" } } }, "response": { "invoices": [ { "date": "2024-07-10T15:00:00.000Z", "errorCode": "", "externalInvoiceId": "1283743", "govResponse": "", "id": "ad5b9dcd-6981-4dc4-a3d7-dd2568298a94", "invoiceType": "SYMBOLIC_RETURN", "series": "32", "status": "AUTHORIZED", "transactionIds": [ { "name": "BUSINESS_TRANSACTION_ID", "id": "94cd4e1a-5cc5-486d-b592-045a95a168e1" } ], "transactionType": "CUSTOMER_SALES" } ], "nextToken": "WTtGLzlBkat22iOI5C1yrpSPqMpz9UHYxdvm5U4DqEVJL5hqxv9xMuXe3eg35i17" } }, { "request": { "parameters": { "dateEnd": { "value": "2024-07-20T23:59:59" }, "dateStart": { "value": "2024-07-01T00:00:00" }, "invoiceType": { "value": "DIRECT_FULFILLMENT" }, "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "pageSize": { "value": 1 }, "sortBy": { "value": "START_DATE_TIME" }, "sortOrder": { "value": "DESC" }, "transactionIdentifierId": { "value": "94cd4e1a-5cc5-486d-b592-045a95a168e1" }, "transactionIdentifierName": { "value": "BUSINESS_TRANSACTION_ID" }, "transactionType": { "value": "VENDOR_INBOUND" }, "warehouseCode": { "value": "ABCD" } } }, "response": { "invoices": [ { "date": "2024-07-10T15:00:00.000Z", "errorCode": "", "externalInvoiceId": "1283743", "govResponse": "", "id": "ad5b9dcd-6981-4dc4-a3d7-dd2568298a94", "invoiceType": "SYMBOLIC_RETURN", "series": "32", "status": "AUTHORIZED", "transactionIds": [ { "name": "BUSINESS_TRANSACTION_ID", "id": "94cd4e1a-5cc5-486d-b592-045a95a168e1" } ], "transactionType": "CUSTOMER_SALES" } ], "nextToken": "WTtGLzlBkat22iOI5C1yrpSPqMpz9UHYxdvm5U4DqEVJL5hqxv9xMuXe3eg35i17" } } ] } }, "400": { "description": "Request has missing or invalid parameters and cannot be parsed.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "nextToken": { "value": "WTtGLzlBkat22iOI5C1yrpSPqMpz9UHYxdvm5U4DqEVJL5hqxv9xMuXe3eg35i17" }, "statuses": { "value": [ "REJECTED" ] } } }, "response": { "errors": [ { "code": "400", "details": "Specifying nextToken with any other parameters will cause the request to fail.", "message": "Invalid Request." } ] } } ] } }, "401": { "description": "A list of error responses returned when a request is unsuccessful.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "404": { "description": "The resource specified does not exist.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "429": { "description": "The frequency of requests was greater than allowed.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "500": { "description": "An unexpected condition occurred that prevented the server from fulfilling the request.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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" } } } } }, "/tax/invoices/2024-06-19/invoices/{invoiceId}": { "get": { "x-amzn-api-internal": "INTERNAL_AND_EXTERNAL", "tags": [ "invoices" ], "description": "Returns invoice data for the specified invoice. This operation returns only a subset of the invoices data; refer to the response definition to get all the possible attributes.\nTo get the full invoice, use the `createInvoicesExport` operation to start an export request.", "operationId": "getInvoice", "produces": [ "application/json" ], "parameters": [ { "description": "The marketplace from which you want the invoice.", "type": "string", "name": "marketplaceId", "in": "query", "required": true }, { "description": "The invoice identifier.", "type": "string", "name": "invoiceId", "in": "path", "required": true }, { "description": "The Warehouse code included in the invoice issued on behalf of the vendor. Check the warehouse code under your WarehouseSettings in VendorCentral.", "type": "string", "name": "warehouseCode", "in": "query" } ], "responses": { "200": { "description": "Success.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/GetInvoiceResponse" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "invoiceId": { "value": "ad5b9dcd-6981-4dc4-a3d7-dd2568298a94" }, "marketplaceId": { "value": "A2Q3Y263D00KWC" } } }, "response": { "invoice": { "date": "2024-07-10T15:00:00.000Z", "errorCode": "", "externalInvoiceId": "1283743", "govResponse": "", "id": "ad5b9dcd-6981-4dc4-a3d7-dd2568298a94", "invoiceType": "CUSTOMER_SALES", "series": "32", "status": "AUTHORIZED", "transactionIds": [ { "name": "BUSINESS_TRANSACTION_ID", "id": "94cd4e1a-5cc5-486d-b592-045a95a168e1" } ], "transactionType": "CUSTOMER_SALES_SYMBOLIC" } } }, { "request": { "parameters": { "invoiceId": { "value": "ad5b9dcd-6981-4dc4-a3d7-dd2568298a94" }, "marketplaceId": { "value": "A2Q3Y263D00KWC" }, "warehouseCode": { "value": "ABCD" } } }, "response": { "invoice": { "date": "2024-07-10T15:00:00.000Z", "errorCode": "", "externalInvoiceId": "1283743", "govResponse": "", "id": "ad5b9dcd-6981-4dc4-a3d7-dd2568298a94", "invoiceType": "DIRECT_FULFILLMENT", "series": "32", "status": "AUTHORIZED", "transactionIds": [ { "name": "BUSINESS_TRANSACTION_ID", "id": "94cd4e1a-5cc5-486d-b592-045a95a168e1" } ], "transactionType": "VENDOR_INBOUND" } } } ] } }, "400": { "description": "Request has missing or invalid parameters and cannot be parsed.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" }, "x-amzn-api-sandbox": { "static": [ { "request": { "parameters": { "marketplaceId": { "value": "A2Q3Y263D00KWC" } } }, "response": { "errors": [ { "code": "400", "details": "Missing required parameter 'invoiceId'", "message": "Invalid Request." } ] } }, { "request": { "parameters": { "invoiceId": { "value": "ad5b9dcd-6981-4dc4-a3d7-dd2568298a94" } } }, "response": { "errors": [ { "code": "400", "details": "Missing required parameter 'marketplaceId'", "message": "Invalid Request." } ] } } ] } }, "401": { "description": "A list of error responses returned when a request is unsuccessful.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "404": { "description": "The resource specified does not exist.", "headers": { "x-amzn-RateLimit-Limit": { "description": "Your rate limit (requests per second) for this operation.", "type": "string" }, "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "429": { "description": "The frequency of requests was greater than allowed.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "schema": { "$ref": "#/definitions/ErrorList" } }, "500": { "description": "An unexpected condition occurred that prevented the server from fulfilling the request.", "headers": { "x-amzn-RequestId": { "description": "Unique request reference identifier.", "type": "string" } }, "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" } } } } } }, "definitions": { "AttributeOption": { "description": "The definition of the attribute option.", "type": "object", "properties": { "description": { "description": "The description of the attribute value.", "type": "string" }, "value": { "description": "The possible values for the attribute option.", "type": "string" } } }, "CarrierDetailsContext": { "description": "Additional information about a carrier.", "type": "object", "properties": { "name": { "description": "The name of the carrier, as registered with state and federal tax authorities.", "type": "string" }, "address": { "description": "The address of the carrier, as registered with state and federal tax authorities.", "type": "string" }, "contextType": { "description": "The type of additional information.", "type": "string" }, "federalTaxId": { "description": "The tax identification number of the carrier.", "type": "string" }, "regionCode": { "description": "The code of the federal subdivision in which the carrier is registered.", "type": "string" }, "regionTaxId": { "description": "The regional tax registration number of the carrier.", "type": "string" }, "vehicleLicensePlate": { "description": "The identifier for the carrier vehicle, as printed on its registration plate.", "type": "string" }, "vehicleRegistrationRegionCode": { "description": "The code of the federal subdivision in which the carrier vehicle is registered.", "type": "string" } } }, "Error": { "description": "The error response that is returned when the request is unsuccessful.", "type": "object", "required": [ "code", "message" ], "properties": { "code": { "description": "An error code that identifies the type of error that occurred.", "type": "string" }, "details": { "description": "Additional details that can help the caller understand or fix the issue.", "type": "string" }, "message": { "description": "A message that describes the error condition.", "type": "string" } } }, "Export": { "description": "Detailed information about the export.", "type": "object", "properties": { "errorMessage": { "description": "When the export generation fails, this attribute contains a description of the error.", "type": "string" }, "exportId": { "description": "The export identifier.", "type": "string" }, "generateExportFinishedAt": { "description": "The date and time when the export generation finished. Vales are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.", "type": "string", "format": "date-time" }, "generateExportStartedAt": { "description": "The date and time when the export generation started. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.", "type": "string", "format": "date-time" }, "invoicesDocumentIds": { "description": "The identifier for the export documents. To get the information required to retrieve the export document's contents, pass each ID in the `getInvoicesDocument` operation.\n\nThis list is empty until the status is `DONE`.", "type": "array", "items": { "type": "string" } }, "status": { "$ref": "#/definitions/ExportStatus" } } }, "ExportInvoicesRequest": { "description": "The information required to create the export request.", "type": "object", "required": [ "marketplaceId" ], "properties": { "dateEnd": { "description": "The latest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is the time of the request.", "type": "string", "format": "date" }, "dateStart": { "description": "The earliest invoice creation date for invoices that you want to include in the response. Dates are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. The default is 24 hours prior to the time of the request.", "type": "string", "format": "date" }, "externalInvoiceId": { "description": "The external ID of the invoices you want included in the response.", "type": "string" }, "fileFormat": { "$ref": "#/definitions/FileFormat" }, "invoiceType": { "description": "The marketplace-specific classification of the invoice type. Use the `getInvoicesAttributes` operation to check `invoiceType` options.", "type": "string" }, "marketplaceId": { "description": "The ID of the marketplace from which you want the invoices.", "type": "string" }, "series": { "description": "The series number of the invoices you want included in the response.", "type": "string" }, "statuses": { "description": "A list of statuses that you can use to filter invoices. Use the `getInvoicesAttributes` operation to check invoice status options.\n\nMin count: 1", "type": "array", "items": { "type": "string" }, "minItems": 1 }, "transactionIdentifier": { "$ref": "#/definitions/TransactionIdentifier" }, "transactionType": { "description": "The marketplace-specific classification of the transaction type for which the invoice was created. Use the `getInvoicesAttributes` operation to check `transactionType` options", "type": "string" }, "warehouseCode": { "description": "The Warehouse code included in the invoice issued on behalf of the vendor. Check the warehouse code under your WarehouseSettings in VendorCentral.", "type": "string" } }, "example": { "dateEnd": "2024-07-30T23:59:59", "dateStart": "2024-07-01T00:00:00", "externalInvoiceId": "1283743", "fileFormat": "XML", "invoiceType": "SYMBOLIC_RETURN", "marketplaceId": "A2Q3Y263D00KWC", "series": "32", "statuses": [ "AUTHORIZED" ], "transactionIdentifier": { "name": "BUSINESS_TRANSACTION_ID", "id": "94cd4e1a-5cc5-486d-b592-045a95a168e1" }, "transactionType": "CUSTOMER_SALES", "warehouseCode": "ABCD" } }, "ExportInvoicesResponse": { "description": "Success.", "type": "object", "properties": { "exportId": { "description": "The export identifier.", "type": "string" } } }, "ExportStatus": { "description": "The current status of the request.", "type": "string", "enum": [ "REQUESTED", "PROCESSING", "DONE", "ERROR" ], "x-docgen-enum-table-extension": [ { "description": "The export request was created, but has not yet started.", "value": "REQUESTED" }, { "description": "The export request is being processed.", "value": "PROCESSING" }, { "description": "The export request has finished successfully. Use the document IDs to download the output documents.", "value": "DONE" }, { "description": "The export request resulted in an error. Refer to the `errorMessage` attribute for more information.", "value": "ERROR" } ] }, "FileFormat": { "description": "Supported invoice file extensions.", "type": "string", "enum": [ "XML" ], "x-docgen-enum-table-extension": [ { "description": "The invoice file is in XML format.", "value": "XML" }, { "description": "The invoice file is in PDF format.", "value": "PDF" } ] }, "GetInvoiceResponse": { "description": "Success.", "type": "object", "properties": { "invoice": { "$ref": "#/definitions/Invoice" } } }, "GetInvoicesAttributesResponse": { "description": "Success.", "type": "object", "properties": { "invoicesAttributes": { "$ref": "#/definitions/InvoicesAttributes" } } }, "GetInvoicesDocumentResponse": { "description": "Success.", "type": "object", "properties": { "invoicesDocument": { "$ref": "#/definitions/InvoicesDocument" } } }, "GetInvoicesExportResponse": { "description": "Success.", "type": "object", "properties": { "export": { "$ref": "#/definitions/Export" } } }, "GetInvoicesExportsResponse": { "description": "Success.", "type": "object", "properties": { "exports": { "description": "A list of exports.", "type": "array", "items": { "$ref": "#/definitions/Export" }, "maxItems": 100 }, "nextToken": { "description": "This token is returned when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the `getInvoices` operation and include this token with the previous call parameters.", "type": "string" } } }, "GetInvoicesResponse": { "description": "Success.", "type": "object", "properties": { "invoices": { "description": "A list of invoices.", "type": "array", "items": { "$ref": "#/definitions/Invoice" }, "maxItems": 100 }, "nextToken": { "description": "This token is returned when the number of results exceeds the specified `pageSize` value. To get the next page of results, call the `getInvoices` operation and include this token with the previous call parameters.", "type": "string" } } }, "GovernmentInvoiceCreationStatus": { "description": "The current status of a government invoice creation request.", "type": "string", "enum": [ "PROCESSING", "SUCCESS", "ERROR" ], "x-docgen-enum-table-extension": [ { "description": "The government invoice creation request is being processed.", "value": "PROCESSING" }, { "description": "The government invoice creation request is finished successfully. Use the external document IDs to download the output documents.", "value": "SUCCESS" }, { "description": "The government invoice creation request resulted in an error. Check the `errorMessage` attribute for more details.", "value": "ERROR" } ] }, "GovernmentInvoiceRequest": { "description": "Information required to create the government invoice.", "type": "object", "required": [ "invoiceType", "marketplaceId", "shipmentId", "transactionType" ], "properties": { "contexts": { "description": "Additional information for invoice creation.", "type": "array", "items": { "$ref": "#/definitions/CarrierDetailsContext" } }, "inboundPlanId": { "description": "The unique inbound plan identifier in which the shipment is contained and for which the invoice will be created.", "type": "string" }, "invoiceType": { "description": "The marketplace-specific classification of the invoice type. Check `invoiceType` options using the `getInvoicesAttributes` operation.", "type": "string" }, "marketplaceId": { "description": "The marketplace of the national authoritative source that will be on the government invoice creation request.", "type": "string" }, "shipmentId": { "description": "The unique shipment identifier for which to get an invoice.", "type": "string" }, "transactionType": { "description": "The marketplace-specific classification of the transaction type that originated the invoice. Check `transactionType` options using the `getInvoicesAttributes` operation.", "type": "string" } }, "example": { "contexts": [ { "name": "testCarrier", "address": "An address", "contextType": "CarrierDetailsContext", "federalTaxId": "46204217000177", "regionCode": "SP", "regionTaxId": "503348865972", "vehicleLicensePlate": "AAA0A00", "vehicleRegistrationRegionCode": "SP" } ], "inboundPlanId": "wf44e473-3f4d-4c6d-a80b-230e644b0c39", "invoiceType": "REMITTANCE", "marketplaceId": "A2Q3Y263D00KWC", "shipmentId": "sh109b72-7b27-4e97-9fd1-3b56915fbc95", "transactionType": "INBOUND_SHIPMENT" } }, "GovernmentInvoiceStatusResponse": { "description": "Success.", "type": "object", "properties": { "invoiceErrors": { "description": "The errors that occurred during invoice creation.", "type": "array", "items": { "$ref": "#/definitions/InvoiceError" } }, "invoiceExternalDocumentId": { "description": "The Government Invoice ID of a successfully authorized invoice.", "type": "string" }, "status": { "$ref": "#/definitions/GovernmentInvoiceCreationStatus" } } }, "GovtInvoiceDocumentResponse": { "description": "Success.", "type": "object", "properties": { "invoiceDocument": { "$ref": "#/definitions/InvoiceDocument" } } }, "Invoice": { "description": "Provides detailed information about an invoice.", "type": "object", "properties": { "date": { "description": "The date and time the invoice is issued. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.", "type": "string", "format": "date-time" }, "errorCode": { "description": "If the invoice is in an error state, this attribute displays the error code.", "type": "string" }, "externalInvoiceId": { "description": "The invoice identifier that is used by an external party. This is typically the government agency that authorized the invoice.", "type": "string" }, "govResponse": { "description": "The response message from the government authority when there is an error during invoice issuance.", "type": "string" }, "id": { "description": "The invoice identifier.", "type": "string" }, "invoiceType": { "description": "The classification of the invoice type. This varies across marketplaces. Use the `getInvoicesAttributes` operation to check `invoiceType` options.", "type": "string" }, "series": { "description": "Use this identifier in conjunction with `externalInvoiceId` to identify invoices from the same seller.", "type": "string" }, "status": { "description": "The invoice status classification. Use the `getInvoicesAttributes` operation to check invoice status options.", "type": "string" }, "transactionIds": { "description": "List with identifiers for the transactions associated to the invoice.", "type": "array", "items": { "$ref": "#/definitions/TransactionIdentifier" } }, "transactionType": { "description": "Classification of the transaction that originated this invoice. Use the `getInvoicesAttributes` operation to check `transactionType` options.", "type": "string" } } }, "InvoiceDocument": { "description": "The `documentId` and an S3 pre-signed URL that you can use to download the specified document file.", "type": "object", "properties": { "invoiceDocumentUrl": { "description": "A pre-signed URL that you can use to download the invoice document in its original format. This URL expires after 30 seconds.", "type": "string" } } }, "InvoiceError": { "description": "An invoice creation error occurred.", "type": "object", "properties": { "description": { "description": "A description of the error.", "type": "string" }, "errorCode": { "description": "The code of the error.", "type": "string" } } }, "InvoicesAttributes": { "description": "An object that contains the invoice attributes definition.", "type": "object", "properties": { "invoiceStatusOptions": { "description": "A list of all the options that are available for the invoice status attribute.", "type": "array", "items": { "$ref": "#/definitions/AttributeOption" } }, "invoiceTypeOptions": { "description": "A list of all the options that are available for the invoice type attribute.", "type": "array", "items": { "$ref": "#/definitions/AttributeOption" } }, "transactionIdentifierNameOptions": { "description": "A list of all the options that are available for the transaction identifier name attribute.", "type": "array", "items": { "$ref": "#/definitions/AttributeOption" } }, "transactionTypeOptions": { "description": "A list of all the options that are available for the transaction type attribute.", "type": "array", "items": { "$ref": "#/definitions/AttributeOption" } } } }, "InvoicesDocument": { "description": "An object that contains the `documentId` and an S3 pre-signed URL that you can use to download the specified file.", "type": "object", "properties": { "invoicesDocumentId": { "description": "The identifier of the export document.", "type": "string" }, "invoicesDocumentUrl": { "description": "A pre-signed URL that you can use to download the invoices document in zip format. This URL expires after 30 seconds.", "type": "string" } } }, "TransactionIdentifier": { "description": "The identifier for a transaction.", "type": "object", "properties": { "name": { "description": "The transaction identifier name. Use the `getInvoicesAttributes` operation to check `transactionIdentifierName` options.", "type": "string" }, "id": { "description": "The transaction identifier.", "type": "string" } } }, "ErrorList": { "type": "object", "description": "A list of error responses that are returned when a request is unsuccessful.", "required": [ "errors" ], "properties": { "errors": { "type": "array", "description": "List of errors.", "items": { "$ref": "#/definitions/Error" } } } } }, "consumes": [ "application/json" ], "produces": [ "application/json" ], "responses": {} }