Skip to main content

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.

Required scope: suppliers:write

Grant 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

OK

Response Headers
    Content-Type