Skip to content

Update Supplier

This endpoint updates the name, description, or archive status of a supplier.

PUT /v1/suppliers/suppliers/:id

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

suppliers:write
ParameterTypeRequiredDescription
idstringYesSupplier ID.

Send only the fields you want to change. Omitted fields keep their current values. You must send a JSON body, even if it is {}.

FieldTypeRequiredDescription
namestringNoSupplier name.
descriptionstring | nullNoSupplier description. Send null to clear it.
isArchivedbooleanNoArchive (true) or restore (false) the supplier.
{
"name": "Updated Supplier Name",
"description": "Updated supplier description",
"isArchived": false
}
Terminal window
curl -X PUT "https://api.crewsum.com/v1/suppliers/suppliers/supplier-stu123vwx4567890" \
-H "x-api-key: $CREWSUM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Supplier Name",
"description": "Updated supplier description",
"isArchived": false
}'

On success, the API returns HTTP 200 OK.

{
"message": "Successfully updated supplier: supplier-stu123vwx4567890"
}
  • Every successful call sets updatedAt to the current time.
  • The API does not check that the supplier exists. An unknown ID still returns 200, nothing changes, and no webhook is sent.
  • Deleted suppliers can still be updated. This endpoint cannot restore a deleted supplier.
  • The request body is not validated against a schema. Wrong types are stored as sent or cause a 500.
  • After an existing supplier is updated, Crewsum sends the suppliers.updated webhook event. The payload is { "suppliers": [<supplier>] }.
StatusMeaning
400The ID path segment was empty (for example, a trailing slash). Message: SupplierID not specified.
500Crewsum could not update the supplier. Message: Error updating supplier: <id>. If no request body is sent, the API returns a 500 with a generic error body instead.

Authentication and scope failures are described in Errors.