Python Zoho CRM API again - insert a new record fails
Attempting to insert new potential in zoho crm. Would greatly appreciate any insights on what I'm missing here.
Note - I've already tried mfabrik.zoho.crm & that failed - overwrites an existing record instead of inserting a new record. Any insights on what I'm missing here would be greatly appreciated.
import urllib
import urllib2
potential={ "Account Name":'ABC Inc.',
"Potential Name":'Product Sale',
... repeat for other fields as dictionary items
}
params = {'authtoken':'my_token', 'scope':'crmapi', 'xmlData':potential, 'relatedModule':'Potentials'}
data = urllib.urlencode(params)
final_URL = "https://crm.zoho.com/crm/private/xml/Potentials/insertRecords"
request = urllib2.Request(final_URL,data)
response = urllib2.urlopen(request)
xml_response = response.read()
print xml_response