# Get orders using filters
**GET /orders**
### ⚠ Attention
We do not recommend calls to this endpoint without proper filtering, especially loading of already closed orders, to not exceed your daily API limit for orders.
When calling this endpoint, orders with `blocked` status are not included in the response, unless you are specifically filtering this status.
## Filtering
Show
You can filter the results by any field from the results set.
E.g. `/orders?customer_id=12345` will return only results with `customer_id` = `12345`
To filter for `boolean` values, `true`, `false`, `1` or `0` are supported
E.g. `/orders?mdp=true` will return all `mdp` orders
To filter for `date-time` and `date` values use `YYYY-MM-DD HH24:MI:SS` and `YYYY-MM-DD` formats respectively (`HH24` means 24 hour format)
E.g. `/orders?ship_date=2017-01-14` will return all orders shipped `2017-01-14`
You may specify a modifier to filters (default is `eq`)
| **Modifier** | **Meaning** |
|--------------|-----------------------------------|
| eq | equal (default) |
| neq | not equal |
| gt | greater than |
| ge | greater or equal |
| lt | less than |
| le | less or equal |
| in | in values |
| nin | not in values |
| bt | between two values |
| nbt | not between two values |
### Usage of filter modifiers
E.g. `/orders?customer_id=in:1234,12345` will return only results with `customer_id` equal to `1234` and `12345`
You may use a special value `$null` with `eq` and `neq` modifiers for nullable fields, where comparing to empty string would not work.
E.g. `/orders?shipped=neq:$null` will return all orders with `shipped` set to any non-null value
## Sorting
Show
You can sort results using sort parameter
E.g. `/orders?_sort=id`
You may specify sorting modifiers (default is asc)
| **Modifier** | **Meaning** |
|--------------|---------------------|
| asc | ascending (default) |
| desc | descending |
E.g. `/orders?_sort=customer_id:asc,id:desc`
## Basic data
Show
When filtering orders with specific `status`, by default, only order ids are returned.
With URL parameter `filter=basic` objects with basic data are returned instead.
### Example
```
{
"result": {
"code": 200,
"status": "OK"
},
"paging": {
"pages": 1,
"size": 1,
"page": 1
},
"data": [
{
"id": 89591350,
"external_id": "24bcb8fe-13d8-11ed-861d-0242ac120002",
"purchase_id": 89591351,
"cod": 25,
"ship_date": "2017-01-14",
"delivered_at": "2018-01-14 08:13:00",
"status": "open",
"confirmed": true,
"test": false,
"mdp": false,
"customer_id": 1111111111,
"customer": "John Doe"
}
]
}
```
## Servers
## Parameters
### Headers
- **X-Application-Name** (string)
### Query parameters
- **client_id** (string)
Client identifier
- **filter** (string)
With URL parameter `filter=basic` objects with basic data are returned instead of list of ids.
- **test** (integer)
Set to `1` to get all orders including `test` orders
## Responses
### 200
OK
#### Body: (object)
- **data** (array[object])
- **result** (object)
- **paging** (object)
[Powered by Bump.sh](https://bump.sh)