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

Community site session details

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

API PATCH on customers fails with "RequestDataInvalid" despite correct ETag and SUPER permissions

(3) ShareShare
ReportReport
Posted on by 9

Hello everyone,

I'm facing a critical issue with the Business Central v2.0 API in a new Sandbox environment, and I've reached a point where I suspect a platform bug. I'm hoping someone in the community might have seen this before.

The Core Problem

Any PATCH request I make to master data entities like /customers and /vendors systematically fails. The server responds with an HTTP 400 Bad Request and the following JSON body:

{
    "error": {
        "code": "RequestDataInvalid",
        "message": "Request data is invalid."
    }
}

What is Working

  • GET requests to collections and single records (e.g., /customers, /vendors({id})) work perfectly.

  • POST requests to create new records (e.g., in /customers) also work perfectly.

Exhaustive Troubleshooting Performed

The issue is exclusively with the PATCH verb. I have already performed the following troubleshooting steps to rule out common errors:

  1. Correct ETag Usage: I am performing a GET request on a specific record to retrieve a fresh @odata.etag and then immediately using that exact, correctly formatted value in the If-Match header of the PATCH request. I have confirmed the values are identical, so this is not a concurrency/ETag mismatch issue.

  2. Simple Field Updates: The error occurs even when I attempt to patch simple text fields like website or email. My JSON body is minimal and valid (e.g., {"website": "new-test-site.com"}).

  3. Standard & Custom Records: The error occurs on records I created via a POST request and also on standard CRONUS demo data records (e.g., customer '10000'). This suggests the issue is not with a specific record's data integrity.

  4. Permissions Confirmed with SUPER: To completely rule out permission issues, I have assigned the SUPER permission set to the Microsoft Entra Application inside Business Central. The PATCH operation still fails with the same error.

  5. Issue is Not Isolated: To check if the problem was specific to the /customers entity, I repeated the exact same test protocol on the /vendors entity. The PATCH request on /vendors also fails with the same RequestDataInvalid error.

My Conclusion & Question

The fact that standard PATCH operations fail across multiple core entities (customers, vendors) despite correctly formed requests and SUPER permissions points to a fundamental platform or environment bug that is preventing data modification via the API.

Has anyone else encountered this specific issue? Is this a known bug in a recent version?

Thank you for any help or insight you can provide.

I have the same question (0)
  • Verified answer
    Sohail Ahmed Profile Picture
    11,089 Super User 2025 Season 2 on at
    API PATCH on customers fails with "RequestDataInvalid" despite correct ETag and SUPER permissions

    Hope this might be helpful:

    I faced the exact same issue with the Item API; my GET and POST requests were working fine, but PATCH was generating the same error. My issue was resolved by following these two steps:

     
    NOTE: You should repeat these step for your customer API
     

    1. Search for "Change Data Access Intent."

    2. Find Object = Page, Item Card (I used a standard web service) and change its data access intent from Default to Allow Write.

    3. Then, in Postman, I made the request by passing If-Match as * and the URL included itemcard(Item No Value).

    ✅ Mark this answer as verified if it helps you.

  • Suggested answer
    YUN ZHU Profile Picture
    92,797 Super User 2025 Season 2 on at
    API PATCH on customers fails with "RequestDataInvalid" despite correct ETag and SUPER permissions
    Hi, It seems to be a permission issue. Have you given the correct permissions in the Microsoft Entra Application Card?
    Please note that you cannot add Super permissions here.
     
    PS: Using OAuth to connect Business Central APIs and Web Service in Postman
     
    Thanks.
    ZHU

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,285

#2
Sumit Singh Profile Picture

Sumit Singh 2,725

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,526

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans