Subscriptions

Access to subscriptions


Parameters

Name In Type Required Description
org_id path string true Organization name
subscription_id path string true netflix subscription identifier
body body DeactivateNetflixRequest true ‘none’

Request body - instance of DeactivateNetflixRequest

1
2
3
4
5
{
  "deactivation_reason": "BAJA VOLUNTARIA",
  "deactivation_user": "test@test.com",
  "requested_deactivation_date": "2017-09-15T22:00:00Z"
}
Name Type Required Description
deactivation_reason string true Deactivation reason text or id as a string
deactivation_user string false User that requests the deactivation
requested_deactivation_date string(date-time) false deactivation date

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10

curl -X POST https://subscriptions.masstack.com/v1/orgs/masmovil/netflix/1/deactivate \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'deactivation_reason': 'BAJA VOLUNTARIA',
  'deactivation_user': 'test@test.com',
  'requested_deactivation_date': '2017-09-15T22:00:00Z'
}" 

Responses

Code Meaning Description Schema
204 No Content Deactivation process for Netflix subscription successfully accepted None
400 Bad Request Invalid body ErrorMessage
404 Not Found A subscription with the specified id was not found ErrorMessage
500 Internal Server Error Unexpected error ErrorMessage

Parameters

Name In Type Required Description
org_id path string true Organization name
id path string true netflix subscription identifier
body body CancelActivationSubscriptionRequest true ‘none’

Request body - instance of CancelActivationSubscriptionRequest

1
2
3
4
5
{
  "cancellation_reason": "BAJA VOLUNTARIA",
  "cancellation_user": "test@test.com",
  "requested_cancellation_date": "2017-09-15T22:00:00Z"
}
Name Type Required Description
cancellation_reason string true Cancellation reason text or id as a string
cancellation_user string false User that requests the cancellation
requested_cancellation_date string(date-time) false cancellation date

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10

curl -X POST https://subscriptions.masstack.com/v1/orgs/masmovil/netflix/1/cancel \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'cancellation_reason': 'BAJA VOLUNTARIA',
  'cancellation_user': 'test@test.com',
  'requested_cancellation_date': '2017-09-15T22:00:00Z'
}" 

Responses

Code Meaning Description Schema
202 Accepted Cancellation process for Netflix subscription successfully accepted None
400 Bad Request Invalid body ErrorMessage
404 Not Found A subscription with the specified id was not found ErrorMessage
500 Internal Server Error Unexpected error ErrorMessage

400 - instance of ErrorMessage

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "XXX_21201",
      "title": "TITLE_OF_THE_DOMAIN_ERROR",
      "ref": "https://developers.masstack.com/en/docs/apis_domain_doc_swagger/2/apioverview/#erro",
      "details": "string"
    }
  ]
}
Name Type Required Description
errors [ErrorMessageItem] true none

Parameters

Name In Type Required Description
org_id path string true Organization name
id path string true subscription unique identifier

Request example

1
2
3
4

curl -X GET https://subscriptions.masstack.com/v1/orgs/yoigo/subscriptions/5652763 \
  -H "Accept: application/json"

Responses

Code Meaning Description Schema
200 OK OK GetSubscription
404 Not Found A subscription with the specified id was not found ErrorMessage
500 Internal Server Error Unexpected error ErrorMessage

Parameters

Name In Type Required Description
org_id path string true Organization name
id path string true subscription unique identifier
body body PatchSubscription true ‘none’

Request body - instance of PatchSubscription

1
2
3
4
5
6
7
8
9
{
  "subscription_type": "MOBILE",
  "status_change": {
    "status": "ACTIVE",
    "status_change_user": "test@test.com",
    "status_change_reason": "customer request",
    "requested_status_change_date": "2017-09-15T22:00:00Z"
  }
}
Name Type Required Description
subscription_type SubscriptionType true subscription type name. Mapping between Mysim and MasSubscriptions subscription_type
  • PRE-PAGO -> MOBILE
  • POST-PAGO -> MOBILE
  • INTERNET FTTH-> BROADBAND
  • INTERNET ADSL -> BROADBAND
  • FIJO ANALOGICO-> LANDLINE
  • FIJO DIGITAL -> LANDLINE
  • AGILE TV -> TV
  • SECURITY -> SECURITY
  • DATASHARING -> DATASHARING
  • MULTISIM -> MULTISIM
  • DEVICEINSURANCE -> DEVICEINSURANCE
  • NETFLIX -> NETFLIX
  • APPLEWATCH -> APPLEWATCH
  • AMAZONPRIME -> AMAZONPRIME
  • MAX -> MAX
  • ORANGE TV -> ORANGETV
  • ORANGE TV LIBRE -> ORANGETVLIBRE
status_change PatchStatusChange 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/v1/orgs/yoigo/subscriptions/5652763 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'subscription_type': 'MOBILE',
  'status_change': {
    'status': 'ACTIVE',
    'status_change_user': 'test@test.com',
    'status_change_reason': 'customer request',
    'requested_status_change_date': '2017-09-15T22:00:00Z'
  }
}" 

Responses

Code Meaning Description Schema
202 Accepted subscription modification successfully done None
400 Bad Request Invalid body ErrorMessage
404 Not Found A subscription with the specified id was not found ErrorMessage
409 Conflict The request could not be completed due to a conflict with the current state of the resource ErrorMessage
500 Internal Server Error Unexpected error ErrorMessage

400 - instance of ErrorMessage

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "errors": [
    {
      "code": "XXX_21201",
      "title": "TITLE_OF_THE_DOMAIN_ERROR",
      "ref": "https://developers.masstack.com/en/docs/apis_domain_doc_swagger/2/apioverview/#erro",
      "details": "string"
    }
  ]
}
Name Type Required Description
errors [ErrorMessageItem] true none

Parameters

Name In Type Required Description
org_id path string true Organization name
filter_type query string true Filter type used for getting subscriptions
filter_value query string true The value to apply to the filter_type. Should match what was in the filter, i.e. if filtering on subscription_id use a subscription_id.

Enumerated Values

Property Values
filter_type one of [MSISDN, SUBSCRIPTIONEMAIL, LANDLINENUMBER, EXTERNALID, DEVICEINSURANCE, INSURANCEPOLICYID, OTTEXTERNALID]

Request example

1
2
3
4

curl -X GET https://subscriptions.masstack.com/v1/orgs/yoigo/subscriptions?filter_type='MSISDN'&filter_value='345652'?filter_type=MSISDN&filter_value=345652 \
  -H "Accept: application/json"

Responses

Code Meaning Description Schema
200 OK OK [GetSubscription]
404 Not Found A subscription with the specified criteria was not found ErrorMessage
500 Internal Server Error Unexpected error ErrorMessage

200 - instance of GetSubscription

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
[
  {
    "id": 1233094,
    "account_id": 1233094,
    "account_bundles": [
      {
        "account_bundle_id": 1233094,
        "status": "ACTIVE",
        "creation_date": "2017-09-15T22:00:00Z",
        "deactivation_date": "2017-09-15T22:00:00Z"
      }
    ],
    "sale_date": "2017-09-15T22:00:00Z",
    "sale_type": "SALE",
    "user_name": "test@test.com",
    "commercial_product_id": 3072,
    "billing_type": "POSTPAID",
    "subscription_type": "MOBILE",
    "subscription_additional_details": {
      "external_id": 11111111,
      "kit_type": "A-MAGNETICO",
      "kit_type_description": "CONTACTO MAGNETICO PARA PUERTAS",
      "third_party_address": {
        "address_type": "INSTALLATION",
        "address_lines": [
          {
            "address_line_name": "Street",
            "address_line_value": "Street name"
          }
        ],
        "contact_details": {
          "contact_name": "string",
          "contact_phone_1": "string",
          "contact_phone_2": "string",
          "contact_email_address": "string",
          "contact_identity_document": "string",
          "additional_details": "string"
        }
      },
      "third_party_work_order_status": "INSTALACION TERMINADA",
      "third_party_installation_status": "INSTALACION TERMINADA",
      "third_party_contract_status": "ACTIVO",
      "installation_date": "2017-09-15",
      "nxt_invoice_cfee_netamo": 8.264463,
      "nxt_invoice_ofee_netamo": 8.264463,
      "total_stay_time": 24,
      "stay_period": 24,
      "total_stay_cost": 400,
      "stay_cost": 400,
      "no_return_cost": 400,
      "install_comp": [
        {
          "item_cd": "A-MAGNETICO",
          "item_desc": "CONTACTO MAGNETICO PARA PUERTAS",
          "item_quantity": 1
        }
      ]
    },
    "addresses": [
      {
        "address_type": "INSTALLATION",
        "address_lines": [
          {
            "address_line_name": "Street",
            "address_line_value": "Street name"
          }
        ],
        "contact_details": {
          "contact_name": "string",
          "contact_phone_1": "string",
          "contact_phone_2": "string",
          "contact_email_address": "string",
          "contact_identity_document": "string",
          "additional_details": "string"
        }
      }
    ],
    "current_status": "ACTIVE",
    "current_status_date": "2017-09-15T22:00:00Z",
    "cancellation_reason": {
      "deactive_motive": "CANCELACION VENTA",
      "reason": "SUBSCRIPTION_NOT_ACTIVATED_AFTER_WAITING_TIME"
    },
    "status_history": [
      {
        "status_date": "2017-09-15T22:00:00Z",
        "status": "ACTIVE"
      }
    ],
    "contract_documents": [
      "string"
    ]
  }
]
Name Type Required Description
anonymous Subscription false none
Name Type Required Description
anonymous object false none

Parameters

Name In Type Required Description
org_id path string true Organization name
id path string true subscription unique identifier
requested_date query string(date-time) false requested date

Request example

1
2
3
4

curl -X GET https://subscriptions.masstack.com/v1/orgs/masmovil/subscriptions/5652763/shippings?requested_date='2017-09-15T22:00:00Z' \
  -H "Accept: application/json"

Responses

Code Meaning Description Schema
200 OK OK [GetSubscriptionShipping]
500 Internal Server Error Unexpected error ErrorMessage

Endpoints

AccountBundles

    Apple Watch

      Credit Limits

        Devices

          Fraud Requests

            FreeUnitsPackages

              Promotions

                Segments

                  Subscription Commercial Products

                    Subscriptions

                      Contracts