# List orders

Retrieves a list of orders that either have the same reference ID or belong to the same guest. You must include either the `referenceId` of the order or the `guestRef` as a query string parameter in the URI of the request, but not both.
In the response, `items.ref` contains the order reference. Use the order reference to interact with a specific order, for example, to retrieve it, update it, or create a data extension for it.

Endpoint: GET /v2.1/orders
Version: v2.1
Security: BasicAuth

## Security:

  - `BasicAuth` (unknown)
    http basic

## Query parameters:

  - `referenceId` (string)

  - `guestRef` (string)

  - `offset` (object)

  - `limit` (object)

  - `expand` (array)

  - `sort` (string)

## Response 200:

  - `200` (unknown)
    Successful operation

## Response 200 fields (application/json):

  - `offset` (integer)
    The request's offset.
    Example: 0

  - `limit` (integer)
    The request's limit.
    Example: 10

  - `first` (object)
    The request's first list of orders URL.

  - `first.href` (string)
    Example: https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10

  - `last` (object)
    The request's last list of orders URL.

  - `last.href` (string)
    Example: https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10

  - `next` (object)
    The request's next list of orders URL.

  - `next.href` (string)
    Example: https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=2d7de9df-45a2-45ea-872c-30e45139007d&offset=1&limit=10

  - `href` (string)
    The request's URL.
    Example: https://api-engage-eu.sitecorecloud.io/v2.1/orders?guestRef=cadd106a-feff-42b2-90fb-a6ed136ece51/contacts?offset=0&limit=10

  - `items` (array)

  - `items.href` (string)
    Example: https://api-engage-eu.sitecorecloud.io/v2.1/orders/cadd106a-feff-42b2-90fb-a6ed136ece51

## Response 401:

  - `401` (unknown)
    Unauthorized request

## Response 401 fields (application/json):

  - `status` (string)
    The HTTP request status.
    Example: UNAUTHORIZED

  - `code` (integer)
    The HTTP response status code.
    Example: 401

  - `message` (string)
    Error description.
    Example: Authentication credentials are required to access the resource. All requests must be authenticated.

  - `moreInfoUrl` (string)
    URL to get more information about the error.
    Example: https://support.sitecore.com

