All top-level API resources have support for bulk fetches via "list" API methods.

For instance you can list charges, list customers, and list orders. These list API methods share a common structure, taking at least these three parameters: limit, starting_after, and ending_before. Selz utilizes cursor-based pagination via the starting_after and ending_before parameters. Both take an existing object ID value. The ending_before parameter returns objects created before the named object, in descending chronological order. The starting_after parameter returns objects created after the named object, in ascending chronological order. If both parameters are provided, only ending_before is used.

Arguments

Argument Description
limit A limit on the number of objects to be returned, between 1 and 100.
starting_after A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo , your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.
ending_before A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar , your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

Response

Argument Description
data An array containing the actual response elements, paginated by any request parameters.
has_more Whether or not there are more elements available after this set. If false , this set comprises the end of the list.

Example Response

{
    "limit": 10,
    "has_more": false,
    "data": [
        {
            "id": "583ccd51131bbc2518346a4a",
            "created_time": "2016-11-29T00:35:29.052Z",
            "first_name": "John",
            "last_name": "Doe",
            "email": "support+1@selz.com",
            "company": null,
            "delivery_address": null,
            "billing_address": null
        },
        {
            "id": "58201857131bbd130c0b6ff8",
            "created_time": "2016-11-07T05:59:51.754Z",
            "first_name": "matthew",
            "last_name": "kempe",
            "email": "support+2@selz.com",
            "company": null,
            "delivery_address": null,
            "billing_address": null
        }
    ]
}