Breaker
Breaker

Reputation: 45

How to get line items from Business Central Web Service (Odata)?

From Microsoft Documentation, to get salesOrderLines, the following http request is needed:

GET businesscentralPrefix/companies({id})/salesOrders({id})/salesOrderLines({salesOrderLineId})

However, it assumes each json object has a unique GUID. But when I try to get Odata, the only thing close to a unique id I get back is "@odata.etag", and this does not allow me to access the salesOrderLines.

Screenshot

Upvotes: 1

Views: 1250

Answers (1)

L H
L H

Reputation: 1275

Use /salesOrders?$expand=SalesOrderSalesLines

Upvotes: 1

Related Questions