---
title: "Get Bulk Order History"
method: GET
path: "/orders"
---

# Get Bulk Order History

`GET /orders`

## Request

- Base URL: `https://api.staging.grubtech.io/order-api`
- URL: `https://api.staging.grubtech.io/order-api/orders`
- Auth: API key in header `X-API-KEY`

The **Get Bulk Order History** endpoint is designed to retrieve historical order data in bulk. This endpoint is ideal for fetching extensive order records over a specified period, enabling you to access past orders for analysis, reporting, or record-keeping purposes. This is especially useful for tracking customer trends, reviewing operational performance, and ensuring data completeness across external systems.

## Query parameters

- `fromDate` string, required: Starting date of the date range. The date should be in ISO 8601 standard, which also has a time and time zone component.
- `toDate` string, required: End date of the date range. The date should be in ISO 8601 standard, which also has time and time zone component.
- `status` string: Status of the orders to be retrieved by a partner. If the status is set to 'COMPLETED, CANCELED' or null, the API returns completed and cancelled orders.
- `page` integer, required: The page the resultset needs to extract. If the resultset has more than one page, the user can set the page number in the URL to fetch only that results page. Note:- user should set the page as '0' since the URL for the next resultset is included in the response body.
- `size` integer, required: Maximum size of the result for one page. This value can be set up to 10,000.*
- `locationIds` string[]: Grubtech location ID to filter the orders.

## Response `200`

Successful response with requested order list.

- PagedModel
  - `page` Page: Details about the requested result set pagination.
    - `size` integer: Maximum results per page
    - `totalElements` integer: Total number of results
    - `totalPages` integer: Total number of pages
    - `number` integer: Current page number
  - `_links` Links: Details about the links that retrieve requested data.
    - `first` Link
      - `href` string: page links
    - `self` Link
      - `href` string: page links
    - `prv` Link
      - `href` string: page links
    - `next` Link
      - `href` string: page links
    - `last` Link
      - `href` string: page links
  - `_embedded` Orders: List of orders within the date range.
    - `orders` Order[]
      - `id` string: A unique identifier representing an order on the order platform.
      - `displayId` string: Human-readable short order ID, to be used by stores and couriers to identify the order.
      - `sequenceNo` string
      - `brand` Brand: Brand details of the partner related to a specific order.
        - `id` string: Unique identifier to represent the brand in Grubtech
        - `name` string: Name of the brand
      - `kitchen` Kitchen: Kitchen details of the partner related to a specific order.
        - `id` string: Unique identifier to represent kitchen in Grubtech
        - `name` string: Name of the kitchen
      - `type` string: Type of an order. Indicates how the order will be served to the customer. Possible values are DELIVERY_BY_FOOD_AGGREGATOR, DELIVERY_BY_RESTAURANT, DINE_IN and PICK_UP
      - `instructions` string: Instructions from a customer regarding the order preparation.
      - `delivery` Delivery: Contains delivery details for the order. If delivery is from GrubTech end, this field should not be null and must include all necessary information related to the delivery.
        - `receiverName` string: Name of the receiver
        - `receiverMobileNumber` string: Mobile number of the receiver
        - `location` Location: The precise address where the order will be received.
          - `address` string: Complete address of the location
          - `latitude` string: Geographic coordinate that specifies the north-south position of a point on the Earth's surface.
          - `longitude` string: Geographic coordinate that specifies the east-west position of a point on the Earth's surface.
        - `notes` string: A special note for delivery
      - `customer` Customer: The details of the person who is placing the order.
        - `name` string: Name of the customer
        - `contactNumber` string: Contact number of the customer
        - `email` string: Email address of the customer
      - `items` Item[]
        - `id` string: Unique identifying string for the item provided by the store.
        - `internalItemId` string: Unique identifier for the item on the Grubtech platform, consistent across all stores.
        - `name` string: Name of the item
        - `quantity` integer: Quantity of the items
        - `price` Price: Pricing information of the order which contains the unit price, taxes, discounts, and total price
          - `unitPrice` Money: Detailed information of the price with the amount, currency, and formatted amount.
            - `amount` integer: Specify the price amount as an integer, representing the lowest denomination (e.g., cents for USD rather than dollars). The price must always be provided, even if it is 0.
            - `currencyCode` string: Three-letter alphabetic codes represent the various currencies used worldwide.
            - `formattedAmount` string: Formatted amount. A display-friendly formatted string representation of the price amount, including currency code.
          - `discountAmount` Money: Detailed information of the price with the amount, currency, and formatted amount.
            - `amount` integer: Specify the price amount as an integer, representing the lowest denomination (e.g., cents for USD rather than dollars). The price must always be provided, even if it is 0.
            - `currencyCode` string: Three-letter alphabetic codes represent the various currencies used worldwide.
            - `formattedAmount` string: Formatted amount. A display-friendly formatted string representation of the price amount, including currency code.
          - `taxAmount` Money: Detailed information of the price with the amount, currency, and formatted amount.
            - `amount` integer: Specify the price amount as an integer, representing the lowest denomination (e.g., cents for USD rather than dollars). The price must always be provided, even if it is 0.
            - `currencyCode` string: Three-letter alphabetic codes represent the various currencies used worldwide.
            - `formattedAmount` string: Formatted amount. A display-friendly formatted string representation of the price amount, including currency code.
          - `totalPrice` Money: Detailed information of the price with the amount, currency, and formatted amount.
            - `amount` integer: Specify the price amount as an integer, representing the lowest denomination (e.g., cents for USD rather than dollars). The price must always be provided, even if it is 0.
            - `currencyCode` string: Three-letter alphabetic codes represent the various currencies used worldwide.
            - `formattedAmount` string: Formatted amount. A display-friendly formatted string representation of the price amount, including currency code.
        - `modifiers` Modifier[]
          - `id` string: Internal reference of the modifier, provided through the menu
          - `internalModifierId` string: Unique identifer for the modifier on Grubtech platform that distinguishes it across all stores.
          - `name` string: Name of the modifier
          - `quantity` integer: number of modifiers
          - `price` Price: Pricing information of the order which contains the unit price, taxes, discounts, and total price
            - `unitPrice` Money: Detailed information of the price with the amount, currency, and formatted amount.
              - …
            - `discountAmount` Money: Detailed information of the price with the amount, currency, and formatted amount.
              - …
            - `taxAmount` Money: Detailed information of the price with the amount, currency, and formatted amount.
              - …
            - `totalPrice` Money: Detailed information of the price with the amount, currency, and formatted amount.
              - …
      - `payment` Payment: Payment information related to an order
        - `status` 'PREPAID' | 'POSTPAID' | 'UNPAID' | 'FOC': The payment status of an order indicates whether the payment has been made in advance or upon delivery. PREPAID is used when the payment is completed upfront, such as when a credit card is used at the time the order is placed. UNPAID is used when payment is made upon delivery, such as cash on delivery or card on delivery.
        - `method` 'CASH' | 'CARD' | 'PREPAID' | 'FOC' | 'LOYALTY_POINTS' | 'VOUCHER' | 'MIXED': The payment method associated with an order, which should be used alongside the payment status. For example, if the payment method is Cash on Delivery, the payment status should be UNPAID, and the payment method should be marked as CASH.
        - `charges` Charges: The various charges that make up the total payment for an order, primarily related to the cost of transporting goods from the seller to the buyer.
          - `subTotal` Money: Detailed information of the price with the amount, currency, and formatted amount.
            - `amount` integer: Specify the price amount as an integer, representing the lowest denomination (e.g., cents for USD rather than dollars). The price must always be provided, even if it is 0.
            - `currencyCode` string: Three-letter alphabetic codes represent the various currencies used worldwide.
            - `formattedAmount` string: Formatted amount. A display-friendly formatted string representation of the price amount, including currency code.
          - `total` Money: Detailed information of the price with the amount, currency, and formatted amount.
            - `amount` integer: Specify the price amount as an integer, representing the lowest denomination (e.g., cents for USD rather than dollars). The price must always be provided, even if it is 0.
            - `currencyCode` string: Three-letter alphabetic codes represent the various currencies used worldwide.
            - `formattedAmount` string: Formatted amount. A display-friendly formatted string representation of the price amount, including currency code.
          - `deliveryFee` Money: Detailed information of the price with the amount, currency, and formatted amount.
            - `amount` integer: Specify the price amount as an integer, representing the lowest denomination (e.g., cents for USD rather than dollars). The price must always be provided, even if it is 0.
            - `currencyCode` string: Three-letter alphabetic codes represent the various currencies used worldwide.
            - `formattedAmount` string: Formatted amount. A display-friendly formatted string representation of the price amount, including currency code.
        - `additionalCharges` AdditionalCharges[]
          - `type` 'SERVICE_FEE' | 'DELIVERY_FEE' | 'DELIVERY_TIPS' | 'WAITER_TIPS' | 'SURCHARGE' | 'OTHER_FEES' | 'PACKAGING_FEE' | 'ENVIRONMENTAL_FEE': Service Types
          - `price` Price: Pricing information of the order which contains the unit price, taxes, discounts, and total price
            - `unitPrice` Money: Detailed information of the price with the amount, currency, and formatted amount.
              - …
            - `discountAmount` Money: Detailed information of the price with the amount, currency, and formatted amount.
              - …
            - `taxAmount` Money: Detailed information of the price with the amount, currency, and formatted amount.
              - …
            - `totalPrice` Money: Detailed information of the price with the amount, currency, and formatted amount.
              - …
          - `tax` Tax[]
            - `amount` Money: Detailed information of the price with the amount, currency, and formatted amount.
              - …
            - `name` string: the display name of the tax type. Ex:- VAT
        - `discounts` Discount[]
          - `amount` Money: Detailed information of the price with the amount, currency, and formatted amount.
            - `amount` integer: Specify the price amount as an integer, representing the lowest denomination (e.g., cents for USD rather than dollars). The price must always be provided, even if it is 0.
            - `currencyCode` string: Three-letter alphabetic codes represent the various currencies used worldwide.
            - `formattedAmount` string: Formatted amount. A display-friendly formatted string representation of the price amount, including currency code.
          - `code` string: Code to identify the specific occasion or season
          - `type` 'PROMOTION' | 'VOUCHER': Discount type
        - `tax` Tax[]
          - `amount` Money: Detailed information of the price with the amount, currency, and formatted amount.
            - `amount` integer: Specify the price amount as an integer, representing the lowest denomination (e.g., cents for USD rather than dollars). The price must always be provided, even if it is 0.
            - `currencyCode` string: Three-letter alphabetic codes represent the various currencies used worldwide.
            - `formattedAmount` string: Formatted amount. A display-friendly formatted string representation of the price amount, including currency code.
          - `name` string: the display name of the tax type. Ex:- VAT
        - `settlements` PaymentSettlement[]
          - `method` 'CASH' | 'CARD' | 'PREPAID' | 'LOYALTY_POINTS' | 'VOUCHER' | 'FOC', required: Payment method of the payment settlement
          - `amount` Money, required: Detailed information of the price with the amount, currency, and formatted amount.
            - `amount` integer: Specify the price amount as an integer, representing the lowest denomination (e.g., cents for USD rather than dollars). The price must always be provided, even if it is 0.
            - `currencyCode` string: Three-letter alphabetic codes represent the various currencies used worldwide.
            - `formattedAmount` string: Formatted amount. A display-friendly formatted string representation of the price amount, including currency code.
          - `notes` string: Remarks regarding the settlement
      - `source` Source: Detailed information about the order source
        - `name` string: Specifies the order source name
        - `uniqueOrderId` string: Unique identifier representing an order on the order platform
        - `placedAt` string: The time that the particular order was placed, represented in ISO8601 format.
        - `channel` string: Specifies the order channel
      - `status` string: Order status which indicates the status of the order.
      - `placedAt` string: The time the order was placed, represented in ISO 8601 format.
      - `scheduledOrder` boolean: Indicates whether this order is scheduled or not.

## Other responses

- `400`: Error response when the server could not understand the request due to an invalid syntax or structure.
- `500`: A generic error response that indicates a problem with the web server.

---

[API](https://skmtc.dev/grubtech/apis/grubtech-data-api.md) - [All operations](https://skmtc.dev/grubtech/apis/grubtech-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/grubtech/apis/grubtech-data-api/revisions/ee65d77a109c?raw)
