API-v1
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.
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
Content-Type: application/xml; charset=utf-8
<proforma>
<state>finalized</state>
</proforma>
<proforma>
<state>canceled</state>
<message>Canceled due to amount of money</message>
</proforma>
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. |
These are the results that will be returned on success and error.
HTTP: 200 OK
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. |
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