Batch update InvoiceLineItems for an Invoice for a Company
Invoices
Batch update InvoiceLineItems for an Invoice for a Company
Batch update `InvoiceLineItems` for an `Invoice` for a `Company`.
This endpoint allows updating, creating, deleting `InvoiceLineItems` all at once.
If updating existing records:
- must provide the `id` for each record to be updated
- only provide the fields to be updated
- no need to provide the `rate_type` field
e.g.
```json
invoice_line_items: [
{
"id": "some-uuid"
"quantity": 20.25,
"rate": 15.75
}
]
```
If deleting existing records:
- must provide the `id` and the property `_destroy: 1`
e.g.
```json
invoice_line_items: [
{
"id": "some-uuid"
"_destroy": 1
}
]
```
<hr>
## This section is deprecated
#### We are still accepting `rate_type` but it will have no effect. It will be removed in one of the next releases.
If creating new records (for cases where the `Invoice` `rate_type` grouping changes):
- must provide the `rate_type`
- must not provide the `id` for each record to be created
- provide all the fields needed for the record
e.g.
```json
rate_type: "RatePerTon",
invoice_line_items: [
{
"quantity": 20.25,
"rate": 12.5
},
{
"quantity": 22.50,
"rate": 12.5
}
]
```
PATCH
Batch update InvoiceLineItems for an Invoice for a Company
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
The Accept-Language request HTTP header indicates the natural language and locale that the client prefers.
Example:
"en"
Body
application/json
Response
OK
Retrieve all InvoiceLineItems that belongs to an Invoice for a CompanyGenerate InvoiceLineItems for an Invoice for a Company