PPV Object

Methods: create | update | delete | list | addmedia | deletemedia | listmedia | addbuyer | updatebuyer | deletebuyer | listbuyers | contacts | updatecontacts

create

create subscription.

Input parameters

Required parameters:

  • String apikey (Api key)
  • String name (subscription name)
  • String subscription_type ( Options are: subscription - pay per view access, password - password access, collection - registration form)

Required parameters (partly optional):

  • Integer period (period of subscription in days)
  • Date access_expire (access expiration date of subscription as YYYY-MM-DD, for example 2018-12-31. Also you can send us exact time, including hours, minutes and seconds as YYYY-MM-DD H:i:s. For example, 2018-12-31 14:01:55. If you send us date only, we will set time by default as 23:59:59)

Optional parameters:

  • String type (subscription type) Options are: single, group. Single by default.
  • String description (description of subscription)
  • String collection_type (Only for subscription_type=collection. Options are: collect - allow access to media when viewer fills in the form и protect - check viewer in the Customer list and allow access if there is)
  • Double cost (subscription cost)
  • Date access_start (access start date of subscription as YYYY-MM-DD, for example 2018-12-31. Also you can send us exact time, including hours, minutes and seconds as YYYY-MM-DD H:i:s. For example, 2018-12-31 14:01:55. If you send us date only, we will set time by default as 00:00:01)
  • Integer activation (Number of password activation)
  • String materials (Additional materials)
  • String buy_redirect_url (URL where user redirects after purchasing)
  • String custom_url (Link for email letter)
  • Boolean ip_recovery (Recover session by IP)
  • Boolean device_ban (Ban concurrent multidevice access)
  • Boolean buyer_commission (Set commission of payment gateway to customer )
  • Boolean downloadable_origin (Allow to download video at the end. It is allowed only with DRM)
  • Integer preview (Preview time before payment request. It is allowed only with DRM)
  • Boolean watermark (Turn on watermark. It is allowed only with DRM)
  • Boolean watermark_email (Show email of customer as watermark. It is allowed only with DRM)
  • Boolean watermark_name (Show name of customer as watermark. It is allowed only with DRM)
  • Boolean watermark_ip (Show ip address of customer as watermark. It is allowed only with DRM)

Output parameters

  • String code (subscription code)
  • String name (subscription name)
  • String type (subscription type)
  • Double cost (subscription cost)
  • Integer period (period of subscription)
  • DateTime AccessExpirationDate (access expiration date of subscription)
  • String description (description of subscription)

Sample query:

https://boomstream.com/api/ppv/create?apikey=[API_KEY]&name=ppv&type=group&cost=100.00&period=1&description=some%20ftext

Sample response:

<Response>
  <Items>
    <Item>
      <Code>X150Kl1d</Code>
      <Name>ppv</Name>
      <Type>group</Type>  
      <Cost>100.00</Cost>
      <Period>1</Period>
      <AccessExpirationDate>2018-12-12 23:59:00</AccessExpirationDate>
      <Description>some text</Description>
    </Item>
  </Items>
  <Status>Success</Status>
</Response>

update

Update information about subscription.

Input parameters

Required parameters:

  • String apikey (Api key)
  • String code (subscription code)

Optional parameters:

  • String name (subscription name)
  • Double cost (subscription cost)
  • String collection_type (Only for subscription_type=collection. Options are: collect - allow access to media when viewer fills in the form и protect - check viewer in the Customer list and allow access if there is)
  • Integer period (period of subscription)
  • Date access_expire (access expiration date of subscription as YYYY-MM-DD, for example 2018-12-31. Also you can send us exact time, including hours, minutes and seconds as YYYY-MM-DD H:i:s. For example, 2018-12-31 14:01:55. If you send us date only, we will set time by default as 23:59:59)
  • Date access_start (access start date of subscription as YYYY-MM-DD, for example 2018-12-31. Also you can send us exact time, including hours, minutes and seconds as YYYY-MM-DD H:i:s. For example, 2018-12-31 14:01:55. If you send us date only, we will set time by default as 00:00:01)
  • String description (description of subscription)
  • Integer activation (Number of password activation)
  • String materials (Additional materials)
  • String buy_redirect_url (URL where user redirects after purchasing)
  • String custom_url (Link for email letter)
  • Boolean ip_recovery (Recover session by IP)
  • Boolean device_ban (Ban concurrent multidevice access)
  • Boolean buyer_commission (Set commission of payment gateway to customer )
  • Boolean downloadable_origin (Allow to download video at the end. It is allowed only with DRM)
  • Integer preview (Preview time before payment request. It is allowed only with DRM)
  • Boolean watermark (Turn on watermark. It is allowed only with DRM)
  • Boolean watermark_email (Show email of customer as watermark. It is allowed only with DRM)
  • Boolean watermark_name (Show name of customer as watermark. It is allowed only with DRM)
  • Boolean watermark_ip (Show ip address of customer as watermark. It is allowed only with DRM)

Output parameters

  • String name (subscription name)
  • Double cost (subscription cost)
  • Integer period (period of subscription)
  • DateTime AccessExpirationDate (access expiration date of subscription)
  • String descrioption (description of subscription)

Sample query:

https://boomstream.com/api/ppv/update?apikey=[API_KEY]&code=X150Kl1d&name=payperview&cost=500.00&period=10&description=text

Sample response:

<Response>
  <Items>
    <Item>
      <Code>X150Kl1d</Code>
      <Name>payperview</Name>
      <Cost>500.00</Cost>
      <Period>10</Period>
      <AccessExpirationDate>2018-12-12 23:59:00</AccessExpirationDate>
      <Description>text</Description>
    </Item>
  </Items>
  <Status>Success</Status>
</Response>

delete

Delete subscription.

Input parameters

Required parameters:

  • String apikey (Api key)
  • String code (subscription code)

Sample query:

https://boomstream.com/api/ppv/delete?apikey=[API_KEY]&code=X150Kl1d

Sample response:

<Response>
  <Status>Success</Status>
</Response>

list

Get list of subscriptions.

Input parameters

Required parameters:

  • String apikey (Api key)

Sample query:

https://boomstream.com/api/ppv/list?apikey=[API_KEY]

Sample response:

<Response>
  <Items>   
    <Item>
      <Name>ppv</Name>
      <Code>X150Kl1d</Code>
      <Cost>100.00</Cost>
      <Period>100.00</Period>
      <AccessExpirationDate>2018-12-12 23:59:00</AccessExpirationDate>
      <AmountFiles>4</AmountFiles>
      <Type>group</Type>
      <AddedDate>2015-12-12 23:23:23</AddedDate>
      <Description>Test</Description>
    </item>
  </Items>  
  <Status>Success</Status>
</Response>

addmedia

Add media file to subscription.

Input parameters

Required parameters:

  • String apikey (Api key)
  • String code (subscription code)
  • String media (media code)

Sample query:

https://boomstream.com/api/ppv/addmedia?apikey=[API_KEY]&code=X150Kl1d&media=xxxxxxxx

Sample response:

<Response>
  <Medias>
    <Item>
      <Title>Тестовое видео</Title>
      <Code>xxxxxxxx</Code>
      <PublishKey></PublishKey>
      <OnlineStatus>False</OnlineStatus>
      <RecordStatus>False</RecordStatus>
      <Concurrent>0</Concurrent>
      <CreationDate>2015-01-29 15:05:58</CreationDate>
      <Type>video</Type>
      <Width>640</Width>
      <Height>480</Height>
      <MediaStatus>Done</MediaStatus>
      <Duration>14</Duration>
      <PlayerCode>&amp;lt;iframe ...... &amp;lt;/iframe&amp;gt;</PlayerCode>
              <DownloadLink>https://bs.boomstream.com/balancer/hash:1234567890/xxxxxxxx.orig</DownloadLink>
         <Poster>
           <Code>xxxxxxxx-a1</Code>
           <Width>640</Width>
           <Height>480</Height>
           <Url>https://bs.boomstream.com/balancer/xxxxxxxx-a1.jpg</Url>
         </Poster>
         <Transcodes>
           <Item>
             <Code>xxxxxxxx-f33ubar5</Code>
             <Title>240p</Title>
             <Width>320</Width>
             <Height>240</Height>
             <PseudoMP4>https://bs.boomstream.com/balancer/xxxxxxxx-f33ubar5.mp4</PseudoMP4>
             <AppleHLS>https://bs.boomstream.com/balancer/xxxxxxxx-f33ubar5/playlist.m3u8</AppleHLS>
           </Item>
         </Transcodes>
         <Adaptive>
	   <AppleHLS>https://bs.boomstream.com/adaptive/xxxxxxxx/playlist.m3u8</AppleHLS>
	 </Adaptive>
         <Screenshots>
           <Item>
             <Code>xxxxxxxx-a1</Code>
             <Width>640</Width>
             <Height>480</Height>
             <Url>https://bs.boomstream.com/balancer/xxxxxxxx-a1.jpg</Url>
            </Item>
          </Screenshots>
    </Item>
  </Medias>
  <Status>Success</Status>
</Response>

deletemedia

Delete media from subscription.

Input parameters

Required parameters:

  • String apikey (Api key)
  • String code (subscription code)
  • String media (media-file code)

Sample query:

https://boomstream.com/api/ppv/deletemedia?apikey=[API_KEY]&code=X150Kl1d&media=xxxxxxxx

Sample response:

<Response>
  <Status>Success</Status>
</Response>

listmedia

Get list of media-files from subscription.

Input parameters

Required parameters:

  • String apikey (Api key)
  • String code (subscription code)

Optional parameters:

  • Integer limit (Items count)
  • Integer offset (Items offset).

Sample query:

https://boomstream.com/api/ppv/listmedia?apikey=[API_KEY]&code=X150Kl1d

Sample response:

<Response>
  <Medias>
    <Item>
       <Title>Тестовое видео</Title>
       <Code>xxxxxxxx</Code>
       <PublishKey></PublishKey>
       <OnlineStatus>False</OnlineStatus>
       <RecordStatus>False</RecordStatus>
       <Concurrent>0</Concurrent>
       <CreationDate>2015-01-29 15:05:58</CreationDate>
       <Type>video</Type>
       <Width>640</Width>
       <Height>480</Height>
       <MediaStatus>Done</MediaStatus>
       <Duration>14</Duration>
       <PlayerCode>&amp;lt;iframe ...... &amp;lt;/iframe&amp;gt;</PlayerCode>
              <DownloadLink>https://bs.boomstream.com/balancer/hash:1234567890/xxxxxxxx.orig</DownloadLink>
       <Poster>
         <Code>xxxxxxxx-a1</Code>
         <Width>640</Width>
         <Height>480</Height>
         <Url>https://bs.boomstream.com/balancer/xxxxxxxx-a1.jpg</Url>
       </Poster>
       <Transcodes>
        <Item>
          <Code>xxxxxxxx-f33ubar5</Code>
          <Title>240p</Title>
          <Width>320</Width>
          <Height>240</Height>
          <PseudoMP4>https://bs.boomstream.com/balancer/xxxxxxxx-f33ubar5.mp4</PseudoMP4>
          <AppleHLS>https://bs.boomstream.com/balancer/xxxxxxxx-f33ubar5/playlist.m3u8</AppleHLS>
        </Item>
      </Transcodes>
      <Adaptive>
        <AppleHLS>https://bs.boomstream.com/adaptive/xxxxxxxx/playlist.m3u8</AppleHLS>
      </Adaptive>
      <Screenshots>
        <Item>
          <Code>xxxxxxxx-a1</Code>
          <Width>640</Width>
          <Height>480</Height>
          <Url>https://bs.boomstream.com/balancer/xxxxxxxx-a1.jpg</Url>
        </Item>
      </Screenshots>
    </Item>
  </Medias>
  <Status>Success</Status>
</Response>

addbuyer

Add customer to subscription.

Input parameters

Required parameters:

  • String apikey (Api key)
  • String code (subscription code)
  • String media (media-file code)
  • Boolean notification (Send notification to email)

Alternative parameters:

  • String email (customers email)
  • String phone (customers phone. There is not sms notification)

Optional parameters:

  • String name (customers name)
  • Integer activation (Number of password activation)
  • Date access_start (access start date of subscription as YYYY-MM-DD, for example 2018-12-31. Also you can send us exact time, including hours, minutes and seconds as YYYY-MM-DD H:i:s. For example, 2018-12-31 14:01:55. If you send us date only, we will set time by default as 00:00:01)
  • Date access_expire (access expiration date as YYYY-MM-DD, for example 2018-12-31. Also you can send us exact time, including hours, minutes and seconds as YYYY-MM-DD H:i:s. For example, 2018-12-31 14:01:55. If you send us date only, we will set time by default as 23:59:59)
  • String custom_url (Link for email letter)
  • Boolean use_subscription_custom_url (Use link for email used in a subscription)

If both custom_url and use_subscription_custom_url are specified then custom_url has more priority.

Sample query:

https://boomstream.com/api/ppv/addbuyer?apikey=[API_KEY]&code=X150Kl1d&media=xxxxxxxx&email=example@example.com&notification=1

Sample response:

<Response>
<Items>
    <Item>
      <Email>example@example.com</Email>
      <Hash>123456789</Hash>
      <Period>30</Period>
      <AccessStartDate>2018-12-11 23:59:00</AccessStartDate>
      <AccessExpirationDate>2018-12-12 23:59:00</AccessExpirationDate>
      <DatePurchase>2015-01-29 15:05:58</DatePurchase>
    </Item>
  </Items>
  <Status>Success</Status>
</Response>

updatebuyer

Update of access password

Input parameters

Required parameters:

  • String apikey (Api key)
  • String code (subscription code)
  • String hash (Access password)

Optional parameters:

  • String name (customers name)
  • Date access_start (access start date of subscription as YYYY-MM-DD, for example 2018-12-31. Also you can send us exact time, including hours, minutes and seconds as YYYY-MM-DD H:i:s. For example, 2018-12-31 14:01:55. If you send us date only, we will set time by default as 00:00:01)
  • Date access_expire (access expiration date as YYYY-MM-DD, for example 2018-12-31. Also you can send us exact time, including hours, minutes and seconds as YYYY-MM-DD H:i:s. For example, 2018-12-31 14:01:55. If you send us date only, we will set time by default as 23:59:59)
  • Integer activation (Number of password activation)

Sample query:

https://boomstream.com/api/ppv/addbuyer?apikey=[API_KEY]&code=X150Kl1d&hash=12345678&activation=4&access_expire=2018-12-31

Sample response:

<Response>
    <Message>Recovery code is updated</Message>
    <Status>Success</Status>
</Response>

deletebuyer

Delete of access password.

Input parameters

Required parameters:

  • String apikey (Api key)
  • String code (subscription code)
  • String hash (Access password)

Sample query:

https://boomstream.com/api/ppv/addbuyer?apikey=[API_KEY]&code=X150Kl1d&hash=12345678

Sample response:

<Response>
    <Message>Recovery code is deleted</Message>
    <Status>Success</Status>
</Response>

listbuyers

List of all customers of subscription.

Current version is 1.1

Input parameters

Required parameters:

  • String apikey (Api key)
  • String code (subscription code)
  • String media (media-file code)

Optional parameters:

  • String email (Filter by email field). Email is not a unique field for buyers, so you can get several results!

Sample query:

https://boomstream.com/api/ppv/listbuyers?apikey=[API_KEY]&code=X150Kl1d&media=xxxxxxxx&email=buyer@example.com&ver=1.1

Sample response:

<Response>
  <Items>
    <Item>
      <Email>example@example.com</Email>
      <Hash>123456789</Hash>
      <Period>30</Period>
      <AccessExpirationDate>2018-12-12 23:59:00</AccessExpirationDate>
      <DatePurchase>2015-01-29 15:05:58</DatePurchase>
    </Item>
  </Items>
  <Status>Success</Status>
</Response>

contacts

Show seller's contacts.

Input parameters

Required parameters:

  • String apikey (Api key)

Output parameters

  • String name (Name of seller)
  • String phone (Phone of seller)
  • String email (Email of shop)
  • String site (Site of shop)
  • String description (Description of shop)

Sample query:

https://boomstream.com/api/ppv/contacts?apikey=[API_KEY]

Sample response:

<Response>
  <Name>Alex</Name>
  <Phone>+0 000 000 000</Phone>
  <Email/>
  <Site/>
  <Description/>
  <Status>Success</Status>
</Response>

updatecontacts

Update seller's contacts.

Input parameters

Required parameters:

  • String apikey (Api key)
  • String name (Seller's name)

Required parameters (partly optional):

  • String phone (Phone of seller)
  • String email (Email of seller)

Optional parameters:

  • String site (Site of shop)
  • String description (Description of shop)

Output parameters

  • String name (Name of seller)
  • String phone (Phone of seller)
  • String email (Email of shop)
  • String site (Site of shop)
  • String description (Description of shop)

Sample query:

https://boomstream.com/api/ppv/updatecontacts?apikey=[API_KEY]&name=Alex&phone=+0 000 000 000

Sample response:

<Response>
  <Name>Alex</Name>
  <Phone>+0 000 000 000</Phone>
  <Email/>
  <Site/>
  <Description/>
  <Message>Updated success</Message>
  <Status>Success</Status>
</Response>