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:
-
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.
-
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"}
).
-
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.
-
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.
-
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.