---
title: "List and filter orders"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# List and filter orders

Path: Nicer API › Commerce

`GET /commerce/orders`

URL: `https://api.nicer.travel/commerce/orders`

Lists orders for the caller's company with filters for status, product kind, advisor, participant, payer, provider locator, trip, creation date range and free text, plus paging and sorting. The default view is the caller's own orders; the company view returns everyone's and requires the company name.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Query parameters

- `advisorIds` (`commerce.orders.list.query.advisorIds`; string, optional)
  - minLength: `1`
- `companyName` (`commerce.orders.list.query.companyName`; string, optional)
  - minLength: `1`
- `createdFrom` (`commerce.orders.list.query.createdFrom`; string, optional)
  - pattern: `^\d{4}-\d{2}-\d{2}$`
- `createdTo` (`commerce.orders.list.query.createdTo`; string, optional)
  - pattern: `^\d{4}-\d{2}-\d{2}$`
- `cursor` (`commerce.orders.list.query.cursor`; string, optional)
  - maxLength: `1500` · minLength: `1`
- `hotelReference` (`commerce.orders.list.query.hotelReference`; string, optional)
  - maxLength: `500` · minLength: `1`
- `includeTemporary` (`commerce.orders.list.query.includeTemporary`; string, optional)
  - one of `"false"`, `"true"` · default: `"false"`
- `limit` (`commerce.orders.list.query.limit`; integer, optional)
  - maximum: `200` · minimum: `1` · default: `50`
- `originAirport` (`commerce.orders.list.query.originAirport`; string, optional)
  - maxLength: `3` · minLength: `3`
- `participantEmail` (`commerce.orders.list.query.participantEmail`; string, optional)
  - format: `email` · pattern: `^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$`
- `participantPhone` (`commerce.orders.list.query.participantPhone`; string, optional)
  - pattern: `^\+[1-9]\d{7,14}$`
- `participantUserId` (`commerce.orders.list.query.participantUserId`; string, optional)
  - minLength: `1`
- `payerEmail` (`commerce.orders.list.query.payerEmail`; string, optional)
  - format: `email` · pattern: `^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$`
- `payerPhone` (`commerce.orders.list.query.payerPhone`; string, optional)
  - pattern: `^\+[1-9]\d{7,14}$`
- `payerUserId` (`commerce.orders.list.query.payerUserId`; string, optional)
  - minLength: `1`
- `page` (`commerce.orders.list.query.page`; integer, optional)
  - maximum: `9007199254740991` · minimum: `0` · default: `0`
- `productKinds` (`commerce.orders.list.query.productKinds`; string, optional)
  - minLength: `1`
- `providerLocator` (`commerce.orders.list.query.providerLocator`; string, optional)
  - maxLength: `255` · minLength: `1`
- `search` (`commerce.orders.list.query.search`; string, optional)
  - maxLength: `200`
- `sort` (`commerce.orders.list.query.sort`; string, optional)
  - one of `"createdAt_asc"`, `"createdAt_desc"` · default: `"createdAt_desc"`
- `statuses` (`commerce.orders.list.query.statuses`; string, optional)
  - minLength: `1`
- `travelersTripId` (`commerce.orders.list.query.travelersTripId`; string, optional)
  - minLength: `1`
- `view` (`commerce.orders.list.query.view`; string, optional)
  - one of `"self"`, `"company"` · default: `"self"`

## Header parameters

- `x-nicer-company` (`commerce.orders.list.header.x-nicer-company`; string, required) — Company context. Authentication and tenant membership are validated by the API.

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
  headers: { "x-nicer-company": process.env.NICER_COMPANY },
});

await nicer.commerce.orders.list();
```

### Nicer CLI

```bash
nicer commerce orders list --company "$NICER_COMPANY"
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/commerce/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'x-nicer-company: string'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/commerce/orders';
const options = {
  method: 'GET',
  headers: {'x-nicer-company': 'string', Authorization: 'Bearer <token>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/commerce/orders"

headers = {
    "x-nicer-company": "string",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "items": [
    {
      "entryMethod": "CHECKOUT",
      "bookingOrigin": "NICER",
      "bookedByUserId": "string",
      "canCancel": true,
      "canCreatePaymentLink": true,
      "companyName": "string",
      "committedAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "orderId": "string",
      "paymentDeadline": "2019-08-24T14:15:22Z",
      "price": {
        "currency": "string",
        "totalMinor": 9007199254740991
      },
      "productName": "string",
      "productType": "PLANNING_FEE",
      "providerLocator": "string",
      "status": "DRAFT",
      "travelDates": {
        "end": "string",
        "start": "string"
      },
      "travelersTripId": "string"
    }
  ],
  "nextCursor": "string",
  "totalCount": 9007199254740991
}
```

- `items` (`commerce.orders.list.response.200.items`; array of object, required)
  - `entryMethod` (`commerce.orders.list.response.200.items.entryMethod`; string, required)
    - one of `"CHECKOUT"`, `"IMPORT"`, `"MANUAL"` · default: `"CHECKOUT"`
  - `bookingOrigin` (`commerce.orders.list.response.200.items.bookingOrigin`; string, required)
    - one of `"NICER"`, `"EXTERNAL"`, `"UNKNOWN"` · default: `"NICER"`
  - `bookedByUserId` (`commerce.orders.list.response.200.items.bookedByUserId`; any of, required)
    - any of the following: `string`, `null`
  - `canCancel` (`commerce.orders.list.response.200.items.canCancel`; boolean, required)
  - `canCreatePaymentLink` (`commerce.orders.list.response.200.items.canCreatePaymentLink`; boolean, required)
  - `companyName` (`commerce.orders.list.response.200.items.companyName`; string, required)
    - minLength: `1`
  - `committedAt` (`commerce.orders.list.response.200.items.committedAt`; any of, required)
    - any of the following: `string`, `null`
  - `createdAt` (`commerce.orders.list.response.200.items.createdAt`; string, required)
    - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`
  - `orderId` (`commerce.orders.list.response.200.items.orderId`; string, required)
    - minLength: `1`
  - `price` (`commerce.orders.list.response.200.items.price`; any of, required)
    - any of the following:
      - `object`
        - `currency` (`commerce.orders.list.response.200.items.price.1.currency`; string, required)
          - pattern: `^[A-Z]{3}$`
        - `totalMinor` (`commerce.orders.list.response.200.items.price.1.totalMinor`; integer, required)
          - maximum: `9007199254740991` · minimum: `0`
      - `null`
  - `productName` (`commerce.orders.list.response.200.items.productName`; string, required)
    - minLength: `1`
  - `productType` (`commerce.orders.list.response.200.items.productType`; string, required)
    - one of `"PLANNING_FEE"`, `"EXTRA_PAYMENT"`, `"HOTEL"`, `"FLIGHT"`, `"INSURANCE"`, `"CAR_RENTAL"`
  - `providerLocator` (`commerce.orders.list.response.200.items.providerLocator`; any of, required)
    - any of the following: `string`, `null`
  - `status` (`commerce.orders.list.response.200.items.status`; string, required)
    - one of `"DRAFT"`, `"AWAITING_PAYMENT"`, `"HOLDING"`, `"HELD"`, `"PAYMENT_PROCESSING"`, `"TICKETING"`, `"BOOKED"`, `"CANCELLATION_PROCESSING"`, `"CANCELLED"`, `"EXPIRED"`, `"NEEDS_ATTENTION"`, `"FAILED"`
  - `travelDates` (`commerce.orders.list.response.200.items.travelDates`; object, required)
    - `end` (`commerce.orders.list.response.200.items.travelDates.end`; any of, required)
      - any of the following: `string`, `null`
    - `start` (`commerce.orders.list.response.200.items.travelDates.start`; any of, required)
      - any of the following: `string`, `null`
  - `travelersTripId` (`commerce.orders.list.response.200.items.travelersTripId`; any of, required)
    - any of the following: `string`, `null`
  - `paymentDeadline` (`commerce.orders.list.response.200.items.paymentDeadline`; any of, optional) — When a held order must be paid by. Null when the order is not held.
    - any of the following: `string`, `null`
- `totalCount` (`commerce.orders.list.response.200.totalCount`; integer, required)
  - maximum: `9007199254740991` · minimum: `0`
- `nextCursor` (`commerce.orders.list.response.200.nextCursor`; any of, optional)
  - any of the following: `string`, `null`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`commerce.orders.list.response.400.errorCode`; string, required)
- `errorMessage` (`commerce.orders.list.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`commerce.orders.list.response.401.errorCode`; string, required)
- `errorMessage` (`commerce.orders.list.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`commerce.orders.list.response.403.errorCode`; string, required)
- `errorMessage` (`commerce.orders.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Commerce/commerce.orders.list/index.md
