Skip to content

Instantly share code, notes, and snippets.

@dubeyji10
Created May 17, 2022 11:18
Show Gist options
  • Save dubeyji10/04a076916ee574ad77110ac2fc6ad8e5 to your computer and use it in GitHub Desktop.
Save dubeyji10/04a076916ee574ad77110ac2fc6ad8e5 to your computer and use it in GitHub Desktop.
for inserting data into invoice info
import requests
import json
'''
-> {{custom-module-name-2}} corressponds to invoice_info in postman client
dummy data insert into new custom module named invoice info
this is an auto increment field on invoice id
'''
url = "https://www.zohoapis.in/crm/v2/invoice_info"
payload = json.dumps({
"data": [
{
"Name": "your-user-id",
"Email":"[email protected]",
"Address": "7th address of client python request",
"City": "West Hampshire",
"State": "New Hapmshire",
"Tel_No": "4422434120",
"amount_recieved": "61011.78",
"data_detail": "6th data details here for entry from python",
"invoice_of": "client 6",
"payment_detail": "6th write payment details here from python client",
"sale_amount": 61144.25,
"tds_percentage": 5
}
],
"trigger": [
"approval",
"workflow",
"blueprint"
]
})
headers = {
'Authorization': 'your-oauth-access-token',
'Content-Type': 'application/json',
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
@dubeyji10
Copy link
Author

dummy data from code

invoice_info_python_code

reflected on zoho crm dashboard

invoice_info_inserts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment