Document API v1 reference
Amazon Business Document API
Overview
An Amazon Business API for retrieving and managing invoice reports.
Version information
Version : 2021-09-30
License information
License : Amazon Software License
License URL : https://aws.amazon.com/asl/
URI scheme
Host : api.business.amazon.com
BasePath : /
Schemes : HTTPS
Consumes
application/json
Produces
application/json
Operations
getReports
createReport
getReport
cancelReport
getReportDocument
Paths
GET /reports/2021-09-30/reports
Operation: getReports
Description
Returns detailed pdf reports that match your filter criteria.
Usage Plan:
Rate (requests per second) | Burst |
---|---|
0.0222 | 10 |
The x-amzn-RateLimit-Limit
response header returns the usage plan rate limits that were applied to the requested operation. The preceding table indicates the default rate and burst values for this operation. For questions about your usage plan, reach out to your Amazon Business technical contact.
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query | reportTypes optional | A list of report types used to filter reports. When reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either reportTypes or nextToken is required. Min count : 1 Max count : 10 | < string > array | - |
Query | processingStatuses optional | A list of processing statuses used to filter reports. Min count : 1 | < enum (ProcessingStatuses) > array | - |
Query | marketplaceIds optional | A list of marketplace identifiers used to filter reports. The reports returned will match at least one of the marketplaces that you specify. Min count : 1 Max count : 10 | < string > array | - |
Query | pageSize optional | The maximum number of reports to return in a single call. Minimum : 1 Maximum : 100 | integer | 10 |
Query | createdSince optional | The earliest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is 90 days ago. Reports are retained for a maximum of 90 days. | string (date-time) | - |
Query | createdUntil optional | The latest report creation date and time for reports to include in the response, in ISO 8601 date time format. The default is now. | string (date-time) | - |
Query | nextToken optional | A string token returned as a response to the previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getReports operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. | string | - |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | getReports request has been submitted. Headers : x-amzn-RateLimit-Limit (string) : The rate limit (requests per second) for this operation. x-amzn-RequestId (string) : A unique request reference identifier. | GetReportsResponse |
401 | The request authorization header is formatted incorrectly or the token is invalid. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
403 | Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
503 | The system is experiencing a temporary overloading or a system maintenance is ongoing. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
For additional error status codes, descriptions and schemas, see Error responses and schemas.
POST /reports/2021-09-30/reports
Operation: createReport
Description
Creates a report for the specified input parameters.
Usage Plan:
Rate (requests per second) | Burst |
---|---|
0.0167 | 15 |
The x-amzn-RateLimit-Limit
response header returns the usage plan rate limits that were applied to the requested operation. The preceding table indicates the default rate and burst values for this operation. For questions about your usage plan, reach out to your Amazon Business technical contact.
Parameters
Type | Name | Schema |
---|---|---|
Body | body required | CreateReportSpecification |
Responses
HTTP Code | Description | Schema |
---|---|---|
202 | The report creation request has been submitted. Headers : x-amzn-RateLimit-Limit (string) : The rate limit (requests per second) for this operation. x-amzn-RequestId (string) : A unique request reference identifier. | CreateReportResponse |
401 | The request authorization header is formatted incorrectly or the token is invalid. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
403 | Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
503 | The system is experiencing a temporary overloading or a system maintenance is ongoing. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
For additional error status codes, descriptions and schemas, see Error responses and schemas.
GET /reports/2021-09-30/reports/{reportId}
Operation: getReport
Description
Returns report details (including the reportDocumentId, if available) for the report that you specify.
Usage Plan:
Rate (requests per second) | Burst |
---|---|
2 | 15 |
The x-amzn-RateLimit-Limit
response header returns the usage plan rate limits that were applied to the requested operation. The preceding table indicates the default rate and burst values for this operation. For questions about your usage plan, reach out to your Amazon Business technical contact.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path | reportId required | The identifier for the report. | string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | The report status has been returned. Headers : x-amzn-RateLimit-Limit (string) : The rate limit (requests per second) for this operation. x-amzn-RequestId (string) : A unique request reference identifier. | Report |
401 | The request's authorization header isn't formatted correctly or doesn't contain a valid token. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
403 | Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
503 | Temporary overloading or maintenance of the server. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
For additional error status codes, descriptions and schemas, see Error responses and schemas.
DELETE /reports/2021-09-30/reports/{reportId}
Operation: cancelReport
Description
Cancels the report that you specify. Only reports with processingStatus=IN_QUEUE can be cancelled. Cancelled reports are returned in subsequent calls to the getReport and getReports operations.
Usage Plan:
Rate (requests per second) | Burst |
---|---|
0.0222 | 10 |
The x-amzn-RateLimit-Limit
response header returns the usage plan rate limits that were applied to the requested operation. The preceding table indicates the default rate and burst values for this operation. For questions about your usage plan, reach out to your Amazon Business technical contact.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path | reportId required | The identifier of the report. | string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | The report generation has been cancelled. Headers : x-amzn-RateLimit-Limit (string) : The rate limit (requests per second) for this operation. x-amzn-RequestId (string) : A unique request reference identifier. | No Content |
401 | The request's authorization header isn't formatted correctly or doesn't contain a valid token. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
403 | Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
503 | The system is experiencing a temporary overloading or a system maintenance is ongoing. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
For additional error status codes, descriptions and schemas, see Error responses and schemas.
GET /reports/2021-09-30/documents/{reportDocumentId}
Operation: getReportDocument
Description
Returns the information required for retrieving the content of the report.
Usage Plan:
Rate (requests per second) | Burst |
---|---|
0.0167 | 15 |
The x-amzn-RateLimit-Limit
response header returns the usage plan rate limits that were applied to the requested operation. The preceding table indicates the default rate and burst values for this operation. For questions about your usage plan, reach out to your Amazon Business technical contact.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path | reportDocumentId required | The identifier for the report document. | string |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | The reportDocumentId has been retrieved. Headers : x-amzn-RateLimit-Limit (string) : The rate limit (requests per second) for this operation. x-amzn-RequestId (string) : A unique request reference identifier. | ReportDocument |
401 | The request's authorization header isn't formatted correctly or doesn't contain a valid token. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
403 | Indicates access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
503 | The system is experiencing a temporary overloading or a system maintenance is ongoing. Headers : x-amzn-RequestId (string) : A unique request reference identifier. | ErrorList |
For additional error status codes, descriptions and schemas, see Error responses and schemas.
Error Responses and Schemas
This table contains HTTP status codes and associated information for error responses.
HTTP Code | Description | Schema |
---|---|---|
400 | The request has missing or invalid parameters and can't be parsed. Headers: x-amzn-RateLimit-Limit (string):The rate limit (requests per second) for this operation. x-amzn-RequestId (string):A unique request reference identifier. | ErrorList |
404 | The specified resource doesn't exist. Headers: x-amzn-RateLimit-Limit (string):The rate limit (requests per second) for this operation. x-amzn-RequestId (string):A unique request reference identifier. | ErrorList |
415 | The request's Content-Type header is invalid. Headers: x-amzn-RequestId (string):A unique request reference identifier. | ErrorList |
429 | The frequency of requests was greater than allowed. Headers: x-amzn-RequestId (string):A unique request reference identifier. | ErrorList |
500 | An unexpected condition occurred that prevented the server from fulfilling the request. Headers: x-amzn-RequestId (string):A unique request reference identifier. | ErrorList |
Definitions
ErrorList
A list of error responses returned when a request is unsuccessful.
Name | Schema |
---|---|
errors required | < Error > array |
Error
Error response returned when the request is unsuccessful.
Name | Description | Schema |
---|---|---|
code required | An error code that identifies the type of error that occurred. | string |
message required | A message that describes the error condition. | string |
details optional | Additional details that can help the caller understand or fix the issue. | string |
Report
Name | Description | Schema |
---|---|---|
marketplaceIds optional | A list of marketplace identifiers for the report. | < string > array |
reportId required | The identifier for the report. | string |
reportType required | The requested report type. | string |
dataStartTime optional | The start of a date and time range used for selecting the data to report. | string (date-time) |
dataEndTime optional | The end of a date and time range used for selecting the data to report. | string (date-time) |
createdTime required | The date and time when the report was created. | string (date-time) |
processingStatus required | The processing status of the report. | enum (ProcessingStatus) |
processingStartTime optional | The date and time when the report processing started, in ISO 8601 date time format. | string (date-time) |
processingEndTime optional | The date and time when the report processing was completed, in ISO 8601 date time format. | string (date-time) |
reportDocumentId optional | The identifier for the report document. Pass this into the getReportDocument operation to get the information you will need to retrieve the report document's contents. | string |
ReportList
Type : < Report > array
CreateReportSpecification
Name | Description | Schema |
---|---|---|
reportOptions optional | Additional information passed in the request. This varies by report type. | ReportOptions |
reportType required | The type of report used for filtering reports to retrieve. | string |
dataStartTime optional | The start of a date and time range, in ISO 8601 date time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this. | string (date-time) |
dataEndTime optional | The end of a date and time range, in ISO 8601 date time format, used for selecting the data to report. The default is now. The value must be prior to or equal to the current date and time. Not all report types make use of this. | string (date-time) |
marketplaceIds required | A list of marketplace identifiers. The report will contain data for all of the specified marketplaces, unless the report type indicates otherwise. | < string > array |
ReportOptions
Additional information passed in the request. This varies by report type.
Type : < string, string > map
CreateReportResponse
Name | Description | Schema |
---|---|---|
reportId required | The identifier for the report. This identifier is unique only in combination with a business entity. | string |
GetReportsResponse
The response for the getReports operation.
Name | Description | Schema |
---|---|---|
reports required | The report list with processingStatus, reportId,reportType, and createdTime | ReportList |
nextToken optional | Returned when the number of results exceeds pageSize. To get the next page of results, call getReports with this token as the only parameter. | string |
ReportDocument
Name | Description | Schema |
---|---|---|
reportDocumentId required | The identifier for the report document. | string |
url required | A presigned URL for the report document. This URL expires after 5 minutes. | string |
compressionAlgorithm optional | If present, the report document contents have been compressed with the provided algorithm. | enum (CompressionAlgorithm) |
ProcessingStatuses
Type : enum
Value | Description |
---|---|
CANCELLED | The report was cancelled. There are two ways a report can be cancelled: an explicit cancellation request before the report starts processing, or an automatic cancellation if there is no data to return. |
DONE | The report has completed processing. |
FATAL | The report was aborted due to a fatal error. |
IN_PROGRESS | The report is being processed. |
IN_QUEUE | The report processing hasn't started. The system may be waiting for another report to complete. |
ProcessingStatus
The processing status of the report.
Type : enum
Value | Description |
---|---|
CANCELLED | The report was cancelled. There are two ways a report can be cancelled: an explicit cancellation request before the report starts processing, or an automatic cancellation if there is no data to return. |
DONE | The report has completed processing. |
FATAL | The report was aborted due to a fatal error. |
IN_PROGRESS | The report is being processed. |
IN_QUEUE | The report processing hasn't started. The system may be waiting for another report to complete. |
CompressionAlgorithm
If present, the report document contents have been compressed with the provided algorithm.
Type : enum
Value | Description |
---|---|
GZIP | The gzip compression algorithm. |
Updated about 13 hours ago