Expand object

Many objects allow you to request additional information as an expanded response by using the expand request parameter. This parameter is available on all API requests, and applies to the response of that request only.

In many cases, an object contains the ID of a related object in its response properties. For example, a Customer may have an associated Organization ID. Those objects can be expanded inline with the expand request parameter.

You can use the expand param on any list endpoint which returns expandable fields.

You can expand multiple objects at once by identifying multiple items in the expand array.

Be aware that using expand will make your queries slower.

Pagination

All top-level API resources have support for bulk fetches via “list” API methods. These list API methods share a common structure, taking at least these three parameters: take, skip, and orderBy.

The response of a list API method represents a single page in a reverse chronological stream of objects. If you do not specify any parameters, you will receive the first page of this stream, containing the newest objects. The limit of objects you can receive is set to 100.

Along with the data, you will receive count to allow you to paginate accordingly.

Parameters

NameTypeDescription
takenumber optionalA limit on the number of objects to be returned, must be a positive int. Max 100..
skipnumber optionalThe number of objects to skip.
orderBystring optional default=createdAt:descObject field to sort. Format is field:asc or desc. If none, it will default to asc.

All top-level API resources have support for search via “list” API methods. It allows you to filter your lists on any property of your object.

The search can be used alongside Pagination query parameters (see above) and the response will follow the same pattern.

Parameters

NameTypeDescription
searchstring optionalThe property and value you want to filter on, separated by :. Format is property:value. property must match an existing property of the object. value must exactly match an existing value (case-sensitive). Example: /customers?search=first_name:Bob will retrieve all customers with the first name Bob.