Invites
Invites Documentation
Invite [LIST]
Invite [LIST]
Request
Endpoint
GET /api/v2/account_lists/5c6dfa9d-2b3a-4cdb-8bcc-3393c027e116/invites
Content-Type: application/vnd.api+json
Body
Parameters
Filters
invite_user_as
Type string
Description Filter by type of invite; Accepts "user" or "coach"
Required No
Response
Headers
Content-Type: application/vnd.api+json; charset=utf-8
200 OK
Body
{
"data": [
{
"id": "c5460c57-3754-48f0-a7ef-6a63121d875c",
"type": "account_list_invites",
"attributes": {
"accepted_at": "-4712-01-01T00:00:00Z",
"code": "abc",
"created_at": "2021-11-23T14:38:10Z",
"invite_user_as": "user",
"recipient_email": "[email protected]",
"updated_at": "2021-11-23T14:38:10Z",
"updated_in_db_at": "2021-11-23T14:38:10Z"
},
"relationships": {
"accepted_by_user": {
"data": null
},
"cancelled_by_user": {
"data": null
},
"invited_by_user": {
"data": {
"id": "0ec8dcc7-bad4-4de7-8494-9dbd58928949",
"type": "users"
}
}
}
}
],
"meta": {
"pagination": {
"page": 1,
"per_page": 25,
"total_count": 1,
"total_pages": 1
},
"sort": null,
"filter": {
}
}
}
Fields
data
Type
[Invite]
Description An array of Invites
Invite [POST]
Invite [POST]
Request
Endpoint
POST /api/v2/account_lists/3fe1b127-05b1-4b61-bdc2-af1af090edac/invites
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "account_list_invites",
"attributes": {
"invite_user_as": "user",
"recipient_email": "[email protected]",
"updated_in_db_at": "2021-11-23 14:38:09 UTC"
}
}
}
Parameters
Attributes
created_at
Type
date
Description The timestamp of when this resource was created
Required No
invite_user_as
Type
string
Description What to type of association to create if user accepts invite; Either "coach" or "user"
Required No
recipient_email
Type
string
Description Recipient Email
Required No
updated_at
Type
date
Description The timestamp of when this resource was last updated
Required No
updated_in_db_at
Type
date
Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.
Required No
Response
Headers
Content-Type: application/vnd.api+json; charset=utf-8
201 Created
Body
{
"data": {
"id": "3a4605ac-adc3-46ac-9e3a-6bd2ecdce084",
"type": "account_list_invites",
"attributes": {
"accepted_at": null,
"code": "f6a32bf36aef71ac4b0dc6a1dc80f296777c7969226939201c6de1d09587fe17",
"created_at": "2021-11-23T14:38:09Z",
"invite_user_as": "user",
"recipient_email": "[email protected]",
"updated_at": "2021-11-23T14:38:09Z",
"updated_in_db_at": "2021-11-23T14:38:09Z"
},
"relationships": {
"accepted_by_user": {
"data": null
},
"cancelled_by_user": {
"data": null
},
"invited_by_user": {
"data": {
"id": "78f296ce-c23e-4530-8a89-dc38b708c9f5",
"type": "users"
}
}
}
}
}
Fields
Attributes
accepted_at
Type
string
Description Accepted At
code
Type
string
Description Code
created_at
Type
date
Description The timestamp of when this resource was created
invite_user_as
Type
string
Description What to type of association to create if user accepts invite; Either "coach" or "user"
recipient_email
Type
string
Description Recipient Email
updated_at
Type
date
Description The timestamp of when this resource was last updated
updated_in_db_at
Type
date
Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.
Relationships
accepted_by_user.data
Type
User
Description user that accepted the invite
cancelled_by_user.data
Type
User
Description user that cancelled the invite
invited_by_user.data
Type
User
Description user that created the invite
Invite [GET]
Invite [GET]
Request
Endpoint
GET /api/v2/account_lists/a2b9ac00-b37a-49bc-b432-f59a490b7d92/invites/a0e03183-477c-404b-9e17-cad6865cd181
Content-Type: application/vnd.api+json
Body
Response
Headers
Content-Type: application/vnd.api+json; charset=utf-8
200 OK
Body
{
"data": {
"id": "a0e03183-477c-404b-9e17-cad6865cd181",
"type": "account_list_invites",
"attributes": {
"accepted_at": "-4712-01-01T00:00:00Z",
"code": "abc",
"created_at": "2021-11-23T14:38:10Z",
"invite_user_as": "user",
"recipient_email": "[email protected]",
"updated_at": "2021-11-23T14:38:10Z",
"updated_in_db_at": "2021-11-23T14:38:10Z"
},
"relationships": {
"accepted_by_user": {
"data": null
},
"cancelled_by_user": {
"data": null
},
"invited_by_user": {
"data": {
"id": "7e881694-678a-4654-a217-a290c06ddc8d",
"type": "users"
}
}
}
}
}
Fields
Attributes
accepted_at
Type
string
Description Accepted At
code
Type
string
Description Code
created_at
Type
date
Description The timestamp of when this resource was created
invite_user_as
Type
string
Description What to type of association to create if user accepts invite; Either "coach" or "user"
recipient_email
Type
string
Description Recipient Email
updated_at
Type
date
Description The timestamp of when this resource was last updated
updated_in_db_at
Type
date
Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.
Relationships
accepted_by_user.data
Type
User
Description user that accepted the invite
cancelled_by_user.data
Type
User
Description user that cancelled the invite
invited_by_user.data
Type
User
Description user that created the invite
Invite [DELETE]
Invite [DELETE]
Request
Endpoint
DELETE /api/v2/account_lists/9f4ba8a3-b61e-4d9d-a6c0-7221689c5d10/invites/75bff6aa-c7f0-4525-8210-0376146484e1
Content-Type: application/vnd.api+json
Body
Response
Headers
204 No Content
Body
Invite [ACCEPT]
Invite [ACCEPT]
Request
Endpoint
PUT /api/v2/account_lists/245304e5-3b41-4109-903d-cb92d41ac018/invites/021dd445-1aa2-4670-861e-d8ae803dbbe8/accept
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "account_list_invites",
"attributes": {
"code": "abc"
}
}
}
Parameters
Attributes
code
Type
Unknown
Description code that matches the code attribute on the invite being accepted
Required No
Response
Headers
Content-Type: application/vnd.api+json; charset=utf-8
200 OK
Body
{
"data": {
"id": "021dd445-1aa2-4670-861e-d8ae803dbbe8",
"type": "account_list_invites",
"attributes": {
"accepted_at": "2021-11-23T14:38:09Z",
"code": "abc",
"created_at": "2021-11-23T14:38:09Z",
"invite_user_as": "user",
"recipient_email": "[email protected]",
"updated_at": "2021-11-23T14:38:09Z",
"updated_in_db_at": "2021-11-23T14:38:09Z"
},
"relationships": {
"accepted_by_user": {
"data": {
"id": "61a87826-8181-45fe-847e-688a4e3cdfe7",
"type": "users"
}
},
"cancelled_by_user": {
"data": null
},
"invited_by_user": {
"data": {
"id": "b3ebd4e7-2b97-4f67-bd38-51371980c7f1",
"type": "users"
}
}
}
}
}
Fields
Attributes
accepted_at
Type
string
Description Accepted At
code
Type
string
Description Code
created_at
Type
date
Description The timestamp of when this resource was created
invite_user_as
Type
string
Description What to type of association to create if user accepts invite; Either "coach" or "user"
recipient_email
Type
string
Description Recipient Email
updated_at
Type
date
Description The timestamp of when this resource was last updated
updated_in_db_at
Type
date
Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.
Relationships
accepted_by_user.data
Type
User
Description user that accepted the invite
cancelled_by_user.data
Type
User
Description user that cancelled the invite
invited_by_user.data
Type
User
Description user that created the invite
Last updated