Skip to content

List Suppliers

This endpoint returns a page of suppliers for the authenticated account.

GET /v1/suppliers/suppliers

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

suppliers:read
ParameterTypeRequiredDescription
archived"true" | "false"NoWhen "true", return only archived suppliers. Any other value returns only active suppliers. Defaults to active suppliers.
all"true" | "false"NoWhen "true", return archived and active suppliers together. archived is then ignored.
pagenumberNoZero-based page index. Defaults to 0.
pageSizenumberNoNumber of suppliers per page. Defaults to 25.
sortCol"supplierName" | "supplierDescription" | "createdAt" | "updatedAt"NoSort column. Must be sent with a valid sortDir.
sortDir"asc" | "desc"NoSort direction. Must be sent with a valid sortCol.

See Pagination for paging and sorting rules.

This endpoint does not accept a request body.

Terminal window
curl "https://api.crewsum.com/v1/suppliers/suppliers?page=0&pageSize=25&sortCol=supplierName&sortDir=asc" \
-H "x-api-key: $CREWSUM_API_KEY"

On success, the API returns HTTP 200 OK.

{
"message": "Successfully fetched suppliers",
"data": {
"suppliers": [
{
"id": "supplier-stu123vwx4567890",
"name": "Supplier Name",
"description": "A brief description of the supplier",
"isArchived": false,
"createdAt": "2023-01-01T00:00:00.000Z",
"updatedAt": null,
"isDeleted": false
}
],
"count": 1
}
}
  • count is the total number of matching suppliers, not the number on this page.
  • Deleted suppliers are never returned, even with all=true.
  • If sortCol or sortDir is missing or invalid, the API ignores both and sorts by updatedAt descending, then createdAt descending.
  • updatedAt is null until the supplier is updated for the first time.
StatusMeaning
500Crewsum could not fetch suppliers. Message: Error fetching suppliers.

Authentication and scope failures are described in Errors.

This endpoint does not trigger a webhook.