Hivebuy External API (v2)

Sections

Theme switcher

Update a project

Header Parameters

Authorizationstring

Path Parameters

companyIdstring Required

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

idstring Required

Row id. A row belonging to another company is 404 on every verb, never 403.

Body Parameters

namestring
descriptionstring | null
projectNumberstring | null

Your own project number. Sortable via ?ordering=projectNumber.

externalIdstring | null

Reference in your system. Not interpreted by Hivebuy.

costCenterstring | null
statusstring

A active, C closed.

Enum values:
AC
activeboolean
parentstring | null

Parent project. Must belong to this company.

legalEntitystring | null

Must belong to this company.

deliveryAddressstring | null

Company address id. Must belong to this company and must not be deleted.

invoiceAddressstring | null

Company address id. Must belong to this company and must not be deleted.

projectApprovalFlowTypestring

Who approves for the project: SIMPLE project owner, MEDIUM owner and budget owner, EXTENDED owner, budget owner and the department heads involved, or USE_PURCHASE_REQUEST_WORKFLOWS to fall back to the normal request workflows.

Enum values:
USE_PURCHASE_REQUEST_WORKFLOWSSIMPLEMEDIUMEXTENDED
totalProjectBudgetstring | null

Total budget as a decimal string.

membersarray

User ids. Each must be an active member of this company.

Show child attributes

approversarray

User ids. Each must be an active member of this company.

Show child attributes

budgetOwnersarray

User ids. Each must be an active member of this company.

Show child attributes

budgetallof

Budget figures you may set on a project write. Every key is optional. amount is the total; sending it is the same as sending totalProjectBudget (prefer totalProjectBudget). usedBudget is normally computed by Hivebuy from orders and invoices. When an API key sends usedBudget, the sender's system (typically the ERP) takes ownership of the used figure: Hivebuy stores the value as sent, stops recalculating it, sets useExternalBudget to true and stamps externalBudgetSyncedAt...

All Of:

amountstring | null

Total budget as a decimal string, e.g. "250000.00". Equivalent to totalProjectBudget.

amountCurrencystring

ISO 4217 code. Omit it to use the company currency. Must match the currency of the stored budget and of every other money value in this object, otherwise the row fails with validation_error.

usedBudgetstring | null

Spent. Computed by Hivebuy from orders and invoices, unless an API key sends it: then the sender owns the figure until releaseExternalBudget (see the schema description).

pendingBudgetstring | null

Accepted and ignored. Hivebuy always computes it from open purchase requests.

remainingBudgetstring | null

Accepted and ignored. Always derived as amount minus used minus pending.

releaseExternalBudgetboolean

Set to true to hand an ERP-owned usedBudget back to Hivebuy. Hivebuy recomputes used from its own orders and invoices and clears externalBudgetSyncedAt. Ignored when the budget is not ERP-owned. Any caller may send it.

writeOnly
commentstring

Response

200
Object

Updated. The body is the read shape.

Response Attributes

idstring
namestring Required
descriptionstring | null
projectNumberstring | null
externalIdstring | null
costCenterstring | null
statusstring

A active, C closed.

Enum values:
AC
activeboolean
parentstring | null
legalEntitystring | null
membersarray

Show child attributes

approversarray

Show child attributes

budgetOwnersarray

Show child attributes

participatingDepartmentsarray

Read-only. Maintained through the departments themselves, not here.

Show child attributes

deliveryAddressstring | null
invoiceAddressstring | null
projectDeliveryAddressesarray

Read-only. The full delivery addresses linked to the project.

Show child attributes

projectApprovalFlowTypestring
Enum values:
USE_PURCHASE_REQUEST_WORKFLOWSSIMPLEMEDIUMEXTENDED
totalProjectBudgetstring | null

Decimal string, e.g. "1250.00".

totalProjectBudgetCurrencystring

ISO 4217 code, inherited from the company.

readOnly
budgetallof

The project's budget as stored. amount follows totalProjectBudget. pendingBudget is computed by Hivebuy from open purchase requests and remainingBudget is always amount minus used minus pending. usedBudget is computed by Hivebuy from orders and invoices, or, while useExternalBudget is true, the figure the ERP last pushed (see BudgetWrite). This is the read shape; the write shape is BudgetWrite.

readOnly

All Of:

idstring
amountstring | null

The budget itself.

amountCurrencystring

ISO 4217 code. The company currency unless a write set another one.

usedBudgetstring | null

Spent. Hivebuy's figure from orders and invoices, or the ERP's figure while useExternalBudget is true.

pendingBudgetstring | null

Committed in open purchase requests, not yet spent. Always computed by Hivebuy.

remainingBudgetstring | null

amount minus used minus pending. Always derived.

useExternalBudgetboolean

true while an external system (the ERP) owns usedBudget. Set when an API key writes usedBudget, cleared by releaseExternalBudget.

readOnly
externalBudgetSyncedAtstring | null

When the ERP last wrote usedBudget. null while Hivebuy computes the used figure itself.

readOnly
commentstring
createdAtstring

When the row was created.

readOnly
updatedAtstring

When the row itself last changed.

readOnly
deletedstring | null

null on a live row; the timestamp of the soft delete otherwise. Read-only everywhere.

readOnly
400
Object

Validation failed.

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

PATCH

/

Select
1

Response