Skip to main content

Additional user assignment and unassignment examples

Assign a user with parameters

Below is an example of assigning a user to subscription passing parameters.

Request

{
"accessRights": "EDIT_AND_VIEW",
"appAdmin": "false",
"billRate": "0",
"department": "IT",
"idNumber": "3345",
"password": "password",
"timezone": "America/New_York",
"title": "Engineer",
"userName": "testuser@example.com",
"zipCode": "95926"
}

Response

Status Code: 201 Created

Assign a user who has already been assigned

Below is an example of assigning a user to subscription where the user has already been assigned to the subscription.

Response

[
{
"code": "Bad Request",
"message": "Subscription has been already assigned to the user"
}
]

Assign a user to a subscription that does not exist

Below is an example of assigning a user to a subscription that does not exist in the system or is not part of this marketplace.

Response

[
{
"code": "Not Found",
"message": "CompanyEntitlement with UUID=07db4f71-8e24-48ba-acd6-49210aee0692 not found."
}
]

Unassigning a user from a subscription does not require parameters beyond the companyId, userId, and subscriptionId, nor are attributes included. The examples included below show possible error cases.

Unassign a user who has not been assigned

Below is an example of unassigning a user from a subscription where the user has either already been unassigned from the subscription or who was not ever assigned to the subscription.

Response

[
{
"code": "Not Found",
"message": "No user entitement found."
}
]

Unassign a user from a subscription that does not exist

Below is an example of unassigning a user from a subscription that does not exist in the system or is not part of this channel.

Response

[
{
"code": "Not Found",
"message": "CompanyEntitlement with UUID=07db2f71-8e24-48ba-acd6-49210aee0692 not found."
}
]

Was this page helpful?