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

Announcements

No record found.

News and Announcements icon
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"
}
  • SParker Profile Picture
    on at

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 710 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 387 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 385 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans