Skip to content

List End Customers

This endpoint returns a page of end customers for the authenticated account.

GET /v1/end-customers/end-customers

Include your API key in the x-api-key header. See Authentication.

end-customers:read
ParameterTypeRequiredDescription
clientIdstringNoReturns only end customers linked to this client.
archivedstringNo"true" returns only archived end customers. Any other value, or no value, returns only end customers that are not archived.
allstringNo"true" returns archived and non-archived end customers. When set, archived is ignored.
pagestringNo0-based page index. Defaults to 0. A non-numeric value is treated as 0.
pageSizestringNoNumber of end customers per page. Defaults to 25. There is no maximum.
sortColstringNoOne of name, description, email, phoneNumber, createdAt, updatedAt, Client.client_name. Requires sortDir. Invalid values are ignored.
sortDirstringNoasc or desc (not case-sensitive). Requires sortCol. Invalid values are ignored.

See Pagination for paging and sorting rules.

This endpoint does not accept a request body.

Terminal window
curl "https://api.crewsum.com/v1/end-customers/end-customers?clientId=client-ghi123jkl4567890&page=0&pageSize=25" \
-H "x-api-key: $CREWSUM_API_KEY"

On success, the API returns HTTP 200 OK.

{
"message": "Successfully fetched end customers",
"data": {
"endCustomers": [
{
"id": "endcustomer-abc123def4567890",
"name": "End Customer Name",
"description": "A brief description",
"clientId": "client-ghi123jkl4567890",
"clientName": "Client Name",
"clientArchived": false,
"clientDeleted": false,
"email": "buyer@example.com",
"phoneNumber": "555-0100",
"address": "123 Main St",
"notes": "Important delivery requirements",
"isArchived": false,
"createdAt": "2026-01-05T15:30:00.000Z",
"updatedAt": "2026-02-10T09:12:00.000Z",
"isDeleted": false
}
],
"count": 1
}
}
  • data.endCustomers holds the current page. data.count is the total number of end customers that match the filters, across all pages.
  • Deleted end customers are never returned.
  • Without a valid sortCol and sortDir pair, end customers are sorted by updatedAt descending, then createdAt descending. End customers that were never updated (updatedAt: null) sort last.
  • End customers without a client return null for clientId, clientName, clientArchived, and clientDeleted.
  • updatedAt is null for end customers that were never updated.
StatusMeaning
500{"message": "Error fetching end customers"}. Crewsum could not fetch end customers.

Authentication and scope failures are described in Errors.

This endpoint does not trigger a webhook.