Get Supplier Contact
This endpoint returns one supplier contact by ID.
Endpoint
Section titled “Endpoint”GET /v1/supplier-contacts/supplier-contacts/:idAuthentication
Section titled “Authentication”Include your API key in the x-api-key header. See Authentication.
Required Scope
Section titled “Required Scope”supplier-contacts:readPath Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Supplier contact ID, for example suppliercontact-vwx123yza4567890. |
Request Body
Section titled “Request Body”This endpoint does not accept a request body.
Example Request
Section titled “Example Request”curl "https://api.crewsum.com/v1/supplier-contacts/supplier-contacts/suppliercontact-vwx123yza4567890" \ -H "x-api-key: $CREWSUM_API_KEY"const response = await fetch( "https://api.crewsum.com/v1/supplier-contacts/supplier-contacts/suppliercontact-vwx123yza4567890", { headers: { "x-api-key": process.env.CREWSUM_API_KEY }, },);const result = await response.json();GET /v1/supplier-contacts/supplier-contacts/suppliercontact-vwx123yza4567890 HTTP/1.1Host: api.crewsum.comx-api-key: <your-api-key>Response
Section titled “Response”On success, the API returns HTTP 200 OK.
Example Response
Section titled “Example Response”{ "message": "Successfully fetched supplier contact", "data": { "id": "suppliercontact-vwx123yza4567890", "supplierId": "supplier-stu123vwx4567890", "supplierName": "Supplier Name", "name": "Supplier Contact Name", "description": "A brief description of the supplier contact", "email": "placeholder@example.com", "isArchived": false, "createdAt": "2023-01-01T00:00:00.000Z", "updatedAt": "2023-01-02T00:00:00.000Z", "isDeleted": false }}Behavior
Section titled “Behavior”- This endpoint returns archived and deleted contacts. Check
isArchivedandisDeletedin the response. updatedAtisnulluntil the contact is updated for the first time.
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
400 | The ID path segment was empty (for example, a trailing slash). Message: Supplier Contact ID not provided. |
404 | Message: Supplier contact not found. The API returns this for an unknown ID and also for any other failure, including database errors. |
Authentication and scope failures are described in Errors.
Related Webhooks
Section titled “Related Webhooks”This endpoint does not trigger a webhook.