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
| Name | Type | Description |
|---|---|---|
| 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 -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"}' result = client.call("dext", "update_item", {"item_id":"it_7f3a10","category":"Office supplies","supplier":"Staples Inc"}) const result = await cotlet.call('dext', 'update_item', {"item_id":"it_7f3a10","category":"Office supplies","supplier":"Staples Inc"}); cotlet call dext update_item --data '{"item_id":"it_7f3a10","category":"Office supplies","supplier":"Staples Inc"}' Example response
{
"item_id": "it_7f3a10",
"status": "ready",
"category": "Office supplies",
"supplier": "Staples Inc",
"total_amount": 84.5
}