API Documentation (1.1.0)
Following this section, goes to provide all description fields of api's.
Base URL
To use the test environment, use the url prefix https://test.osteocom.me/sv6. For the production environment use https://osteocom.me/sv6.
Authorization API POST
The Authorization api provides the access all other subsequent calls. You need two fields, clientId and clientSecret, you will use the returned token in the request header of your next calls, without it, you will not be able to do other calls.
Payload
Response
{
"clientId": "...",
"clientSecret": "..."
}{
"token": "..."
}HTTP Status Codes
| Status Code | Description |
|---|---|
200 OK | A valid JWT token. |
401 Not Authorized | Unknown client |
Catalog API: Content catalog access POST
It access the Osteocom content catalog, which has already been pre-agreed between the parties. At this stage, you access the necessary information about the available content. Each channel has its own data depends on its preconfigurated language as according between osteocom and the partner including exceptions for some fields that, if unnecessary, according with partner and osteocom, they cannot provided or passed with no value.
Header
Payload
Response
{
"catalog": [
{
"idChannel": "...",
"authors": [],
"video": []
}
]
}catalog[] object
catalog[].authors[] object
catalog[].video[] object
catalog[].video[].authors[] object
catalog[].video[].audio[] object
HTTP Status Codes
| Status Code | Description |
|---|---|
200 OK | Catalog is returned |
404 Not Found | Catalog not found |
500 Internal Server Error | Unexpected error |
Content Access Authorization POST
Manages the purchase of content. Send Osteocom user and purchase details (including contents chosen and their own price). After processing this data, the user is authorized to access purchased content.
Header
Payload (update from version 1.0.0)
products[] object
Response
{
"clientId": "...",
"userId": "...",
"email": "test@domain.com",
"name": "...",
"surname": "...",
"products": [
{
"price": 0,
"productId": "..."
}
]
}{
"token": "..."
}HTTP Status Codes (update from version 1.0.0)
| Status Code | Description |
|---|---|
200 OK | Purchase successful. |
400 Email field required. | When email field is required. |
403 Unformatted email | When email field is required. |
500 Internal Server Error | Unexpected error. |
Video API POST
Allows end users to access purchased content. Verifies permissions and grants access if everything is correct. The api outcome is a token that you can use by embedding into our provided url within an iframe; see the section: Iframe-Based Video Access.
Header
Payload
Response
{
"userId": "...",
"clientId": "...",
"videoId": "...",
"userAccessKey": "..."
}{
"tokenAuthVideo": "..."
}HTTP Status Codes
| Status Code | Description |
|---|---|
200 OK | A signed URL for the video is returned |
401 Not Authorized | The client is not authorized |
401 Token Expired | Token video has expired. |
404 Not Found | Video not found. |
500 Internal Server Error | An unexpected error occurred |