Switch invoice state

Switch the state of an existing invoice.

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

Format

The format of the API response can be either JSON or XML.

Allowed:
integer
required

An internal identifier that is unique to each Invoice within B2Brouter.

Body Params

Attributes to update the state of the invoice

string
enum
required

Valid states for an issued invoice:

  • new - The initial status of an issued invoice.
  • sent - The invoice has been sent successfully. It cannot be set manually when tax reporting to the French tax authority (DGFiP) is active for the account: the invoice becomes sent by being sent through B2Brouter.
  • accepted - When the invoice is marked as accepted.
  • registered - When a registered notification has been received or manually marked as registered.
  • refused - When a refused notification has been received or manually marked as refused.
  • paid - When the invoice has been paid or the invoice is marked manually as paid.
  • closed - Is a final state.

Valid states for a received invoice:

  • new - The initial status of a received invoice or manually marked as new.
  • paid - When the invoice has been paid or the invoice is marked manually as paid.
  • accepted - When the invoice is marked as accepted.
  • refused - When the invoice is marked as refused.
  • annotated - When the invoice is marked annotated.

Valid states for an issued simplified invoice:

  • new - The initial status of an issued simplified invoice.
  • sent - The invoice has been sent successfully. It cannot be set manually when tax reporting to the French tax authority (DGFiP) is active for the account: the invoice becomes sent by being sent through B2Brouter.
  • paid - When the invoice has been paid or the invoice is marked manually as paid.
  • downloaded - When the invoice has been downloaded or manually marked as downloaded.
  • accepted - When the invoice is marked as accepted.
  • refused - When a refused notification has been received or manually marked as refused.
  • registered - When a registered notification has been received or manually marked as registered.
  • closed - Is a final state.

Valid states for an issued self-invoice:

  • paid - When the invoice has been paid or the invoice is marked manually as paid.
  • accepted - When the invoice is marked as accepted.
  • registered - When a registered notification has been received or manually marked as registered.
  • closed - Is a final state.
string
enum

Used to send notification of the state chan via mail to the client.
Only for Received Invoices and for states 'accepted', 'refused' & 'paid'.

Allowed:
string

To annotate the reason of the state change, if commit is 'with_mail',
and the new state is 'accepted', 'refused' or 'paid', the reason will be
included in the mail sent to the client.

For a received invoice whose refusal is reported to the French
administration (DGFiP flux 6 lifecycle status 210), the PPF requires a
comment (MDT-126, rule G7.25). When state is refused and no reason is
given, B2Brouter fills the comment with the standard label of the refusal
reason code and records a cdar_reason_generated event on the invoice.
Accounts configured to require the refusal reason receive 422 instead.

Responses
204

State successfully switched

401

Unauthorized

403

Forbidden

404

Invoice not found

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