Skip to main content
POST
Error

Authorizations

authorization
string
header
required
X-Workspace-ID
string
header
required

Path Parameters

supplier_invoice_id
integer
required

Body

application/json

With purchase_order_item_id the item bills that PO item (same supplier and currency, PO open or closed); without it it is an extra charge and description is required.

purchase_order_item_id
integer | null
charge_purchase_order_id
integer | null

Extra charges only — the PO the charge belongs to (same checks as a PO item line); its whole amount goes to that PO. Unlinked charges are spread across the invoice's POs; an invoice with nothing linked is a non-PO cost. Setting purchase_order_item_id without this key clears it.

project_id
integer | null

Extra charges only (PO item lines take their PO item's project) — any project of the workspace. Defaults to the only candidate — a linked charge's PO's projects; an unlinked charge's projects billed on POs by the invoice's other items, else those items' projects — and is required when there are several or none. A linked charge's project must be one of its PO's; when the invoice bills POs, an unlinked charge's project must be one of the billed projects. Defaults to the project of package_section_id / package_baseline_item_id when sent.

package_section_id
integer | null

Extra charges only (PO item lines copy their PO item's dimensions, values sent are ignored) — required; a section of a baselined package of the charge's project, counted there by the budget analysis. Defaults to the only candidate — a linked charge's PO's item sections in its project, else the sections of the invoice's other items in its project.

package_id
integer | null

Extra charges only — optional; must be the package of package_section_id.

category_id
integer | null

Extra charges only — optional workspace category; blank clears it.

package_baseline_item_id
integer | null

Extra charges only — optional baseline row of the charge's project (baselined package); the package, section and category are copied from it (an package_section_id sent along must match).

description
string | null
quantity
string
Example:

"400"

unit_price
string
Example:

"10.00"

Response

Created

id
integer
required
project_id
integer
required

A PO item line's PO item project; an extra charge's own project.

package_id
integer
required

Budget dimensions — a PO item line's copied from its PO item, an extra charge's own.

package_section_id
integer
required
quantity
string
required
Example:

"400.00"

unit_price
string
required
Example:

"10.00"

amount
string
required

quantity × unit price, 2 decimals.

matches
object[]
required
supplier_invoice_id
integer
purchase_order_item
object | null

The billed PO item; null for an extra charge (freight, packaging, ...), which is never matched. Carries the PO item's current budget dimensions; the line's own are a snapshot taken when it was saved, so they differ once the PO item is moved (section, category, baseline row) after billing.

charge_purchase_order
object | null

Extra charges only — the PO the charge belongs to; null for PO item lines and unlinked charges.

category_id
integer | null
category
string | null

The category text (named like a manual PO item's).

package_baseline_item_id
integer | null
description
string | null
position
integer
created_at
string<date-time>
updated_at
string<date-time>