v1
latestOpenAPI 3.0.12026-07-263591116.9 KBDocument V2
Edit a document
put/v2/doc/{doc_hash_id}
Path parameters
doc_hash_idstring required
The hash ID of the document that needs to be updated.
Request body
Example request
{
"serial_number": "INV123",
"serial_number_v2": {
"prefix": "INV-, INV/2024, INV-2024/25, INV/2024-25",
"doc_number": 1,
"suffix": "-suffix, /-suffix,-/suffix, /suffix"
},
"document_type": "invoice",
"document_date": "11-06-2024",
"party": {
"id": "CUST123",
"type": "customer",
"name": "John Doe",
"country_code": "91",
"phone_number": "1234567890",
"company_name": "Company Name",
"email": "johndoe@example.com",
"gstin": "27AARCS7202C1ZD",
"shipping_address": {
"addr_id": -1,
"addr_id_v2": "addr1",
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"billing_address": {
"addr_id": -1,
"addr_id_v2": "addr1",
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
}
},
"due_date": "11-06-2024",
"reference": "Reference Text",
"notes": "Notes for the document",
"terms": "Terms and Conditions",
"items": [
{
"id": "ITEM123",
"name": "Item Name",
"quantity": 1,
"unit_price": 100,
"tax_rate": 18,
"price_with_tax": 118,
"net_amount": 100,
"total_amount": 118,
"discount_percent": 10,
"discount_amount": 10,
"description": "Item Description",
"hsn_code": "1234",
"item_type": "Product",
"unit": "kg",
"category": "Electronics",
"custom_columns": [
{
"label": "Custom Field 1",
"value": "Value 1"
}
]
}
],
"extra_discount": 20,
"round_off": true,
"bank_details": {
"account_number": "1234567890",
"ifsc": "SBIN0000001",
"bank_name": "State Bank of India",
"branch": "Mumbai"
},
"charges_and_deductions": [
{
"id": 1,
"name": "Delivery Charge",
"amount": 100,
"tax_rate": 18,
"sac_code": "1234",
"type": "charge"
}
],
"company_shipping_address": {
"addr_id": -1,
"addr_id_v2": "addr1",
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"company_billing_address": {
"addr_id": -1,
"addr_id_v2": "addr1",
"address_line1": "123 Street",
"address_line2": "Apt 4B",
"city": "City Name",
"state": "State Name",
"country": "Country Name",
"pincode": "123456"
},
"export_invoice_details": {
"shipping_bill_date": "14-02-2024",
"shipping_bill_number": "123456",
"shipping_port_code": "123456",
"export_type": "With Payment of Tax",
"country_id": "Afghanistan",
"currency_id": "AED"
},
"subscription_details": {
"start_time": "0019-08-17",
"end_time": "0019-08-18",
"repeat": 1,
"repeat_type": "days"
},
"convert": {
"convert_from": "invoice",
"hash_id": "SL123"
},
"custom_headers": [
{
"label": "Custom Header 1",
"value": "Value 1"
}
]
}Response
Success
Example response
{
"success": true,
"message": "Message",
"data": {
"hash_id": "SL123",
"serial_number": "SL123"
}
}