curl -X PUT "https://api.clevrscan.com/api/document_history/92343" \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"gpt_result": {
"sync": false,
"company_id": "72",
"MasterID": "72_07AAAFC4619B2ZO_CC/06733/25-26_26-06-2025",
"Action": "Create",
"VoucherNumber": "CC / 06733 / 25-26",
"VoucherDate": "20250626",
"Reference": "CC / 06733 / 25-26",
"ReferenceDate": "20250626",
"PartyName": "E Chand Company",
"VoucherType": "Purchase",
"Voucher_Total": 20640,
"DispatchThrough": "BY HAND",
"MotorVehicleNo": "7703958865",
"BuyerName": "E Chand Company",
"BuyerGSTIN": "07AAAFC4619B2ZO",
"BuyerState": "Delhi",
"BuyerCountryName": "India",
"BuyerGSTRegistrationType": "Regular",
"BuyerEmail": "info@chandcompany.com",
"BuyerMobile": "23213236, 23218581, 23216796, 23213420",
"BuyerTallyGroup": "$$GroupSundryCreditors",
"ConsigneeGSTIN": "07AAFCG3149J1ZI",
"ConsigneeTallyGroup": "$$GroupSundryCreditors",
"ConsigneeState": "Delhi",
"ConsigneeCountryName": "India",
"ConsigneeGSTRegistrationType": "Regular",
"PlaceOfSupply": "Delhi",
"IsInvoice": "Yes",
"IsDeleted": "No",
"InventoryEntries": [
{
"StockItemName": "CLAMP 6298-1 INSIZE",
"HSNCode": "90319000",
"Unit": "PCS.",
"IGSTRate": 18,
"Rate": 219.18,
"Amount": 219.18
},
{
"StockItemName": "DIGITAL INSIDE MICROMETER 3520-30 INSIZE",
"HSNCode": "90173010",
"Unit": "PCS.",
"IGSTRate": 18,
"Rate": 10542.48,
"Amount": 10542.48
}
],
"EInvoiceDetails": [
{
"AckNo": "172517776958296",
"AckDate": "20250626",
"IRN": "3438651bb8093f564d21839cee6ac04ed3cc8d987aa50f3f347fdcff88a083fb"
}
]
}
}'
{
"document_id": 92343,
"message": "Document updated successfully",
"updated_at": "2025-09-09T00:28:13.311518+05:30"
}
Updates metadata or AI-extracted results for a specific document in the history.
curl -X PUT "https://api.clevrscan.com/api/document_history/92343" \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"gpt_result": {
"sync": false,
"company_id": "72",
"MasterID": "72_07AAAFC4619B2ZO_CC/06733/25-26_26-06-2025",
"Action": "Create",
"VoucherNumber": "CC / 06733 / 25-26",
"VoucherDate": "20250626",
"Reference": "CC / 06733 / 25-26",
"ReferenceDate": "20250626",
"PartyName": "E Chand Company",
"VoucherType": "Purchase",
"Voucher_Total": 20640,
"DispatchThrough": "BY HAND",
"MotorVehicleNo": "7703958865",
"BuyerName": "E Chand Company",
"BuyerGSTIN": "07AAAFC4619B2ZO",
"BuyerState": "Delhi",
"BuyerCountryName": "India",
"BuyerGSTRegistrationType": "Regular",
"BuyerEmail": "info@chandcompany.com",
"BuyerMobile": "23213236, 23218581, 23216796, 23213420",
"BuyerTallyGroup": "$$GroupSundryCreditors",
"ConsigneeGSTIN": "07AAFCG3149J1ZI",
"ConsigneeTallyGroup": "$$GroupSundryCreditors",
"ConsigneeState": "Delhi",
"ConsigneeCountryName": "India",
"ConsigneeGSTRegistrationType": "Regular",
"PlaceOfSupply": "Delhi",
"IsInvoice": "Yes",
"IsDeleted": "No",
"InventoryEntries": [
{
"StockItemName": "CLAMP 6298-1 INSIZE",
"HSNCode": "90319000",
"Unit": "PCS.",
"IGSTRate": 18,
"Rate": 219.18,
"Amount": 219.18
},
{
"StockItemName": "DIGITAL INSIDE MICROMETER 3520-30 INSIZE",
"HSNCode": "90173010",
"Unit": "PCS.",
"IGSTRate": 18,
"Rate": 10542.48,
"Amount": 10542.48
}
],
"EInvoiceDetails": [
{
"AckNo": "172517776958296",
"AckDate": "20250626",
"IRN": "3438651bb8093f564d21839cee6ac04ed3cc8d987aa50f3f347fdcff88a083fb"
}
]
}
}'
{
"document_id": 92343,
"message": "Document updated successfully",
"updated_at": "2025-09-09T00:28:13.311518+05:30"
}
PUT /api/document_history/{documentId}
Content-Type: application/json
X-API-Key: <api_key>
{
"gpt_result": {
"sync": false,
"company_id": "72",
"MasterID": "72_07AAAFC4619B2ZO_CC/06733/25-26_26-06-2025",
...
}
}
| Parameter | Type | Required | Description |
|---|---|---|---|
| documentId | Number | Yes | Unique ID of the document to update |
| Parameter | Type | Required | Description |
|---|---|---|---|
| gpt_result | Object | Yes | Object containing updated AI results or metadata |
curl -X PUT "https://api.clevrscan.com/api/document_history/92343" \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"gpt_result": {
"sync": false,
"company_id": "72",
"MasterID": "72_07AAAFC4619B2ZO_CC/06733/25-26_26-06-2025",
"Action": "Create",
"VoucherNumber": "CC / 06733 / 25-26",
"VoucherDate": "20250626",
"Reference": "CC / 06733 / 25-26",
"ReferenceDate": "20250626",
"PartyName": "E Chand Company",
"VoucherType": "Purchase",
"Voucher_Total": 20640,
"DispatchThrough": "BY HAND",
"MotorVehicleNo": "7703958865",
"BuyerName": "E Chand Company",
"BuyerGSTIN": "07AAAFC4619B2ZO",
"BuyerState": "Delhi",
"BuyerCountryName": "India",
"BuyerGSTRegistrationType": "Regular",
"BuyerEmail": "info@chandcompany.com",
"BuyerMobile": "23213236, 23218581, 23216796, 23213420",
"BuyerTallyGroup": "$$GroupSundryCreditors",
"ConsigneeGSTIN": "07AAFCG3149J1ZI",
"ConsigneeTallyGroup": "$$GroupSundryCreditors",
"ConsigneeState": "Delhi",
"ConsigneeCountryName": "India",
"ConsigneeGSTRegistrationType": "Regular",
"PlaceOfSupply": "Delhi",
"IsInvoice": "Yes",
"IsDeleted": "No",
"InventoryEntries": [
{
"StockItemName": "CLAMP 6298-1 INSIZE",
"HSNCode": "90319000",
"Unit": "PCS.",
"IGSTRate": 18,
"Rate": 219.18,
"Amount": 219.18
},
{
"StockItemName": "DIGITAL INSIDE MICROMETER 3520-30 INSIZE",
"HSNCode": "90173010",
"Unit": "PCS.",
"IGSTRate": 18,
"Rate": 10542.48,
"Amount": 10542.48
}
],
"EInvoiceDetails": [
{
"AckNo": "172517776958296",
"AckDate": "20250626",
"IRN": "3438651bb8093f564d21839cee6ac04ed3cc8d987aa50f3f347fdcff88a083fb"
}
]
}
}'
{
"document_id": 92343,
"message": "Document updated successfully",
"updated_at": "2025-09-09T00:28:13.311518+05:30"
}