Hi All,
I am trying to closed current job via external code using Patch Call for
PATCH /services/data/v45.0/jobs/ingest/<JobID>
{
"state":"UploadComplete"
}
But it is throwing the error :
HTTP status is 405, Method Not Allowed(("errorCode"-"METHOD_NOT_ALLOWED","message"-"HTTP Method 'POST' not allowed. Allowed are GET,PATCH,DELETE"))
Same call is working in Postman but not working if I call it from external Code.
kindly suggest
Thanks in advance
Best Regards
Sundeep
1 resposta
Hi sandeep kumar,
This error actually tells you what’s wrong:
So even though you think you’re sending a PATCH, your external code is actually sending POST. Salesforce is rejecting it with 405.
That’s why:
- It works in Postman (Postman really sends PATCH)
- It fails in your code (your HTTP client is likely defaulting to POST or doesn’t support PATCH properly)