I'm encountering some issues when attempting to create an opportunity using the python library simple salesforce.
I've verified that CloseDate is a Date Type field.
With the simple salesforce wrapper, I can connect to my account, create Account records, and query Opportunities. However, when I try to run the following
sf.Opportunity.create({'CloseDate' : "2018-05-09", 'Amount' : 20.0, 'StageName' : 'Closed Won', 'Name' : 'FIRST LAST'})
I get the following traceback.
SalesforceMalformedRequest: Malformed request https://cs47.salesforce.com/services/data/v38.0/sobjects/Opportunity/. Response content: [{'message': 'Invalid Date', 'errorCode': 'UNKNOWN_EXCEPTION', 'fields': []}]
Those 4 fields are the only required ones with CloseDate being the only Date. I have tried all sorts of variations on the format of the date without any luck (slashes instead of hyphens, datetime objects, etc). This includes adding time on to the end of the date just in case it was looking for that format. Tried a bunch of different formats from the dev forums as well as from the docs. Any help would be greatly appreciated. Thanks.
"
for the date but then'
for the other strings.OrderedDict([('totalSize', 11084), ('records', OrderedDict([('type', 'Opportunity'), ('url', ('CloseDate', '2017-03-07')]),
'{"CloseDate": "2018-05-09", "Amount": 20.0, "StageName": "Closed Won", "Name": "VENUE NAME FIRST LAST"}'