Attach variants to a supplier
Attaches variants to a supplier and answers 201 with the variant-supplier rows that now exist for the ids named: unit_cost, currency, min_order_quantity, batch_size, lead_time, where the lead time came from, and whether this supplier is that variant's default.
Name the variants one of two ways. variant_ids is an explicit list. filter_args and search select them the way the variants table does, with exceptions naming the ids to leave out; that arm attaches by query and answers an empty variant_suppliers list, so read the variants back afterwards rather than trusting the response to enumerate them.
A variant that already has a default supplier keeps it; one that does not takes this supplier as its default. A pair that already exists is left exactly as it is rather than reset, so re-sending the same ids costs nothing and changes nothing.
An unknown supplier is refused 404.
Scope: suppliers:write, which includes suppliers:read.
Request
- Base URL: https://api.app.tightly.io
- URL: https://api.app.tightly.io/api/v1/inventory/suppliers/{supplier_id}/variants
- Auth: HTTP bearer
Path parameters
The supplier's id, as list_suppliers serves it.
Headers
The date train to answer on. One train exists today, 2026-11, the one this reference describes and the one every key is minted on, so the call answers on it with or without this header. Send it anyway, so a client built now names its train from the start.
A string of your own, up to 255 characters, that makes this write safe to retry. Send the same key twice and the second request is answered with the first one's status and body instead of writing again, so a client that retried after a timeout ends holding the record's id rather than creating a second one. Reusing a key with a different body, or while the first request is still running, is refused 409. A write that failed releases its key. Keys answer for 24 hours and belong to the API key that used them. A key longer than 255 characters is ignored and the write goes ahead without the guarantee.
Request body
Response
The variant-supplier rows for the ids named. Empty when the variants were selected by filter_args or search.
Changes
No recorded changes to this operation across all 1 revision of this API.