Created
May 17, 2022 11:18
-
-
Save dubeyji10/04a076916ee574ad77110ac2fc6ad8e5 to your computer and use it in GitHub Desktop.
for inserting data into invoice info
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dummy data from code
reflected on zoho crm dashboard