v2018-02-15: Query Operators
This version introduces several new query operators which makes it possible for the Xola API to now support a pseudo query language. Please read the documentation for a list of supported query operators.
Prior to this release, certain fields would default to a particular query operation. For example, the orders endpoint when queried for two arrival dates (/api/orders?arrival=2018-01-01,2018-01-05
) would automatically perform a "range" query.
From this release onward, every query must explicitly specify a query operator. If none is specified, the API will assume an "equals" query. However, if you're sending an older version, Xola will fallback to old behavior. Here are a list of endpoints and the fallback behavior supported for each of them:
Query Fallback Behavior
All the following fallback behaviors apply to GET
requests.
Path | Behavior |
---|---|
/api/purchases /api/orders /api/gifts /api/transactions | Applies to: createdAt , arrival , updatedAt , items.realizedAt When an array of two dates is provided, then a range operator is assumed. |
/api/purchases /api/orders /api/gifts /api/transactions /api/jobs | *Applies to: status , type , method , source When an array is provided, then an in operator is assumed. |
/api/purchases /api/orders /api/gifts | Applies to: event , status , arrival , experience When these filters are provided, they are automatically prefixed with item. so that they apply to the items collection (the items collection was introduced in the packages release). |