Schemas

Errors

1
2
3
4
5
6
7
8
[
  {
    "code": "SomeErrorCode",
    "title": "TITLE_OF_THE_DOMAIN_ERROR",
    "details": "Some error happened",
    "ref": "https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/apioverview/#errors"
  }
]
Name Type Required Description
anonymous [Error] false none

Error

1
2
3
4
5
6
{
  "code": "SomeErrorCode",
  "title": "TITLE_OF_THE_DOMAIN_ERROR",
  "details": "Some error happened",
  "ref": "https://developers.masstack.com/en/docs/apis_provision_doc_swagger/1/apioverview/#errors"
}
Name Type Required Description
code string false none
title string false none
details string false none
ref string false Optional reference URL (used by Netflix)

WorkflowResponse

1
2
3
4
5
{
  "message": "message",
  "workflowId": "workflowId",
  "runId": "workflowId"
}
Name Type Required Description
message string false none
workflowId string false none
runId string false none

CreateSubscriptionBody

1
2
3
4
5
6
7
{
  "subscriptionId": "ENT1664367665579",
  "products": [
    "com.disney.yoigo.es.bundle.basic",
    "com.disney.yoigo.es.bundle.premium"
  ]
}
Name Type Required Description
subscriptionId string true The subscriptionId will be sent as the entitlement ID, an unique identifier of product(s) to which a customer is entitled.
products Products true List of product identifiers.

ModifySubscriptionBody

1
2
3
4
5
6
{
  "products": [
    "com.disney.yoigo.es.bundle.basic",
    "com.disney.yoigo.es.bundle.premium"
  ]
}
Name Type Required Description
products Products true List of product identifiers.

SuspendSubscriptionBody

1
2
3
4
5
6
{
  "products": [
    "com.disney.yoigo.es.bundle.basic",
    "com.disney.yoigo.es.bundle.premium"
  ]
}
Name Type Required Description
products Products true List of product identifiers.

ReactivateSubscriptionBody

1
2
3
4
5
6
{
  "products": [
    "com.disney.yoigo.es.bundle.basic",
    "com.disney.yoigo.es.bundle.premium"
  ]
}
Name Type Required Description
products Products true List of product identifiers.

SubscriptionStatus

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "entitled": "ACTIVE",
  "cancellation": "VOLUNTARY",
  "products": [
    "com.disney.yoigo.es.bundle.basic",
    "com.disney.yoigo.es.bundle.premium"
  ],
  "activated": "LINKED",
  "lastUpdated": "2019-08-24T14:15:22Z"
}
Name Type Required Description
entitled string true Status field indicating whether the subject can watch content.
cancellation string false Indicates why a subscription has been canceled.
products Products true List of product identifiers.
activated string true The status of an active subscription
lastUpdated string(date-time) true ISO-8601 timestamp indicating when this subscription was last updated.
Property Values
entitled one of [ACTIVE, BILLING_HOLD, CANCELED, GRACE_PERIOD]
cancellation one of [VOLUNTARY, INVOLUNTARY, PLAN_SWITCHED, ABUSE_REVOCATION, UNKNOWN]
activated one of [LINKED, UNLINKED]

ActivationUrlRequest

1
2
3
4
5
6
7
8
{
  "products": [
    "com.disney.yoigo.es.bundle.basic",
    "com.disney.yoigo.es.bundle.premium"
  ],
  "country": "ES",
  "expireDate": "2021-01-01T00:00:00Z"
}
Name Type Required Description
products Products true List of product identifiers.
country string true none
expireDate string(date-time) true ISO-8601 timestamp indicating when the activation will expire

ActivationUrlResponse

1
2
3
4
{
  "expiryDate": "2023-06-20T14:32:45+02:00",
  "url": "https://www.example.com/activation/123"
}
Name Type Required Description
expiryDate string false Date when activation URL expires in ISO 8601 format.
url string true Activation URL.

Products

1
2
3
4
[
  "com.disney.yoigo.es.bundle.basic",
  "com.disney.yoigo.es.bundle.premium"
]
None

CreateSubscription

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "external_id": "external_subscription_12345",
  "billing_event_id": "e307f177-091a-4840-9830-dda1c29eea44",
  "bundle_id": "c2a45099-1cda-4178-83a8-02c02356ea01",
  "channel": "WEB",
  "netflix_email": "test@email.com",
  "netflix_offer_id": "2106f808-36e9-402d-bf37-f1f7fa04776b",
  "netflix_phone": "+525512345678",
  "partner_account_id": 4567890123456789,
  "partner_charge_country": "ES",
  "preferred_language": "es-ES"
}
Name Type Required Description
external_id ExternalID false Identifier of the subscription on the CRM
billing_event_id BillingEventID false Reference identifier used for tracking/reconciliation. Max 1024 bytes.
bundle_id BundleID true Describes your bundle offers. Each of your offers should correspond to a unique BundleID.
channel Channel false Channel used to sign up for the Bundle.
netflix_email Email false Customer’s primary email address (standard email format).
netflix_offer_id OfferID true Pre-agreed UUID for each Netflix plan available in your bundle offers.
netflix_phone Phone false E.164 format. +[CountryCode][PhoneNumber]
partner_account_id PartnerAccountId true Partner Account Identifier (PAI) to associate a partner account with a Netflix account.
partner_charge_country PartnerChargeCountry false Two letter codes that conform to ISO 3166-1
preferred_language PreferredLanguage false Language preferred for contact.

EnrollDigitalVirgoSubscription

1
2
3
4
{
  "phone_number": "+525512345678",
  "pai": "123456"
}
Name Type Required Description
phone_number Phone true E.164 format. +[CountryCode][PhoneNumber]
pai Pai false Pai number to identify subscription.

EnrollDigitalVirgoSubscriptionResponse

1
2
3
{
  "id": 4567890123456789
}
Name Type Required Description
id SubscriptionId false Subscription identifier. Corresponds to the Partner Account Identifier (PAI).

GenerateUrl

1
2
3
4
5
6
7
8
{
  "channel": "WEB",
  "partner_charge_country": "ES",
  "promotion_id": "PROMO_ID",
  "token_error_url": "https://www.example.com/error/token",
  "type": "BUNDLE",
  "validity_duration_in_seconds": 43200
}
Name Type Required Description
channel BundleActivationChannel false Channel used to activate the Bundle.
partner_charge_country PartnerChargeCountry false Two letter codes that conform to ISO 3166-1
promotion_id PromotionID false PromotionID agreed upon with Netflix. Applies to prepaid promotion integrations.
token_error_url TokenErrorURL true URL where Netflix can redirect the user when token is invalid.
type TokenType true The token type indicates the purpose of the token and its intended usage.
validity_duration_in_seconds ValidityDurationInSeconds false For ACCOUNT_RECOVERY token type only. Up to 24 hours.

GenerateUrlResponse

1
2
3
4
5
{
  "expiry_date": "2023-05-20T14:32:45+02:00",
  "token": "73e90548-b839-423f-be6d-7ed715de656e",
  "requested_securitized_url": "https://www.sandbox.netflix.com/partner/home?ptoken=73e90548-b839-423f-be6d-7ed715de656e"
}
Name Type Required Description
expiry_date TokenExpiryDate false Date when token expires in ISO 8601 format.
token Token false Token value is a unique identifier based on UUID
requested_securitized_url RequestedSecuritizedUrl false RequestedSecuritizedUrl use token value to reference a Netflix url

GetSubscriptionStatusResponse

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "has_partner_mop": true,
  "product_type": "string",
  "subscription": {
    "plan": {
      "localized_type": "string",
      "type": "string"
    }
  },
  "bundle": {
    "id": "string",
    "offer_id": "string",
    "status": "string"
  }
}
Name Type Required Description
has_partner_mop boolean false none
product_type string false none
subscription Subscription false none
bundle Bundle false none

Subscription

1
2
3
4
5
6
{
  "plan": {
    "localized_type": "string",
    "type": "string"
  }
}
Name Type Required Description
plan Plan false none

Plan

1
2
3
4
{
  "localized_type": "string",
  "type": "string"
}
Name Type Required Description
localized_type string false none
type string false none

Bundle

1
2
3
4
5
{
  "id": "string",
  "offer_id": "string",
  "status": "string"
}
Name Type Required Description
id string false none
offer_id string false none
status string false none

FetchSubscriptionEventsResponse

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "events": [
    {
      "bundle_id": "c2a45099-1cda-4178-83a8-02c02356ea01",
      "event_type": "BUNDLE_ACTIVATION",
      "netflix_event_id": "5a875d71-7deb-4693-a4d0-ae97aac9da8a",
      "netflix_offer_id": "2106f808-36e9-402d-bf37-f1f7fa04776b",
      "original_netflix_transaction_id": "e307f177-091a-4840-9830-dda1c29eea44",
      "partner_account_id": 4567890123456789,
      "partner_reference_id": "e307f177-091a-4840-9830-dda1c29eea44",
      "timestamp": 1683710542
    }
  ],
  "next_page_offset": "7hysgqtGuaiqbVyqiIaNhjqqqq811lsU=="
}
Name Type Required Description
events [SubscriptionEvent] false List of zero or more Event objects that are relevant to the time period defined by startTimestamp and endTimestamp
next_page_offset string false A value to retrieve subsequent pages for the same period.

Suspend

1
2
3
4
5
{
  "external_id": "external_subscription_12345",
  "suspend_event_id": "c2a45099-1cda-4178-83a8-02c02356ea01",
  "reason": "PAYMENT_INSTRUMENT_FAILURE"
}
Name Type Required Description
external_id ExternalID false Identifier of the subscription on the CRM
suspend_event_id string true Partner-provided reference identifier for the suspend event.
reason string true none

Reactivate

1
2
3
4
{
  "external_id": "external_subscription_12345",
  "reactivate_event_id": "c2a45099-1cda-4178-83a8-02c02356ea01"
}
Name Type Required Description
external_id ExternalID false Identifier of the subscription on the CRM
reactivate_event_id string true Partner-provided reference identifier for the reactivate event.

UpdateSubscription

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "external_id": "external_subscription_12345",
  "billing_event_id": "e307f177-091a-4840-9830-dda1c29eea44",
  "bundle_id": "c2a45099-1cda-4178-83a8-02c02356ea01",
  "channel": "WEB",
  "netflix_email": "test@email.com",
  "netflix_offer_id": "2106f808-36e9-402d-bf37-f1f7fa04776b",
  "netflix_phone": "+525512345678",
  "partner_charge_country": "ES",
  "preferred_language": "es-ES"
}
Name Type Required Description
external_id ExternalID false Identifier of the subscription on the CRM
billing_event_id BillingEventID false Reference identifier used for tracking/reconciliation. Max 1024 bytes.
bundle_id BundleID false Describes your bundle offers. Each of your offers should correspond to a unique BundleID.
channel Channel false Channel used to sign up for the Bundle.
netflix_email Email false Customer’s primary email address (standard email format).
netflix_offer_id OfferID false Pre-agreed UUID for each Netflix plan available in your bundle offers.
netflix_phone Phone false E.164 format. +[CountryCode][PhoneNumber]
partner_charge_country PartnerChargeCountry false Two letter codes that conform to ISO 3166-1
preferred_language PreferredLanguage false Language preferred for contact.

ExternalID

1
"external_subscription_12345"
Name Type Required Description
anonymous string false Identifier of the subscription on the CRM

BillingEventID

1
"e307f177-091a-4840-9830-dda1c29eea44"
Name Type Required Description
anonymous string false Reference identifier used for tracking/reconciliation. Max 1024 bytes.

BundleActivationChannel

1
"WEB"
Name Type Required Description
anonymous string false Channel used to activate the Bundle.

BundleID

1
"c2a45099-1cda-4178-83a8-02c02356ea01"
Name Type Required Description
anonymous string false Describes your bundle offers. Each of your offers should correspond to a unique BundleID.

Channel

1
"WEB"
Name Type Required Description
anonymous string false Channel used to sign up for the Bundle.

Email

1
"test@email.com"
Name Type Required Description
anonymous string false Customer’s primary email address (standard email format).

OfferID

1
"2106f808-36e9-402d-bf37-f1f7fa04776b"
Name Type Required Description
anonymous string false Pre-agreed UUID for each Netflix plan available in your bundle offers.

PartnerAccountId

1
4567890123456789
Name Type Required Description
anonymous string false Partner Account Identifier (PAI) to associate a partner account with a Netflix account.

PartnerChargeCountry

1
"ES"
Name Type Required Description
anonymous string false Two letter codes that conform to ISO 3166-1

Phone

1
"+525512345678"
Name Type Required Description
anonymous string false E.164 format. +[CountryCode][PhoneNumber]

Pai

1
"123456"
Name Type Required Description
anonymous string false Pai number to identify subscription.

PreferredLanguage

1
"es-ES"
Name Type Required Description
anonymous string false Language preferred for contact.

PromotionID

1
"PROMO_ID"
Name Type Required Description
anonymous string false PromotionID agreed upon with Netflix. Applies to prepaid promotion integrations.

SubscriptionEvent

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "bundle_id": "c2a45099-1cda-4178-83a8-02c02356ea01",
  "event_type": "BUNDLE_ACTIVATION",
  "netflix_event_id": "5a875d71-7deb-4693-a4d0-ae97aac9da8a",
  "netflix_offer_id": "2106f808-36e9-402d-bf37-f1f7fa04776b",
  "original_netflix_transaction_id": "e307f177-091a-4840-9830-dda1c29eea44",
  "partner_account_id": 4567890123456789,
  "partner_reference_id": "e307f177-091a-4840-9830-dda1c29eea44",
  "timestamp": 1683710542
}
Name Type Required Description
bundle_id BundleID false Describes your bundle offers. Each of your offers should correspond to a unique BundleID.
event_type string false Type of subscription event.
netflix_event_id string false Unique ID per event (useful for deduplication).
netflix_offer_id OfferID false Pre-agreed UUID for each Netflix plan available in your bundle offers.
original_netflix_transaction_id string false Depends on event type. See API docs.
partner_account_id PartnerAccountId false Partner Account Identifier (PAI) to associate a partner account with a Netflix account.
partner_reference_id string false Depends on event type. See API docs.
timestamp integer(int64) false Time in seconds since UNIX epoch when event occurred.

SubscriptionEventType

1
"BUNDLE_ACTIVATION"
Name Type Required Description
anonymous string false Subscription event type

SubscriptionId

1
4567890123456789
Name Type Required Description
anonymous string false Subscription identifier. Corresponds to the Partner Account Identifier (PAI).

Token

1
"73e90548-b839-423f-be6d-7ed715de656e"
Name Type Required Description
anonymous string false Token value is a unique identifier based on UUID

RequestedSecuritizedUrl

1
"https://www.sandbox.netflix.com/partner/home?ptoken=73e90548-b839-423f-be6d-7ed715de656e"
Name Type Required Description
anonymous string false RequestedSecuritizedUrl use token value to reference a Netflix url

TokenErrorURL

1
"https://www.example.com/error/token"
Name Type Required Description
anonymous string false URL where Netflix can redirect the user when token is invalid.

TokenExpiryDate

1
"2023-05-20T14:32:45+02:00"
Name Type Required Description
anonymous string false Date when token expires in ISO 8601 format.

TokenType

1
"BUNDLE"
Name Type Required Description
anonymous string false The token type indicates the purpose of the token and its intended usage.

ValidityDurationInSeconds

1
43200
Name Type Required Description
anonymous integer(int32) false For ACCOUNT_RECOVERY token type only. Up to 24 hours.

EndTimestamp

1
1683796942
Name Type Required Description
anonymous integer(int64) false Timestamp (UNIX epoch seconds) to filter events before a specific time.

StartTimestamp

1
1683710542
Name Type Required Description
anonymous integer(int64) false Timestamp (UNIX epoch seconds) to filter events on or after a specific time.