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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jan 07 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 comment
    10|10000 characters needed characters exceeded