Validation of mandatory document category in API calls

When adding documents via the MKG API, it is now checked whether a document category is mandatory. If this is the case and no category is provided, the call is rejected with an error message. This aligns the API's behavior with the client and prevents inconsistent data.