PUT group-invitation/…
Accepts or declines an invitation for a group.
Resource URL
https://www.drillster.com/api/2.1.1/group-invitation/{token}
The token is the unique code representing the group invitation.
Parameters
Field | Type | Description |
---|---|---|
action required |
String | The action to apply to the invitation.
|
If a PUT request has no body (i.e. the body is empty), it is still mandatory to include a Content-Length header (i.e.
Content-Length: 0
). Not all HTTP clients do this automatically. For more information, please see RFC 2616.
Response
The accepted or declined 2.1.1 GroupInvitation object.
Example request
POST https://www.drillster.com/api/2.1/group-invitation/eFqr79Q4R3KiMs2a7vSNqQ
action=ACCEPT
Response
{
"status": "ACCEPTED",
"user": {
"id": "x1MZEtQoRb19bU6v0bunOw",
"emailAddress": "jane.doe@example.com"
},
"group": {
"id": "bWBNGxnkf9dx2K4BGc2mndIEw0urEGKNs-9Zme3PgOM",
"name": "European geography",
"description": "Learn the countries and capitals of Europe",
"counts": {
"drillables": 20,
"tests": 6
}
}
}
Error responses
The following error situations are possible:
ID | Response code | Description |
---|---|---|
missing_token |
400 (Bad request) | Group invitation token is missing |
missing_action |
400 (Bad request) | The action must be either ACCEPT or DECLINE |
invalid_invitation_status |
400 (Bad request) | The action must be either ACCEPT or DECLINE |
unknown_group_invitation |
404 (Not found) | The group invitation not found |
no_user_account |
400 (Bad request) | No user account has been set up yet for the invitee – set up a user account first |
no_catalog_access |
403 (Forbidden) | The group is locked on a catalog, and the user does not have access to this catalog |
no_permission |
403 (Forbidden) | The caller has no permission to this endpoint |
group_member_quota_reached |
400 (Bad request) | You reached the number of group members you can add to your groups for your license |
privacy_location_conflict |
409 (Conflict) | The user has a privacy data location that conflicts with the privacy data location of your organization |
internal_error |
500 (Internal error) | An internal error occurred |
accept_failed message |
400 (Bad request) | Accepting the group invitation failed |
decline_failed |
400 (Bad request) | Declining the group invitation failed |
Last updated on