Skip to main content

Notifications

Community site session details

Community site session details

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

Error 400

(0) ShareShare
ReportReport
Posted on by 25

Dear all,

I have an issue I can't exit. I need to connect to bc to send a json. I'm using postman. But everytime it gives me error 400.

I do a post method as shown below, showing also the json:

2020_2D00_09_2D00_09-11_5F00_19_5F00_59_2D00_Window.png

I set the authorization (to get data I used NTLM and it ran):

2020_2D00_09_2D00_09-11_5F00_21_5F00_23_2D00_Window.png

I don't show username for reasons nut I inserted it

I set content-type="application/json" in header tab.

But everytime it gives me error 400. Can someone help me? I have never used nav so I don't know if there are any specific issues

Thanks

  • sdfs Profile Picture
    25 on at
    RE: Error 400

    If I do a get method, I'll receive following JSON:

    {

       "odata.metadata": "https://**.dynamicscloud.it:7058/PROD_WS/OData/$metadata#OrdProdEMS",

       "value": [

           {

               "odata.etag": "W/\"'20%3BZsMAAAJ7ATEAAAAAAA%3D%3D7%3B92072020%3B'\"",

               "Transaction_ID": "1",

               "Prod_Order_No": "TEST-EMS1",

               "Line_No": 10000,

               "Operation_No": "10",

               "Item_No": "08692",

               "Quantity": "100",

               "Work_Center_No": "P1",

               "Standard_Task_Code": "",

               "Sales_Order_No": "ODV20-0030",

               "Sales_Order_Line_No": 10000,

               "Creation_Date": "2020-06-04T00:00:00",

               "Imported": true,

               "Error": "",

               "ETag": "20;ZsMAAAJ7ATEAAAAAAA==7;92072020;"

           }]}

    While checking JSON properties, I don't find document type

  • sdfs Profile Picture
    25 on at
    RE: Error 400

    I can't connect. I hope that my pc means properly my computer IP address. I can't also see anything browsing it

  • Lars Lohndorf-Larsen Profile Picture
    on at
    RE: Error 400

    My example above was based on standard CRONUS data, did that work in your end?

    MyPC:16048/.../SalesOrder

    {

      "Document_Type": "Order",

      "Sell_to_Customer_No": "30000"

    }

  • sdfs Profile Picture
    25 on at
    RE: Error 400

    Moreover the problem is due to bad syntax, error

  • sdfs Profile Picture
    25 on at
    RE: Error 400

    What I can tell you is that, if I do a get, connecting to this address https://***.dynamicscloud.it:7058/PROD_WS/OData/Company('***_test_20200603')/OrdProdEMS?$format=json, I can do it without any problems. If I post something, I won't be able to do it. It's impossible very time it says error 400

  • Lars Lohndorf-Larsen Profile Picture
    on at
    RE: Error 400

    I got it to work like this:

    Body:

    {

       "Document_Type": "Order",

       "Sell_to_Customer_No": "30000"

    }

    POST MyPC:16048/.../SalesOrder

    pastedimage1599649030465v1.png

    Also consider using API https://docs.microsoft.com/en-us/graph/dynamics-business-central-concept-overview - especially if you are doing something for long-term solutions. Thougs it all is OData so I cannot give you any specifics why API is better than OData, except it is newer.

  • Lars Lohndorf-Larsen Profile Picture
    on at
    RE: Error 400

    Hi sdfs,

    Can you do a simple GET command? Like this:

    GET http://MyPC:16048/BC160/OData/Company('CRONUS%20International%20Ltd.')/SalesOrder

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 944

#2
YUN ZHU Profile Picture

YUN ZHU 841 Super User 2025 Season 1

#3
Mansi Soni Profile Picture

Mansi Soni 602

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans