Custom Sales invoice numbering through rest api

Hi ,

I want create a sales invoice through rest api and i am using the below JSON for this. It works fine. But i would like to create invoice with custom invoice numbering not ERPNext numbering. I used name tag and it is not working. Kindly update the solution if available.
{
“submit_on_creation”:“0”,
“against_income_account”:“Sales - HE”,
“party_account_currency”:“INR”,
“owner”:“XXXXXX@XXX.sd”,
“price_list_currency”:“INR”,
“customer_name”:“Kumudham”,
“update_stock”:“1”,
“docstatus”: 1,
“company”:“Har ent”,
“customer”:“Kumudham - 1”,
“is_opening”:" No",
“customer_group”:“Commercial”,
“naming_series”:“SINV-”,
“currency”:“INR”,
“debit_to”:“Debtors - HE”,
“posting_date”:“2017-06-14”,
“selling_price_list”:“Standard Selling”,
“discount_amount”:"",
“apply_discount_on”:"",

“items”:[
{
“cost_center”:“Main - HE”,
“qty”:“15”,
“warehouse”:“Stores - HE”,
“item_code”:“prdocut”,
“parenttype”:" Sales Invoice",
“parentfield”:“items”
}
],

“taxes”:[
{
“doctype”: “Sales Taxes and Charges”,
“rate”: 5,
“item_wise_tax_detail”: “{“prdocut” Rs.10”:[5.0,0.38]}",
“cost_center”: “Main - HE”,
“description”: “VAT @ 5%”,
“account_head”: “VAT @ 5% - HE”,
“charge_type”: “On Net Total”,
“parenttype”: “Sales Invoice”,
“parentfield”: “taxes”
}
]
}

Thanks,
Mohanraj

it is not possible to change or set the name for sales invoice documents through API, You will need to write the auto_name method to achieve that

can you please share the use case?

Hi,

I have a third party invoicing application which will create and manage the invoices alone. From there i would like to export the invoices, payments to erpnext through REST api. I want to maintain the same invoice number in erpnext as in third party application.

Thanks,
Mohanraj K