Documentation menu

API reference

6 operations in acquisition-costs. Raw spec: openapi.json.

GET/api/v1/acquisition-costs/summary

GET /api/acquisition-costs/summary — base-currency totals per reporting class, optionally narrowed to an order, project, ticket or date window.

Parameters

NameInTypeRequiredDescription
purchase_order_idquery—No
project_idquery—No
ticket_idquery—No
fromquery—No
toquery—No

Responses

StatusDescription
200
422the date window is inverted

Security: bearer

GET/api/v1/acquisition-costs/{id}

GET /api/acquisition-costs/{id}.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
404layer not visible in scope

Security: bearer

POST/api/v1/acquisition-costs/{id}/reverse

POST /api/acquisition-costs/{id}/reverse — record the correcting document.

The reversal copies the split it reverses, negated, and reuses the rate the reversed layer locked, so the pair nets to zero in the base currency. It does not re-split: a reversal that apportioned again could land a cent somewhere the original did not, and the pair would no longer cancel.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

ReverseAcquisitionCostRequest

Responses

StatusDescription
200
404layer not visible in scope
409layer already reversed, or is itself a reversal
422the correcting document was refused

Security: bearer

GET/api/v1/purchase-receipts/{id}/acquisition-costs

GET /api/purchase-receipts/{id}/acquisition-costs.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
404receipt not visible in scope

Security: bearer

POST/api/v1/purchase-receipts/{id}/acquisition-costs

POST /api/purchase-receipts/{id}/acquisition-costs — record one charge document against a receipt and split it.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Request body

CreateAcquisitionCostRequest

Responses

StatusDescription
200
404receipt or vendor not visible in scope
409idempotency key reused or order not receivable
422the charge or its split was refused

Security: bearer

GET/api/v1/purchase-receipts/{id}/valuation

GET /api/purchase-receipts/{id}/valuation — receipt cost plus capitalised layers, per line and in total. Every amount comes from a stored snapshot, so two runs over the same receipt answer the same money.

Parameters

NameInTypeRequiredDescription
idpathstringYes

Responses

StatusDescription
200
404receipt not visible in scope

Security: bearer