List
List customers
client.v1.customers.list(CustomerListParamsquery?, RequestOptionsoptions?): CursorPage<idstringcreated_atstringcustom_fieldsRecord<string, string>customer_configCustomerConfigexternal_idstringingest_aliasesarraynamestringarchived_atunioncurrent_billable_statusCurrentBillableStatusCustomerDetail>
get/v1/customers
List all customers.
Parameters
querycustomer_idsarrayingest_aliasstringlimitnumbernext_pagestringonly_archivedbooleansalesforce_account_idsarrayCustomerListParams
Returns
idstringcreated_atstringcustom_fieldsRecord<string, string>customer_configCustomerConfigexternal_idstringingest_aliasesarraynamestringarchived_atunioncurrent_billable_statusCurrentBillableStatusCustomerDetail
import Metronome from '@metronome/sdk';
const client = new Metronome({
bearerToken: 'My Bearer Token',
});
// Automatically fetches more pages as needed.
for await (const customerDetail of client.v1.customers.list()) {
console.log(customerDetail.id);
}
200 Example
{
"data": [
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"created_at": "2019-12-27T18:11:19.117Z",
"custom_fields": {
"foo": "string"
},
"customer_config": {
"salesforce_account_id": "salesforce_account_id"
},
"external_id": "external_id",
"ingest_aliases": [
"string"
],
"name": "name",
"archived_at": "2019-12-27T18:11:19.117Z",
"current_billable_status": {
"value": "billable",
"effective_at": "2019-12-27T18:11:19.117Z"
}
}
],
"next_page": "next_page"
}