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

# Get Bulk Order History

`GET /orders`

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, required — Unique ID for the order from the aggregator platform.
      - `storeId` string, required — Store ID is for identifying the relevant store of the order. This ID will be provided by either Grubtech or the aggregator.
      - `displayId` string, required — Displayable friendly five-character ID, used by stores and couriers to identify the order easily
      - `type` 'DELIVERY_BY_AGGREGATOR' | 'DELIVERY_BY_MERCHANT' | 'PICK_UP', required — Type of an order
      - `currencyCode` string, required — Applicable currency code for the menu. According to ISO-4217
      - `instructions` string — Instructions from the customer pertaining to the preparation of this order.
      - `delivery` Delivery — Delivery details of the order. If the requested party is planning to do the delivery by the Grubtech end, delivery information is mandatory.
        - `receiverName` string, required — Name of the receiver
        - `receiverMobileNumber` string, required — Mobile number of the receiver
        - `location` Location, required
          - `address1` string, required — The primary address line for the pickup location.
          - `address2` string — The secondary address line for the pickup location (optional).
          - `area` string, required — The area or neighborhood of the pickup location.
          - `city` string, required — The city where the pickup location is situated.
          - `country` string — The country where the pickup location is situated.
          - `formattedAddress` string, required — A formatted version of the full address.
          - `coordinates` Coordinates, required
            - `latitude` string, required — The latitude of the location.
            - `longitude` string, required — The longitude of the location.
        - `notes` string — A special note for delivery
        - `pickupTime` string, date-time — The time items were picked up or will be picked up, represented in ISO 8601 format.
      - `customer` Customer — The details of the person who is placing the order.If the order type equals to DELIVERY_BY_MERCHANT or PICK_UP, then this object is required.
        - `name` string, required — Name of the customer
        - `contactNumber` string, required — Contact number of the customer
        - `email` string — e-mail address of the customer
      - `items` Item[], required
        - `name` string, required — The name or description of the item to be delivered.
        - `quantity` integer, required — The quantity of the specific item to be delivered.
      - `archivedItems` ArchivedItem[]
        - `id` string, required — Unique identifying ID for the item, provided by the Grubtech.
        - `lineId` string, required — Unique identifying ID for the order line item within order, provided by the store.
        - `quantity` integer, required — Quantity of the items
        - `price` Price, required — Pricing information of the order, which contains the unit price, discounts, and total price
          - `unitPrice` integer, required — Specifies the unit price to charge for ordering the item. Price should always be an integer value (never decimals) because the price is set in the lowest denomination (e.g., cents for US currency, not dollars). Price should always be set even if the price is 0.
          - `discountAmount` integer — Specifies the unit price to charge for ordering the item. Price should always be an integer value (never decimals) because the price is set in the lowest denomination (e.g., cents for US currency, not dollars). Price should always be set even if the price is 0.
          - `totalPrice` integer, required — Specifies the unit price to charge for ordering the item. Price should always be an integer value (never decimals) because the price is set in the lowest denomination (e.g., cents for US currency, not dollars). Price should always be set even if the price is 0.
        - `archivedReason` 'ITEM_REMOVAL' | 'ITEM_SUBSTITUTION' | 'QTY_ADJUSTMENT', required — Reason for the item amendment
        - `amendItems` OrderAmends[]
          - `id` string, required — Unique identifier for the item which is related to the amendment
          - `lineId` string, required — Unique identifying ID for the order line item within the order provided by the store.
          - `quantity` integer, required — Quantity related to the item amendment
      - `payment` Payment, required
        - `mode` 'CARD' | 'CASH' | 'PREPAID', required — Specifies the method of payment for the delivery order. It indicates how the payment will be handled at the time of delivery.
        - `amount` integer, required — The total amount to be collected at delivery.
        - `currencyCode` string, required — The currency of the payment, in ISO 4217 format (e.g., USD, AED).
      - `scheduledOrder` object — Scheduled order details. This object should be included only if the order is expected to be prepared at a future time.
        - `scheduledAt` string — The time at which the order will be scheduled is represented in ISO 8601 format.
      - `status` 'PLACED' | 'APPROVED', required — Order status. This will indicate the current status of the order
      - `placedAt` string, required — The time at which the order was placed, represented in ISO 8601 format.

## 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.net/grubtech/apis/grubtech-auth-server.md) · [All operations](https://skmtc.net/grubtech/apis/grubtech-auth-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/grubtech/grubtech-auth-server/versions/21688b6dcb69/schema)
