v1

latestOpenAPI 3.0.0Apache 2.02026-07-142008071.1 MB
Orders

BatchRetrieveOrders

Retrieves a set of orders by their IDs.

If a given order ID does not exist, the ID is ignored instead of generating an error.

post/v2/orders/batch-retrieve

Request body

location_idstring

The ID of the location for these orders. This field is optional: omit it to retrieve orders within the scope of the current authorization's merchant ID.

order_idsstring[] required

The IDs of the orders to retrieve. A maximum of 100 orders can be retrieved per request.

Example request

{
  "request_body": {
    "location_id": "057P5VYJ4A5X1",
    "order_ids": [
      "CAISEM82RcpmcFBM0TfOyiHV3es",
      "CAISENgvlJ6jLWAzERDzjyHVybY"
    ]
  }
}

Response

Success

Example response

{
  "orders": [
    {
      "id": "CAISEM82RcpmcFBM0TfOyiHV3es",
      "line_items": [
        {
          "base_price_money": {
            "amount": 1599,
            "currency": "USD"
          },
          "name": "Awesome product",
          "quantity": "1",
          "total_money": {
            "amount": 1599,
            "currency": "USD"
          },
          "uid": "945986d1-9586-11e6-ad5a-28cfe92138cf"
        },
        {
          "base_price_money": {
            "amount": 2000,
            "currency": "USD"
          },
          "name": "Another awesome product",
          "quantity": "3",
          "total_money": {
            "amount": 6000,
            "currency": "USD"
          },
          "uid": "a8f4168c-9586-11e6-bdf0-28cfe92138cf"
        }
      ],
      "location_id": "057P5VYJ4A5X1",
      "reference_id": "my-order-001",
      "total_money": {
        "amount": 7599,
        "currency": "USD"
      }
    }
  ]
}