+ Start a Discussion
Bhanu K NBhanu K N 

Always getting 404 error for Patch API request

Hi,
I am trying to update a record via API request, I have added everything as needed but I always end up getting a 404 error.
User-added imageI am getting the Object ID value from here:
User-added imageAny help is highly appreciated. 

Thank you. 
Best Answer chosen by Bhanu K N
Maharajan CMaharajan C
Hi Bhanu,

Please reduce the version number to v53.0 in URL

I hope you are using the correct object api name and record id... Because Id starts 001 is Account in Salesforce...

Thanks,
Maharajan.C

All Answers

PriyaPriya (Salesforce Developers) 

Hey Bhanu,

HttpRequest doesn't support PATCH as the method.
Possible values for the method type include:
DELETE
GET
HEAD
POST
PUT
TRACE

For solution, refer this link :- 
https://salesforce.stackexchange.com/questions/284324/patch-request-always-get-404-not-found-response

Kindly mark it best answer if it helps,

Regards,

Priya Ranjan

Bhanu K NBhanu K N
Hi Priya, 
Thank you so much for the reply. 
I see. But, using POST directly won't help either. In the link that you shared, it is proposed that we go through a proxy and rewrite POST as PATCH. Is there a simpler solution? I am just doing POC for an integration.

Regards
Bhanu 
Maharajan CMaharajan C
Hi Bhanu,

Please reduce the version number to v53.0 in URL

I hope you are using the correct object api name and record id... Because Id starts 001 is Account in Salesforce...

Thanks,
Maharajan.C
This was selected as the best answer
Bhanu K NBhanu K N
Hi Maharajan, 
Reducing the version helped! 
Thank you!