Adding New Entries to SugarCRM - rodacom/sugarcrm GitHub Wiki

import sugarcrm

# This is the URL for the v4 REST API in your SugarCRM server.
url = 'http://yo.com/service/v4/rest.php'
username = 'apiuser'
password = 'apipass'

# This way you log-in to your SugarCRM instance.
conn = sugarcrm.Sugarcrm(url, username, password)

from sugarcrm.sugarentry import SugarEntry

new_contact = SugarEntry(conn['Contacts'])
new_contact['first_name'] = 'Васіль'
new_contact['last_name'] = 'Пупкоў'
new_contact['birthdate'] = '1978-05-10'
new_contact.save()