---
title: "query eater's related history orders"
method: POST
path: "/v1/eater/order-history"
tags: ["direct_orders_endpoints"]
---

# query eater's related history orders

`POST /v1/eater/order-history`

## Request

- Base URL: `https://partners.tryotter.com`
- URL: `https://partners.tryotter.com/v1/eater/order-history`
- Auth: OAuth 2
  - Authorization code: `/v1/auth/oauth2/authorize`
  - Client credentials
  - Token URL: `/v1/auth/token` scopes: `direct.orders`
- TypeScript: <https://skmtc.dev/cloudkitchens/apis/otter-api/docs/v1/eater/order-history/post.ts> (a function with typed inputs; its response is checked against the schema)

`Provide an external eater ID to get a list of order related to that eater.`

## Request body `application/x-www-form-urlencoded`

- EaterOrderHistoryRequest: Request parameters to fetch eater's order history
  - `limit` number, required: Max number of orders to retrieve per page
  - `pageToken` string: Opaque token used for paging. Query parameters must be URL encoded.
  - `eaterId` string, required: External eater's Id
  - `source` string: Order placed from which source

## Response `200`

Eater order history response.

- EaterOrderHistoryResponse: Response body containing the user's order history.
  - `orders` EaterOrder[], required: List of orders placed by the user. Each item contains details about a specific order.
    - `id` string: Unique ID for the order that was placed.
    - `status` 'NEW_ORDER' | 'CONFIRMED' | 'PICKED_UP' | 'CANCELED' | 'FULFILLED' | 'PREPARED' | 'REJECTED' | 'UNKNOWN', required: The status of the order.
    - `items` Item3[]: Items ordered.
      - `quantity` integer: The quantity of the item ordered by the customer.
      - `id` string, nullable: The unique ID of the item.
      - `name` string, nullable, required: The name of the item as displayed to the customer.
    - `orderedAt` string, date-time, nullable: The date (in UTC) when the order was placed by the customer.
    - `orderTotal` number, nullable: Order total including everything paid by the customer.
    - `currencyCode` string, required: The 3-letter currency code (ISO 4217) to use for all monetary values in this order.
    - `pickupTime` string, date-time, nullable: Time (in UTC) specified by the provider when the courier or customer is expected to pick up the order.
    - `store` Store2
      - `id` string, required: Store identifier.
      - `name` string, required: Store name.
      - `logoUrl` string: store's logo image url.
      - `bannerUrl` string: store's banner image url.
      - `phoneNumber` string: store's phone number.
      - `address` Address, nullable, required: Order delivery address.
        - `fullAddress` string, nullable: Full, human comprehensible address. It is usually formatted in the order appropriate for your locale.
        - `postalCode` string: Postal code of the address.
        - `city` string: The city/town portion of the address.
        - `state` string: Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, or a prefecture.
        - `countryCode` string: CLDR country code. See http://cldr.unicode.org/
        - `addressLines` string[], nullable: Address lines (e.g. street, PO Box, or company name) or the full single line address (e.g. street, city, state, country, zip).
        - `linesOfAddress` string[], nullable: Deprecated: use addressLines. Address lines (e.g. street, PO Box, or company name) or the full single line address (e.g. street, city, state, country, zip).
        - `location` Location, nullable: Latitude and longitude of the address.
          - `latitude` number, double, required: The latitude of the location.
          - `longitude` number, double, required: The longitude of the location.
    - `orderAgainUrl` string: The link url for reordering.
  - `nextPageToken` string: Opaque token used to fetch the following page. If not set, no more orders are available.

## Other responses

- `400`: The request is malformed.
- `401`: Invalid authorization.
- `403`: Authorization not valid for the requested resource.
- `422`: The request body is not valid.

---

[API](https://skmtc.dev/cloudkitchens/apis/otter-api.md) - [All operations](https://skmtc.dev/cloudkitchens/apis/otter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudkitchens/apis/otter-api/revisions/4c868194a467?raw)
