I am trying to get all won opportunities that are new business only for example.
r = requests.get('{}/services/data/v41.0/query'.format(instance_url),params = {'q':'SELECT Name, Type from Opportunity where IsWon=true and CloseDate={0} and type!={1}'.format(today,'Renewal')}, headers=header)
Unfortunately, this brings me the error:
[{"message":"\nCloseDate=2017-12-11 and type!=Renewal\n ^\nERROR at Row:1:Column:87\nBind variables only allowed in Apex code","errorCode":"MALFORMED_QUERY"}]
If I leave the type away it works fine, but giving me, all won opportunities even renewals for example.
Does anyone have a solution? Thanks.