Skip to main content

Notifications

Small and medium business | Business Central, N...
Unanswered

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

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"
}
Categories:
  • SParker Profile Picture
    SParker 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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,113 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans