OrderQuery
Filter parameters to fetch a list of orders
Fields
| Field | Description |
|---|---|
|
filter
string
|
A SQL query that returns order IDs Can be used to do arbitrary filtering. See the database documentation for order for more information. Example value:"select id from tm.order where totalamount > 100" |
|
includearchived
bool
|
If this parameter is true, archived items will be returned as well. |
|
lastupdatesince
timestamp
|
Only include orders that have been updated since the given timestamp. Example value:"2014-09-26 15:24:36" |
|
limit
int
|
Limit results to at most the given amount of orders. Example value:100 |
|
offset
int
|
Skip the first X orders. Example value:100 |
|
orderby
string
|
Order by the given field. Supported values: "createdts" |
|
orderby_asc
bool
|
Sets the direction for ordering. Default false. Example value:true |
|
output
string
|
Output format. Possible values:
"withlookup" |
|
searchterm
string
|
A text filter string. Matches against the order ID or the customer details.. Example value:"Live" |
|
simplefilter
|
Filters the orders based on a given set of fields. Currently supports: { "saleschannelid": 123 } |
Example
1{
2 "filter": "select id from tm.order where totalamount > 100",
3 "includearchived": false,
4 "lastupdatesince": "2014-09-26 15:24:36",
5 "limit": 100,
6 "offset": 100,
7 "orderby": "createdts",
8 "orderby_asc": true,
9 "output": "withlookup",
10 "searchterm": "Live",
11 "simplefilter": {
12 "saleschannelid": 123
13 }
14}