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...
Answered

Business central api POST bad request

(0) ShareShare
ReportReport
Posted on by 45

Hi

Im creating a rest api for my BC company, and i can retrieve all saleorders (Test company)

But now im following (https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesorder_create) to create a salesorder, but the response is pastedimage1650628338137v1.png

i tried using the company info, and also the basic example.

This is my header settings:

pastedimage1650628421052v2.png

Any suggestions on what im doing wrong?

I have the same question (0)
  • Izet Profile Picture
    45 on at

    Also my json data im sending:

    {
      "number": "1009",
      "orderDate": "2015-12-31",
      "customerNumber": "GL00000008",
      "currencyCode": "GBP",
      "paymentTermsId": "3bb5b4b6-ea4c-43ca-ba1c-3b69e29a6668"
    }

  • Suggested answer
    JAngle Profile Picture
    150 on at

    if you remove the paymentTermsId do you get the same error? I have virtually the same body working correctly and I know for certain the GUID for the paymentTermsId is present in the company I am POSTing to. I use variables in my example body:

    {
        "number": "1009",
        "customerNumber": "10000",
        "currencyCode": "USD",
        "orderDate": "2021-12-31",
        "paymentTermsId": "{{paymentTermsId}}",
        "salesOrderLines": [
    	{
    		"itemId": "{{itemId}}",
    		"quantity": 1
    	}
        ]
    }

  • Suggested answer
    Izet Profile Picture
    45 on at

    You are right, it works now without paymentTermsId!

    Thanks! :)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,857 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans