Subscriptions

Subscription resource contains all the data applicable to any kind of subscription regardless its type


Parameters

Name In Type Required Description
offset query integer false Pagination offset
limit query integer false Pagination limit
org path string true Organization name
id path string true subscriptions bundle unique identifier
mandatory query boolean false Mandatory subscription filter
status query SubscriptionStatusFilterEnum false Subscription status filter
type query SubscriptionType false Subscription type

Request example

1
2
3
4
5

curl -X GET https://subscriptions.masstack.com/v2/orgs/yoigo/bundles/ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39/subscriptions?offset='0'&limit='50'&mandatory='true'&status={"eq":"ACTIVE","in":["ACTIVE"]}&type='NETFLIX' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK OK SubscriptionsSet
403 Forbidden Forbidden access ErrorResponse
404 Not Found A bundle with the specified id was not found ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
default Default Any client or server error ErrorResponse

Parameters

Name In Type Required Description
offset query integer false Pagination offset
limit query integer false Pagination limit
org path string true Organization name
legacy_id query integer false Legacy id. Required if ‘legacy_account_id’, ‘account_id’ or legacy_bundle_id filter are not provided.
legacy_account_id query integer false Account id the subscription is linked to. Required if ‘legacy_id’, ‘account_id’ or legacy_bundle_id filter are not provided. Linked to MySim/Apollo storage, to be deprecated.
legacy_bundle_id query integer false Bundle id the subscription is linked to. Required if ‘legacy_id’, ‘account_id’ or legacy_account_id filter are not provided. Linked to MySim/Apollo storage, to be deprecated.
account_id query string false Account id the subscription is linked to. Required if ‘legacy_id’, ‘legacy_account_id’ or legacy_bundle_id filters are not provided.
mandatory query boolean false Mandatory subscription filter
status query SubscriptionStatusFilterEnum false Subscription status filter
type query SubscriptionType false Subscription type
activation_date query DateFilterEnum false Subscriptions activated matching date filter. Available filters are [eq, lt, lte, gt, gte]. Format
according to ISO 8601
deactivation_date query DateFilterEnum false Active subscription or deactivated matching date filter. Available filters are [eq, lt, lte, gt, gte].
Format according to ISO 8601

Request example

1
2
3
4
5

curl -X GET https://subscriptions.masstack.com/v2/orgs/yoigo/subscriptions?offset='0'&limit='50'&legacy_id='26245435'&legacy_account_id='572234234'&legacy_bundle_id='26245435'&account_id='ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39'&mandatory='true'&status={"eq":"ACTIVE","in":["ACTIVE"]}&type='NETFLIX'&activation_date='2023-01-05T03:30:15Z'&deactivation_date='2023-01-05T03:30:15Z' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK OK SubscriptionsSet
403 Forbidden Forbidden access ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
default Default Any client or server error ErrorResponse

Parameters

Name In Type Required Description
org path string true Organization name
id path string true Subscription unique identifier

Request example

1
2
3
4
5

curl -X GET https://subscriptions.masstack.com/v2/orgs/yoigo/subscriptions/ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39 \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK OK Subscription
403 Forbidden Forbidden access ErrorResponse
404 Not Found A subscription with the specified id was not found ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
default Default Any client or server error ErrorResponse

Parameters

Name In Type Required Description
org path string true Organization name
id path string true Subscription unique identifier
body body OperationsSet false Array of operations to be applied to the subscription generic data fields

Request body - JsonObject

1
2
3
4
5
6
7
8
[
  {
    "op": "add",
    "path": "/status",
    "value": "DEACTIVATED",
    "reason": "SUBSCRIBER_REQUESTED"
  }
]
Name Type Required Description
anonymous [Operation] false none

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14

curl -X PATCH https://subscriptions.masstack.com/v2/orgs/yoigo/subscriptions/ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "[
  {
    'op': 'add',
    'path': '/status',
    'value': 'DEACTIVATED',
    'reason': 'SUBSCRIBER_REQUESTED'
  }
]" 

Responses

Code Meaning Description Schema
200 OK OK Subscription
400 Bad Request Bad request ErrorResponse
403 Forbidden Forbidden access ErrorResponse
404 Not Found A subscription with the specified id was not found ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
default Default Any client or server error ErrorResponse

Parameters

Name In Type Required Description
org path string true Organization name
id path string(uuid) true Subscription unique identifier
body body SubscriptionCancellationRequest true Cancellation request

Request body - instance of SubscriptionCancellationRequest

1
2
3
{
  "reason": "SUBSCRIBER_RESIGNATION"
}
Name Type Required Description
reason string true Reason for the cancellation request
Property Values
reason one of [ACCOUNT_MIGRATION, BUNDLE_CANCELLATION, BUNDLE_DEACTIVATION, BUNDLE_MIGRATION, FRAUD_CHECK_REJECTION, OTHER, PAYMENT_ERROR, PROVISIONING_ISSUE, SUBSCRIBER_RESIGNATION]

Request example

1
2
3
4
5
6
7
8
9

curl -X POST https://subscriptions.masstack.com/v2/orgs/yoigo/subscriptions/ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39/cancel \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'reason': 'SUBSCRIBER_RESIGNATION'
}" 

Responses

Code Meaning Description Schema
202 Accepted Cancellation process started None
400 Bad Request Bad request ErrorResponse
403 Forbidden Forbidden access ErrorResponse
404 Not Found A subscription with the specified id was not found ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
default Default Any client or server error ErrorResponse

Parameters

Name In Type Required Description
org path string true Organization name
id path string(uuid) true Subscription’s unique identifier
body body SubscriptionDeactivationRequest true Deactivate subscription data

Request body - instance of SubscriptionDeactivationRequest

1
2
3
4
5
6
7
8
9
{
  "reason": "SUBSCRIBER_RESIGNATION",
  "promotion_commitments_to_cancel": [
    "ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39"
  ],
  "device_commitments_to_cancel": [
    "ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39"
  ]
}
Name Type Required Description
reason string true Reason for the deactivation
promotion_commitments_to_cancel [string] false Promotion commitment IDs to cancel in the deactivation process
device_commitments_to_cancel [string] false Device commitment IDs to cancel in the deactivation process
Property Values
reason one of [ACCOUNT_MIGRATION, BUNDLE_DEACTIVATION, BUNDLE_MIGRATION, FRAUD_CHECK_REJECTION, NON_PAYMENT, OTHER, PAYMENT_ERROR, PROVISIONING_ISSUE, SUBSCRIBER_RESIGNATION]

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15

curl -X POST https://subscriptions.masstack.com/v2/orgs/yoigo/subscriptions/ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39/deactivate \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'reason': 'SUBSCRIBER_RESIGNATION',
  'promotion_commitments_to_cancel': [
    'ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39'
  ],
  'device_commitments_to_cancel': [
    'ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39'
  ]
}" 

Responses

Code Meaning Description Schema
202 Accepted Deactivation process started None
403 Forbidden Forbidden access ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
default Default Any client or server error ErrorResponse

Parameters

Name In Type Required Description
org path string true Organization name
id path string(uuid) true Subscription unique identifier
body body SubscriptionActivationRequest true Activation request

Request body - instance of SubscriptionActivationRequest

1
2
3
{
  "activation_date": "2023-01-01T00:00:00Z"
}
Name Type Required Description
activation_date string(date-time) false Date and time when the subscription is activated. Format according to ISO 8601

Request example

1
2
3
4
5
6
7
8
9

curl -X POST https://subscriptions.masstack.com/v2/orgs/yoigo/subscriptions/ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39/activate \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}" \
 --data-raw "{
  'activation_date': '2023-01-01T00:00:00Z'
}" 

Responses

Code Meaning Description Schema
202 Accepted Activation process started None
400 Bad Request Bad request ErrorResponse
403 Forbidden Forbidden access ErrorResponse
404 Not Found A subscription with the specified id was not found ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
default Default Any client or server error ErrorResponse

Parameters

Name In Type Required Description
offset query integer false Pagination offset
limit query integer false Pagination limit
org path string true Organization name
id path string true Subscription unique identifier
last_updated_date query DateFilterEnum false Changes matching date filter. Available filters are [eq, lt, lte, gt, gte]. Format according to ISO 8601
status query LifeCycleStatus false Subscription status filter

Enumerated Values

Property Values
status one of [REQUESTED, ON_HOLD, PROVISIONING, ACTIVE, DEACTIVATING, DEACTIVATED, CANCELLING, CANCELLED]

Request example

1
2
3
4
5

curl -X GET https://subscriptions.masstack.com/v2/orgs/yoigo/subscriptions/ce2f20cb-35df-4ffe-bca6-c0ed0c28cb39/history?offset='0'&limit='50'&last_updated_date='2023-01-05T03:30:15Z'&status='ACTIVE' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {access-token}"

Responses

Code Meaning Description Schema
200 OK OK SubscriptionsSet
403 Forbidden Forbidden access ErrorResponse
404 Not Found A subscription with the specified id was not found ErrorResponse
500 Internal Server Error Internal server error ErrorResponse
default Default Any client or server error ErrorResponse

Endpoints

Subscriptions

    Bundles

      Promotions

        Devices

          AddOns

            Amazon Prime

              Max

                Mobile

                  Broadband

                    Landline

                      Orange TV

                        Orange TV Libre

                          Disney

                            Netflix

                              Credit Limits

                                Change Requests

                                  Commitments