> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.monite.com/v2024-01-31/api/payable-line-items/patch-payables-id-line-items-id/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.monite.com/_mcp/server. # Update a line item in a payable PATCH https://api.sandbox.monite.com/v1/payables/{payable_id}/line_items/{line_item_id} Content-Type: application/json Edits the information of a specific line item. Related guide: [Update a line item](https://docs.monite.com/accounts-payable/payables/line-items#update-a-line-item) See also: [Manage line items](https://docs.monite.com/accounts-payable/payables/line-items) [Collect payables](https://docs.monite.com/accounts-payable/payables/collect) Reference: https://docs.monite.com/api/payable-line-items/patch-payables-id-line-items-id ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, 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 - `line_item_id` (string, required) - `payable_id` (string, required) ### 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 a LineItemRequest. - `accounting_tax_rate_id` (string, optional) — ID of the tax rate reference used for accounting integration. May be used to override auto-picked tax rate reference in accounting platform in case of any platform-specific constraints. - `description` (string, optional) — Description of the product. - `ledger_account_id` (string, optional) — ID of the account record used to store bookkeeping entries for balance-sheet and income-statement transactions. - `name` (string, optional) — Name of the product. - `quantity` (double, optional) — The quantity of each of the goods, materials, or services listed in the payable. - `tax` (integer, optional) — VAT rate in percent [minor units](https://docs.monite.com/references/currencies#minor-units). Example: 12.5% is 1250. - `unit` (string, optional) — The unit of the product - `unit_price` (integer, optional) — The unit price of the product, in [minor units](https://docs.monite.com/references/currencies#minor-units). For example, $12.50 is represented as 1250. ## Response ### 200 Successful Response - `id` (string, required) - `payable_id` (string, required) - `accounting_tax_rate_id` (string, optional) — ID of the tax rate reference used for accounting integartion. May be used to override auto-picked tax rate reference in accounting platform in case of any platform-specific constraints. - `description` (string, optional) — Description of the product. - `ledger_account_id` (string, optional) — ID of the account record used to store bookkeeping entries for balance-sheet and income-statement transactions. - `name` (string, optional) — Name of the product. - `ocr_set_quantity_to_one` (boolean, optional, default: false) — Indicates whether the item's `unit_price` and `quantity` were adjusted by OCR. - `quantity` (double, optional) — The quantity of each of the goods, materials, or services listed in the payable. - `subtotal` (integer, optional) — The subtotal (excluding VAT), in [minor units](https://docs.monite.com/references/currencies#minor-units). - `tax` (integer, optional) — VAT rate in percent [minor units](https://docs.monite.com/references/currencies#minor-units). Example: 12.5% is 1250. - `tax_amount` (integer, optional) — Tax amount in [minor units](https://docs.monite.com/references/currencies#minor-units). For example, $12.50 is represented as 1250. - `total` (integer, optional) — The actual price of the product. - `unit` (string, optional) — The unit of the product - `unit_price` (integer, optional) — The unit price of the product, in [minor units](https://docs.monite.com/references/currencies#minor-units). For example, $12.50 is represented as 1250. - `was_created_by_user_id` (string, optional) — ID of the user who created the tag. ## Errors ### 400 Patch Payables ID Line Items ID Request Bad Request Error Bad Request - `error` (ErrorSchema2, required) ### 401 Patch Payables ID Line Items ID Request Unauthorized Error Unauthorized - `error` (ErrorSchema2, required) ### 403 Patch Payables ID Line Items ID Request Forbidden Error Forbidden - `error` (ErrorSchema2, required) ### 404 Patch Payables ID Line Items ID Request Not Found Error Not found - `error` (ErrorSchema2, required) ### 406 Patch Payables ID Line Items ID Request Not Acceptable Error Not Acceptable - `error` (ErrorSchema2, required) ### 422 Patch Payables ID Line Items ID Request Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ### 500 Patch Payables ID Line Items ID Request Internal Server Error Internal Server Error - `error` (ErrorSchema2, required) ## Types ### ErrorSchema2 - `message` (string, required) ### ValidationError - `loc` (list of ValidationErrorLocItem, required) - `msg` (string, required) - `type` (string, required) ### ValidationErrorLocItem ## Examples **Request** ```json {} ``` **Response** ```json { "id": "id", "payable_id": "payable_id", "accounting_tax_rate_id": "dd13735f-ef3a-4312-8c37-835d70341375", "description": "description", "ledger_account_id": "7df884fd-8be8-4eba-b6ff-417b66efe033", "name": "name", "ocr_set_quantity_to_one": false, "quantity": 1.22, "subtotal": 1250, "tax": 2000, "tax_amount": 250, "total": 1200, "unit": "meter", "unit_price": 1500, "was_created_by_user_id": "ea837e28-509b-4b6a-a600-d54b6aa0b1f5" } ``` **SDK Code** ```python import requests url = "https://api.sandbox.monite.com/v1/payables/payable_id/line_items/line_item_id" payload = {} headers = { "x-monite-version": "2024-01-31", "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4", "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.patch(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.sandbox.monite.com/v1/payables/payable_id/line_items/line_item_id'; const options = { method: 'PATCH', headers: { 'x-monite-version': '2024-01-31', 'x-monite-entity-id': '9d2b4c8f-2087-4738-ba91-7359683c49a4', Authorization: 'Bearer ', 'Content-Type': 'application/json' }, body: '{}' }; 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/payables/payable_id/line_items/line_item_id" payload := strings.NewReader("{}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("x-monite-version", "2024-01-31") req.Header.Add("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4") req.Header.Add("Authorization", "Bearer ") 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/payables/payable_id/line_items/line_item_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["x-monite-version"] = '2024-01-31' request["x-monite-entity-id"] = '9d2b4c8f-2087-4738-ba91-7359683c49a4' request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.patch("https://api.sandbox.monite.com/v1/payables/payable_id/line_items/line_item_id") .header("x-monite-version", "2024-01-31") .header("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('PATCH', 'https://api.sandbox.monite.com/v1/payables/payable_id/line_items/line_item_id', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', 'x-monite-entity-id' => '9d2b4c8f-2087-4738-ba91-7359683c49a4', 'x-monite-version' => '2024-01-31', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.sandbox.monite.com/v1/payables/payable_id/line_items/line_item_id"); var request = new RestRequest(Method.PATCH); request.AddHeader("x-monite-version", "2024-01-31"); request.AddHeader("x-monite-entity-id", "9d2b4c8f-2087-4738-ba91-7359683c49a4"); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "x-monite-version": "2024-01-31", "x-monite-entity-id": "9d2b4c8f-2087-4738-ba91-7359683c49a4", "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.sandbox.monite.com/v1/payables/payable_id/line_items/line_item_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PATCH" 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() ```