You might have implemented, with Dynamics 365 Business Central SaaS, your own solution to deploy extensions automagically through whatever programming language or using PostMan or via logicApps.
It could happen, then, that when performing a PATCH call like e.g.
api.businesscentral.dynamics.com/.../content
that you might receive an error like
{
"error": {
"code": "Unknown",
"message": "'<integerNumber>' is not a valid language code. You must specify a locale identifier (LCID) or code in the format of language-country/region, such as en-US, de-DE, or da-DK. CorrelationId: <GUID>."
}
}
The rationale behind this error is related on mimic the equivalent of specifying the deployment language as it happens from the Extensions Management UI as shown below:
When using the automation API, the Language is taken from the session language and sometimes a wrong or null value might raise the error described.
Meanwhile development team is analyzing why this is happening and to resolve it in the medium term, the viable solution for this issue is to always include in the Headers the following entry
"Accept-Language" : "en-US"
Or whatever valid language you would like to use in your deployment (typically English). This will be intercepted by the application and converted from LCID into its equivalent Language code and used as GLOBALLANGUAGE within the following sentence in the ExtensionManagement codeunit