Answers
Answers Documentation
Answer [LIST]
Answer [LIST]
Request
Endpoint
GET /api/v2/coaching/answers
Content-Type: application/vnd.api+json
Body
Response
Headers
Content-Type: application/vnd.api+json; charset=utf-8
200 OK
Body
{
"data": [
{
"id": "f6c63f80-c3e0-47b4-a7f1-c6c46f6c11ef",
"type": "coaching_answers",
"attributes": {
"created_at": "2021-11-23T14:38:06Z",
"response": null,
"updated_at": "2021-11-23T14:38:06Z",
"updated_in_db_at": "2021-11-23T14:38:06Z"
},
"relationships": {
"question": {
"data": {
"id": "ecceae2c-3843-4eff-9921-de4e0924c5a9",
"type": "coaching_questions"
}
},
"answer_set": {
"data": {
"id": "67711e79-a691-48b8-b866-58727dbac0ef",
"type": "coaching_answer_sets"
}
},
"submitted_by_user": {
"data": {
"id": "8512d8b9-79b2-461b-aae5-cc6d5213280a",
"type": "users"
}
}
}
}
],
"meta": {
"pagination": {
"page": 1,
"per_page": 25,
"total_count": 1,
"total_pages": 1
},
"sort": null,
"filter": {
}
}
}
Fields
data
Type
[Answer]
Description An array of Answer Objects
Answer [POST]
Answer [POST]
Request
Endpoint
POST /api/v2/coaching/answers
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "coaching_answers",
"attributes": {
"response": "test",
"updated_in_db_at": "2021-11-23 14:38:06 UTC"
},
"relationships": {
"question": {
"data": {
"type": "coaching_questions",
"id": "6acffd23-5ba3-464b-81bc-f7fe39983d0a"
}
},
"answer_set": {
"data": {
"type": "coaching_answer_sets",
"id": "3ed86d29-9a0b-40f3-b940-45f1e1cacc92"
}
}
}
}
}
Parameters
Attributes
created_at
Type
date
Description The timestamp of when this resource was created
Required No
response
Type
string
Description The answer itself
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
Relationships
answer_set.data
Type
Answer Set
Description The Answer Set that the answer belongs to
Required No
question.data
Type
Question
Description The Question that the answer belongs to
Required No
submitted_by_user.data
Type
User
Description The User that submitted the answer (filled in automatically)
Required No
Response
Headers
Content-Type: application/vnd.api+json; charset=utf-8
201 Created
Body
{
"data": {
"id": "d02d364a-621f-401e-8dc5-b46e9a319669",
"type": "coaching_answers",
"attributes": {
"created_at": "2021-11-23T14:38:07Z",
"response": "test",
"updated_at": "2021-11-23T14:38:07Z",
"updated_in_db_at": "2021-11-23T14:38:07Z"
},
"relationships": {
"question": {
"data": {
"id": "6acffd23-5ba3-464b-81bc-f7fe39983d0a",
"type": "coaching_questions"
}
},
"answer_set": {
"data": {
"id": "3ed86d29-9a0b-40f3-b940-45f1e1cacc92",
"type": "coaching_answer_sets"
}
},
"submitted_by_user": {
"data": {
"id": "8d75c4b2-8293-4392-bbe4-c8d3272c9cda",
"type": "users"
}
}
}
}
}
Fields
Attributes
created_at
Type
date
Description The timestamp of when this resource was created
response
Type
string
Description The answer itself
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
answer_set.data
Type
Answer Set
Description The Answer Set that the answer belongs to
question.data
Type
Question
Description The Question that the answer belongs to
submitted_by_user.data
Type
User
Description The User that submitted the answer (filled in automatically)
Answer [GET]
Answer [GET]
Request
Endpoint
GET /api/v2/coaching/answers/99f2bdb0-6da0-4744-b364-c96825b9ea44
Content-Type: application/vnd.api+json
Body
Response
Headers
Content-Type: application/vnd.api+json; charset=utf-8
200 OK
Body
{
"data": {
"id": "99f2bdb0-6da0-4744-b364-c96825b9ea44",
"type": "coaching_answers",
"attributes": {
"created_at": "2021-11-23T14:38:06Z",
"response": null,
"updated_at": "2021-11-23T14:38:06Z",
"updated_in_db_at": "2021-11-23T14:38:06Z"
},
"relationships": {
"question": {
"data": {
"id": "e85bf068-f398-481e-a83a-6004fb58afe7",
"type": "coaching_questions"
}
},
"answer_set": {
"data": {
"id": "74650a7f-8a09-4306-9da8-9d777418a098",
"type": "coaching_answer_sets"
}
},
"submitted_by_user": {
"data": {
"id": "c148c36b-39a1-41ec-baaf-613b0b70689b",
"type": "users"
}
}
}
}
}
Fields
Attributes
created_at
Type
date
Description The timestamp of when this resource was created
response
Type
string
Description The answer itself
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
answer_set.data
Type
Answer Set
Description The Answer Set that the answer belongs to
question.data
Type
Question
Description The Question that the answer belongs to
submitted_by_user.data
Type
User
Description The User that submitted the answer (filled in automatically)
Answer [PUT]
Answer [PUT]
Request
Endpoint
PUT /api/v2/coaching/answers/f97ba23e-131b-45a4-af21-13a40f5236dc
Content-Type: application/vnd.api+json
Body
{
"data": {
"type": "coaching_answers",
"attributes": {
"response": "test",
"updated_in_db_at": "2021-11-23 14:38:06 UTC"
},
"relationships": {
"question": {
"data": {
"type": "coaching_questions",
"id": "f2b5b503-764b-4425-a213-5af8ff655ff3"
}
},
"answer_set": {
"data": {
"type": "coaching_answer_sets",
"id": "39903de6-ca46-4e04-97d3-82e8a28e2690"
}
}
}
}
}
Parameters
Attributes
created_at
Type
date
Description The timestamp of when this resource was created
Required No
overwrite
Type
boolean
Description
Only used for updating a record where you want to ignore the server's ' 'updated_in_db_at
value and force overwrite the values for the record. ' 'Must be true
to work.
Required No
response
Type
string
Description The answer itself
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
Relationships
answer_set.data
Type
Answer Set
Description The Answer Set that the answer belongs to
Required No
question.data
Type
Question
Description The Question that the answer belongs to
Required No
submitted_by_user.data
Type
User
Description The User that submitted the answer (filled in automatically)
Required No
Response
Headers
Content-Type: application/vnd.api+json; charset=utf-8
200 OK
Body
{
"data": {
"id": "f97ba23e-131b-45a4-af21-13a40f5236dc",
"type": "coaching_answers",
"attributes": {
"created_at": "2021-11-23T14:38:06Z",
"response": "test",
"updated_at": "2021-11-23T14:38:06Z",
"updated_in_db_at": "2021-11-23T14:38:06Z"
},
"relationships": {
"question": {
"data": {
"id": "f2b5b503-764b-4425-a213-5af8ff655ff3",
"type": "coaching_questions"
}
},
"answer_set": {
"data": {
"id": "39903de6-ca46-4e04-97d3-82e8a28e2690",
"type": "coaching_answer_sets"
}
},
"submitted_by_user": {
"data": {
"id": "b4ee22c8-2af7-4c44-9282-43ae9733c38d",
"type": "users"
}
}
}
}
}
Fields
Attributes
created_at
Type
date
Description The timestamp of when this resource was created
response
Type
string
Description The answer itself
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
answer_set.data
Type
Answer Set
Description The Answer Set that the answer belongs to
question.data
Type
Question
Description The Question that the answer belongs to
submitted_by_user.data
Type
User
Description The User that submitted the answer (filled in automatically)
Last updated