Delete Supplier Contact
This endpoint soft-deletes a supplier contact. The record is marked as deleted but is not removed.
Endpoint
Section titled “Endpoint”DELETE /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:writePath Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Supplier contact ID. |
Request Body
Section titled “Request Body”This endpoint does not accept a request body.
Example Request
Section titled “Example Request”curl -X DELETE "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", { method: "DELETE", headers: { "x-api-key": process.env.CREWSUM_API_KEY }, },);const result = await response.json();DELETE /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”The message currently says “supplier” instead of “supplier contact”. Do not match on the message text.
{ "message": "Successfully deleted supplier suppliercontact-vwx123yza4567890"}Behavior
Section titled “Behavior”- This is a soft delete. The API sets
isDeletedtotrueand keeps the record. - Deleted contacts no longer appear in List Supplier Contacts. Get Supplier Contact still returns them, with
"isDeleted": true. - The API cannot undo a delete.
- An unknown ID still returns
200. - After the delete, Crewsum sends the
supplier-contacts.deletedwebhook event. The payload is{ "contacts": [{ "supplier": <supplier>, "supplierContact": <contact> }] }, with"isDeleted": trueon the contact. For an unknown ID, the event is still sent, with an emptycontactsarray.
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
400 | The ID path segment was empty (for example, a trailing slash). Message: TaskID not supplied. |
500 | Crewsum could not delete the contact. Message: Error deleting supplier <id>. |
Authentication and scope failures are described in Errors.
Related Webhooks
Section titled “Related Webhooks” supplier-contacts.deleted View webhook event details.