List customers
client.customers.list(CustomerListParams { created_from, created_to, email, 12 more } params?, RequestOptionsoptions?): PageNumberSchema<Data { id, created_at, email, 6 more } >
/v1/customers
Lists or searches customers connected to your account. All supported query parameters are optional. If none are provided, the response will include all customers connected to your account. This endpoint supports advanced sorting and filtering options.
Parameters
Returns
List customers
import Straddle from '@straddlecom/straddle';
const client = new Straddle({
apiKey: 'My API Key',
});
// Automatically fetches more pages as needed.
for await (const customer of client.customers.list()) {
console.log(customer.id);
}
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"email": "dev@stainless.com",
"name": "name",
"phone": "+46991022",
"status": "pending",
"type": "individual",
"updated_at": "2019-12-27T18:11:19.117Z",
"external_id": "external_id"
}
],
"meta": {
"api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"api_request_timestamp": "2019-12-27T18:11:19.117Z",
"max_page_size": 0,
"page_number": 0,
"page_size": 0,
"sort_by": "sort_by",
"sort_order": "asc",
"total_items": 0,
"total_pages": 0
},
"response_type": "object"
}Returns Examples
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"email": "dev@stainless.com",
"name": "name",
"phone": "+46991022",
"status": "pending",
"type": "individual",
"updated_at": "2019-12-27T18:11:19.117Z",
"external_id": "external_id"
}
],
"meta": {
"api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"api_request_timestamp": "2019-12-27T18:11:19.117Z",
"max_page_size": 0,
"page_number": 0,
"page_size": 0,
"sort_by": "sort_by",
"sort_order": "asc",
"total_items": 0,
"total_pages": 0
},
"response_type": "object"
}