> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.monite.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server.

# Update the line items of a receivable

PUT https://api.sandbox.monite.com/v1/receivables/{receivable_id}/line_items
Content-Type: application/json

Use this endpoint to update the line items in:

* draft quotes,
* invoices in the `draft` and `recurring` statuses,
* ([non-compliant mode only](https://docs.monite.com/accounts-receivable/regulatory-compliance/invoice-compliance)) invoices in the `issued` and `overdue` statuses.

Invoices and quotes in other statuses cannot be updated.

The list of line items provided in the request body fully replaces all previous line items in the specified document.

To update the line items in draft credit notes, use [`PATCH /receivables/{receivable_id}`](https://docs.monite.com/api/receivables/patch-receivables-id) instead.

Reference: https://docs.monite.com/api/receivables/put-receivables-id-line-items

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.sandbox.monite.com/v1` (sandbox, default)
- `https://api.monite.com/v1` (eu_production)
- `https://us.api.monite.com/v1` (na_production)

## Request

### Path parameters

- `receivable_id` (string, required) — ID of the invoice or quote you want to update.

### Headers

- `x-monite-version` (string, required)
- `x-monite-entity-id` (string, required) — The ID of the entity that owns the requested resource.

### Body (application/json)

This endpoint expects an object.

- `data` (list of LineItem, required) — The new list of line items that will replace existing line items.

## Response

### 200

Successful Response

- `data` (list of ResponseItem, required) — The list of line items.

## Errors

### 400 Put Receivables ID Line Items Request Bad Request Error

Bad Request

- `error` (ErrorSchema, required)

### 401 Put Receivables ID Line Items Request Unauthorized Error

The `Authorization` header is missing or contains an invalid or expired access token. See [Authentication](https://docs.monite.com/api/concepts/authentication) to learn how to authenticate API calls.

- `error` (ErrorSchema, required)

### 403 Put Receivables ID Line Items Request Forbidden Error

The specified access token does not have permissions to perform this operation.

- `error` (ErrorSchema, required)

### 404 Put Receivables ID Line Items Request Not Found Error

An invoice or quote with the specified ID was not found.

- `error` (ErrorSchema, required)

### 409 Put Receivables ID Line Items Request Conflict Error

Possible reasons: * The specified invoice or quote is in a status that cannot be edited. * `receivable_id` specifies an unsupported document type, such as a credit note.

- `error` (ErrorSchema, required)

### 422 Put Receivables ID Line Items Request Unprocessable Entity Error

Validation Error

- `detail` (list of ValidationError, optional)

### 429 Put Receivables ID Line Items Request Too Many Requests Error

API rate limit has been exceeded. Check the response headers for the rate limit information.

- `any`

## Types

### LineItem

- `quantity` (double, required) — The quantity of each of the goods, materials, or services listed in the receivable.
- `accounting_tax_rate_id` (string, optional) — ID of the tax rate in the connected accounting system, to be used when pushing the invoice to that accounting system. Use `GET /accounting_tax_rates` to get these IDs. If omitted, Monite will attempt to match the tax rates based on their numeric value.
- `custom_vat_rate_id` (string, optional) — ID of the user-defined VAT or tax rate created via `/custom_vat_rates`. Can be used by entities in any country. This field is mutually exclusive with `vat_rate_id` and `tax_rate_value`.
- `discount` (Discount, optional) — The discount for a product.
- `product` (LineItemProductCreate, optional) — Object of product. Can be used instead of product_id, created in product's catalog
- `product_id` (string, optional) — Unique identifier of the product.
- `tax_rate_name` (string, optional) — Has effect only if `tax_rate_value` is used. Specifies the display name of that tax rate.
- `tax_rate_value` (integer, optional) — The VAT or tax rate value multiplied by 100. For example, 12.5% is represented as 1250. Can be used only by entities from [countries](https://docs.monite.com/accounts-receivable/vat-rates#supported-countries) not covered by Monite's built-in catalog of VAT rates. This field is mutually exclusive with `vat_rate_id` and `custom_vat_rate_id`.
- `tax_status` (enum, optional) — Tax applicability status of the line item. Possible values: * `taxable` (default) - Standard tax behavior. Requires the tax rate to be specified. * `exempt` - Line item is exempt from taxes. Exempt items are not included in total tax calculations. * `non_taxable` - Line item is outside the tax scope entirely, cannot have tax rates.
  - Allowed values: `taxable`, `exempt`, `non_taxable`
- `vat_rate_id` (string, optional) — ID of a VAT or tax rate from Monite's [built-in catalog](https://docs.monite.com/api/vat-rates/get-vat-rates). Can be used only for [select countries](https://docs.monite.com/accounts-receivable/vat-rates#supported-countries). This field is mutually exclusive with `custom_vat_rate_id` and `tax_rate_value`.

### ResponseItem

- `product` (LineItemProduct, required)
- `quantity` (double, required) — The quantity of each of the goods, materials, or services listed in the receivable.
- `total_after_vat` (integer, required) — Total of line_item after VAT with applied line item discount in [minor units](https://docs.monite.com/references/currencies#minor-units).
- `total_before_vat` (integer, required) — Total of line_item before VAT in [minor units](https://docs.monite.com/references/currencies#minor-units).
- `discount` (Discount, optional) — The discount for a product.
- `tax_status` (enum, optional) — Tax applicability status of the line item. Possible values: * `taxable` (default) - Standard tax behavior. Requires the tax rate to be specified. * `exempt` - Line item is exempt from taxes. Exempt items are not included in total tax calculations. * `non_taxable` - Line item is outside the tax scope entirely, cannot have tax rates.
  - Allowed values: `taxable`, `exempt`, `non_taxable`

### ErrorSchema

- `message` (string, required)

### ValidationError

- `loc` (list of ValidationErrorLocItem, required)
- `msg` (string, required)
- `type` (string, required)

### Discount

- `amount` (integer, required) — The actual discount of the product in [minor units](https://docs.monite.com/references/currencies#minor-units) if type field equals amount, else in percent minor units
- `type` (enum, required) — The field specifies whether to use product currency or %.
  - Allowed values: `amount`, `percentage`

### LineItemProductCreate

- `name` (string, required) — Name of the product.
- `price` (Price, required)
- `description` (string, optional) — Description of the product.
- `external_reference` (string, optional) — A user-defined identifier of the product. For example, an internal product code or SKU (stock keeping unit). Client applications can use this field to map the products in Monite to an external product catalog.
- `ledger_account_id` (string, optional)
- `measure_unit` (UnitRequest, optional)
- `smallest_amount` (double, optional) — The smallest amount allowed for this product.
- `type` (enum, optional) — Specifies whether this offering is a product or service. This may affect the applicable tax rates.
  - Allowed values: `product`, `service`

### LineItemProduct

- `id` (string, required) — Unique ID of the product.
- `name` (string, required) — Name of the product.
- `price` (Price, required)
- `price_after_vat` (Price, required)
- `vat_rate` (LineItemProductVatRate, required)
- `accounting_tax_rate_id` (string, optional) — Unique identifier of the accounting tax rate object.
- `description` (string, optional) — Description of the product.
- `external_reference` (string, optional) — A user-defined identifier of the product. For example, an internal product code or SKU (stock keeping unit). Client applications can use this field to map the products in Monite to an external product catalog.
- `is_inline` (boolean, optional, default: false) — Indicates whether the product is inline
- `ledger_account_id` (string, optional)
- `measure_unit` (LineItemProductMeasureUnit, optional)
- `smallest_amount` (double, optional) — The smallest amount allowed for this product.
- `type` (enum, optional) — Specifies whether this offering is a product or service. This may affect the applicable tax rates.
  - Allowed values: `product`, `service`

### ValidationErrorLocItem

### Price

- `currency` (enum, required) — The currency in which the price of the product is set.
  - Allowed values: `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLP`, `CNY`, `COP`, `CRC`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SEK`, `SGD`, `SHP`, `SLE`, `SOS`, `SRD`, `SSP`, `SVC`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`
- `value` (integer, required) — The actual price of the product.

### UnitRequest

- `name` (string, required)
- `description` (string, optional)

### LineItemProductVatRate

- `country` (enum, required) — Two-letter ISO country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
  - Allowed values: `AF`, `AX`, `AL`, `DZ`, `AS`, `AD`, `AO`, `AI`, `AQ`, `AG`, `AR`, `AM`, `AW`, `AU`, `AT`, `AZ`, `BS`, `BH`, `BD`, `BB`, `BY`, `BE`, `BZ`, `BJ`, `BM`, `BT`, `BO`, `BA`, `BW`, `BV`, `BR`, `IO`, `BN`, `BG`, `BF`, `BI`, `KH`, `CM`, `CA`, `IC`, `CV`, `KY`, `CF`, `EA`, `TD`, `CL`, `CN`, `CX`, `CC`, `CO`, `KM`, `CG`, `CD`, `CK`, `CR`, `CI`, `HR`, `CU`, `CY`, `CZ`, `DK`, `DJ`, `DM`, `DO`, `EC`, `EG`, `SV`, `GQ`, `ER`, `EE`, `SZ`, `ET`, `FK`, `FO`, `FJ`, `FI`, `FR`, `GF`, `PF`, `TF`, `GA`, `GM`, `GE`, `DE`, `GH`, `GI`, `GR`, `GL`, `GD`, `GP`, `GU`, `GT`, `GG`, `GN`, `GW`, `GY`, `HT`, `HM`, `VA`, `HN`, `HK`, `HU`, `IS`, `IN`, `ID`, `IR`, `IQ`, `IE`, `IM`, `IL`, `IT`, `JM`, `JP`, `JE`, `JO`, `KZ`, `KE`, `KI`, `KP`, `KR`, `KW`, `KG`, `LA`, `LV`, `LB`, `LS`, `LR`, `LY`, `LI`, `LT`, `LU`, `MO`, `MG`, `MW`, `MY`, `MV`, `ML`, `MT`, `MH`, `MQ`, `MR`, `MU`, `YT`, `MX`, `FM`, `MD`, `MC`, `MN`, `ME`, `MS`, `MA`, `MZ`, `MM`, `NA`, `NR`, `NP`, `NL`, `AN`, `NC`, `NZ`, `NI`, `NE`, `NG`, `NU`, `NF`, `MP`, `MK`, `NO`, `OM`, `PK`, `PW`, `PS`, `PA`, `PG`, `PY`, `PE`, `PH`, `PN`, `PL`, `PT`, `PR`, `QA`, `RE`, `RO`, `RU`, `RW`, `SH`, `KN`, `LC`, `PM`, `VC`, `WS`, `SM`, `ST`, `SA`, `SN`, `RS`, `SC`, `SL`, `SG`, `SK`, `SI`, `SB`, `SO`, `ZA`, `SS`, `GS`, `ES`, `LK`, `SD`, `SR`, `SJ`, `SE`, `CH`, `SY`, `TW`, `TJ`, `TZ`, `TH`, `TL`, `TG`, `TK`, `TO`, `TT`, `TN`, `TR`, `TM`, `TC`, `TV`, `UG`, `UA`, `AE`, `GB`, `US`, `UM`, `UY`, `UZ`, `VU`, `VE`, `VN`, `VG`, `VI`, `WF`, `EH`, `YE`, `ZM`, `ZW`, `BL`, `BQ`, `CW`, `MF`, `SX`
- `value` (integer, required) — Percent minor units. Example: 12.5% is 1250.
- `id` (string, optional) — Unique identifier of the vat rate object.
- `components` (list of VatRateComponent, optional) — Sub-taxes included in the VAT.
- `is_custom` (boolean, optional, default: false) — Indicates whether this vat rate is defined by user.
- `name` (string, optional) — Display name of the vat rate.

### LineItemProductMeasureUnit

- `name` (string, required)
- `id` (string, optional)
- `description` (string, optional)

### VatRateComponent

- `name` (string, required) — Display name of the Tax.
- `value` (double, required) — Percent multiplied by a 100. Example: 12.125% is 1212.5. Will be rounded to 2 decimal places

## Examples

**Request**

```json
{
  "data": [
    {
      "quantity": 2,
      "product_id": "d211fd83-4010-4b23-8207-570d0ed5ebe1",
      "vat_rate_id": "9a7f880d-0f2a-44ca-aa35-e22281e30f63"
    },
    {
      "quantity": 1,
      "product": {
        "name": "LG WH1000XM Monitor",
        "price": {
          "currency": "EUR",
          "value": 25000
        },
        "measure_unit": {
          "name": "pcs."
        }
      },
      "vat_rate_id": "9a7f880d-0f2a-44ca-aa35-e22281e30f63"
    }
  ]
}
```

**Response**

```json
{
  "data": [
    {
      "product": {
        "id": "id",
        "name": "name",
        "price": {
          "currency": "AED",
          "value": 1
        },
        "price_after_vat": {
          "currency": "AED",
          "value": 1
        },
        "vat_rate": {
          "country": "AF",
          "value": 1,
          "id": "id",
          "components": [
            {
              "name": "name",
              "value": 1.1
            }
          ],
          "is_custom": true,
          "name": "name"
        },
        "accounting_tax_rate_id": "accounting_tax_rate_id",
        "description": "description",
        "external_reference": "HT-1234-S-BL",
        "is_inline": true,
        "ledger_account_id": "ledger_account_id",
        "measure_unit": {
          "name": "name",
          "id": "id",
          "description": "description"
        },
        "smallest_amount": 1.1,
        "type": "product"
      },
      "quantity": 1.1,
      "total_after_vat": 1,
      "total_before_vat": 1,
      "discount": {
        "amount": 1,
        "type": "amount"
      },
      "tax_status": "taxable"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.sandbox.monite.com/v1/receivables/receivable_id/line_items"

payload = { "data": [
        {
            "quantity": 2,
            "product_id": "d211fd83-4010-4b23-8207-570d0ed5ebe1",
            "vat_rate_id": "9a7f880d-0f2a-44ca-aa35-e22281e30f63"
        },
        {
            "quantity": 1,
            "product": {
                "name": "LG WH1000XM Monitor",
                "price": {
                    "currency": "EUR",
                    "value": 25000
                },
                "measure_unit": { "name": "pcs." }
            },
            "vat_rate_id": "9a7f880d-0f2a-44ca-aa35-e22281e30f63"
        }
    ] }
headers = {
    "x-monite-version": "2024-05-25",
    "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.sandbox.monite.com/v1/receivables/receivable_id/line_items';
const options = {
  method: 'PUT',
  headers: {
    'x-monite-version': '2024-05-25',
    'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"data":[{"quantity":2,"product_id":"d211fd83-4010-4b23-8207-570d0ed5ebe1","vat_rate_id":"9a7f880d-0f2a-44ca-aa35-e22281e30f63"},{"quantity":1,"product":{"name":"LG WH1000XM Monitor","price":{"currency":"EUR","value":25000},"measure_unit":{"name":"pcs."}},"vat_rate_id":"9a7f880d-0f2a-44ca-aa35-e22281e30f63"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sandbox.monite.com/v1/receivables/receivable_id/line_items"

	payload := strings.NewReader("{\n  \"data\": [\n    {\n      \"quantity\": 2,\n      \"product_id\": \"d211fd83-4010-4b23-8207-570d0ed5ebe1\",\n      \"vat_rate_id\": \"9a7f880d-0f2a-44ca-aa35-e22281e30f63\"\n    },\n    {\n      \"quantity\": 1,\n      \"product\": {\n        \"name\": \"LG WH1000XM Monitor\",\n        \"price\": {\n          \"currency\": \"EUR\",\n          \"value\": 25000\n        },\n        \"measure_unit\": {\n          \"name\": \"pcs.\"\n        }\n      },\n      \"vat_rate_id\": \"9a7f880d-0f2a-44ca-aa35-e22281e30f63\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("x-monite-version", "2024-05-25")
	req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sandbox.monite.com/v1/receivables/receivable_id/line_items")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-monite-version"] = '2024-05-25'
request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"data\": [\n    {\n      \"quantity\": 2,\n      \"product_id\": \"d211fd83-4010-4b23-8207-570d0ed5ebe1\",\n      \"vat_rate_id\": \"9a7f880d-0f2a-44ca-aa35-e22281e30f63\"\n    },\n    {\n      \"quantity\": 1,\n      \"product\": {\n        \"name\": \"LG WH1000XM Monitor\",\n        \"price\": {\n          \"currency\": \"EUR\",\n          \"value\": 25000\n        },\n        \"measure_unit\": {\n          \"name\": \"pcs.\"\n        }\n      },\n      \"vat_rate_id\": \"9a7f880d-0f2a-44ca-aa35-e22281e30f63\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.sandbox.monite.com/v1/receivables/receivable_id/line_items")
  .header("x-monite-version", "2024-05-25")
  .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"data\": [\n    {\n      \"quantity\": 2,\n      \"product_id\": \"d211fd83-4010-4b23-8207-570d0ed5ebe1\",\n      \"vat_rate_id\": \"9a7f880d-0f2a-44ca-aa35-e22281e30f63\"\n    },\n    {\n      \"quantity\": 1,\n      \"product\": {\n        \"name\": \"LG WH1000XM Monitor\",\n        \"price\": {\n          \"currency\": \"EUR\",\n          \"value\": 25000\n        },\n        \"measure_unit\": {\n          \"name\": \"pcs.\"\n        }\n      },\n      \"vat_rate_id\": \"9a7f880d-0f2a-44ca-aa35-e22281e30f63\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.sandbox.monite.com/v1/receivables/receivable_id/line_items', [
  'body' => '{
  "data": [
    {
      "quantity": 2,
      "product_id": "d211fd83-4010-4b23-8207-570d0ed5ebe1",
      "vat_rate_id": "9a7f880d-0f2a-44ca-aa35-e22281e30f63"
    },
    {
      "quantity": 1,
      "product": {
        "name": "LG WH1000XM Monitor",
        "price": {
          "currency": "EUR",
          "value": 25000
        },
        "measure_unit": {
          "name": "pcs."
        }
      },
      "vat_rate_id": "9a7f880d-0f2a-44ca-aa35-e22281e30f63"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4',
    'x-monite-version' => '2024-05-25',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sandbox.monite.com/v1/receivables/receivable_id/line_items");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-monite-version", "2024-05-25");
request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"data\": [\n    {\n      \"quantity\": 2,\n      \"product_id\": \"d211fd83-4010-4b23-8207-570d0ed5ebe1\",\n      \"vat_rate_id\": \"9a7f880d-0f2a-44ca-aa35-e22281e30f63\"\n    },\n    {\n      \"quantity\": 1,\n      \"product\": {\n        \"name\": \"LG WH1000XM Monitor\",\n        \"price\": {\n          \"currency\": \"EUR\",\n          \"value\": 25000\n        },\n        \"measure_unit\": {\n          \"name\": \"pcs.\"\n        }\n      },\n      \"vat_rate_id\": \"9a7f880d-0f2a-44ca-aa35-e22281e30f63\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-monite-version": "2024-05-25",
  "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["data": [
    [
      "quantity": 2,
      "product_id": "d211fd83-4010-4b23-8207-570d0ed5ebe1",
      "vat_rate_id": "9a7f880d-0f2a-44ca-aa35-e22281e30f63"
    ],
    [
      "quantity": 1,
      "product": [
        "name": "LG WH1000XM Monitor",
        "price": [
          "currency": "EUR",
          "value": 25000
        ],
        "measure_unit": ["name": "pcs."]
      ],
      "vat_rate_id": "9a7f880d-0f2a-44ca-aa35-e22281e30f63"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/receivables/receivable_id/line_items")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```