cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ServiceLayer receiving faulty payload

gombo
Explorer
0 Kudos
527

Hello everybody

I'm using ServiceLayer to create Invoices,Orders,Payments but lately I'm receiving BadFormat error much often.

{ 

"error" : 

     { "code" : -1, "message" : 

                              { "lang" : "en-us", "value" : "BadFormat" } 

     } 

}

And here is my payload:

As you can see here there is nothing wrong with the payload.

But in ServiceLayer log I can see payload become faulty with generated /n and some commas.

Here is what is received on ServiceLayer:

,{""CardCode"":"""",""CardName"":""**********""""DocDate"":""2020-12-17"",""DocDueDate"":""2020-12-17"",""TaxDate"":""2020-12-13"",""Address2"":"""",""NumAtCard"":""DE24915"""""",""DocCurrency"":""EUR"",""PriceMode"":""G"",""DocTotal"":242.06,""DocumentLines"":[\n{,""BaseType"":17,""BaseEntry"":24434,""BaseLine"":0}
,{,""BaseType"":17,""BaseEntry"":24434,""BaseLine"":1
},{,""BaseType"":17,""BaseEntry"":24434,""BaseLine"":2}]
,""DocumentAdditionalExpenses"":[{,""BaseDocEntry"":24434,""BaseDocLine"":0,""BaseDocType"":17}]}

I changed the CardName so don't worry about * values.

Also Address2 value wasn't even transferred to ServiceLayer which is missing as you can see from the payload.

And from this payload you can see comma is generated in start of JSON, and some generated \n values as well.

What i should do?

Any kind of help will be really appreciated.

Accepted Solutions (0)

Answers (0)