---
title: "Add or update miscellaneous charges in Invoice"
method: PUT
path: "/invoices/{invoice_id}/miscellaneous_charges"
tags: ["Invoices"]
---

# Add or update miscellaneous charges in Invoice

`PUT /invoices/{invoice_id}/miscellaneous_charges`

## Request

- Base URL: `https://api.togai.com`
- URL: `https://api.togai.com/invoices/{invoice_id}/miscellaneous_charges`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/togaihq/apis/togai-apis/docs/invoices/:invoice_id/miscellaneous_charges/put.ts> (a function with typed inputs; its response is checked against the schema)

Add or update miscellaneous charges in Invoice

## Path parameters

- `invoice_id` string, required

## Request body

- ManageMiscellaneousChargesRequest: Payload to update custom line items
  - `items` object[], required
    - `name` string, required: Name of the miscellaneous charge
    - `rate` number: Rate of the charge
    - `quantity` number: Quantity of the charge
    - `value` string: Value of the charge Possible values: 1. Fixed number [Example: 10] 2. Json Logic [Example: {"*": [{"var": "um.lineitem.id"}, 0.1]}] You can use all line item ids as variables in the json logic
    - `considerForRevenue` boolean: Specifies whether to consider this miscellaneous charge for revenue or not

## Response `200`

Response for Miscellaneous Charges Request

- MiscellaneousChargesResponse: Miscellaneous charges response
  - `data` object[], required
    - `name` string, required: Name of the miscellaneous charge
    - `rate` number: Rate of the charge
    - `quantity` number: Quantity of the charge
    - `value` string: Value of the charge Possible values: 1. Fixed number [Example: 10] 2. Json Logic [Example: {"*": [{"var": "um.lineitem.id"}, 0.1]}] You can use all line item ids as variables in the json logic
    - `considerForRevenue` boolean: Specifies whether to consider this miscellaneous charge for revenue or not

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response
- `404`: Error response
- `429`: Error response
- `default`: Error response

## Changes

- **2024-03-01** `6fb940b0dad9`: 1 breaking, 5 info
  - the response property `data/items/value` became optional for the status `200`
  - added the new optional request property `items/items/quantity`
  - added the new optional request property `items/items/rate`
  - the request property `items/items/value` became optional
  - …2 more
- **2023-09-25** `ae3b70608528`: 2 info
  - added the new optional request property `items/items/considerForRevenue`
  - added the optional property `data/items/considerForRevenue` to the response with the `200` status
- **2023-09-02** `6b13f6f47735`: 1 breaking, 6 warning, 1 info
  - the request property `items/items/value` became required
  - removed the request property `items/items/considerForRevenue`
  - removed the request property `items/items/quantity`
  - removed the request property `items/items/rate`
  - …4 more

[Operation history](https://skmtc.dev/togaihq/apis/togai-apis/changes/invoices/:invoice_id/miscellaneous_charges/put.md)

---

[API](https://skmtc.dev/togaihq/apis/togai-apis.md) - [All operations](https://skmtc.dev/togaihq/apis/togai-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/togaihq/apis/togai-apis/revisions/442f5d8f4aa0?raw)
