Reporting API v1 model

 {
  "swagger": "2.0",
  "info": {
    "title": "Amazon Business API for Order History",
    "version": "2021-01-08",
    "description": "With Amazon Business API for Order History you can create spend reports and track progress towards your spending goals",
    "license": {
      "name": "Amazon Software License",
      "url": "https://aws.amazon.com/asl/"
    }
  },
  "externalDocs": {
    "description": "Learn more about the Amazon Business API.",
    "url": "http://business.amazon.com"
  },
  "host": "api.business.amazon.com",
  "schemes": [
    "https"
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {
    "/reports/2021-01-08/orders": {
      "get": {
        "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",
        "operationId": "getOrdersByOrderDate",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "startDate",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "date-time",
            "description": "Lower limit for the search range. This date represents the order date"
          },
          {
            "name": "nextPageToken",
            "in": "query",
            "required": false,
            "type": "string",
            "description": "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"
          },
          {
            "name": "endDate",
            "in": "query",
            "required": true,
            "type": "string",
            "format": "date-time",
            "description": "Upper limit for the search range, This date represents the order date"
          },
          {
            "name": "purchaseOrderNumber",
            "in": "query",
            "required": false,
            "type": "string",
            "description": "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**"
          },
          {
            "name": "includeLineItems",
            "in": "query",
            "required": false,
            "type": "boolean",
            "default": false,
            "description": "Option to get all line items associated with the order"
          },
          {
            "name": "includeShipments",
            "in": "query",
            "required": false,
            "type": "boolean",
            "default": false,
            "description": "Option to get all shipments associated with the order"
          },
          {
            "name": "includeCharges",
            "in": "query",
            "required": false,
            "type": "boolean",
            "default": false,
            "description": "Option to get all charges associated with the order"
          }
        ],
        "responses": {
          "200": {
            "description": "Orders successfully retrieved",
            "schema": {
              "$ref": "#/definitions/OrdersOutput"
            },
            "x-amazon-spds-sandbox-behaviors": [
              {
                "request": {
                  "parameters": {
                    "startDate": {
                      "value": "2020-12-01T00:00:00"
                    },
                    "endDate": {
                      "value": "2020-12-01T23:00:00"
                    }
                  }
                },
                "response": {
                  "orders": [
                    {
                      "orderDate": "2020-12-01T01:55:00Z",
                      "orderId": "112-1248174-0174665",
                      "purchaseOrderNumber": "[purchaseOrderNumber]",
                      "orderQuantity": 0,
                      "orderStatus": "CANCELLED",
                      "orderSubTotal": {
                        "currencyCode": "USD",
                        "amount": "0"
                      },
                      "orderShippingAndHandling": {
                        "currencyCode": "USD",
                        "amount": "0"
                      },
                      "orderPromotion": {
                        "currencyCode": "USD",
                        "amount": "0"
                      },
                      "orderTax": {
                        "currencyCode": "USD",
                        "amount": "0"
                      },
                      "orderNetTotal": {
                        "currencyCode": "USD",
                        "amount": "0"
                      },
                      "lastOrderApproverName": "[lastOrderApproverName]",
                      "buyingCustomer": {
                        "id": "[EMPTY]",
                        "email": "[[email protected]]",
                        "name": "[buyingCustomerName]"
                      },
                      "buyerGroupName": "[buyerGroupName]",
                      "businessOrderInfo": {
                        "purchaseOrderNumber": "[purchaseOrderNumber]",
                        "glCode": "[glCode]",
                        "costCenter": "[costCenter]",
                        "location": "[location]",
                        "projectCode": "[projectCode]",
                        "department": "[department]",
                        "customField": "[customValue]"
                      },
                      "lineItems": [
                        {
                          "productCategory": "[productCategory]",
                          "asin": "[productAsin]",
                          "title": "[productTitle]",
                          "unspsc": "[unspsc]",
                          "productCondition": "New",
                          "listedPricePerUnit": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "purchasedPricePerUnit": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "itemQuantity": 3,
                          "itemSubTotal": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "itemShippingAndHandling": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "itemPromotion": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "itemTax": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "itemNetTotal": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "purchaseOrderLineItem": "[purchaseOrderLineItem]",
                          "taxExemptionApplied": true,
                          "taxExemptionType": "[taxExemptionType]",
                          "taxExemptOptOut": false,
                          "discountProgram": "[discountProgram]",
                          "discountType": "[discountType]",
                          "discountAmount": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "discountRatio": "0.1",
                          "seller": {
                            "sellerName": "[sellerName]",
                            "sellerCity": "[sellerCity]",
                            "sellerState": "[sellerState]",
                            "sellerPostalCode": "[sellerPostalCode]"
                          },
                          "sellerCredentials": [
                            "[sellerCredential]"
                          ],
                          "brandCode": "[brandCode]",
                          "brandName": "[brandName]",
                          "manufacturerName": "[manufacturerName]",
                          "transactionIds": [
                            "[transactionId]"
                          ],
                          "carrierTrackingNumbers": [
                            "[carrierTrackingNumber]"
                          ]
                        }
                      ],
                      "shipments": [
                        {
                          "shipmentDate": "2020-12-15T15:14:02Z",
                          "shipmentStatus": "SHIPPED",
                          "carrierTracking": "[carrierTracking]",
                          "deliveryInformation": {
                            "expectedDeliveryDate": "2020-12-15T15:14:02Z",
                            "deliveryStatus": "DELIVERED"
                          },
                          "shipmentQuantity": 1,
                          "shipmentSubTotal": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "shipmentShippingAndHandling": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "shipmentPromotion": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "shipmentTax": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "shipmentNetTotal": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "carrierName": "[carrierName]"
                        }
                      ],
                      "charges": [
                        {
                          "transactionDate": "2020-12-15T15:14:02Z",
                          "transactionId": "[transactionId]",
                          "amount": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "paymentInstrumentType": "[paymentInstrumentType]",
                          "paymentInstrumentLast4Digits": "[paymentInstrumentLast4Digits]"
                        }
                      ]
                    }
                  ],
                  "nextPageToken": "[nextPageToken]",
                  "size": 1
                }
              }
            ],
            "headers": {
              "Access-Control-Allow-Origin": {
                "type": "string"
              },
              "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"
              }
            }
          },
          "400": {
            "description": "400 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "x-amazon-spds-sandbox-behaviors": [
              {
                "request": {
                  "parameters": {
                    "startDate": {
                      "value": "2020-12-01T00:00:00"
                    },
                    "endDate": {
                      "value": "2020-08-01T00:00:00"
                    }
                  }
                },
                "response": {
                  "errors": [
                    {
                      "code": "INVALID_REQUEST_PARAMETER",
                      "message": "Bad number of query parameters. Please specify either a date range or a purchase order number."
                    }
                  ]
                }
              }
            ],
            "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"
              }
            }
          },
          "401": {
            "description": "401 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "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"
              }
            }
          },
          "403": {
            "description": "403 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "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"
              }
            }
          },
          "404": {
            "description": "404 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "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"
              }
            }
          },
          "429": {
            "description": "429 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "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"
              }
            }
          },
          "500": {
            "description": "500 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "headers": {
              "Access-Control-Allow-Origin": {
                "type": "string"
              },
              "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"
              }
            }
          },
          "504": {
            "description": "504 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "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"
              }
            }
          }
        }
      }
    },
    "/reports/2021-01-08/orders/{orderId}": {
      "get": {
        "description": "API to fetch details for a specific order based on order identifier.You can optionally retrieve lineItem, charges and shipments for this order",
        "operationId": "getOrdersByOrderId",
        "produces": [
          "application/json"
        ],
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "type": "string",
            "description": "Order identifier to get the corresponding order details"
          },
          {
            "name": "includeLineItems",
            "in": "query",
            "required": false,
            "type": "boolean",
            "default": false,
            "description": "Option to get all line items associated with the order"
          },
          {
            "name": "includeShipments",
            "in": "query",
            "required": false,
            "type": "boolean",
            "default": false,
            "description": "Option to get all shipments associated with the order"
          },
          {
            "name": "includeCharges",
            "in": "query",
            "required": false,
            "type": "boolean",
            "default": false,
            "description": "Option to get all charges associated with the order"
          }
        ],
        "responses": {
          "200": {
            "description": "Orders retrieved successfully",
            "schema": {
              "$ref": "#/definitions/OrdersOutput"
            },
            "x-amazon-spds-sandbox-behaviors": [
              {
                "request": {
                  "parameters": {
                    "orderId": {
                      "value": "114-7470804-5505847"
                    }
                  }
                },
                "response": {
                  "orders": [
                    {
                      "orderDate": "2020-12-01T01:55:00Z",
                      "orderId": "112-1248174-0174665",
                      "purchaseOrderNumber": "[purchaseOrderNumber]",
                      "orderQuantity": 0,
                      "orderStatus": "CANCELLED",
                      "orderSubTotal": {
                        "currencyCode": "USD",
                        "amount": "0"
                      },
                      "orderShippingAndHandling": {
                        "currencyCode": "USD",
                        "amount": "0"
                      },
                      "orderPromotion": {
                        "currencyCode": "USD",
                        "amount": "0"
                      },
                      "orderTax": {
                        "currencyCode": "USD",
                        "amount": "0"
                      },
                      "orderNetTotal": {
                        "currencyCode": "USD",
                        "amount": "0"
                      },
                      "lastOrderApproverName": "[lastOrderApproverName]",
                      "buyingCustomer": {
                        "id": "[EMPTY]",
                        "email": "[[email protected]]",
                        "name": "[buyingCustomerName]"
                      },
                      "buyerGroupName": "[buyerGroupName]",
                      "businessOrderInfo": {
                        "purchaseOrderNumber": "[purchaseOrderNumber]",
                        "glCode": "[glCode]",
                        "costCenter": "[costCenter]",
                        "location": "[location]",
                        "projectCode": "[projectCode]",
                        "department": "[department]",
                        "customField": "[customValue]"
                      },
                      "lineItems": [
                        {
                          "productCategory": "[productCategory]",
                          "asin": "[productAsin]",
                          "title": "[productTitle]",
                          "unspsc": "[unspsc]",
                          "productCondition": "New",
                          "listedPricePerUnit": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "purchasedPricePerUnit": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "itemQuantity": 3,
                          "itemSubTotal": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "itemShippingAndHandling": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "itemPromotion": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "itemTax": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "itemNetTotal": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "purchaseOrderLineItem": "[purchaseOrderLineItem]",
                          "taxExemptionApplied": true,
                          "taxExemptionType": "[taxExemptionType]",
                          "taxExemptOptOut": false,
                          "discountProgram": "[discountProgram]",
                          "discountType": "[discountType]",
                          "discountAmount": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "discountRatio": "0.1",
                          "seller": {
                            "sellerName": "[sellerName]",
                            "sellerCity": "[sellerCity]",
                            "sellerState": "[sellerState]",
                            "sellerPostalCode": "[sellerPostalCode]"
                          },
                          "sellerCredentials": [
                            "[sellerCredential]"
                          ],
                          "brandCode": "[brandCode]",
                          "brandName": "[brandName]",
                          "manufacturerName": "[manufacturerName]",
                          "transactionIds": [
                            "[transactionId]"
                          ],
                          "carrierTrackingNumbers": [
                            "[carrierTrackingNumber]"
                          ]
                        }
                      ],
                      "shipments": [
                        {
                          "shipmentDate": "2020-12-15T15:14:02Z",
                          "shipmentStatus": "SHIPPED",
                          "carrierTracking": "[carrierTracking]",
                          "deliveryInformation": {
                            "expectedDeliveryDate": "2020-12-15T15:14:02Z",
                            "deliveryStatus": "DELIVERED"
                          },
                          "shipmentQuantity": 1,
                          "shipmentSubTotal": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "shipmentShippingAndHandling": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "shipmentPromotion": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "shipmentTax": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "shipmentNetTotal": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "carrierName": "[carrierName]"
                        }
                      ],
                      "charges": [
                        {
                          "transactionDate": "2020-12-15T15:14:02Z",
                          "transactionId": "[transactionId]",
                          "amount": {
                            "currencyCode": "USD",
                            "amount": "0"
                          },
                          "paymentInstrumentType": "[paymentInstrumentType]",
                          "paymentInstrumentLast4Digits": "[paymentInstrumentLast4Digits]"
                        }
                      ]
                    }
                  ],
                  "nextPageToken": "[nextPageToken]",
                  "size": 1
                }
              }
            ],
            "headers": {
              "Access-Control-Allow-Origin": {
                "type": "string"
              },
              "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"
              }
            }
          },
          "400": {
            "description": "400 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "x-amazon-spds-sandbox-behaviors": [
              {
                "request": {
                  "parameters": {}
                },
                "response": {
                  "errors": [
                    {
                      "code": "INVALID_REQUEST_PARAMETER",
                      "message": "Bad number of query parameters. Please specify either a date range or a purchase order number."
                    }
                  ]
                }
              }
            ],
            "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"
              }
            }
          },
          "403": {
            "description": "403 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "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"
              }
            }
          },
          "404": {
            "description": "404 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "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"
              }
            }
          },
          "429": {
            "description": "429 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "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"
              }
            }
          },
          "500": {
            "description": "500 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "headers": {
              "Access-Control-Allow-Origin": {
                "type": "string"
              },
              "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"
              }
            }
          },
          "504": {
            "description": "504 response",
            "schema": {
              "$ref": "#/definitions/ErrorList"
            },
            "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"
              }
            }
          }
        }
      }
    }
  },
  "definitions": {
    "Money": {
      "description": "The monetary value.",
      "type": "object",
      "required": [
        "currencyCode",
        "amount"
      ],
      "properties": {
        "currencyCode": {
          "type": "string",
          "description": "The three-digit currency code, in ISO 4217 format."
        },
        "amount": {
          "type": "string",
          "description": "The currency amount."
        }
      }
    },
    "Order": {
      "description": "The response schema for the getOrdersByDates and getOrdersById operations",
      "type": "object",
      "required": [
        "orderDate",
        "orderId",
        "purchaseOrderNumber",
        "orderQuantity",
        "orderStatus",
        "lastOrderApproverName",
        "buyingCustomer",
        "buyerGroupName",
        "orderSubTotal",
        "orderShippingAndHandling",
        "orderPromotion",
        "orderTax",
        "orderNetTotal",
        "businessOrderInfo"
      ],
      "properties": {
        "orderDate": {
          "description": "Date when order was placed.",
          "type": "string",
          "format": "date-time"
        },
        "orderId": {
          "description": "Amazon order identifier.",
          "type": "string"
        },
        "purchaseOrderNumber": {
          "description": "Purchase Order Number assigned to the order.",
          "type": "string"
        },
        "orderQuantity": {
          "description": "The item quantity relevant to this order.",
          "type": "integer"
        },
        "orderStatus": {
          "description": "The status of the order.",
          "type": "string",
          "enum": [
            "Pending Approval",
            "Payment Confirmed",
            "Pending Fulfillment",
            "Pending",
            "Cancelled",
            "Closed"
          ],
          "x-docgen-enum-table-extension": [
            {
              "value": "Pending Approval",
              "description": "The order has been submitted for approval."
            },
            {
              "value": "Payment Confirmed",
              "description": "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."
            },
            {
              "value": "Pending Fulfillment",
              "description": "The order is due for fulfillment."
            },
            {
              "value": "Pending",
              "description": "The order details are being processed by Amazon Business."
            },
            {
              "value": "Cancelled",
              "description": "The order has been cancelled either by the buyer or by Amazon Business."
            },
            {
              "value": "Closed",
              "description": "The order has been delivered to the buyer and closed."
            }
          ]
        },
        "lastOrderApproverName": {
          "description": "Name of the last person who took action on order approval.",
          "type": "string"
        },
        "buyingCustomer": {
          "description": "Requisitioner or buyer that placed the order.",
          "$ref": "#/definitions/Customer"
        },
        "buyerGroupName": {
          "description": "The group within the business from which the order was placed.",
          "type": "string"
        },
        "businessOrderInfo": {
          "type": "object",
          "description": "Additional information provided at checkout.",
          "additionalProperties": {
            "type": "string"
          }
        },
        "orderSubTotal": {
          "description": "Principal amount on the order (only includes the price; excludes shipping, taxes, or discounts).",
          "$ref": "#/definitions/Money"
        },
        "orderShippingAndHandling": {
          "description": "Total shipping charges applied (excludes shipment tax and discounts).",
          "$ref": "#/definitions/Money"
        },
        "orderPromotion": {
          "description": "Sum of all discounts on all order items and shipping (we don't show shipping discounts separately by each individual order).",
          "$ref": "#/definitions/Money"
        },
        "orderTax": {
          "description": "Sum of all taxes on the order",
          "$ref": "#/definitions/Money"
        },
        "orderNetTotal": {
          "description": "Total amount charged for the order.",
          "$ref": "#/definitions/Money"
        },
        "lineItems": {
          "description": "Total items of the order",
          "type": "array",
          "items": {
            "$ref": "#/definitions/LineItem"
          }
        },
        "shipments": {
          "description": "Total shipments of the order",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Shipment"
          }
        },
        "charges": {
          "description": "Total charges of the order",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Charge"
          }
        }
      }
    },
    "Charge": {
      "type": "object",
      "required": [
        "transactionDate",
        "transactionId",
        "amount",
        "paymentInstrumentType",
        "paymentInstrumentLast4Digits"
      ],
      "properties": {
        "transactionDate": {
          "description": "Date when payment was processed.",
          "type": "string",
          "format": "date-time"
        },
        "transactionId": {
          "description": "Transaction reference identifier of the transaction.",
          "type": "string"
        },
        "amount": {
          "description": "Amount charged for a particular transaction. If amount is not settled yet, this is the amount for which Amazon received an authorization.",
          "$ref": "#/definitions/Money"
        },
        "paymentInstrumentType": {
          "description": "Credit card, Pay by Invoice, Bank Account, Reward Account, etc.",
          "type": "string"
        },
        "paymentInstrumentLast4Digits": {
          "description": "The last 4 digits of the payment card used in the transaction. If Pay by Invoice was used, this value is null.",
          "type": "string"
        }
      },
      "description": "This attribute represents a charge object"
    },
    "Customer": {
      "description": "A customer with a role in a purchase (Buyer,Payer,Approver etc.,).",
      "type": "object",
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "description": "Unique customer identifier internal to Amazon. **This is currently in testing**",
          "type": "string"
        },
        "name": {
          "description": "The customer name.",
          "type": "string"
        },
        "email": {
          "description": "The customer email address.",
          "type": "string"
        }
      }
    },
    "OrdersOutput": {
      "type": "object",
      "description": "A model which represents a paginated list of orders",
      "required": [
        "orders",
        "nextPageToken",
        "size"
      ],
      "properties": {
        "orders": {
          "description": "Orders for the given date range or by the given orderId",
          "type": "array",
          "items": {
            "$ref": "#/definitions/Order"
          }
        },
        "nextPageToken": {
          "description": "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.",
          "type": "string"
        },
        "size": {
          "description": "Size of the orders returned in the current response",
          "type": "integer"
        }
      }
    },
    "LineItem": {
      "type": "object",
      "description": "This attribute represents a line item object",
      "required": [
        "productCategory",
        "asin",
        "title",
        "unspsc",
        "productCondition",
        "listedPricePerUnit",
        "purchasedPricePerUnit",
        "itemQuantity",
        "itemSubTotal",
        "itemShippingAndHandling",
        "itemPromotion",
        "itemTax",
        "itemNetTotal",
        "purchaseOrderLineItem",
        "taxExemptionApplied",
        "taxExemptionType",
        "taxExemptOptOut",
        "discountProgram",
        "discountType",
        "discountAmount",
        "discountRatio",
        "seller",
        "sellerCredentials",
        "brandCode",
        "brandName",
        "manufacturerName",
        "transactionIds",
        "carrierTrackingNumbers"
      ],
      "properties": {
        "productCategory": {
          "description": "Category of the product according to Amazon terminology.",
          "type": "string"
        },
        "asin": {
          "description": "The Amazon Standard Identification Number (ASIN) for the item",
          "type": "string"
        },
        "title": {
          "description": "The title of the item.",
          "type": "string"
        },
        "unspsc": {
          "description": "The United Nations Standard Products and Services Code for the item",
          "type": "string"
        },
        "productCondition": {
          "description": "Condition of the item purchased (new, used, used good, etc.).",
          "type": "string"
        },
        "listedPricePerUnit": {
          "description": "Listed Price Per Unit on Amazon Business.",
          "$ref": "#/definitions/Money"
        },
        "purchasedPricePerUnit": {
          "description": "Purchased Price Per Unit",
          "$ref": "#/definitions/Money"
        },
        "itemQuantity": {
          "description": "Quantity of a line item.",
          "type": "integer"
        },
        "itemSubTotal": {
          "description": "Total principal amount you paid for individual items in the order. Excludes tax, promotions, discounts, and shipping and handling.",
          "$ref": "#/definitions/Money"
        },
        "itemShippingAndHandling": {
          "description": "Principal amounts for the shipping and handling for each item. Excludes the corresponding tax and discount amounts.",
          "$ref": "#/definitions/Money"
        },
        "itemPromotion": {
          "description": "Total discounts or promotions applied to a line item. Includes all discount components (discount on price, shipping, gift wrapping, other fees, etc.). Excludes tax.",
          "$ref": "#/definitions/Money"
        },
        "itemTax": {
          "description": "Total tax charged on item.",
          "$ref": "#/definitions/Money"
        },
        "itemNetTotal": {
          "description": "Total charged for the item. Including tax, discounts, shipping and handling, and item price.",
          "$ref": "#/definitions/Money"
        },
        "purchaseOrderLineItem": {
          "description": "Only for customers using Punchout. The cXML system adds a line item number.",
          "type": "string"
        },
        "taxExemptionApplied": {
          "description": "Yes or No.",
          "type": "boolean"
        },
        "taxExemptionType": {
          "description": "Code that specifies the type of tax exemption applied",
          "type": "string"
        },
        "taxExemptOptOut": {
          "description": "Yes or No.",
          "type": "boolean"
        },
        "discountProgram": {
          "description": "Negotiated Pricing or Quantity Discounts",
          "type": "string"
        },
        "discountType": {
          "description": "Type of the discount applied",
          "type": "string"
        },
        "discountAmount": {
          "description": "Amount (in dollars) discounted ",
          "$ref": "#/definitions/Money"
        },
        "discountRatio": {
          "description": "The ratio of price to discount.",
          "type": "string"
        },
        "seller": {
          "description": "Information of the selling merchant including name, city, state and postal code.",
          "$ref": "#/definitions/Seller"
        },
        "sellerCredentials": {
          "description": "Seller's credentials or certifications (i.e. Minority owned business, Veteran owned business, etc.)",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "brandCode": {
          "description": "Brand code as provided by the vendor or seller.",
          "type": "string"
        },
        "brandName": {
          "description": "Item Brand as provided by the vendor or seller.",
          "type": "string"
        },
        "manufacturerName": {
          "description": "Name of the manufacturer as provided by the vendor or seller.",
          "type": "string"
        },
        "transactionIds": {
          "description": "Transaction reference identifiers for the LineItem.",
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "carrierTrackingNumbers": {
          "description": "Tracking numbers from the shipment carrier for the LineItem.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Seller": {
      "type": "object",
      "description": "This attribute represents the name, city, state and postal code of the selling merchant.",
      "required": [
        "sellerName",
        "sellerCity",
        "sellerState",
        "sellerPostalCode"
      ],
      "properties": {
        "sellerName": {
          "description": "Name of the selling merchant.",
          "type": "string"
        },
        "sellerCity": {
          "description": "City of the selling merchant.",
          "type": "string"
        },
        "sellerState": {
          "description": "State of the selling merchant.",
          "type": "string"
        },
        "sellerPostalCode": {
          "description": "Postal code of the selling merchant.",
          "type": "string"
        }
      }
    },
    "Shipment": {
      "type": "object",
      "description": "This attribute represents a shipment object",
      "required": [
        "shipmentDate",
        "shipmentStatus",
        "carrierTracking",
        "deliveryInformation",
        "shipmentQuantity",
        "shipmentSubTotal",
        "shipmentShippingAndHandling",
        "shipmentPromotion",
        "shipmentTax",
        "shipmentNetTotal",
        "carrierName"
      ],
      "properties": {
        "shipmentDate": {
          "description": "Date when the item was shipped",
          "type": "string",
          "format": "date-time"
        },
        "shipmentStatus": {
          "description": "Current status of the shipment",
          "type": "string",
          "enum": [
            "Shipped"
          ],
          "x-docgen-enum-table-extension": [
            {
              "value": "Shipped",
              "description": "The package has been shipped."
            }
          ]
        },
        "carrierTracking": {
          "description": "Tracking number from the shipment carrier.",
          "type": "string"
        },
        "deliveryInformation": {
          "description": "Details the delivery status and estimated delivery date.",
          "$ref": "#/definitions/DeliveryInformation"
        },
        "shipmentQuantity": {
          "description": "Total quantity (across all line items) in the shipment.",
          "type": "integer"
        },
        "shipmentSubTotal": {
          "description": "This is the sum of all items in a shipment order (only includes the price; excludes shipping, taxes, or discounts).",
          "$ref": "#/definitions/Money"
        },
        "shipmentShippingAndHandling": {
          "description": "Shipping and handling for the line items in the shipment.",
          "$ref": "#/definitions/Money"
        },
        "shipmentPromotion": {
          "description": "Sum of all discounts for line items in the shipment",
          "$ref": "#/definitions/Money"
        },
        "shipmentTax": {
          "description": "Sum of all taxes charged for line items in the shipment.",
          "$ref": "#/definitions/Money"
        },
        "shipmentNetTotal": {
          "description": "Total amount charged for the shipment.",
          "$ref": "#/definitions/Money"
        },
        "carrierName": {
          "description": "Name of the shipment carrier.",
          "type": "string"
        }
      }
    },
    "DeliveryInformation": {
      "type": "object",
      "description": "Details the delivery status and estimated delivery date.",
      "required": [
        "expectedDeliveryDate",
        "deliveryStatus"
      ],
      "properties": {
        "expectedDeliveryDate": {
          "type": "string",
          "description": "The expected delivery date of the shipment.",
          "format": "date-time"
        },
        "deliveryStatus": {
          "type": "string",
          "description": "The current delivery status of the shipment.",
          "enum": [
            "DELIVERED",
            "NOT DELIVERED",
            "NOT AVAILABLE"
          ],
          "x-docgen-enum-table-extension": [
            {
              "value": "DELIVERED",
              "description": "The package has been delivered."
            },
            {
              "value": "NOT DELIVERED",
              "description": "The package hasn't been delivered."
            },
            {
              "value": "NOT AVAILABLE",
              "description": "The package has no delivery information."
            }
          ]
        }
      }
    },
    "ErrorList": {
      "type": "object",
      "description": "A list of error responses returned when a request is unsuccessful.",
      "required": [
        "errors"
      ],
      "properties": {
        "errors": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Error"
          }
        }
      }
    },
    "Error": {
      "description": "Error response returned when the request is unsuccessful.",
      "properties": {
        "code": {
          "description": "An error code that identifies the type of error that occurred.",
          "type": "string"
        },
        "message": {
          "description": "A message that describes the error condition.",
          "type": "string"
        },
        "details": {
          "description": "Additional details that can help the caller understand or fix the issue.",
          "type": "string"
        }
      },
      "required": [
        "code",
        "message"
      ],
      "type": "object"
    }
  }
}