API-v1

Application Programming Interface

InvoiceXpress Documentation



Change State


proformas.change-state

Changes the state of a proforma.

Possible state transitions:

From To Event
draft final finalized
draft deleted deleted
final accepted accept
final refused refuse
final canceled canceled
accepted refused refuse
refused accepted accept

Any other transitions will fail. When canceling a proforma 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/proformas/{proforma-id}/change-state.xml
Header

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

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

Parameters

Property Required Description
api_key Yes Your secret identifier. You can find your API Key under Account >> API in the Account section.
proforma-id Yes Id of the proforma to change state.
state Yes State which the proforma will be changed to. Options are: finalized, deleted, canceled, accepted, refused.
message Depends Reason for cancelling the proforma. 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