Version 2.5 (v2.5)

Filtering

The Administrate API provides a set of filters which are useful for requesting a restricted set of results to avoid further processing and reduce bandwidth. This allows the possiblity to return records between a set of dates, for example, or all those records that belong to a list of ids.

NameOperatorUsage
Exactly equal, default__eqattribute__eq=[value]
Not equal__neattribute__ne=[value]
Less than__ltattribute__lt=[value]
Less than or equal__leattribute__le=[value]
Greater than__gtattribute__gt=[value]
Greater than or equal__geattribute__ge=[value]
Like, % in query matches any string__lkattribute__lk=[value]
Not Like__nlattribute__nl=[value]
Contains__ctattribute__ct=[value]
Starts with__swattribute__sw=[value]
Ends with__ewattribute__ew=[value]
In, ie 2 is ‘in’ 1,2,3,4__inattribute__in=value_1[,value_2]*
Not in__niattribute__ni=value_1[,value_2]*

Pagination

All endpoints support pagination and will return only 50 records, further records can be accessed by appending the parameter _page to the query for example:

RequestResponse
GET /api/v2.5/crm/opportunitiesJSON list of first 50 Opportunities
GET /api/v2.5/crm/opportunities?_page=2JSON list of second 50 Opportunities
GET /api/v2.5/crm/opportunities?_limit=100JSON list of first 100 Opportunities
GET /api/v2.5/crm/opportunities?_limit=100&_page=3JSON list of third 100 Opportunities

Headers are sent to communicate what information is available:

Header NameDescriptionExample Data
X-Pagination-PageCurrent Page1
X-Pagination-PagesAvailable Pages2
X-Pagination-PerRecords per page50
X-Pagination-TotalTotal number of records75

Limiting

You can limit the results of a request using the _limit parameter

Example

curl -k -u <username>:<password> \
     https://YOUR-SUBDOMAIN.administrateapp.com/api/v2.5/crm/opportunities?_limit=10

Order

You can order the results of a request using the _order parameter, which takes one or more attributes to order by. By default this will be in ascending order, to sort in descending order prefix the attribute by ‘-‘.

Example ordered by name in ascending order

curl -k -u <username>:<password> \
     https://YOUR-SUBDOMAIN.administrateapp.com/api/v2.5/crm/opportunities?_order=name&_limit=10

Example ordered by name in descending order

curl -k -u <username>:<password> \
    https://YOUR-SUBDOMAIN.administrateapp.com/api/v2.5/crm/opportunities?_order=-name&_limit=10