Merge Suppliers
POST/api/suppliers/:supplier/merge
Merge one supplier into another. The supplier in the URL is the source: all of its records are re-pointed to the target, and the source is then permanently deleted. This operation is irreversible — there is no undo.
suppliers:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body:
target_supplier_id(integer, required) — the surviving supplier that absorbs everything.
What gets transferred to the target: purchase orders, purchase invoices, bills, vendor credits, vendor deposits, inbound shipments, supplier warehouses, inventory allocations, manufacturing/contractor references, cost entries, and forecast configurations. Supplier-product links, pricing-tier attachments, supplier inventory, and metric snapshots move too — where the target already has an equivalent record (e.g. the same product), the source's duplicate is dropped in favor of the target's. If the source was a product's default supplier and the target also supplies that product, the target becomes the default. Custom field values move to the target as well — where the target already has a value for the same custom field, the target's value is kept and the source's is dropped.
Errors (422):
- merging a supplier into itself
- the target supplier does not exist
- source and target are different types (a product supplier cannot merge with a service provider)
- the target supplier is archived (unarchive it first)
Synchronous — completes in one transaction. Requires the suppliers:write token scope and permission to delete suppliers.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.