Skip to Content
0
Aug 09, 2022 at 01:17 AM

SAP Business One Service Layer Batch Question

103 Views

In the following batch request I get this error:

"code" : 242,\n "message" : {\n "lang" : "en-us",\n "value" : "Incomplete request, Please check if the sub-request has complete request content and there should be two '\\r\\n' between sub-request header and

HEADER:
multipart/mixed;boundary=batch_1


BODY:
--batch_1
Content-Type: multipart/mixed;boundary=changeset_1
--changeset_1
Content-Type: application/http
Content-Transfer-Encoding:binary
Content-ID:1

Post /b1s/v1/Resources


Content-Type: application/json


{"Code":"Lunch","VisCode": "Lunch","Type": "rtLabor","Group":4 ,"IssueMethod":"rimManual","UnitOfMeasure":"Hour","TimePerUnits":3600,"Name":"Lunch"}
--changeset_1

Content-Type: application/http
Content-Transfer-Encoding:binary
Content-ID:2

Post /b1s/v1/Resources


Content-Type: application/json


{"Code":"Break","VisCode": "Break","Type": "rtLabor","Group":4,"IssueMethod":"rimManual","UnitOfMeasure":"Hour","TimePerUnits":3600,"Name":"Break"}
--changeset_1--
--batch_1--