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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Error creating customer in Business Central through API: Request data is invalid

(1) ShareShare
ReportReport
Posted on by 5

Hi,

I am trying to create a customer through the API and I am getting a "Request data is invalid" error.

I am posting to  api.businesscentral.dynamics.com/.../customers

The following json:

{

number: "43000003",

displayName: "Sample Customer API",
}
Any ideas on what's going on? The documentation is not clear on what fields are required.
I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    The following works fine:

    https    :    //api.businesscentral.dynamics.com/v2.0/{{TENANTAADID}}/{{PRODUCTION}}/api/v2.0/companies({{COMPANY}})/customers

    JSON:

    {

       "number": "43000",

       "displayName": "Sample Data"

    }

    {

       "@odata.context": "api.businesscentral.dynamics.com/.../$metadata

       "@odata.etag": "W/\"JzE5OzYwOTM2NTIwODQxMDU4ODU1ODYxOzAwOyc=\"",

       "id": "826ed5ad-be4b-ed11-946f-000d3abc180b",

       "number": "43000",

       "displayName": "Sample Data",

       "type": "Person",

    Etc.

    I see you are using My Company, could it be that this company is empty and not yet filled with the required master data?

    Thank you.

  • Pablo Caselas Profile Picture
    5 on at

    Hi, thanks for the response! Where can I see what required master data is missing?

    Edit*:

    I went ahead and created a new company for testing purposes called "test-api".

    Went to settings > company information and filled all required fields. 

    But I am still getting the same Bad Request error. 

    Kind regards,

    Pablo

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Try to connect to a CRONUS Company as it has all relevant demo data included.

    Thank you.

  • Pablo Caselas Profile Picture
    5 on at

    I created a CRONUS account (I've previously deleted the one that was included) using this flags:

    Captura-de-Pantalla-2022_2D00_10_2D00_17-a-las-10.34.34.png

    But same error. I think there's something wrong with my account. I've been having other problems before this (a tenant without a global admin), then an error granting permissions to the app that got solved with the help of Microsoft support...

    Who could I talk within Microsoft to try to solve this issue?

    Captura-de-Pantalla-2022_2D00_10_2D00_17-a-las-11.38.20.png

    Thank you very much for the help! Marco Mels 

    Kind regards,

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Feel free to raise the scenario to us at Microsoft via your partner or CSP.

    Thank you.

  • Pablo Caselas Profile Picture
    5 on at

    We don't have a partner yet because we're still evaluating Business Central (we're talking to one, though). But we need to know if the API suits us first. Because if the API doesn't fit our requirements, the product won't be a fit for us.

    How can I raise a CSP? Because I've been in previous talks with Microsoft Support due to problems with Azure Portal while creating the oauth app to consume the API, I've replied to the email with the case Azure Portal case yesterday, but got no reply. I don't know if I need to raise it for somewhere else.

    Thanks for your help Marco Mels 

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Microsoft Business Central support is primarily provided to partner or CSP's (Cloud Solution Providers). This is because partners are able to modify the base product which means they should evaluate first if it is something in their IP or ours.

    There is a grey area of customers who are evaluating the product and do not yet have a partner or CSP assigned. They sometimes raise support tickets with Azure support, and they sometimes get lost if the Azure support area as there are several support teams out there providing support for several areas of the Azure service. Best probably is to clearly tell them this is for Business Central support. We will probably need to evaluate on a case-by-case base if customers are entitled to get to Business Central support, but the Azure support engineer needs to reach out to us otherwise we do not know that a support ticket is waiting for us (so we surely need to improve in this area on our side).

    Customers who have a paid production license do have a partner or CSP assigned so they can get to us fairly easily.

    Thank you.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,229

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,867 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans