Hivebuy External API (v2)

Sections

Theme switcher

Attach a document to a purchase order

Header Parameters

Authorizationstring

Path Parameters

companyIdstring Required

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

orderIdstring Required

The order's UUID, or the external reference it was sent out with.

Body Parameters

filestring Required

Base64-encoded file content (or the file part on a multipart request). Roughly 1.9 MB maximum.

namestring

Title, and where the extension is taken from when it is not given separately. Defaults to "Purchase Order Document".

extensionstring

Explicit extension, e.g. pdf. Needed when name carries none.

typestring

Document type. Defaults to a generic "other".

Response

201
Object

Attached. Returns the order's whole document list.

Response Attributes

documentsarray

The order's full document list after the upload.

Show child attributes

purchaseOrderIdstring
uploadedDocumentIdstring
400
Object

No file, an unsupported extension, or a file over the size ceiling.

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

404
Object

No such row for this company, including a row that belongs to another company, and a soft-deleted row you tried to write to. The API does not confirm whether the id exists elsewhere.

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