web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

API post to SalesOrderLines 400 error after v22 (2023 Wave 1) update

(0) ShareShare
ReportReport
Posted on by

External application uses the API to create sales orders. The sales order itself is created, but the sales order lines are returning a 400 error with no detail as to what is being rejected. Trying a few different sales orders with different items, all rejected the same way.

Posting to "api.businesscentral.dynamics.com/v2.0<id>/Production/api/v2.0/salesOrders(<soId>)/salesOrderLines?company=<company>"
Example data:

{
    "documentId": "4165e114-4009-ee11-8f6e-000d3a0a013c",
    "sequence": 10000,
    "itemId": "92f207e3-5b61-ec11-9f08-0022483d0a04",
    "lineType": "Item",
    "lineObjectNumber": "90030",
    "description": "description",
    "quantity": 2,
    "unitPrice": "17.38",
    "discountPercent": "0.000",
    "taxCode": "TAXABLE"
}
I have the same question (0)
  • SParker Profile Picture
    on at
    RE: API post to SalesOrderLines 400 error after v22 (2023 Wave 1) update

    It appears at least that my issue was 'sequence' seems to not be accepted through the post. It seems a line number property is automatically applied on insertion of the line.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,106

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,291 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 2,010 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans