Skip to content
Resources · Changelog

API Documentation (1.1.0)

Version

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.

POST/contentLicensing_login

Payload

clientId*
String
The partner's unique client ID. Provided according with osteocom.
clientSecret*
String
The secret key provided according with osteocom.

Response

token
String
Token used for subsequential calls as Bearer Token in the requests header.
json
{
  "clientId": "...",
  "clientSecret": "..."
}
json
{
  "token": "..."
}

HTTP Status Codes

Status CodeDescription
200 OKA valid JWT token.
401 Not AuthorizedUnknown 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.

POST/contentLicensing_catalog

Header

Authorization*
String
Bearer token

Payload

clientId*
String
The partner's unique client ID

Response

catalog
Array of Objects
The catalog is an array containing objects. Each object represents a channel with its associated details like authors, images, and videos.
json
{
  "catalog": [
    {
      "idChannel": "...",
      "authors": [],
      "video": []
    }
  ]
}

catalog[] object

idChannelString
It is used in the purchase api as a parameter both for purchasing the channel in the form of productId and for gaining access to the video.
authorsArray
Contains references to the authors, specifically the name and image if any, for each author.
backgroundString
Background image URL for the channel
coverString
Cover image URL for the channel
trailerString
Trailer video URL for the channel
priceInt
Price of the channel content
titleString
A channel title realated to the channel language
subtitleString
A channel subtitle related to the channel language
htmlDescriptionString
An osteocom html description that describe the channel.
videoArray

catalog[].authors[] object

nameString
Author's name
imageString
Author's image URL

catalog[].video[] object

videoIdString
Unique identifier for the video
backgroundString
Background image URL for the video
coverString
Cover image URL for the video
trailerString
mp4 trailer for the video
authorsArray
Contains references to the authors, specifically the name and image if anyfor each author
titleString
A video title realated to the channel language
subtitleString
A video subtitle related to the channel language
htmlDescriptionString
An osteocom html description that describe the video.
durationInt
duration of a video in seconds
videoQualityInt
the quality of the video: i.e. FULLHD
audioArray

catalog[].video[].authors[] object

nameString
Author's name
imageString
Author's image URL

catalog[].video[].audio[] object

nameString
the language of the audio translation: i.e. italian or english

HTTP Status Codes

Status CodeDescription
200 OKCatalog is returned
404 Not FoundCatalog not found
500 Internal Server ErrorUnexpected 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.

POST/contentLicensing_contentAccessAuthorization

Header

Authorization*
String
Bearer token

Payload (update from version 1.0.0)

clientId*
String
Unique identifier for the client.
userId*
String
User Id provided by partner. This field id is provided by the partner. It represent the unique identifier for the user. The partner can choose it depending on how he thinks it is more manageable for him handle this field. The identifier must not have a specific formatting for osteocom. The most important thing is that must be unique for identify the customer. Osteocom manages this fields only for content authorization access and for user token creation.
email
String
User's email address. This field becomes mandatory if partner gave permission to osteocom about marketing consent. The email must be a valid formatted email i.e. test@domain.com, otherwise the field is considered optional.
name
String
User's name.
surname
String
User's surname.
products*
Array of Objects
Products is an array containing objects. Each object represents a products with the associated price.

products[] object

priceInt
Specifies the price of that product.
productIdString
The channelId used for identify the channel purchased by the customer. This field is mandatory passed to osteocom requests when required.

Response

token
String
A token for accessing purchased content.
json
{
  "clientId": "...",
  "userId": "...",
  "email": "test@domain.com",
  "name": "...",
  "surname": "...",
  "products": [
    {
      "price": 0,
      "productId": "..."
    }
  ]
}
json
{
  "token": "..."
}

HTTP Status Codes (update from version 1.0.0)

Status CodeDescription
200 OKPurchase successful.
400 Email field required.When email field is required.
403 Unformatted emailWhen email field is required.
500 Internal Server ErrorUnexpected 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.

POST/contentLicensing_videoAccess

Header

Authorization
String
Bearer token mandatory

Payload

userId*
String
This field id is provided by the partner. It represent the unique indentifier for the user. The partner can choose it depending on how he thinks it is more manageable for him handle this field. The identifier must not have a specific formatting for osteocom. The most important thing is that must be unique for identify the customer. Osteocom manages this fields only for content authorization access and for user token creation.
clientId*
String
The partner's unique client ID
videoId*
String
Unique identifier for the video
userAccessKey*
String
Access key that authenticates the user

Response

tokenAuthVideo
String
A token that must be used as parameter into a dedicated url.
json
{
  "userId": "...",
  "clientId": "...",
  "videoId": "...",
  "userAccessKey": "..."
}
json
{
  "tokenAuthVideo": "..."
}

HTTP Status Codes

Status CodeDescription
200 OKA signed URL for the video is returned
401 Not AuthorizedThe client is not authorized
401 Token ExpiredToken video has expired.
404 Not FoundVideo not found.
500 Internal Server ErrorAn unexpected error occurred

Built with VitePress.