This endpoint returns all of the user opt out decisions for a specific course.
Verb/URI
https://launch.vitalsource.com/api/v4/courses/:course_id/opt_outs
Data Definitions
Name
|
Usage
|
Description
|
Data Type
|
Example
|
Required
|
||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
page | URL param / Message body | page number of opt outs request, default to page 1 | integer | /opt_outs?page=1 | No | ||||||||||||
per_page | URL param / Message body | number of opt out records returned per request, default is 100 | integer 1-1000 | /opt_out?per_page=1000 | No | ||||||||||||
created_from | URL param / Message body | returns opt out records that have been created at or since this time | ISO-8601 date/time | /opt_out?created_from=2019-06-07T20:25:22Z | No | ||||||||||||
created_until | URL param / Message body | returns opt out records that have been created at or until this time | ISO-8601 date/time | /opt_out?created_until=2019-06-11T20:25:22Z | No | ||||||||||||
updated_from | URL param / Message body | returns opt out records that have been updated at or since this time | ISO-8601 date/time | /opt_out?updated_from=2019-06-07T20:25:22Z | No | ||||||||||||
updated_until | URL param / Message body | returns opt out records that have been updated at or until this time | ISO-8601 date/time | /opt_out?updated_until=2019-06-11T20:25:22Z | No | ||||||||||||
id | Message body | VitalSource identifier for the opt out record | integer | 12345678901 | N/A | ||||||||||||
tenant_id | Message body | VitalSource identifier for the school | integer | N/A | |||||||||||||
tenant_user_id | Message body | VitalSource identifier for the user making the opt out decision | integer | N/A | |||||||||||||
course_id | URL path / Message body | VitalSource identifier for the course to which the opt out decision applies | integer | N/A | |||||||||||||
opt_out | Message body | The user's opt out decision | Boolean |
|
N/A | ||||||||||||
sku | Message body | VitalSource product SKU to which the opt out decision applies | string | 9781234567890R180 | N/A | ||||||||||||
reason_id | Message body | User provided reason for opting out | integer |
|
N/A | ||||||||||||
created_at | Message body | Indicates the date on which the user made their initial opt out decision | ISO-8601 date/time |
2018-12-04T15:59:59Z |
N/A | ||||||||||||
updated_at | Message body | Indicates the date on which the user last updated their opt out decision | ISO-8601 date/time |
2018-12-04T15:59:59Z |
N/A |
Request Headers
X-VitalSource-API-Key: ABCDEFGHIJKLMNOP
Accept: application/json
Content-type: application/json
Response
Response Body
JSON
{
"page": 1,
"per_page": 100,
"num_items": 2,
"total_pages": 1,
"opt_outs": [
{
"id": 5659847,
"tenant_id": 1234,
"course_id": 5678,
"tenant_user_id": 66401547,
"opt_out": "yes",
"sku": "9781234567890R180",
"reason_id": 1,
"created_at": "2018-12-04T15:59:59Z",
"updated_at": "2018-12-04T15:59:59Z"
},
{
"id": 5659678,
"tenant_id": 1234,
"course_id": 5678,
"tenant_user_id": 6647568,
"opt_out": "no",
"sku": "9781234567890R180",
"reason_id": null,
"created_at": "2018-12-03T15:59:59Z",
"updated_at": "2018-12-04T13:45:18Z"
}
]
}
Successful Response Message
HTTP: 200 OK
Error Codes
HTTP Status
|
Message
|
Notes
|
---|---|---|
404 | Not Found | The request parameters provided do not correspond to any known data |
401 | Unauthorized | The API key provided is not associated with any LTI integration |
Comments
Please sign in to leave a comment.