PUT
/
invoices
/
{invoice_id}
/
miscellaneous_charges
curl --request PUT \
  --url https://api.togai.com/invoices/{invoice_id}/miscellaneous_charges \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "items": [
    {
      "name": "charge 1",
      "value": "100"
    },
    {
      "name": "qty & rate charge",
      "rate": 20,
      "quantity": 10
    },
    {
      "name": "json logic charge",
      "value": "{\"var\": \"um.linitem.id\"}"
    }
  ]
}'
{
  "data": [
    {
      "name": "charge 1",
      "value": "100"
    },
    {
      "name": "charge 2",
      "rate": 20,
      "quantity": 10,
      "value": "200"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

invoice_id
string
required
Example:

"ACC001"

Body

application/json
Payload to update custom line items

Payload to update custom line items

items
object[]
required

Miscellaneous charges are the charges that can be added to the invoice. A charge must either have rate and quantity or value. In case of rate and quantity, the value must not be provided as it is automatically calculated as (rate * quantity).

Response

200
application/json
Response for Miscellaneous Charges Request

Miscellaneous charges response

data
object[]
required

Miscellaneous charges are the charges that can be added to the invoice. A charge must either have rate and quantity or value. In case of rate and quantity, the value must not be provided as it is automatically calculated as (rate * quantity).