# SVOD

Subscription Video On Demand

A subscription will give access to a range of products for a given period.

# List SVOD Products

ProductSVOD represents a subscription product in the API. Available subscriptions can be retrieved with the following query :

query SVODProducts {
  cms {
    products(query: "type:SVOD") {
      items {
        id
        name
        extension {
          ... on ProductSVOD {
            accessPeriod
            autoRenewal
            trialPeriod
            accessModes {
              id
              priceFormat
            }
          }
        }
      }
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

# Active SVOD Accesses

To retrieve the user's active subscriptions, use user.accesses and query for type:SVOD.

query ActiveSubscriptions {
  user {
    accesses(query: "type:SVOD") {
      items {
        id
        dateExp
        dateRenewal
        recurring
        type
        product {
          id
          name
        }
      }
    }
  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# Toggle Renewal

If the subscription uses a Payment Gateway (ProductAccess.gateway) which supports recurring payments, you can enable/disable the renewal with the toggleAccessRenewal mutation:

mutation ToggleRenewal {
  toggleAccessRenewal(access: "55")
}
1
2
3