Append a line to a document
POST/api/{parent}/{id}/items
Headers
| Field | Type | Description |
|---|---|---|
| authtoken | String | Authentication token, generated from admin area |
Parameters
| Field | Type | Description |
|---|---|---|
| parent | String | Document type owning the lines |
| id | Number | Parent document unique ID |
| title | String | Mandatory line title. A description is accepted instead. |
| description | String | optional Optional line description |
| quantity | Number | Mandatory quantity, numeric |
| rate | Number | Mandatory unit rate, numeric |
| unit_type | String | optional Optional unit type, maximum 20 characters |
| sort | Number | optional Optional display order. Defaults to the end of the list. |
| item_id | Number | optional Optional items library ID |
| taxable | Number | optional Invoices only. 1 (default) or 0. |
curl -X POST "https://yoursite.com/api/1/123/items" \
-H "authtoken: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "title": "...", "quantity": "...", "rate": "..." }' Success-Response:
HTTP/1.1 201 Created
{
"status": 200,
"messages": {"success": "The record has been saved."},
"id": 12
}