Skip to main content
POST
/
consumers
/
{consumer_id}
/
accounting
/
invoices
Create sale/purchase entry
curl --request POST \
  --url https://api.chift.eu/consumers/{consumer_id}/accounting/invoices \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "invoice_type": "customer_invoice",
  "invoice_number": "<string>",
  "currency": "<string>",
  "untaxed_amount": 123,
  "tax_amount": 123,
  "total": 123,
  "reference": "<string>",
  "payment_communication": "<string>",
  "customer_memo": "<string>",
  "invoice_date": "2023-12-25",
  "due_date": "2023-12-25",
  "partner_id": "<string>",
  "journal_id": "<string>",
  "status": "draft",
  "pdf": "<string>",
  "currency_exchange_rate": 123,
  "invoice_correction": {
    "sale_invoice_correction_tax_code": "<string>",
    "purchase_invoice_correction_tax_code": "<string>",
    "invoice_correction_credit_account_number": "<string>",
    "invoice_correction_debit_account_number": "<string>"
  },
  "nl_payment_terms_split": {
    "g_account": {
      "amount": 123,
      "iban": "<string>"
    },
    "n_account": {
      "amount": 123,
      "iban": "<string>"
    }
  },
  "shipping_country": "<string>",
  "partner_info": {
    "account_number": "<string>",
    "account_name": "<string>"
  },
  "lines": [
    {
      "line_number": 123,
      "unit_price": 123,
      "unit_of_measure": "<string>",
      "quantity": 123,
      "untaxed_amount": 123,
      "tax_rate": 123,
      "tax_amount": 123,
      "total": 123,
      "account_number": "<string>",
      "tax_code": "<string>",
      "description": "",
      "analytic_account": "<string>"
    }
  ],
  "start_date": "2023-12-25",
  "end_date": "2023-12-25"
}'
{
  "invoice_type": "customer_invoice",
  "invoice_number": "<string>",
  "currency": "<string>",
  "untaxed_amount": 123,
  "tax_amount": 123,
  "total": 123,
  "reference": "<string>",
  "payment_communication": "<string>",
  "customer_memo": "<string>",
  "id": "<string>",
  "invoice_date": "2023-12-25",
  "due_date": "2023-12-25",
  "partner_id": "<string>",
  "journal_id": "<string>",
  "payments": [
    {
      "id": "<string>",
      "name": "<string>",
      "currency": "<string>",
      "amount": 123,
      "dedicated_amount": 0,
      "payment_date": "2023-12-25",
      "journal_type": "customer_invoice",
      "journal_id": "<string>",
      "journal_name": "<string>",
      "reconciled": true,
      "communication": "<string>",
      "matching_number": "<string>"
    }
  ],
  "status": "cancelled",
  "last_updated_on": "2023-11-07T05:31:56Z",
  "partner": {
    "external_reference": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "name": "<string>",
    "function": "<string>",
    "is_company": true,
    "company_id": "<string>",
    "phone": "<string>",
    "mobile": "<string>",
    "email": "<string>",
    "language": "<string>",
    "internal_notes": "<string>",
    "website": "<string>",
    "vat": "<string>",
    "iban": "<string>",
    "bank_account": "<string>",
    "currency": "<string>",
    "active": true,
    "account_number": "<string>",
    "company_number": "<string>",
    "id": "<string>",
    "last_updated_on": "2023-11-07T05:31:56Z",
    "addresses": [
      {
        "address_type": "main",
        "name": "<string>",
        "number": "<string>",
        "box": "<string>",
        "phone": "<string>",
        "mobile": "<string>",
        "email": "<string>",
        "street": "<string>",
        "city": "<string>",
        "postal_code": "<string>",
        "country": "<string>"
      }
    ]
  },
  "due_dates": [
    {
      "due_date": "2023-12-25",
      "payment_method": "<string>",
      "amount": 123
    }
  ],
  "attachments_info": {
    "status": "unknown",
    "attachments": [
      {
        "filename": "<string>",
        "url": "<string>"
      }
    ]
  },
  "lines": [
    {
      "line_number": 123,
      "unit_price": 123,
      "unit_of_measure": "<string>",
      "quantity": 123,
      "untaxed_amount": 123,
      "tax_rate": 123,
      "tax_amount": 123,
      "total": 123,
      "account_number": "<string>",
      "tax_code": "<string>",
      "description": "<string>",
      "analytic_account": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

This access token needs to be included in each of your request to the Chift API.

Path Parameters

consumer_id
string<uuid>
required

Query Parameters

folder_id
string | null

Id of the accounting folder instance. A folder represents a legal entity within the system. Required when the multiple folders feature is enabled.

force_financial_period
string | null

Forces financial period in which the invoice must be created. This will create the invoice in the forced financial period rather than the current period. The format is: mmYYYY.

regroup_lines
enum<string> | null
default:true

Allow to regroup invoice lines by account number, tax code and analytic account in the accounting system.

Available options:
true,
false

Body

application/json
invoice_type
enum<string>
required

Specifies the type of invoice

Available options:
customer_invoice,
customer_refund,
supplier_invoice,
supplier_refund
currency
string
required

Code (e.g., USD, EUR) of the currency used for invoice amounts.

untaxed_amount
number
required

Total amount of the invoice excluding taxes.

tax_amount
number
required

Total amount of tax applied to the invoice

total
number
required

Total amount of the invoice, including taxes (untaxed_amount + tax_amount).

invoice_date
string<date>
required

Accounting date of the invoice (format: YYYY-MM-DD).

due_date
string<date>
required

Due date for payment or settlement (format: YYYY-MM-DD).

lines
InvoiceLineItemInMonoAnalyticPlan · object[]
required
invoice_number
string | null

Unique 'number' of the invoice instance in the accounting software. This is an internal reference number. if not specified, will be automatically generated according to the system’s numbering rules. It does not necessarily match the number displayed on an invoice.It is recommended to use this number for idempotency to prevent duplicate entries. Refer to the idempotency documentation in the Developer Guides for more details

reference
string | null

Optional reference field used to store an external or contextual identifier related to the entry. For purchase invoices, it typically contains the invoice number issued by the supplier. For sales invoices, it may reference a quote number or any other relevant document. Unlike number, this field is not subject to specific format or character restrictions and can hold free-form text.

payment_communication
string | null

Field containing the payment reference or communication associated with the invoice (e.g., bank transfer reference, SEPA remittance message). Often used for reconciliation purposes.

customer_memo
string | null

Internal or external note associated with the invoice, typically intended for the customer. Can include additional context, comments, or special instructions related to the transaction.

partner_id
string | null

Id of the related third party (supplier or customer) in the accounting software. Used to link the invoice to the corresponding client or supplier record in the accounting system.

Minimum length: 1
journal_id
string | null

Identifier of the journal for the invoice. If not provided, the journal will be set automatically if only one exists; otherwise, an error will be thrown.

status
enum<string> | null
default:posted

string indicating if invoice has been posted (finalized) in the accounting system.

Available options:
draft,
posted
pdf
string | null

Base 64 string representing the PDF attached to the invoice.

currency_exchange_rate
number | null
default:1

Exchange rate applicable at the date of the invoice. Required when the invoice currency is different from the folder's default currency.

invoice_correction
object | null

Information used to add a correction line when roundings have an impact on the total amount of the invoice.

nl_payment_terms_split
object | null

NL only - For Dutch split payment compliance (G/N-rekening): use to specify how invoice amounts are divided between a blocked (G) and normal (N) account in high-risk sectors (e.g., construction, staffing).

shipping_country
string | null

Format: ISO 3166-1 codes.

partner_info
object | null

Information about the client/supplier that must be created. In some tools we cannot create a client/supplier by API. Missing clients/suppliers must be explicitly provided during the invoice creation and will be automatically created by the accounting software. This is for example the case for Tiime.

start_date
string<date> | null

Start date of the period covered by the invoice (format: YYYY-MM-DD). This field should be used when the invoice relates to prepaid income or expenses (accruals and deferrals), indicating when the covered period begins.

end_date
string<date> | null

End date of the period covered by the invoice (format: YYYY-MM-DD). This field should be used when the invoice relates to prepaid income or expenses (accruals and deferrals), indicating when the covered period ends.

Response

Successful Response

invoice_type
enum<string>
required

Specifies the type of invoice

Available options:
customer_invoice,
customer_refund,
supplier_invoice,
supplier_refund
currency
string
required

Code (e.g., USD, EUR) of the currency used for invoice amounts.

untaxed_amount
number
required

Total amount of the invoice excluding taxes.

tax_amount
number
required

Total amount of tax applied to the invoice

total
number
required

Total amount of the invoice, including taxes (untaxed_amount + tax_amount).

invoice_date
string<date>
required

Accounting invoice date. It is automatically set to '1970-01-01' if the value is empty in the accounting system.

due_date
string<date>
required

Last Due date of the invoice. The invoice date is used when this information is not given by the software.

partner_id
string
required
lines
InvoiceLineItemOutMonoAnalyticPlan · object[]
required
invoice_number
string | null

Unique 'number' of the invoice instance in the accounting software. This is an internal reference number. if not specified, will be automatically generated according to the system’s numbering rules. It does not necessarily match the number displayed on an invoice.It is recommended to use this number for idempotency to prevent duplicate entries. Refer to the idempotency documentation in the Developer Guides for more details

reference
string | null

Optional reference field used to store an external or contextual identifier related to the entry. For purchase invoices, it typically contains the invoice number issued by the supplier. For sales invoices, it may reference a quote number or any other relevant document. Unlike number, this field is not subject to specific format or character restrictions and can hold free-form text.

payment_communication
string | null

Field containing the payment reference or communication associated with the invoice (e.g., bank transfer reference, SEPA remittance message). Often used for reconciliation purposes.

customer_memo
string | null

Internal or external note associated with the invoice, typically intended for the customer. Can include additional context, comments, or special instructions related to the transaction.

id
string | null
journal_id
string | null

Indicates the journal used in for the invoice. If the journal is not given, the journal will be automatically set if only one journal exists otherwise an error will be thrown.

payments
Payment · object[] | null
status
enum<string> | null
default:posted
Available options:
cancelled,
draft,
posted,
paid
last_updated_on
string<date-time> | null

The last time the invoice has been updated.

partner
object | null

Extra information about the partner (client/supplier) linked to the invoice. To ensure this information is returned, you need to use the include_partner_info query parameter.

due_dates
InvoiceItemDueDatesOut · object[] | null

List of all due dates of the invoice.

attachments_info
object

Extra information about the attachments linked to the invoice.