Skip to navigation

List customers

View as Markdown

The customers of your organization (or, for a key limited to one customer, that customer), in the order of their ids. With client_reference_id the list holds every customer that carries that value (the same value can be on many customers: it is not unique), and an unknown value is an empty list. A search reads only so many rows in one request: it may answer fewer than limit objects, even none, with has_more true and a next_cursor, which you send as starting_after (or ending_before) to go on until has_more is false.

Scope: customers:read.

Authentication

AuthorizationBearer

A restricted API key, tc_rk_live_ and 32 characters. Send it as Authorization: Bearer <key>. A key lists its scopes, and each operation below names the one it needs; a key may also be limited to one customer. An owner or a developer of the organization makes a key in the dashboard, under API keys, after a code sent to their e-mail. The key is shown once, when it is made. An owner or a developer can revoke it there, and a revoked key stops working within a minute.

Query parameters

limitintegerOptional1-100
How many objects a page holds, 1 to 100. The default is 10.
starting_afterstringOptional

The id of the last object of the page you hold: returns the page that follows it. In a search by client_reference_id the answer can be a short page, or none, with has_more true and a next_cursor: send that instead, and go on until has_more is false.

ending_beforestringOptional

The id of the first object of the page you hold: returns the page that precedes it. Not together with starting_after. In a search by client_reference_id read backward, the next_cursor of the answer when it has one.

client_reference_idstringOptional

Only the customers that carry this client reference id (1 to 128 characters). It is not unique, so the list can hold many; an unknown value is an empty list.

Response

A page of customers.
datalist of objects
has_moreboolean

Whether another page follows. Ask for it with starting_after set to the id of the last object here, or, when the answer has a next_cursor, with that. A search by client_reference_id can answer a short page, or none, with has_more true: it reads only so many rows in one request, and next_cursor is the way on.

objectstring

Always list.

next_cursorstringOptional

Only in the answer to a search (client_reference_id) that stopped before it could fill the page: it read all the rows it may in one request. Then data holds what it found so far, possibly nothing, has_more is true, and this is the position to continue from: pass it as starting_after (or as ending_before, if you page backward) in place of the id of the last object. It is an id of the kind of the list, but not necessarily the id of an object in data. Left out otherwise.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error