Create Entitlement Request for current User
POST /obp/v7.0.0/entitlement-requests
OBPv3.0.0-addEntitlementRequest No role required RoleEntitlementUser
Create Entitlement Request.
Any logged in User can use this endpoint to request an Entitlement
Entitlements are used to grant System or Bank level roles to Users. (For Account level privileges, see Views)
For a System level Role (.e.g CanGetAnyUser), set bank_id to an empty string i.e. "bank_id":""
For a Bank level Role (e.g. CanCreateAccount), set bank_id to a valid value e.g. "bank_id":"my-bank-id"
User Authentication is Required. The User must be logged in. The Application must also be authenticated.
JSON request body fields (2)
- bank_id
- gh.29.uk
- role_name
JSON response body fields (13)
Example request body
{
"bank_id": "gh.29.uk",
"role_name": "CanCreateBranch"
}Example success response
{
"entitlement_request_id": "6fb17583-1e49-4435-bb74-a14fe0996723",
"user": {
"user_id": "9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1",
"email": "felixsmith@example.com",
"provider_id": "Chris",
"provider": "http://127.0.0.1:8080",
"username": "felixsmith",
"entitlements": {
"list": [
{
"entitlement_id": "6fb17583-1e49-4435-bb74-a14fe0996723",
"role_name": "CanQueryOtherUser",
"bank_id": "gh.29.uk"
}
]
}
},
"role_name": "CanQueryOtherUser",
"bank_id": "gh.29.uk",
"created": "1100-01-01T00:00:00Z"
}Possible errors (9)
- OBP-20001: User not logged in. Authentication is required!
- OBP-20005: User not found. Please specify a valid value for USER_ID.
- OBP-10001: Incorrect json format.
- OBP-10007: Incorrect Role name:
- OBP-30205: This entitlement is a Bank Role. Please set bank_id to a valid bank id.
- OBP-30206: This entitlement is a System Role. Please set bank_id to empty string.
- OBP-30214: Entitlement Request already exists for the user.
- OBP-30217: Entitlement Request cannot be added.
- OBP-50000: Unknown Error.