All parameters and it’s values are case-sensitive. token parameter is required for every request. This API only accept GET method.

Get Content List –

End Point – https://api2.plansinfo.com/v6/ott/content/list

Request Parameters –

  1. addedAfter (optional)- It will list contents which are added in database after this date-time. Supported Format – 2017-07-19T18:30:00.000Z
  2. source (optional)- It filter list with given OTT.
  3. releaseYear (optional)- It will filter list with given release year.
  4. contentType (optional)- It will filter MOVIE or SHOW.
  5. term (optional) – It will search for a show or movie.

Response Object –

  1. id – A unique identifier for content.
  2. title – title of content.
  3. contentType – Content type MOVIE or SHOW.

Get content Details –

End Point https://api2.plansinfo.com/v6/ott/content/details

Request Parameters –

  1. id (required)- Id of content.

Response Object –

  1. title (VARCHAR)- Title of content.
  2. id (INT) – Id of content.
  3. releaseYear (SMALLINT)- Release Year of content.
  4. releaseDate (DATETIME) – Release Date of content.
  5. duration (SMALLINT)- Duration of movie in seconds. For shows it will be null.
  6. contentType (VARCHAR)- Type of content (MOVIE/SHOW) .
  7. originalLanguage New (VARCHAR) – Original Languages of content.
  8. languages (array) – All languages in which content is available.
  9. seasons New (array) – name, number and releaseDate of season.
  10. genres (array) – All genres of content.
  11. description (TEXT) – Description of content.
  12. poster (URL) – A poster of content of size 400X578.
  13. images (array) – All images available for content.
  14. active (bool) – Some times invalid movies/shows are added in database. If this parameter is false then it means content should be removed/replaced.
  15. cast (array) – An array of actors/actress.
  16. imdb (object) – titleId, rating, votes will be available here.
  17. youtube (object) – trailerLink will be available here.
  18. addedAt (DATETIME) – Date time when content was added in our database.

Songs API-

End Point – https://api2.plansinfo.com/v6/ott/songs

Request Parameters

  1. contentId (Integer) – Id of the movie.

Response Object –
  1. songs [array]- List of songs.
  2. name (string) – Name of song.
  3. duration (int) – Duration of song in seconds.
  4. link (URL) – Spotify link of song.

Crew API

End Point – https://api2.plansinfo.com/v6/ott/crew


Request Parameters

  1. id (integer) – id of crew.

Response Object –

  1. name (varchar) – name of person.
  2. realName (varchar) – Original name of person.
  3. gender (varchar) – gender of person.
  4. primaryDepartment (varchar) – Primary profession of person.
  5. height (int)- height in centimeter.
  6. weight (int) – weight in kilogram.
  7. zodiacSign (varchar) – zodiac sign of person.
  8. netWorth (varchar) – net worth of person.
  9. religion (varchar) – religion of person.
  10. nationality (varchar) – nationality of person.
  11. birthDate (DATETIME) – Birth date of person.
  12. birthPlace (varchar)- Birth place of person.’
  13. maritalStatus (varchar) – Current marital status of person.
  14. education (varchar)- Highest educational qualification of person.
  15. debut (array) – category wise debut movies or show of person.
  16. relations (array) – Wife, Husband, Son, Daughter and other relations.

Episodes API –

End Point – https://api2.plansinfo.com/v6/ott/episodes

Example– https://api2.plansinfo.com/v6/ott/episodes?contentId=21133&token=jjhhh

Request Parameters

  1. contentId (Integer) – Id of the show.
Response Object –
  1. episodes (array) – Array of episodes.
  2. seasonNumber (int)- Number of season.
  3. episodeNumber (int) – Number of episode.
  4. episodeName (varchar) – Name of episode.
  5. releaseDate (DateTime)- Release date of episode.
  6. description (Text) – Description of episode.
  7. crew (array) – Array of Crew . Crew object is similar as content details API.

Webhook –

You can set up a webhook to receive real-time updates when contents are added or modified.

Our server will post a JSON payload at URL provided by you.

Payload Objects-

  1. service (VARCHAR)- Its value will be OTT always (reserved for future).
  2. event (VARCHAR)- It’s value can be INSERT, UPDATE, DELETE or SYNC. (For now, please ignore this parameter and use a common logic to handle all events)
  3. entityType (VARCHAR)- It’s value will be CONTENT, (For now there is a single endpoint to get rating and content details, so please ignore this parameter)
  4. entityId (INT)- An unique identifier of content.
Sample Webhook data-
    "event": "INSERT",
    "service": "OTT",
    "entityType": "CONTENT",
    "entityId": 26372
Sample PHP code to read webhook response –
//read posted JSON data
//get entitId from data
//call content details API to get details and update content in your database
//if update is success
echo "success"; //display any text like success or done .
//in case of failure 
//http_response_code(500); //500 or any response code not equal to 200 are treated as //failure.
//echo "failed"; //display any text like failed or error message .


Once you receive a webhook request from our server, please call our API to get content details and update data in your database. Please send HTTP Code 200 if your update is done, all other HTTP codes will be treated as an error. Our server will try maximum 3 times for a single webhook in case of error.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Check Also
Back to top button