Reference
Incoming invoices
GET/api/v1/incoming-invoicesList incoming invoices
Incoming (supplier) invoices as on /finanzen/eingangsrechnungen: supplier, their invoice number, invoice and due date, gross and still open in cents, the state (draft, open, partially_paid, overdue, paid), the areas (Bereiche, with their KOST) the cost shares name, and the DATEV hand-off state (offen, blockiert, uebergeben, im_paket or aus, with a reason where there is one). Without a status it lists the ones still to be paid. Drafts are proposals from the document intake or from an agent, waiting for a person to confirm them. Each item carries einvoice, null unless its file is an e-invoice: { format, legal, validation (pending, valid, invalid or unavailable), deviations } where deviations lists the saved values that differ from the e-invoice. Read only. finance.manage only.scope finance:read
Query
| status | one of entwurf, offen, ueberfaellig, bezahlt, alleentwurf, offen (still to be paid, incl. overdue), ueberfaellig, bezahlt or alle. Default offen. |
| company_id | stringOnly this supplier (search_companies). |
| query | stringPart of the supplier, its name on a draft, or the invoice number. |
| limit | integerDefault 50, at most 200. |
Response 200
| items[] | object[] |
| items[].id | string |
| items[].einvoice | object | null |
| items[].einvoice.format | string |
| items[].einvoice.legal | boolean |
| items[].einvoice.validation | one of pending, valid, invalid, unavailable |
| items[].einvoice.deviations[] | object[] |
| items[].supplier | string | null |
| items[].supplier_invoice_number | string | null |
| items[].invoice_date | string |
| items[].due_date | string |
| items[].gross_cents | integer |
| items[].open_cents | integer |
| items[].state | one of draft, open, partially_paid, paid, initiated, overdue, cancelled |
| items[].document_url | string | null |
| items[].areas[] | object[] |
| items[].areas[].id | string |
| items[].areas[].name | string |
| items[].areas[].cost_center | string | null |
| items[].datev | object |
| items[].datev.state | one of offen, blockiert, uebergeben, im_paket, aus |
| items[].datev.reasonoptional | string |
Schema
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"einvoice": {
"anyOf": [
{
"type": "object",
"properties": {
"format": {
"type": "string"
},
"legal": {
"type": "boolean"
},
"validation": {
"type": "string",
"enum": [
"pending",
"valid",
"invalid",
"unavailable"
]
},
"deviations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"enum": [
"grossCents",
"netCents",
"vatCents",
"supplierInvoiceNumber",
"invoiceDate",
"dueDate"
]
},
"stored": {
"type": [
"string",
"number",
"null"
]
},
"eInvoice": {
"type": [
"string",
"number",
"null"
]
}
},
"required": [
"field",
"stored",
"eInvoice"
],
"additionalProperties": false
}
}
},
"required": [
"format",
"legal",
"validation",
"deviations"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"supplier": {
"type": [
"string",
"null"
]
},
"supplier_invoice_number": {
"type": [
"string",
"null"
]
},
"invoice_date": {
"type": "string"
},
"due_date": {
"type": "string"
},
"gross_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"open_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"state": {
"type": "string",
"enum": [
"draft",
"open",
"partially_paid",
"paid",
"initiated",
"overdue",
"cancelled"
]
},
"document_url": {
"type": [
"string",
"null"
]
},
"areas": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"cost_center": {
"type": [
"string",
"null"
]
}
},
"required": [
"id",
"name",
"cost_center"
],
"additionalProperties": false
}
},
"datev": {
"type": "object",
"properties": {
"state": {
"type": "string",
"enum": [
"offen",
"blockiert",
"uebergeben",
"im_paket",
"aus"
]
},
"reason": {
"type": "string"
}
},
"required": [
"state"
],
"additionalProperties": false
}
},
"required": [
"id",
"einvoice",
"supplier",
"supplier_invoice_number",
"invoice_date",
"due_date",
"gross_cents",
"open_cents",
"state",
"document_url",
"areas",
"datev"
],
"additionalProperties": false
}
}
},
"required": [
"items"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
POST/api/v1/incoming-invoicesCreate incoming invoice draft
Proposes an incoming (supplier) invoice as a draft (optionally from an uploaded XML e-invoice, see attachment_id) for a person to check and confirm on /finanzen/eingangsrechnungen. A draft is not payable, books nothing and is not in the liquidity forecast until it is confirmed; confirming, cancelling, payments and matching bank transactions are not available here. Name the supplier by company_id or, when it is not a Firma yet, by supplier_name; on confirmation a name is matched to the Firma of that name or becomes a new supplier Firma. Give a cost category, or a purchase contract line with the period it bills. Amounts in cents (the gross of a share in euros); the area is business_unit_id or a split in shares, kept on confirmation; due_date defaults to the supplier's payment term.scope finance:write
Body (JSON)
| company_id | stringThe supplier Firma, if it exists. |
| supplier_name | stringThe supplier's name when it is not a Firma yet; confirming makes it one. |
| attachment_id | stringAn XML e-invoice or other invoice file from upload_attachment. Missing fields default from an e-invoice; explicit arguments win and differences are listed in the result. |
| supplier_invoice_number | stringThe number printed on the supplier's invoice. Required without an e-invoice in attachment_id. |
| invoice_date | stringRequired without an e-invoice in attachment_id. |
| due_date | stringDefault: invoice date plus the supplier's payment term. |
| gross_cents | integerRequired without an e-invoice in attachment_id. |
| net_cents | integerGive net and vat together; they add up to gross. |
| vat_cents | integer |
| iban | stringThe supplier's IBAN as printed. |
| category_key | stringA cost category (list_finance_categories). Not needed with a contract period. |
| contract_line_id | stringA purchase contract line of the supplier, with period_from. |
| period_from | stringFirst day of the period the invoice bills. |
| business_unit_id | stringThe area (Bereich) the whole invoice belongs to: its id or name (list_business_units). Give this or shares. Without either the area is derived from the supplier and contract. |
| shares[] | object[]A split over several areas, one entry per area; the gross amounts must add up to the invoice's gross. |
| shares[].business_unit_idrequired | string |
| shares[].grossrequired | numberGross of this share in euros. |
Response 200
| id | string |
| state | string |
| supplier | string | null |
| gross_cents | integer |
| einvoice | object | null |
| einvoice.format | string |
| einvoice.legal | boolean |
| einvoice.validation | one of pending, valid, invalid, unavailable |
| einvoice.deviations[] | object[] |
| einvoice.deviations[].field | one of grossCents, netCents, vatCents, supplierInvoiceNumber, invoiceDate, dueDate |
| einvoice.deviations[].stored | string | number | null |
| einvoice.deviations[].eInvoice | string | number | null |
| url | string |
| next | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"state": {
"type": "string",
"const": "draft"
},
"supplier": {
"type": [
"string",
"null"
]
},
"gross_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"einvoice": {
"anyOf": [
{
"type": "object",
"properties": {
"format": {
"type": "string"
},
"legal": {
"type": "boolean"
},
"validation": {
"type": "string",
"enum": [
"pending",
"valid",
"invalid",
"unavailable"
]
},
"deviations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"enum": [
"grossCents",
"netCents",
"vatCents",
"supplierInvoiceNumber",
"invoiceDate",
"dueDate"
]
},
"stored": {
"type": [
"string",
"number",
"null"
]
},
"eInvoice": {
"type": [
"string",
"number",
"null"
]
}
},
"required": [
"field",
"stored",
"eInvoice"
],
"additionalProperties": false
}
}
},
"required": [
"format",
"legal",
"validation",
"deviations"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"url": {
"type": "string"
},
"next": {
"type": "string"
}
},
"required": [
"id",
"state",
"supplier",
"gross_cents",
"einvoice",
"url",
"next"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.
GET/api/v1/incoming-invoices/{id}Get incoming invoice
One incoming (supplier) invoice by id (from list_incoming_invoices): supplier, their number, dates, gross and open in cents, the state, and its payments -- id, paid_on, amount_cents, note, origin (hand: recorded by hand; bank: from a bank transaction; reversal: an undone bank booking), bank_transaction_id (the transaction behind it or coupled to it, else null) and cancelled ({ on, by, reason } or null). payment_order is the initiated SEPA payment order, or null. Read only. finance.manage only.scope finance:read
Path
| idrequired | stringThe incoming invoice's id. |
Response 200
| id | string |
| supplier | string | null |
| supplier_invoice_number | string | null |
| invoice_date | string |
| due_date | string |
| gross_cents | integer |
| open_cents | integer |
| state | one of draft, open, partially_paid, paid, initiated, overdue, cancelled |
| payments[] | object[] |
| payments[].id | string |
| payments[].paid_on | string |
| payments[].amount_cents | integer |
| payments[].note | string | null |
| payments[].origin | one of hand, bank, reversal, cancellation |
| payments[].bank_transaction_id | string | null |
| payments[].cancelled | object | null |
| payments[].cancelled.on | string |
| payments[].cancelled.by | string |
| payments[].cancelled.reason | string |
| payment_order | object | null |
| payment_order.id | string |
| payment_order.status | string |
| payment_order.amount_cents | integer |
| payment_order.created_on | string |
Schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"supplier": {
"type": [
"string",
"null"
]
},
"supplier_invoice_number": {
"type": [
"string",
"null"
]
},
"invoice_date": {
"type": "string"
},
"due_date": {
"type": "string"
},
"gross_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"open_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"state": {
"type": "string",
"enum": [
"draft",
"open",
"partially_paid",
"paid",
"initiated",
"overdue",
"cancelled"
]
},
"payments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"paid_on": {
"type": "string"
},
"amount_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"note": {
"type": [
"string",
"null"
]
},
"origin": {
"type": "string",
"enum": [
"hand",
"bank",
"reversal",
"cancellation"
]
},
"bank_transaction_id": {
"type": [
"string",
"null"
]
},
"cancelled": {
"anyOf": [
{
"type": "object",
"properties": {
"on": {
"type": "string"
},
"by": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"required": [
"on",
"by",
"reason"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"paid_on",
"amount_cents",
"note",
"origin",
"bank_transaction_id",
"cancelled"
],
"additionalProperties": false
}
},
"payment_order": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"status": {
"type": "string",
"const": "initiated"
},
"amount_cents": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"created_on": {
"type": "string"
}
},
"required": [
"id",
"status",
"amount_cents",
"created_on"
],
"additionalProperties": false
},
{
"type": "null"
}
]
}
},
"required": [
"id",
"supplier",
"supplier_invoice_number",
"invoice_date",
"due_date",
"gross_cents",
"open_cents",
"state",
"payments",
"payment_order"
],
"additionalProperties": false
}Refusals are problems with a code — see Errors.