Documentation
Difficulty level:
This section only applies if the module Invoice is active.
API - Invoice - POST invoice/
POST invoice/
Used for
Adding an invoice. Returns the invoice id on successfull save.
Note that the invoice does not need to be valid at this point. The status of the invoice will be draft.
It is possible to create an invoice for a new customer and add the customer during the save process.
See the customer entity for the fields which can be used.
When customer_id is ommited a new customer wil be created.
Authentication
Requires authentication.
Parameters
| Parameter | Description | Required | Example |
|---|---|---|---|
| date | invoice date | Yes | 2012-06-12 |
| customer | Array of customer fields | No | See check function |
Response codes
- 200 OK
Example
Adding an invoice with invoice date equals 12th of June 2012.
POST api/rest/invoice/
Request:
{
"date": "2012-06-12"
}
Response:
{
"status": true,
"invoice_id": 11,
"messages": [
"Invoice saved"
]
}





