Reporting API v1 reference
Amazon Business API for Order History
Overview
With Amazon Business API for Order History you can create spend reports and track progress towards your spending goals
Version information
Version : 2021-01-08
License information
License : Amazon Software License
License URL : https://aws.amazon.com/asl/
URI scheme
Host : api.business.amazon.com
Schemes : HTTPS
Consumes
application/json
Produces
application/json
External Docs
Description : Learn more about the Amazon Business API.
URL : http://business.amazon.com
Operations
getOrdersByOrderDate
getOrdersByOrderId
Paths
GET /reports/2021-01-08/orders
Operation: getOrdersByOrderDate
Description
Returns a paginated list of orders with order dates that fall within the date range that you specify. You can optionally retrieve lineItem, charges and shipments for these orders
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Query | startDate required | Lower limit for the search range. This date represents the order date | string (date-time) | - |
Query | nextPageToken optional | A page token returned in the response to your previous request when the number of results exceed the page size(100). To get the next page of results, include nextPageToken as the only parameter. When no nextPageToken value is returned there are no more pages to return. This token needs to be encoded | string | - |
Query | endDate required | Upper limit for the search range, This date represents the order date | string (date-time) | - |
Query | purchaseOrderNumber optional | The purchase order number associated with the item of a PPI order. This number is created by the buyer. This is an option param to only get order details for a specific purchase order number. This is currently under testing | string | - |
Query | includeLineItems optional | Option to get all line items associated with the order | boolean | "false" |
Query | includeShipments optional | Option to get all shipments associated with the order | boolean | "false" |
Query | includeCharges optional | Option to get all charges associated with the order | boolean | "false" |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | Orders successfully retrieved Headers : Access-Control-Allow-Origin (string) x-amzn-RateLimit-Limit (string) : Your rate limit (requests per second) for this operation. x-amzn-requestid (string) : Unique request reference identifier. | OrdersOutput |
For error status codes, descriptions and schemas, see Error responses and schemas.
Produces
application/json
GET /reports/2021-01-08/orders/{orderId}
Operation: getOrdersByOrderId
Description
API to fetch details for a specific order based on order identifier.You can optionally retrieve lineItem, charges and shipments for this order
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path | orderId required | Order identifier to get the corresponding order details | string | - |
Query | includeLineItems optional | Option to get all line items associated with the order | boolean | "false" |
Query | includeShipments optional | Option to get all shipments associated with the order | boolean | "false" |
Query | includeCharges optional | Option to get all charges associated with the order | boolean | "false" |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 | Orders retrieved successfully Headers : Access-Control-Allow-Origin (string) x-amzn-RateLimit-Limit (string) : Your rate limit (requests per second) for this operation. x-amzn-requestid (string) : Unique request reference identifier. | OrdersOutput |
For error status codes, descriptions and schemas, see Error responses and schemas.
Produces
application/json
Error Responses and Schemas
This table contains HTTP status codes and associated information for error responses.
HTTP Code | Description | Schema |
---|---|---|
400 | 400 response Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. x-amzn-requestId (string):Unique request reference identifier. | ErrorList |
401 | 401 response Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. x-amzn-requestId (string):Unique request reference identifier. | ErrorList |
403 | 403 response Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. x-amzn-requestId (string):Unique request reference identifier. | ErrorList |
404 | 404 response Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. x-amzn-requestId (string):Unique request reference identifier. | ErrorList |
429 | 429 response Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. x-amzn-requestId (string):Unique request reference identifier. | ErrorList |
500 | 500 response Headers: Access-Control-Allow-Origin (string) x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. x-amzn-requestId (string):Unique request reference identifier. | ErrorList |
504 | 504 response Headers: x-amzn-RateLimit-Limit (string):Your rate limit (requests per second) for this operation. x-amzn-requestId (string):Unique request reference identifier. | ErrorList |
Definitions
Money
The monetary value.
Name | Description | Schema |
---|---|---|
currencyCode required | The three-digit currency code, in ISO 4217 format. | string |
amount required | The currency amount. | string |
Order
The response schema for the getOrdersByDates and getOrdersById operations
Name | Description | Schema |
---|---|---|
orderDate required | Date when order was placed. | string (date-time) |
orderId required | Amazon order identifier. | string |
purchaseOrderNumber required | Purchase Order Number assigned to the order. | string |
orderQuantity required | The item quantity relevant to this order. | integer |
orderStatus required | The status of the order. | enum (OrderStatus) |
lastOrderApproverName required | Name of the last person who took action on order approval. | string |
buyingCustomer required | Requisitioner or buyer that placed the order. | Customer |
buyerGroupName required | The group within the business from which the order was placed. | string |
businessOrderInfo required | Additional information provided at checkout. | < string, string > map |
orderSubTotal required | Principal amount on the order (only includes the price; excludes shipping, taxes, or discounts). | Money |
orderShippingAndHandling required | Total shipping charges applied (excludes shipment tax and discounts). | Money |
orderPromotion required | Sum of all discounts on all order items and shipping (we don't show shipping discounts separately by each individual order). | Money |
orderTax required | Sum of all taxes on the order | Money |
orderNetTotal required | Total amount charged for the order. | Money |
lineItems optional | Total items of the order | < LineItem > array |
shipments optional | Total shipments of the order | < Shipment > array |
charges optional | Total charges of the order | < Charge > array |
Charge
This attribute represents a charge object
Name | Description | Schema |
---|---|---|
transactionDate required | Date when payment was processed. | string (date-time) |
transactionId required | Transaction reference identifier of the transaction. | string |
amount required | Amount charged for a particular transaction. If amount is not settled yet, this is the amount for which Amazon received an authorization. | Money |
paymentInstrumentType required | Credit card, Pay by Invoice, Bank Account, Reward Account, etc. | string |
paymentInstrumentLast4Digits required | The last 4 digits of the payment card used in the transaction. If Pay by Invoice was used, this value is null. | string |
Customer
A customer with a role in a purchase (Buyer,Payer,Approver etc.,).
Name | Description | Schema |
---|---|---|
id required | Unique customer identifier internal to Amazon. This is currently in testing | string |
name optional | The customer name. | string |
email optional | The customer email address. | string |
OrdersOutput
A model which represents a paginated list of orders
Name | Description | Schema |
---|---|---|
orders required | Orders for the given date range or by the given orderId | < Order > array |
nextPageToken required | A page token returned in the response to your previous request when the number of results exceed the page size(100). To get the next page of results, include nextPageToken as the only parameter. When no nextPageToken value is returned there are no more pages to return. | string |
size required | Size of the orders returned in the current response | integer |
LineItem
This attribute represents a line item object
Name | Description | Schema |
---|---|---|
productCategory required | Category of the product according to Amazon terminology. | string |
asin required | The Amazon Standard Identification Number (ASIN) for the item | string |
title required | The title of the item. | string |
unspsc required | The United Nations Standard Products and Services Code for the item | string |
productCondition required | Condition of the item purchased (new, used, used good, etc.). | string |
listedPricePerUnit required | Listed Price Per Unit on Amazon Business. | Money |
purchasedPricePerUnit required | Purchased Price Per Unit | Money |
itemQuantity required | Quantity of a line item. | integer |
itemSubTotal required | Total principal amount you paid for individual items in the order. Excludes tax, promotions, discounts, and shipping and handling. | Money |
itemShippingAndHandling required | Principal amounts for the shipping and handling for each item. Excludes the corresponding tax and discount amounts. | Money |
itemPromotion required | Total discounts or promotions applied to a line item. Includes all discount components (discount on price, shipping, gift wrapping, other fees, etc.). Excludes tax. | Money |
itemTax required | Total tax charged on item. | Money |
itemNetTotal required | Total charged for the item. Including tax, discounts, shipping and handling, and item price. | Money |
purchaseOrderLineItem required | Only for customers using Punchout. The cXML system adds a line item number. | string |
taxExemptionApplied required | Yes or No. | boolean |
taxExemptionType required | Code that specifies the type of tax exemption applied | string |
taxExemptOptOut required | Yes or No. | boolean |
discountProgram required | Negotiated Pricing or Quantity Discounts | string |
discountType required | Type of the discount applied | string |
discountAmount required | Amount (in dollars) discounted | Money |
discountRatio required | The ratio of price to discount. | string |
seller required | Information of the selling merchant including name, city, state and postal code. | Seller |
sellerCredentials required | Seller's credentials or certifications (i.e. Minority owned business, Veteran owned business, etc.) | < string > array |
brandCode required | Brand code as provided by the vendor or seller. | string |
brandName required | Item Brand as provided by the vendor or seller. | string |
manufacturerName required | Name of the manufacturer as provided by the vendor or seller. | string |
transactionIds required | Transaction reference identifiers for the LineItem. | < string > array |
carrierTrackingNumbers required | Tracking numbers from the shipment carrier for the LineItem. | < string > array |
Seller
This attribute represents the name, city, state and postal code of the selling merchant.
Name | Description | Schema |
---|---|---|
sellerName required | Name of the selling merchant. | string |
sellerCity required | City of the selling merchant. | string |
sellerState required | State of the selling merchant. | string |
sellerPostalCode required | Postal code of the selling merchant. | string |
Shipment
This attribute represents a shipment object
Name | Description | Schema |
---|---|---|
shipmentDate required | Date when the item was shipped | string (date-time) |
shipmentStatus required | Current status of the shipment | enum (ShipmentStatus) |
carrierTracking required | Tracking number from the shipment carrier. | string |
deliveryInformation required | Details the delivery status and estimated delivery date. | DeliveryInformation |
shipmentQuantity required | Total quantity (across all line items) in the shipment. | integer |
shipmentSubTotal required | This is the sum of all items in a shipment order (only includes the price; excludes shipping, taxes, or discounts). | Money |
shipmentShippingAndHandling required | Shipping and handling for the line items in the shipment. | Money |
shipmentPromotion required | Sum of all discounts for line items in the shipment | Money |
shipmentTax required | Sum of all taxes charged for line items in the shipment. | Money |
shipmentNetTotal required | Total amount charged for the shipment. | Money |
carrierName required | Name of the shipment carrier. | string |
DeliveryInformation
Details the delivery status and estimated delivery date.
Name | Description | Schema |
---|---|---|
expectedDeliveryDate required | The expected delivery date of the shipment. | string (date-time) |
deliveryStatus required | The current delivery status of the shipment. | enum (DeliveryStatus) |
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 |
OrderStatus
The status of the order.
Type : enum
Value | Description |
---|---|
Pending Approval | The order has been submitted for approval. |
Payment Confirmed | The payment information has been collected by Amazon Business. This doesn’t mean that payment has been authorized by the bank or that Amazon Business have the collected funds. |
Pending Fulfillment | The order is due for fulfillment. |
Pending | The order details are being processed by Amazon Business. |
Cancelled | The order has been cancelled either by the buyer or by Amazon Business. |
Closed | The order has been delivered to the buyer and closed. |
ShipmentStatus
Current status of the shipment
Type : enum
Value | Description |
---|---|
Shipped | The package has been shipped. |
DeliveryStatus
The current delivery status of the shipment.
Type : enum
Value | Description |
---|---|
DELIVERED | The package has been delivered. |
NOT DELIVERED | The package hasn't been delivered. |
NOT AVAILABLE | The package has no delivery information. |
Updated about 2 months ago