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...
Suggested Answer

Bad Request error in Business Central API

(0) ShareShare
ReportReport
Posted on by 170

Hi all,

I am having a strange issue with Business Central API. below is the case.

I have developed a codeunit in business central on-cloud with multiple functions and published as Web Service. Most functions receives parameter and return the values accordingly. However, i am having issue with one of the functions. It receive the parameters and process the values accordingly within Business Central. 

While making the API call to this function, it says "Bad Request". below is the function and parameter. i am using OData API url to call these methods.

procedure UpdateEventsAfterIntegration(Entry_No: Text[50]; Status: Text[50]; Message: Text[250])
begin
        Message(Entry_No + Message);
end;
Postman API Call:
7587.pastedimage1652163991488v1.png
I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,788 Moderator on at

    Hi Sunil Kumar ,

    Can you please change your 3rd parameter name to something else? Because you are now using standard keyword name "Message" please replace it with like MsgStr: Text[250]

    and used the same parameter like below.

    Message(Entry_No + MsgStr);

    And then please try again.

  • Sunil1991 Profile Picture
    170 on at

    Hi Nitin,

    Thanks for your input. however, i tried as you suggested and still having the same error.

  • Suggested answer
    Nitin Verma Profile Picture
    21,788 Moderator on at

    Please share your code here.

  • Sunil1991 Profile Picture
    170 on at

    Hi Nitin,

    I got the issue and resolved it.

    Basically, first latter of parameter names should starts with small letter as below. earlier it was starting with Capital letter.

    procedure UpdateEventsAfterIntegration(entry_No: Text[50]; status: Text[50]; txtMessage: Text[250])

    begin

           Message(entry_No + txtMessage);

    end;

  • Suggested answer
    Nitin Verma Profile Picture
    21,788 Moderator on at

    Yes, Good to know that it has been resolved,

    Now you can please close this thread.

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 2,055 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,063 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 1,014 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans