function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Suhel CruiseSuhel Cruise 

sobject update API returning NOT_FOUND error code

I have created and updated a few Contacts and have also encoded start and end parameters
Following is my REST call
GET https://xxx.xxx.xxx/services/data/v49.0/sobjects/Contact/updated?start=2020-11-01T00%3A00%3A00%2B05%3A30&end=2020-11-06T14%3A56%3A00%2B05%3A30

But I keep getting 
[
    {
        "errorCode": "NOT_FOUND",
        "message": "The requested resource does not exist"
    }
]
What am I missing here ?

Thanks
Suhel

 
Best Answer chosen by Suhel Cruise
RituSharmaRituSharma
Try as below:
https://xxx.xx.xxx/services/data/v49.0/query?q=select+Id,Name+from+Contact+WHERE+LastModifiedDate>=2020-11-01T05%3A27%3A00%2B00%3A00+AND+LastModifiedDate<=2020-11-09T05%3A40%3A00%2B00%3A00

All Answers

Suhel CruiseSuhel Cruise
Just to add to it, I am using a developer edition. Do I need to enable some permissions for this ?
RituSharmaRituSharma
I just tried the REST call and it worked perfectly in my developer edition. Just check if user profile is having API access at the profile level.
Suhel CruiseSuhel Cruise
Thanks for your response !!

Good to know it works on Dev edition. But for me, its still not working.
I enabled API access through a new permission set for my user (System administrator)

https://xxx.xx.xxx/services/data/v49.0/sobjects/Contact/updated/​​​?start=2020-11-01T05%3A27%3A00%2B00%3A00&end=2020-11-09T05%3A40%3A00%2B00%3A00

I double checked that my object was created before end datetime (2020-11-09T05:40:00+00:00)

Object creation time fetched using GET Contact REST API
  "CreatedDate": "2020-11-09T05:26:07.000+0000"

I am not sure what am I still missing ? I am trying this out through Postman.Any suggestions / help will be highly appreciated.

Regards,
Suhel

 
Suhel CruiseSuhel Cruise
Also, I am invoking the REST API from outside Salesforce ecosystem / my local system using "Connected App". All other APIs to fetch and list objects is working fine. But this particular API is still not working for me.
RituSharmaRituSharma
Try as below:
https://xxx.xx.xxx/services/data/v49.0/query?q=select+Id,Name+from+Contact+WHERE+LastModifiedDate>=2020-11-01T05%3A27%3A00%2B00%3A00+AND+LastModifiedDate<=2020-11-09T05%3A40%3A00%2B00%3A00
This was selected as the best answer
Suhel CruiseSuhel Cruise
That helps !! Thanks much.