API-v1

Application Programming Interface

InvoiceXpress Documentation



Change State


debit-notes.change-state

Changes the state of a debit-note.

Possible state transitions:

From To Event
draft final finalized
draft deleted deleted
final canceled canceled
final settled settled
settled final unsettled

Any other transitions will fail. When canceling a debit-note you must specify a reason.

Usage

You call this method by submitting an HTTP PUT request to the following URL:

https://{account-name}.app.invoicexpress.com/debit_notes/{debit-note-id}/change-state.xml
Header

Content-Type: application/xml; charset=utf-8

Body
<debit_note>
 <state>finalized</state>
</debit_note>
<debit_note>
 <state>canceled</state>
 <message>Canceled due to amount of money</message>
</debit_note>

Parameters

Property Required Description
api_key Yes Your secret identifier. You can find your API Key under Account >> API in the Account section.
debit-note-id Yes Id of the debit-note to change state.
state Yes State which the debit-note will be changed to. Options are: finalized, deleted, second_copy, canceled, settled, unsettled.
message Depends Reason for cancelling the debit-note. Only required when state is "canceled", otherwise ignored.

Return Values

These are the results that will be returned on success and error.

Sucess
HTTP: 200 OK
Error
Code Description
HTTP: 401 Access denied The API Key parameter is missing or is incorrectly entered.
HTTP: 404 Not Found Account not found.
HTTP: 422 Unprocessable Entity XML data is missing or elements wrongly named.

Engenharia e Design ao seu serviço!

Uma equipa de Engenharia e Produto que pensam, desenham e executam em detalhe cada pormenor da experiência dos utilizadores.

Uma equipa ao seu dispor que trabalha diariamente para si.

Conhecer o InvoiceXpress