Update an Invitation
Request Details
Item | Value |
Description | Updates a household invitation status. |
Method | PUT |
Endpoint | https://[environment]api[client_id].crowdtwist.com/v2/household/[household_id]/invitation/[invitation_id]?api_key=[api_key]¤t_user=[member_id] |
Content Type | application/json |
Request
Field Name | Sample Value | Required | Format | Notes |
URL PARAMETERS | ||||
household_id | 10 | Yes | Integer | The ID of the household. |
invitation_id | 12 | Yes | Integer | The ID of the invitation. |
QUERY STRING PARAMETERS | ||||
api_key | QWERTYUIOP | Yes | String | |
current_user | 240835353 | Yes | Integer | The member who is performing this action. This member must be the household owner. (CrowdTwist User ID) |
Request Body
Field Name | Validation | Format | Notes |
status | "ACCEPTED" | String | The new status of this invitation. Invitees can update the status to "ACCEPTED" or "REJECTED" while the owner of the household can rescind the invite by updating to "REMOVED" |
Successful Response
Field Name | Sample Value | Format | Description |
invitation_id | 12 | Integer | The id of this invitation. |
email_address | "jack@example.com" | String | The email address of the invitee. |
date_sent | "2020-11-25T19:27:42.000Z" | String (ISO 8601) | The date this invitation was sent. |
status | "ACCEPTED" | String | The updated status of this invitation. |
Sample Successful Response
{
"invitation_id": 12,
"email_address": "jack@example.com",
"date_sent": "2020-11-25T19:27:42.000Z",
"status": "ACCEPTED"
}
Error Responses
Error Code | Description |
404 | Unable to find household. |
400 | User must be the invitee to accept or reject an invite |
400 | A non-positive integer value was provided for current_user. |
400 | Missing current_user query parameter. |
400 | Status is required. |
400 | [invalid status] is not a valid value for status. Only "accepted", "rejected", and "removed” are allowed |