Hivebuy External API (v2)

Sections

Theme switcher

Bulk upsert catalogue items

Header Parameters

Authorizationstring

Path Parameters

companyIdstring Required

Company ID. Must be one of the IDs returned by GET /api/v2/companies/.

Body Parameters

idstring | null

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.

namesobject

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

descriptionstring
gtinstring | null

Barcode number of the item. Unique across all of Hivebuy.

unitstring

Unit of measure, e.g. pc, kg, l.

Default value
pc
articlestring

Article number of the item.

cataloguesarray

Ids of the catalogues the item belongs to.

Show child attributes

companySupplierstring | null

Supplier the item is bought from. Must belong to this company.

contractstring | null

Contract the item is covered by.

unlistedSupplierstring | null

Free-text supplier name, for items with no supplier record.

minimalQuantitystring | null

Smallest quantity that can be ordered. Decimal string. A JSON number is accepted on input and comes back as a string.

Default value
1.00
quantityStepstring | null

Quantity increment. Decimal string. A JSON number is accepted on input and comes back as a string.

Default value
1.00
activeboolean
Default value
true
externalArticlestring | null

Article number in your own system.

recurrenceobject | null

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

imagesarray

Show child attributes

categorystring

Category id. Must belong to this company. Required on a row that creates a new item.

tagsarray

Tag ids.

Show child attributes

itemVariantsarray

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.

Min items
1

Show child attributes

Response

200
Object

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

upsertedarray

Show child attributes

errorsarray

Show child attributes

400
Object

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

typestring
Enum values:
validationErrorclientErrorserverError
errorsarray

Show child attributes

401
Object

Missing, invalid, or expired API key, or a session credential was used instead of an API key.

Response Attributes

typestring
Enum values:
validationErrorclientErrorserverError
errorsarray

Show child attributes

403
Object

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

typestring
Enum values:
validationErrorclientErrorserverError
errorsarray

Show child attributes

429
Object

Rate limit exceeded (60 requests per minute per API key). Retry after the number of seconds given in the message.

Response Attributes

typestring
Enum values:
validationErrorclientErrorserverError
errorsarray

Show child attributes

POST

/

Select
1

Response