VALIDATION_ERROR for a malformed body; USER_ID_REQUIRED when an email or non-id was sent; USER_NOT_FOUND when an id does not exist in this organization, with details.invalid[] naming the field and index; USER_NOT_ACTIVE when requested_by, or a person in requested_for, is not active or is archived, with details.invalid[] naming the field and status, and the index for requested_for; APP_NOT_RESOLVED when app_id names no application here.
Also VALIDATION_ERROR with details.fields[0].code = "invalid_format" when form_version is not a parsable timestamp. That is a 400 rather than a 409, because a value that is not a version cannot be a stale version and re-reading the schema would never make it valid.
Also VALIDATION_ERROR with details.fields[0].code = "already_used_for_another_app" when this external_ref is already in use for a different application. Idempotency is keyed on (organization, external_ref) alone, so one ticket requesting several applications needs a distinct reference for each — "INC1234:slack", "INC1234:datadog".
Also VALIDATION_ERROR with details.fields[0].code = "already_used_for_other_people" on requested_for when this external_ref was raised for different people. A retry must name the same requested_for; access for anyone else needs a new request with its own external_ref.
Also VALIDATION_ERROR when requested_for names the same person twice, and when request_role or license_name names no requestable role or license of this application (entity_not_found; only for a field with an options_ref; the message names the list to pick an id from).
And VALIDATION_ERROR with the reason in message and no details when Zluri's request service refuses the request: the application is archived, or a person in requested_for is a non-human identity, such as a bot, API token or service principal.
Also VALIDATION_ERROR when app_id names an application that is inactive (not_requestable on app_id): GET /ext/access/catalog/apps never lists one. And when field_values does not fit the application's form: required, invalid_option, invalid_type or invalid_format, one entry per field (see field_values for the rules). Form problems and refused fields come back in the same response. A body that is not valid JSON is refused before it reaches this API: 400 MISC, message Bad Request, in the ExtGatewayError shape.