# Update a supplier `PATCH / PUT / POST /api/v1/suppliers/{id}` Updates a supplier by ID. ## Permissions Send your API key in `X-API-Key`. Required permissions are **Suppliers → Write**. ## Path parameters - `id` (integer, required) — ID of the supplier. ## Body parameters - `name` (string) — Supplier name, up to 191 characters. - `email` (string or null) — Contact email. - `phone` (string or null) — Phone number. - `vat` (string or null) — VAT registration number. - `taxcode` (string or null) — Tax code. - `pec` (string or null) — Certified email address. - `sdi` (string or null) — Electronic invoicing recipient code. - `address` (string or null) — Street address. - `city` (string or null) — City. - `province` (string or null) — Province or state. - `zip` (string or null) — Postal code. - `country` (string or null) — Two-letter country code. - `iban` (string or null) — Account IBAN. - `bic` (string or null) — Bank identifier code. - `is_active` (boolean) — Whether the supplier is active. - `notes` (string or null) — Notes about the supplier. - `metadata` (map or null) — Additional supplier data. Include `is_active` when editing an active supplier. Omitting it deactivates the supplier. ## Request (PATCH) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request PATCH \ --url "https://api.asdincloud.com/api/v1/suppliers/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"email":"billing@example.com","is_active":true}' ``` ## Request (PUT) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request PUT \ --url "https://api.asdincloud.com/api/v1/suppliers/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"email":"billing@example.com","is_active":true}' ``` ## Request (POST) Set ASDINCLOUD_API_KEY and any variables named in the example before running it. ```sh curl --request POST \ --url "https://api.asdincloud.com/api/v1/suppliers/${ID:?Set ID}" \ --header "X-API-Key: $ASDINCLOUD_API_KEY" \ --header "Content-Type: application/json" \ --data '{"email":"billing@example.com","is_active":true}' ``` ## Response **200 OK** Returns a successful update response. Example with fictional data and selected fields. ```json { "message_key": "entities.supplier.messages.updated" } ``` ## Errors - `401` — The API key is missing or invalid. - `403` — The API key lacks the required permission. - `404` — The requested record was not found. - `422` — One or more fields failed validation.