- Approve or reject a self-service request.
The webhook-mode counterpart of the portal's approve / reject buttons: the tenant's backend posts the decision here after acting on a `self_service.request.submitted` event. Validation, merge, offer or invitation creation, status transition and pub-sub all live in the selfservice package — this handler is a thin auth + scope check (`self_service`).
Optional in the contract because configs with no admin-filled claims approve without one. The server-side coverage check (selfservice package) is what enforces presence when the config does have admin-filled keys — a missing key returns InvalidArgument. Wrapped in Option so the generated OpenAPI spec marks it optional; a plain json.RawMessage gets emitted as required by Encore regardless of json:omitempty.
- Mock serverhttps://docs.deepcredentials.swiss/_mock/docs/openapi/self-service-v1/b2b/v1/self-service/requests/{requestId}/decision
- Developmenthttps://api.dev.deepcredentials.swiss/b2b/v1/self-service/requests/{requestId}/decision
- Integrationhttps://api.int.deepcredentials.swiss/b2b/v1/self-service/requests/{requestId}/decision
curl -i -X POST \
'https://docs.deepcredentials.swiss/_mock/docs/openapi/self-service-v1/b2b/v1/self-service/requests/{requestId}/decision' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-Environment: beta' \
-H 'X-Org-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-d '{
"decision": "approve",
"admin_claims": {
"is_employee": true
}
}'{ "request_id": "9c9a1f7b-2a3e-4f4a-9d22-1a2b3c4d5e6f", "status": "approved", "offer_id": "d4e5f6a7-b8c9-0123-4567-89abcdef0123" }