Update invoice line
PATCH https://api.ecurring.com/invoice-lines/{id}
Update an invoice line. In accordance with the JSON API specification any missing attribute will be interpreted as if they were included with their current value. It's therefore not necessary to include every attribute of the invoice line during a partial update.
Parameters
Replace {id}
in the URL with the identifier of the invoice line.
Request attributes
description
string |
The description of the invoice line. This could be the name of your product. |
amount
double |
The amount (per unit) of the product, in euro. |
tax_rate
double |
The tax rate (percentage) that is applied or should be applied to the amount , depending on tax_included .
|
tax_included
boolean |
Indicates whether or not the tax_rate is already applied to the given amount .
|
quantity
integer |
The quantity of the product. The total amount will be calculated by multiplying the quantity with the amount .
|
Example
Updating the quantity of an invoice line
Request
PATCH /invoice-lines/1562050264 HTTP/1.1
Content-Type: application/vnd.api+json
Accept: application/vnd.api+json
{
"data": {
"type": "invoice-line",
"id": "1562050264",
"attributes": {
"quantity": 7
}
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/vnd.api+json
{
"links": {
"self": "https://api.ecurring.com/invoice-lines/1562050264"
},
"data": {
"type": "invoice-line",
"id": "1562050264",
"links": {
"self": "https://api.ecurring.com/invoice-lines/1562050264"
},
"attributes": {
"description": "lunchbox",
"amount_excl": "10.00",
"amount_incl": "12.10",
"tax_rate": "21.00",
"tax_amount": "2.10",
"tax_included": false,
"quantity": 7,
"created_at": "2019-10-04T14:44:47+02:00",
"updated_at": "2019-10-04T14:44:47+02:00"
}
}
}