cancel
Showing results for 
Search instead for 
Did you mean: 

B1iF Http PATCH request Body

former_member599304
Discoverer
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

HuanYang
Employee
Employee

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

Answers (0)