---
title: "Update Supplier Provider"
method: PATCH
path: "/supplier_provider/{supplier_provider_uid}"
---

# Update Supplier Provider

`PATCH /supplier_provider/{supplier_provider_uid}`

## Request

- Base URL: `https://dc-region.zuperpro.com/api`
- URL: `https://dc-region.zuperpro.com/api/supplier_provider/{supplier_provider_uid}`
- Auth: API key in header `x-api-key`

Updates a supplier provider; send only the fields you want to change inside `supplier_provider`. Unless `update_supplier_provider_token` is `false` or you set `connection_status`, Zuper re-authenticates with the supplier before saving (for SRS it also re-validates the customer account) and marks the provider `CONNECTED`, so this is also how you reconnect a provider showing `RECONNECT_REQUIRED`. SRS needs no credentials to reconnect; ABC Supply and QXO usually need a new `refresh_token`. Setting `is_active` to `false` disconnects the provider and clears its stored supplier tokens, so reactivating an ABC Supply or QXO provider requires a new `refresh_token` in the same request. The response returns only the provider's UID. Requires supplier integration to be enabled for the company; otherwise the request fails with 400. Admin only: the API key must belong to an admin user; other roles receive 405 Access Denied.

## Path parameters

- `supplier_provider_uid` string, required

## Request body

- object
  - `supplier_provider` object, required: Required. The fields to change; all are optional.
    - `supplier_provider_name` string: New display name. Cannot be empty.
    - `supplier_provider_type` 'SRS' | 'ABC_SUPPLY' | 'QXO': Changes the supplier type. Fails with 409 if the company already has a provider of that type.
    - `supplier_provider_keys` object: New supplier credentials or account details. Never returned by any endpoint.
      - `credentials_keys` object
        - `refresh_token` string: `ABC_SUPPLY` and `QXO`: a new OAuth refresh token for the account, used to reconnect. Omit to keep using the stored token. Not used for SRS.
      - `customer_data` object: SRS account details. Fields you send are merged with the stored ones; a new `customer_code` is verified with SRS before it is saved.
        - `customer_code` string: The customer's SRS account number.
        - `invoice_number` string: Number of an SRS invoice on the account; send together with `invoice_date`.
        - `invoice_date` string: Date of the invoice in `invoice_number`.
        - `integration_key` string: SRS integration key for the account; alternative to `invoice_number` and `invoice_date`.
    - `is_active` boolean: `false` deactivates the provider: it is marked `RECONNECT_REQUIRED` and its stored supplier tokens are cleared. `true` reactivates and reconnects it.
    - `connection_status` 'NOT_CONNECTED' | 'RECONNECT_REQUIRED': Marks the provider as disconnected. When set, Zuper saves the change without contacting the supplier.
    - `connection_error_message` string: Note stored with the connection status and returned as `connection_error_message`.
  - `update_supplier_provider_token` boolean: When `true`, Zuper re-authenticates with the supplier before saving. Send `false` to save without contacting the supplier. Also accepted as a query parameter.

## Response `200`

200

- object
  - `type` 'success'
  - `title` string
  - `message` string
  - `data` object
    - `supplier_provider_uid` string

## Other responses

- `400`: 400
- `404`: 404
- `405`: 405
- `409`: 409

## Changes

- **2026-11-03** `3c21bc232e16`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zuper/apis/zuper-pro-api/changes/supplier_provider/:supplier_provider_uid/patch.md)

---

[API](https://skmtc.dev/zuper/apis/zuper-pro-api.md) - [All operations](https://skmtc.dev/zuper/apis/zuper-pro-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zuper/apis/zuper-pro-api/revisions/3c21bc232e16?raw)
