Invites

Invites Documentation

Invite [LIST]

Invite [LIST]

Request

Endpoint

GET /api/v2/account_lists/68683b2d-3585-42f2-94f3-e1c366cf8177/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": "53af07af-76b9-470b-b1d4-9be69aac6ba1",
      "type": "account_list_invites",
      "attributes": {
        "accepted_at": "-4712-01-01T00:00:00Z",
        "code": "abc",
        "created_at": "2022-01-12T17:18:21Z",
        "invite_user_as": "coach",
        "recipient_email": "joe@example.com",
        "updated_at": "2022-01-12T17:18:21Z",
        "updated_in_db_at": "2022-01-12T17:18:21Z"
      },
      "relationships": {
        "accepted_by_user": {
          "data": null
        },
        "cancelled_by_user": {
          "data": null
        },
        "invited_by_user": {
          "data": {
            "id": "7ac9d6aa-4f6d-4b9c-a99c-768668a84fe1",
            "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/f10a0678-541e-4ebc-bb33-bc9ede811be9/invites
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "account_list_invites",
    "attributes": {
      "invite_user_as": "user",
      "recipient_email": "joe@example.com",
      "updated_in_db_at": "2022-01-12 17:18:20 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": "3f3a94bf-190a-4f91-8fea-8a90210cd993",
    "type": "account_list_invites",
    "attributes": {
      "accepted_at": null,
      "code": "f0303e65a41ee7e4ce8fb26b90e9bd973e7ca4406e4d918282460bb4a65b5728",
      "created_at": "2022-01-12T17:18:20Z",
      "invite_user_as": "user",
      "recipient_email": "joe@example.com",
      "updated_at": "2022-01-12T17:18:20Z",
      "updated_in_db_at": "2022-01-12T17:18:20Z"
    },
    "relationships": {
      "accepted_by_user": {
        "data": null
      },
      "cancelled_by_user": {
        "data": null
      },
      "invited_by_user": {
        "data": {
          "id": "ca6628ae-21dc-4d22-b71f-59b4c73bfb8d",
          "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/3434c562-71bf-4a25-b086-e33234396385/invites/6e8a98ca-46ec-4d4b-886a-efada4d19d4b
Content-Type: application/vnd.api+json

Body

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "6e8a98ca-46ec-4d4b-886a-efada4d19d4b",
    "type": "account_list_invites",
    "attributes": {
      "accepted_at": "-4712-01-01T00:00:00Z",
      "code": "abc",
      "created_at": "2022-01-12T17:18:20Z",
      "invite_user_as": "user",
      "recipient_email": "joe@example.com",
      "updated_at": "2022-01-12T17:18:20Z",
      "updated_in_db_at": "2022-01-12T17:18:20Z"
    },
    "relationships": {
      "accepted_by_user": {
        "data": null
      },
      "cancelled_by_user": {
        "data": null
      },
      "invited_by_user": {
        "data": {
          "id": "12327b73-e57f-4bbf-9c53-ce0aaf0c7152",
          "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/08d9120d-db44-48e0-b7b0-6ba37b18b130/invites/6be89230-020f-4381-8a11-1217598d89a0
Content-Type: application/vnd.api+json

Body

Response

Headers

204 No Content

Body

Invite [ACCEPT]

Invite [ACCEPT]

Request

Endpoint

PUT /api/v2/account_lists/94fee331-c9c9-49d7-b2b6-b0169165ff10/invites/ae81fbc3-c15c-4234-b6dd-4c14d38c0835/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": "ae81fbc3-c15c-4234-b6dd-4c14d38c0835",
    "type": "account_list_invites",
    "attributes": {
      "accepted_at": "2022-01-12T17:18:20Z",
      "code": "abc",
      "created_at": "2022-01-12T17:18:20Z",
      "invite_user_as": "user",
      "recipient_email": "joe@example.com",
      "updated_at": "2022-01-12T17:18:20Z",
      "updated_in_db_at": "2022-01-12T17:18:20Z"
    },
    "relationships": {
      "accepted_by_user": {
        "data": {
          "id": "06f99481-46fe-4efd-873c-04f339a23867",
          "type": "users"
        }
      },
      "cancelled_by_user": {
        "data": null
      },
      "invited_by_user": {
        "data": {
          "id": "410eaf0c-87f0-4ca5-ab2b-b3db55647dc8",
          "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