Guides & Articles AdultCentro.Publisher API Documentation
Content API Manual

AdultCentro Publisher Content API Manual

Please note

Starting October 25th, 2012 we have fully switched to the API Platform 2.0 which has proven to be much more efficient. Documentation has been updated accordingly.

 

  • To be able to access AdultCentro Content API you will need to contact the Customer Relations Department at support@adultcentro.com and request an API Integration Pack. Our account managers will provide you with one as soon as possible.
  • Please note that default XML template may not have all the information you are looking for. If this is the case, please let us know and we will add it..
  • The standard way of using the Content API to collect data about DVDs and their scenes consists of 3 steps:
  1. Request information about DVDs;
  2. Request information about a specific DVD using DVD ID;
  3. Request information about a Scene using Scene ID

NOTE: If you have a limited amount of niches enabled for your XML some of provided examples can show up blank due to absence of specific content in your XML.

General

For every action which displays content, you can use pager parameters:

  1. boxPager_of= - field name or field index for sorting

Can be:

a. CONTENTNAME - sort by title

b. LASTPUBLISHDATE - sort by added on date

c. DOWNLOADED - sort by downloads

        2. boxPager_od= - sort flag: 1 - desc, 0 or empty - asc;

        3. boxPager_rpp= - number of results on one page;

        4. boxPager_cp= - pager current page, page numbers can be 1 ... N;

Model Data

showModels - will display full model list.

Model data available:

  • model_id
  • name
  • stage_name
  • first_name
  • last_name
  • image
  • model_sex (activated on request)

1 - male

2 - female 

3 - shemale 

4 - in between 

5 - unknown

Examples:

All models - .../api/boxedpromo/?xml=1&action=showModels

Male models - …/api/boxedpromo/?action=showGalleries&subAction=listModels&model_sex=1

Specific Content Data

The ACP Content API provides a possibility to request Data separately for different Content types including Models, Content Categories, Content Studios, DVDs and Scenes. This data is provided through 'showGalleries' action. This action has several sub actions through a "subAction" parameter:

  1. listModels - this action display models data and allows to filter it by:

a. cast= - coma separated list of models IDs;

b. dvds= - coma separated list of DVDs IDs;

c. letter= - the filter on the first character of a name

d. workMode= - lists content by categories with AND or OR condition. If nothing specified, OR is used by default;

Example: .../api/boxedpromo/?xml=1&action=showGalleries&subAction=listModels&cast=1,2&dvds=2222

      2. listCats - this action display Categories data and allows to filter it by:*

a. cats= - coma separated list of categories’ IDs;

b. dvds= - coma separated list of DVDs’ IDs;

c. workMode= - lists content by categories with AND or OR condition. If nothing specified, OR is used by default;

d. cast= - coma separated list of Model’s Ids

e. hdOnly= - to show filter HD content only

f. scOnly= - shows only softcore content

g. rTag= – lists content by criteria below (may be several, separated by comas)

            |  1  bikini 

            |  2  topless

            |  3  nude

            |  4  hardcore

h. modelName= - filters content by model’s name

i. studios= - displays content by studio IDs (may be listed, separated by comas)

j. cats= - coma separated list of categories’ IDs

k. keywords= - filters content by category names (may be listed, separated by comas)

Example: .../api/boxedpromo/?xml=1&action=showGalleries&subAction=listCats&cats=1,2&dvds=2222

      3. listStudios - this action displays studios  data and allows to filter it by:

a. studios= - coma separated list of Studios IDs;

b. dvds= - coma separated list of DVDs IDs;

c. workMode= - lists content by categories with AND or OR condition. If nothing specified, OR is used by default;

d. cast= - coma separated list of Model’s Ids

e. hdOnly= - to show filter HD content only

f. scOnly= - shows only softcore content

g. rTag= – lists content by criteria below (may be several, separated by comas)

            |  1  bikini 

            |  2  topless

            |  3  nude

            |  4  hardcore

h. modelName= - filters content by model’s name

i. studios= - displays content by studio IDs (may be a coma separated list of studios)

j. cats= - coma separated list of categories’ IDs

k. keywords= - filters content by category names (may be listed, separated by comas)

Use example: .../api/boxedpromo/?xml=1&action=showGalleries&subAction=listStudios&studios=1,2&dvds=2222

      4. listDvds - this action displays DVDs data and allows to filter them by (default sub action): studios, categories (cats) and cast. You can use the following parameters in this subaction:*

a. scenesInfo - this flag can be 1 or 0 and it add into dvds view info about dvd's scenes;

b. letter - the filter on the first character of a name;

c. orientation - this flag can be 1, 2 or 3  (1 - straight, 2 - gay, 3 - shemale)

d. workMode= - lists content by categories with AND or OR condition. If nothing specified, OR is used by default;

e. cast= - coma separated list of Model’s Ids

f. hdOnly= - to show filter HD content only

g. scOnly= - shows only softcore content

h. rTag= – lists content by criteria below (may be several, separated by comas)

            |  1  bikini

            |  2  topless

            |  3  nude

            |  4  hardcore

i. modelName= - filters content by model’s name

j.studios= - displays content by studio IDs (may be a coma separated list of studios)

k. cats= - coma separated list of categories’ IDs

l. keywords= - filters content by category names (may be listed, separated by comas)

Example: .../api/boxedpromo/?xml=1&action=showGalleries&subAction=listDvds&studios=1,2&cats=1,2,3&cast=3,4,1&scenesInfo=1

      5. listScenes - this action display scenes data and allows to filter them by:*

a. scenes= - coma separated list of Scenes IDs;

b. dvds= - coma separated list of DVDs IDs;

c. previews=1 - by using this parameter you request a link to Scenes video previews;

d. formats=1 - by using this parameters you request a list of formats with links to download;

e. orientation - this flag can be 1, 2 or 3  (1 - straight, 2 - gay, 3 - shemale)

f. workMode= - lists content by categories with AND or OR condition. If nothing specified, OR is used by default;

g. cast= - coma separated list of Model’s Ids

h. hdOnly= - to show filter HD content only]

i. scOnly= - shows only softcore content

j. rTag= – lists content by criteria below (may be several, separated by comas)

            |  1  bikini 

            |  2  topless

            |  3  nude

            |  4  hardcore

k. modelName= - filters content by model’s name

l. studios= - displays content by studio IDs (may be a coma separated list of studios)

m. cats= - coma separated list of categories’ IDs

n. keywords= - filters content by category names (may be listed, separated by comas)

Use example: .../api/boxedpromo/?xml=1&action=showGalleries&subAction=listScenes&scenes=1,2&previews=1

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listScenes&dvds=2222&previews=1

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listScenes&formats=1

Mixed Content Data

The API can provide all content data in one single XML. This is done through *'showsets' action. This action displays scenes and allows filtering them by following parameters:*

  1. for - text string which will search in: DVDs/Scenes titles, DVDs/Scenes descriptions and in Model names;
  2. studio - Studio ID;
  3. cat - Category ID;
  4. modelIds - coma separated models’ IDs list;
  5. onlyCats - coma separated categories’ IDs list;
  6. onlyStudios - coma separated studios’ IDs list;
  7. keywords - comma separated keywords. If this parameter is used, then 'cat' parameter will be ignored;
  8. relevant - sorts result by relevance (if equal to 1). Works only with filtering by keywords;
  9. cast=   - coma separated model's IDs list;
  10. scenes=  - coma separated list of Scenes IDs;
  11. dvds=    - coma separated list of DVDs IDs;
  12. studios= - Studio ID;
  13. cats=   -  Category ID;

For example: .../api/boxedpromo/?xml=1&action=showSets&for=Anal&studio=1&cat=1&modelIds=1,2,3&onlyCats=1,2,3&onlyStudios=1,2,3


History Data

showHistory - the function shows changes of DVDs statuses starting from a certain time or over a certain period of time.

DVDs can have 2 statuses:

Published - new DVDs that were added to the system, or DVDs that were updated.
Unpublished - DVDs that were removed from the system temporarily or completely.

showHistory can have the following parameters:

startFrom= - linux style time stamp in ms to show history from. If used all other parameters will be ignored.
contentType= - 1 for DVDs and 2 for scenes, will show both if omited
lastM= - number of months to show history for
lastD= - number of days to show history for
lastH= - number of hours to show history for
If &lastD= and &lastH= and &lastM= are present in the same query, the time spans are added together.

For example: .../api/boxedpromo/?xml=1&action=showHistory&startFrom=1274088555

For example: .../api/boxedpromo/?xml=1&action=showHistory&lastD=3&lastH=22

For exemple: .../api/boxedpromo/?&action=showHistory&lastD=30&xml=1&contentType=2&boxPager_rpp=100&boxPager_cp=1


I have imported all info into my database. What requests shall I use to keep my database up to date?

After importing the full listing once, you only need 2 requests to keep your base up to date.

.../api/boxedpromo/?xml=1&action=showHistory&lastD=1&contentType=1
.../api/boxedpromo/?xml=1&action=showHistory&lastD=1&contentType=2

You can run this script once a day.

If specified content from list is not in your base - ADD
If specified content is already in your base - Delete and replace

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listDvds&workmode=and&boxPager_of=LASTPUBLISHDATE&boxPager_od=1&boxPager_rpp=20&boxPager_cp=1 

this request is showing unpublished content, should run it once a day as well and if specified content is in your base - Delete

New add-on to ShowHistory

Upon multiple requests, a new version of ShowHistory is now available (but not necessary) via an additional parameter in the query - &version=2 and includes the following options:

ShowHistory action has been separated into two different listings:

  • &published
  • &unpublished

If none selected by default, the request will return published listing.

With this new functionality, instead of the current tag: <published>, you may also use:

<Scene published>

<DVD published>

<HD Scene published>

<HD DVD published>

The same specifications are applicable to <unpublished> tag.

An example request that would return such results looks like this:

…/api/boxedpromo/?&action=showHistory&lastD=2&contentType=2&version=2

This will allow you to always keep your base up to date.

 

Examples of requests (NOTE: To make example API queries work you will need to replace ".." with a URL of your website on AdultCentro.Publisher platform)

  • Most downloaded DVDs:

.../api/boxedpromo/?xml=1&action=showGalleries&boxPager_cp=1&boxPager_od=1&boxPager_of=DOWNLOADED&boxPager_rpp=10&subAction=listDvds&workmode=and

 

  • Most downloaded Scenes:

.../api/boxedpromo/?xml=1&action=showGalleries&boxPager_cp=1&boxPager_od=1&boxPager_of=DOWNLOADED&boxPager_rpp=10&subAction=listScenes&workmode=and

 

  • Top rated DVDs:

.../api/boxedpromo/?xml=1&action=showGalleries&boxPager_cp=1&boxPager_od=1 &boxPager_rpp=10&subAction=listDvds&workmode=and

 

  • Top rated Scenes:

.../api/boxedpromo/?xml=1&action=showGalleries&boxPager_cp=1&boxPager_od=1 &boxPager_rpp=10&subAction=listScenes&workmode=and

 

  • List all models that name starts with an A:

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listModels&letter=a&boxPager_od=1&boxPager_rpp=20&boxPager_cp=1

 

  • List all models in alphabetical order:

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listModels&boxPager_of=NAME&boxPager_rpp=100&boxPager_od=0

 

  • List all models from specified DVD:

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listModels&dvds=178719

 

  • Shows DVDs data in a format of 50 DVDs per page, sorted descending by the date when DVDs were added to the system. 

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listDvds&boxPager_rpp=50&boxPager_od=1&boxPager_of=LASTPUBLISHDATE

 

  • Shows available data for DVD with ID=128:

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listDvds&dvds=128

 

  • Shows available data for all Scenes of DVD with ID=128:

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listScenes&dvds=128

 

  • Shows available data for an individual Scene with ID=134:

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listScenes&scenes=134

 

  • Shows 50 available categories per page with their IDs in the system:

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listCats&boxPager_rpp=50

 

  • Shows 50 DVDs per page from Asian niche (ID: 1007) with DVD scenes information:

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listDvds&cats=1007&scenesInfo=1&boxPager_rpp=50

 

  • Shows 50 DVDs per page from Asian niche (ID: 1007) sorting them by date of publish:

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listDvds&cats=1007&scenesInfo=1&boxPager_rpp=50&boxPager_of=LASTPUBLISHDATE&boxPager_od=1

 

  • Shows 50 DVDs per page from Asian (ID: 1007) and Brunette (ID: 26482) niche with DVD scenes information:

.../api/boxedpromo/?xml=1&action=showGalleries&subAction=listDvds&cats=1007,26482&scenesInfo=1&boxPager_rpp=50&workmode=AND



!UPCOMING CHANGES TO THE PUBLISHER API!


Please, get acquainted with the new API access requirements that will eventually be obligatory for using our Publisher API.


  API usage scheme:

  1. generate an access token to API using your AC (Publisher, Cloud or Market) account credentials. (Details in section P2)
  2. request content meta using the already generated access token. (Details in section P3)
  3. import META and format links to your database (Details in section P4)

 

     Required data:

  1. Your AC (Publisher, Cloud or Market) account username
  2. Your AC (Publisher, Cloud or Market) account password

 

 

P2 – Access Token generation: 

 

  • First of all, you need to open up a connection session and get your unique access token to be able to get the content. Keep in mind that this token has a 30 minute lifetime and will expire afterwards, so you will need to get a new one for the following queries after this token expires (Please note that our server works on default worldwide time, which is GMT+0)

 

The following query is used in order to generate an access token:

 

http://crm.adultcentro.com/cloud/authorize.php?username={username}&password={password}&output=json

 

Where:

  • username - Your AC (Publisher, Cloud or Marker) account username
  • password -  Your AC (Publisher, Cloud or Marker) account password
  • output - Can be xml or json (response examples below are shown in json format)

 

In case of correct username and password, you'll get the following success response: 

 

{"status":true,"response":{"accessToken":"64 byte key","expire":"2014-04-17 06:40:48"}}

 

In the response, you can find the token itself as well as the expiration time and date.

 

In case your username or password are not correct, you will get the following error response: 

 

{"status":false,"error":"Illegal credentials"}

 

 In this case, please check your username and password for spaces or typos.

 

_______________________________________________________________________________________

 

Implementation

 

Example (php): 

 

function getAccessToken($username, $password) {

 

    $query = ‘http://crm.adultcentro.com/cloud/authorize.php?' . http_build_query(array(

 

            'username' => $username,

 

            'password' => $password,

 

            ‘output’ => ‘json’

 

    ));

 

 
    if (!isset($resJson['status'])) {

 

        throw new Exception("Illegal response: " . $res);

 

    } else if (!$resJson['status']) {

 

        throw new Exception("Service error: " . $resJson['error']);

 

    }

 

 
    $res = serviceRequest($query);

 

    $resJson = json_decode($res, true);

 

 
    if (!empty($resJson[‘response’]['accessToken'])) {

 

        return $resJson[‘response’]['accessToken'];

 

    }

 

 
    throw new Exception("Cannot get access token. Service response: " . $res);

 

}

 

After that you will be able to use the token you have received to navigate through the API and execute all of the available queries, for example:

 

http://example.api.membercms.com/api/boxedpromo/?action=showGalleries&subAction=listScenes&accessToken=39b06e6f83f523901054dba9efe9f7f59f28eae6687d99f0777ba8028937959b

{literal} {/literal}