Skip to Content

B1iF Http PATCH request Body

Hello Guys,

i need help with a scenario im developing right now.

I have a scenario where i automatically get Invoices from a standalone API and importing them into B1. After importing i want to write back the DocEntry of the successfully imported invoice.
I have to do a PATCH-request with following information in the body (it needs to look like this or it wont work):

{"sapID":3}

This needs to be in the raw body(JSON) of the PATCH-request.

My Payload in the HTTP-Atom looks like this:

<pltype>json</pltype>

<payload>

<number name="sapID">2</number>

</payload>

<htta> <par id="httpheader.???" value="">

<par id="httpheader.Content-Type" value="application/json">

</par>

<!--optional - you can specify here your own http header definitions - multiple elements allowed-->

</par>

<par id="htta.returnpltypeforce" value="json">

<!--optional-->

</par>

<par id="htta.returnpltypedefault" value="json">

<!--optional-->

</par>

</htta>

When i look onto my API, the body sent is empty. Meaning that something is wrong with my payload. Is there anyway i can specify the body and directly send my information in said (raw) body?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on Jan 07, 2019 at 07:00 AM

    Hello Severin,

    You may try this

    ...	
    <pltype>json</pltype>
    <payload>
    	<io xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:com.sap.b1i.bizprocessor:bizatoms" pltype="json" xsi:schemaLocation="urn:com.sap.b1i.bizprocessor:bizatoms json_pltype.xsd">
    		<object>
    			<number name="sapID">3</number>
    		</object>
    	</io>
    </payload>
    ...

    Thanks & best regards

    Huan Yang

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.