Hi all,
I am populating a line items related to a Job table using Custom API. My custom API is working fine with GET, PATCH, POST when I send single record. However, in my case I would like to send multiple lines. Is it possible to have array of items in JSON in BC Custom API? I am using version 16.x but soon will be upgrading to 19.1
Let me know if anyone come across same requirement in one of your project.
Table: Job (will be created by end user)
Table: Job Lines ( I would like to populate using API)
{
"value": [
{
"JobNo": "A00600",
"LineNo": 2000,
"CostType": "Material",
"Quantity": 10,
"Price" : 100
}
]
}
I tried array in POST but no luck, getting message back from API
"message": "An unexpected 'StartArray' node was found when reading from the JSON reader. A 'StartObject' node was expected. CorrelationId: 6ec8513d-5334-471f-a3a1-fdb4b82d97ab."
[
{
Payload
},
{
Payload
}
]
Best Regards,
Farooq