Update item

Change extracted fields of an item, such as supplier, category, date or total.

PATCH https://cotlet.dev/api/v1/dext/items/{item_id}

write

Updates the fields you pass and leaves the rest. Dext moves an item to Ready once Category, Supplier and Total amount are filled. The change reaches no one and is undone with another update, so it runs without asking.

Parameters

Parameters: update_item
NameTypeDescription
item_id string required string Item ID from list_items.
supplier string string Supplier or customer name.
category string string Category name as in Dext.
date date date Document date.
document_reference string string Invoice or receipt number.
description string string Item description.
total_amount number number Total amount including tax.
tax_amount number number Tax amount.
paid boolean boolean Paid toggle.
payment_method string string Payment method name as in Dext.
publish_to string string Publish destination, a connected accounting software.

Request

cURL
curl -X PATCH https://cotlet.dev/api/v1/dext/items/it_7f3a10 \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"Office supplies","supplier":"Staples Inc"}'
Python
result = client.call("dext", "update_item", {"item_id":"it_7f3a10","category":"Office supplies","supplier":"Staples Inc"})
Node.js
const result = await cotlet.call('dext', 'update_item', {"item_id":"it_7f3a10","category":"Office supplies","supplier":"Staples Inc"});
CLI
cotlet call dext update_item --data '{"item_id":"it_7f3a10","category":"Office supplies","supplier":"Staples Inc"}'

Example response

JSON

{
  "item_id": "it_7f3a10",
  "status": "ready",
  "category": "Office supplies",
  "supplier": "Staples Inc",
  "total_amount": 84.5
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.