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

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,169 Super User 2026 Season 1 on at

    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
    99,055 Super User 2026 Season 1 on at
    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

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

#2
YUN ZHU Profile Picture

YUN ZHU 1,103 Super User 2026 Season 1

#3
Kamal Khakhkhar Profile Picture

Kamal Khakhkhar 695

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans