invoices.purchases.update

Update a previously inserted purchase invoice, which will then be converted into a book entry. The result will contain the newly generated book entry's id.

There are two ways to update an invoice, either with or without an attached document (the original attachment will be deleted in both cases).

  • When no document is attached, use the application/json content type as usual.
  • For joining a document to the invoice, use the multipart/form-data content type and add two arguments. The first one must be named file and contain the file's bytes, and the other one must be named body and contain the json-formatted information.

The total amount must be equal to the sum of the base amount and tax amount. Additionnally, the sum of each line's base amount must be equal to the global base amount (same for the tax amount).

The accepted tax combinations (Tax type / kind / rate / origin / condition / condition value)) are available here.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
string
required
string
required
number
required

0 for an invoice, 1 for a credit note

number | null

Nullable. The number of the invoice, which will also be associated to the book entry. (can be 0 if not confirmed)

date-time
required
date-time
required
string
required
number
required
number
required
number
required
string | null
number
enum
  • 0: Bank Transfer
  • 100: Manual
  • 110: Domiciliation
  • 200: Credit Card
  • 400: Paypal
  • 410: Doccle
  • 420: Digiteal
  • 900: Check
  • 910: Bill Draft
string | null

Required if a document is attached. Include the file's extension.

string | null
number | null

NULL By default.

string | null

Nullable. If one is provided, the corresponding vehicle will be associated to every account history that uses an account requiring a vehicle.

Discount
object | null

NULL By default. Information about a discount accorded if the payment is done within a given period of time.

string
enum

NULL by default (= EUR). The folder must be configured to allow currencies for using this field.

boolean

Nullable, false by default

boolean

Nullable, false by default. By default, all tax amounts are recalculated (base amount X tax rate) and adapted if the provided tax amount is within 1 cent of the calculated one. If you want to force a specific tax amount, set this value to true.

boolean

Nullable, false by default. By default, all unbalanced book entries will be refuted. If you want to force it even though it's not balanced, set this value to true.

InvoiceLines
array of objects
required
InvoiceLines*
Headers
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

401

Unauthorized – invalid, expired or missing access token.

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json