Bulk upsert catalogue items
Header Parameters
Path Parameters
Company ID. Must be one of the IDs returned by GET /api/v2/companies/.
Body Parameters
Optional. When set, this row updates exactly this item, so a rename updates in place instead of creating a duplicate. It must be a live item of this company. A malformed or empty id fails this row with invalid_id, and an unknown, foreign or soft-deleted id fails it with unknown_id. Either way the rest of the batch still saves.
Locale-keyed names. names.en is required on rows without an id, because it is the fallback match key. A row addressed by id may leave names out entirely, which is how a partial update works here. An id-less row without names.en fails with validation_error and errorField names.
Show child attributes
Barcode number of the item. Unique across all of Hivebuy.
Unit of measure, e.g. pc, kg, l.
Article number of the item.
Ids of the catalogues the item belongs to.
Show child attributes
Supplier the item is bought from. Must belong to this company.
Contract the item is covered by.
Free-text supplier name, for items with no supplier record.
Smallest quantity that can be ordered. Decimal string. A JSON number is accepted on input and comes back as a string.
Quantity increment. Decimal string. A JSON number is accepted on input and comes back as a string.
Article number in your own system.
How often the item is reordered. Written inline with the item. Include the id on update to change the existing row instead of replacing it.
Show child attributes
Show child attributes
Category id. Must belong to this company. Required on a row that creates a new item.
Tag ids.
Show child attributes
The variants of this item. At least one is required on a row that creates. Send a variant's id to update it in place. A variant without an id is matched against the item's existing variants by names.en, and is created when nothing matches. A variant the payload leaves out is removed from the item.
Show child attributes
Response
Always 200 once the batch shape is accepted. Saved rows in upserted, each with its action. Failed rows in errors, each with its 0-based row index.
Response Attributes
Show child attributes
Show child attributes
The whole request was refused and nothing was written: the body is not a JSON array, an entry is not an object, or the payload has more than 50 rows.
Response Attributes
validationErrorclientErrorserverError Show child attributes
Missing, invalid, or expired API key, or a session credential was used instead of an API key.
Response Attributes
validationErrorclientErrorserverError Show child attributes
Authenticated but not entitled: the key's user is not an active member of this company, the External API feature (or the resource's own feature) is not enabled for it, the key lacks the scope this verb needs, or a browser session was used.
Response Attributes
validationErrorclientErrorserverError Show child attributes
Rate limit exceeded (60 requests per minute per API key). Retry after the number of seconds given in the message.
Response Attributes
validationErrorclientErrorserverError