cancel
Showing results for 
Search instead for 
Did you mean: 

SAP B1If - HTTP call - how use method PATCH?

rafael_ogeda
Participant

Hi guys!

We are using SAP B1If (Version 1.22.27) to send a HTTP request to an API using the PATCH HTTP method. In payload for HTTP call we are using <method>patch</method> in <call><connect> section.

But always we receive error in HTTP call: HTTPcode="405", HTTPmsg="Method Not Allowed". In returnData we get "Message":"The requested resource does not support http method 'POST'."

We conclude that B1If is not accepting PATCH HTTP method and is always sending the request as POST. We found In B1If online documentation, in topic 5.1 Configuring HTTP Outbound (HTTA), that "The integration framework supports POST, GET, PUT, DELETE, and TRACE."

We try to add the X-HTTP-Method-Override header = PATCH in the request, but we still get the same response (HTTPcode="405", HTTPmsg="Method Not Allowed")... We believe that the API hasn't built-in support for X-HTTP-Method-Override header.

Anybody knows some strategy to make a HTTP call using PATCH in SAP B1If?

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Dear rafael.ogeda,

I know that it is quite late however this is for documenting the solution.

For compatibility reasons, the method PATCH sends a POST request with headers "X-HTTP-Method-Override: PATCH" and "X-HTTP-METHOD: PATCH".

Since SAP Business One Version 9.3 PL12, Integration Framework supports the method PATCH2 which sends a native PATCH request. However, this method is not available in the method dropdown in the atom configuration; you have to enter it manually.

PATCH2 was introduced from 9.3 PL12 and 10.0 PL01, but we suggest you to use either 9.3 PL13 or 10.0 PL02 because these versions include a fix for the issue that scenarios can't get the returned payloads of PATCH.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

Answers (0)