Questions

Questions Documentation

Question [LIST]

Question [LIST]

Request

Endpoint

GET /api/v2/coaching/questions
Content-Type: application/vnd.api+json

Body

Parameters

Sorts

position

Type Unknown

Description Sort by position

Required No

Filters

organization_id

Type ID string

Description Filter by Organization; accepts an Organization id

Required No

Response

Headers

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

Body

{
  "data": [
    {
      "id": "ff31ca87-8f35-405b-816d-a7da04f983f1",
      "type": "coaching_questions",
      "attributes": {
        "created_at": "2021-11-23T14:37:28Z",
        "position": 0,
        "prompt": "This is a question",
        "required": false,
        "response_options": null,
        "updated_at": "2021-11-23T14:37:28Z",
        "updated_in_db_at": "2021-11-23T14:37:28Z"
      },
      "relationships": {
        "organization": {
          "data": {
            "id": "25f5c768-4641-4d60-82d4-db5569ddce60",
            "type": "organizations"
          }
        }
      }
    }
  ],
  "meta": {
    "pagination": {
      "page": 1,
      "per_page": 25,
      "total_count": 1,
      "total_pages": 1
    },
    "sort": null,
    "filter": {
    }
  }
}

Fields

data

Type [Question]

Description An array of Question Objects

Question [GET]

Question [GET]

Request

Endpoint

GET /api/v2/coaching/questions/d80d6c14-4921-49e6-a98c-9a3bdf04471e
Content-Type: application/vnd.api+json

Body

Response

Headers

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

Body

{
  "data": {
    "id": "d80d6c14-4921-49e6-a98c-9a3bdf04471e",
    "type": "coaching_questions",
    "attributes": {
      "created_at": "2021-11-23T14:37:28Z",
      "position": 0,
      "prompt": "This is a question",
      "required": false,
      "response_options": null,
      "updated_at": "2021-11-23T14:37:28Z",
      "updated_in_db_at": "2021-11-23T14:37:28Z"
    },
    "relationships": {
      "organization": {
        "data": {
          "id": "735f1ba9-8df0-4e03-8e33-0bc44a76f77f",
          "type": "organizations"
        }
      }
    }
  }
}

Fields

Attributes

created_at

Type date

Description The timestamp of when this resource was created

position

Type integer

Description What order the question should be in

prompt

Type string

Description The question itself

required

Type boolean

Description Is this question required

response_options

Type ["string"]

Description If the question is multiple choice, the list of string options

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

organization.data

Type Organization

Description The Organization that the question belongs to

Last updated