Skip to main content
Clear invoice coding

Authorizations

Authorization
string
header
required

Personal API key sent as a bearer token, together with X-Organization-Id. The key must have at least the access level the endpoint requires (read, write or admin).

Headers

X-Organization-Id
string

The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.

Path Parameters

id
string<uuid>
required

Response

The invoice’s coding.

state
enum<string>
required

The worst state of its lines; unavailable without accounts payable or synced accounts; booked once the accounting system has posted its booking (see voucher), which is its coding: no lines, nothing to fill and nothing suggested.

Available options:
ready,
needs_input,
invalid,
unavailable,
booked
open_field_count
integer
required

Missing fields across the lines.

nothing_to_post
boolean
required

The invoice’s total is 0 and every line is not_booked. It needs no coding, and is transferred without a supplier invoice: as a plain voucher with its documents, or not at all when the accounting system refuses that.

suggesting
boolean
required

Whether Watchdog is still making the invoice’s coding suggestions, after it arrived or a person asked again. They are written all at once; read the coding again when the invoice_coding_suggestions workflow ends.

dimensions
object[]
required

The organization’s active dimensions, in the accounting system’s order.

lines
object[]
required
groups
object[]
required

The lines grouped by identical coding: each group posts as one.

voucher
object
required

The voucher the invoice posts as: Watchdog’s draft from the coding above, or the accounting system’s booking compared with it.