I have been trying to update the shippedQuantity via the salesOrderLines API, still not able to PUT to the salesOrderLines API. I finally was able to return the needed record using Stefano's suggestion (api.businesscentral.dynamics.com/.../salesOrderLines eq 10000) but cannot for the life of me get a PUT request to update the the shippedQuantity field (or any field for that matter).
I was finally able to get this error:
<code>RequestDataInvalid</code>
I made a PUT request to sandbox/api/v1.0/companies(246d9e77-cf80-4bba-8f28-5047c573a9cc)/salesOrders(52861b2e-8048-ea11-a812-000d3a72cf43)/salesOrderLines?$filter=sequence eq 10000 using basic auth and the If-Match properly in my Header with this as my body.
I have also tried this endpoint: sandbox/api/v1.0/companies(246d9e77-cf80-4bba-8f28-5047c573a9cc)/salesOrders(52861b2e-8048-ea11-a812-000d3a72cf43) and also get the "Request data is invalid" error. Any guidance as to why I cannot updated the sales order line is much appreciated! The documentation at https://docs.microsoft.com/en-us/dynamics-nav/api-reference/v1.0/api/dynamics_salesorderline_update says I should be using this endpoint, yet I keep getting errors.
This is what returns when doing a GET request for the sales order line:
"value": [
{
"@odata.etag": "W/\"JzQ0Oy9Td0creW02Z0ZhQXdUL1RzS3FtcmlOOHFUOHVUSmk1TGMxUGlzTm1JQ0U9MTswMDsn\"",
"id": "52861b2e-8048-ea11-a812-000d3a72cf43-10000",
"documentId": "52861b2e-8048-ea11-a812-000d3a72cf43",
"sequence": 10000,
"itemId": "07e85a5c-c406-ea11-bb24-00155df3a615",
"accountId": "00000000-0000-0000-0000-000000000000",
"lineType": "Item",
"description": "PARIS Guest Chair, black",
"unitOfMeasureId": "85e85a5c-c406-ea11-bb24-00155df3a615",
"quantity": 2,
"unitPrice": 192.8,
"discountAmount": 0,
"discountPercent": 0,
"discountAppliedBeforeTax": false,
"amountExcludingTax": 385.6,
"taxCode": "FURNITURE",
"taxPercent": 5,
"totalTaxAmount": 19.28,
"amountIncludingTax": 404.88,
"invoiceDiscountAllocation": 0,
"netAmount": 385.6,
"netTaxAmount": 19.28,
"netAmountIncludingTax": 404.88,
"shipmentDate": "2019-05-13",
"shippedQuantity": 0,
"invoicedQuantity": 0,
"invoiceQuantity": 2,
"shipQuantity": 2,
"lineDetails": {
"number": "1900-S",
"displayName": "PARIS Guest Chair, black"
},
"unitOfMeasure": {
"code": "PCS",
"displayName": "Piece",
"symbol": null,
"unitConversion": null
}
}
Any help/guidance is much appreciated!