Skip to Content
Jun 20, 2022 at 05:37 AM

405 Error in POST call : SAP CPI Odata V2


Hello Folks,

I have a scenario in CPI in which i need to read data from an excel file and POST a batch operation on S/4 Hana system.

For POST to S4 system i am using Purchase Contract API (Standard API from API business HUB)

Link :

Issue : While trying to do POST i am getting 405 method not allowed error. I amusing contetct type as multipart/mixed; boundary=batch

And payload is in below format :


Content-Type: multipart/mixed;boundary=changeset


Content-Type: application/http

Content-Transfer-Encoding: binary

POST A_PurchaseContract HTTP/1.1

Content-Type: application/json

Accept: application/json

sap-context-accept: header

{ -sample body-}



i checked that POST batch operations are allowed on the API. Can you please suggest what am i missing?