cancel
Showing results for 
Search instead for 
Did you mean: 

SAP B1 - Service Layer (Serial/Batches ans Bin Locations)

alex72
Explorer
0 Kudos

Hi, I trie create a Delivery Note from a existent Order, if the item doesn't have serial number and locations is ok, but with that information:

{ "CardCode": "C001460",

"DocDueDate":"2021-06-16",

"Comments": "Este é um teste de ligação de Order a Delivery!",

"DocumentLines": [

{

"BaseType": 17,

"BaseEntry": 77,

"BaseLine": 0,

"WarehouseCode": "02",

},

"SerialNumbers": [

{

"ManufacturerSerialNumber": "NS456789",

"Quantity": 1.0, }

],

"DocumentLinesBinAllocations": [

{

"BinAbsEntry": 6,

"Quantity": 1.0,

}

]

] }

Gives a error:

{ "error": { "code": -1, "message": { "lang": "en-us", "value": "BadFormat" } } }

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear alex72,

Following HTTP request works fine for me in the DEMO Database on Feature Package 2102 for SAP Business One Version 10.0:

POST /b1s/v1/DeliveryNotes
{
   "DocDate":"2021-06-17",
   "DocDueDate":"2021-06-17",
   "CardCode":"C20000",
   "DocumentLines":[
      {
         "BaseType":17,
         "BaseEntry":371,
         "BaseLine":0,
         "SerialNumbers":[
            {
               "InternalSerialNumber":"TSTSL-02",
               "BaseLineNumber":0,
               "Quantity":1.0
            }
         ],
         "DocumentLinesBinAllocations":[
            {
               "BinAbsEntry":58,
               "Quantity":1.0,
               "SerialAndBatchNumbersBaseLine":0,
               "BaseLineNumber":0
            }
         ]
      }
   ]
}

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

alex72
Explorer
0 Kudos

Hi Ankit, thaks for the fast resposnse.

Now, i have the Error thar the Serial Number is invalid:

"value": "480000112 - Batch/serial number SN456789 selected in row 1 does not exist; specify a valid batch/serial number"

My SN is SN456789 (Internal and mrf)

Note: Is Warehouse number "02" that bin location.

Thanks again

Answers (0)