AccountBundles

Access to subscriptions in an account bundle


Parameters

Name In Type Required Description
org_id path string true Organization name
id path string true Account Bundle Id
offset query integer false Pagination offset
limit query integer false Pagination limit
only_active_subscriptions query boolean false Whether only active subscriptions should be retrieved

Request example

1
2
3
4

curl -X GET https://subscriptions.masstack.com/v1/orgs/masmovil/account_bundles/3821002?offset='0'&limit='200'&only_active_subscriptions='true' \
  -H "Accept: application/json"

Responses

Code Meaning Description Schema
200 OK OK GetAccountBundle
404 Not Found A bundle 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
account_bundle_id path string true account bundle identifier
body body SellMultiSimRequest true ‘none’

Request body - instance of SellMultiSimRequest

 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
{
  "customer_id": 1234,
  "account_id": 10096875,
  "sale_details": {
    "date": "2017-09-15T22:00:00Z",
    "user_name": "test@test",
    "delivery_method": "OFFLINE",
    "scoring": {
      "id": "string",
      "value": "string"
    },
    "signature": {
      "id": "string",
      "type": "BIOMETRIC"
    }
  },
  "commercial_product_id": 1,
  "main_subscription_id": 5331402,
  "numeration_type": "NEW",
  "imsi": 214035453370793,
  "iccid": 8934011411551283000,
  "free_units_packages": [
    {
      "id": 1233094
    }
  ],
  "promotions": [
    {
      "id": 1233094
    }
  ]
}
Name Type Required Description
customer_id string true Customer identifier
account_id string true account identifier
sale_details object true none
» date string(date-time) true sale date
» user_name string false Optional user name
» delivery_method string true Sale delivery method
» scoring object false none
»» id string false Sale scoring identifier
»» value string false Sale scoring value
» signature object false none
»» id string false Sale signature identifier
»» type string false Sale signature type
commercial_product_id string true Commercial product identifier
main_subscription_id string true Subscription identifier from an existent mobile subscription
numeration_type NumerationType true numeration type name. Mapping between Mysim origin and MasSubscriptions numeration_type
  • OriginId=1 -> Nuevo numero -> NEW
  • Origin=2 -> Numero portado -> OUTER_PORTABILITY
  • OriginId=10 -> Numero entre marcas -> INNER_PORTABILITY
  • Others -> UNKNOWN -> UNKNOWN
imsi string true International Mobile Subscriber Identity associated to the mobile subscription
iccid string true Circuit Card Identification Number associated to the SIM card
free_units_packages [SellMultiSimRequestFreeUnitsPackage] false list of free units packages included in the sale
promotions [SellMultiSimRequestPromotion] false list of promotions included in the sale
Property Values
delivery_method one of [OFFLINE, ONLINE]
type one of [PAPER, BIOMETRIC, OTP]

Request 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

curl -X POST https://subscriptions.masstack.com/v1/orgs/masmovil/account_bundles/1/multisim/sell \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'customer_id': 1234,
  'account_id': 10096875,
  'sale_details': {
    'date': '2017-09-15T22:00:00Z',
    'user_name': 'test@test',
    'delivery_method': 'OFFLINE',
    'scoring': {
      'id': 'string',
      'value': 'string'
    },
    'signature': {
      'id': 'string',
      'type': 'BIOMETRIC'
    }
  },
  'commercial_product_id': 1,
  'main_subscription_id': 5331402,
  'numeration_type': 'NEW',
  'imsi': 214035453370793,
  'iccid': 8934011411551283000,
  'free_units_packages': [
    {
      'id': 1233094
    }
  ],
  'promotions': [
    {
      'id': 1233094
    }
  ]
}" 

Responses

Code Meaning Description Schema
201 Created Sell process for multi-sim subscription successfully accepted SellMultiSimResponse
400 Bad Request Invalid body ErrorMessage
404 Not Found A subscription or an account bundle with the specified ids 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 identifier
body body DeactivateMultiSimRequest true ‘none’

Request body - instance of DeactivateMultiSimRequest

1
2
3
4
5
{
  "deactivation_reason": "1234",
  "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/multisim/1/deactivate \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'deactivation_reason': '1234',
  'deactivation_user': 'test@test.com',
  'requested_deactivation_date': '2017-09-15T22:00:00Z'
}" 

Responses

Code Meaning Description Schema
202 Accepted Deactivation process for multi-sim subscription successfully accepted None
400 Bad Request Invalid body ErrorMessage
404 Not Found A subscription with the specified ids 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
account_bundle_id path string true account bundle identifier
body body SellDeviceInsuranceRequest true ‘none’

Request body - instance of SellDeviceInsuranceRequest

 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
{
  "customer_id": "1234",
  "account_id": "10096875",
  "sale_details": {
    "date": "2017-09-15T22:00:00Z",
    "user_name": "test@test",
    "delivery_method": "OFFLINE",
    "scoring": {
      "id": "string",
      "value": "string"
    },
    "signature": {
      "id": "string",
      "type": "BIOMETRIC"
    }
  },
  "commercial_product_id": 1,
  "subscription_id": "5331402",
  "subscription_device_id": "5331402",
  "promotions": [
    {
      "id": 1233094
    }
  ]
}
Name Type Required Description
customer_id string true Customer identifier
account_id string true account identifier
sale_details object true none
» date string(date-time) true sale date
» user_name string false Optional user name
» delivery_method string true Sale delivery method
» scoring object false none
»» id string false Sale scoring identifier
»» value string false Sale scoring value
» signature object false none
»» id string false Sale signature identifier
»» type string false Sale signature type
commercial_product_id string true Commercial product identifier
subscription_id string true SubscriptionId associated to the SubscriptionDeviceId
subscription_device_id string true SubscriptionDeviceId from insured device
promotions [SellDeviceInsuranceRequestPromotion] false list of promotions included in the sale
Property Values
delivery_method one of [OFFLINE, ONLINE]
type one of [PAPER, BIOMETRIC, OTP]

Request 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

curl -X POST https://subscriptions.masstack.com/v1/orgs/masmovil/account_bundles/1/device_insurance/sell \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'customer_id': '1234',
  'account_id': '10096875',
  'sale_details': {
    'date': '2017-09-15T22:00:00Z',
    'user_name': 'test@test',
    'delivery_method': 'OFFLINE',
    'scoring': {
      'id': 'string',
      'value': 'string'
    },
    'signature': {
      'id': 'string',
      'type': 'BIOMETRIC'
    }
  },
  'commercial_product_id': 1,
  'subscription_id': '5331402',
  'subscription_device_id': '5331402',
  'promotions': [
    {
      'id': 1233094
    }
  ]
}" 

Responses

Code Meaning Description Schema
201 Created Sell process for device-insurance subscription successfully accepted SellDeviceInsuranceResponse
400 Bad Request Invalid body ErrorMessage
404 Not Found A subscription or an account bundle with the specified ids was not found ErrorMessage
500 Internal Server Error Unexpected error ErrorMessage

Parameters

Name In Type Required Description
org_id path string true Organization name
subscription_id path string true device insurance subscription identifier
body body DeactivateDeviceInsuranceRequest true ‘none’

Request body - instance of DeactivateDeviceInsuranceRequest

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/device_insurance/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
202 Accepted Deactivation process for device-insurance 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
subscription_id path string true device insurance subscription identifier
body body CancelDeviceInsuranceRequest true ‘none’

Request body - instance of CancelDeviceInsuranceRequest

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/device_insurance/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 device-insurance 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

Endpoints

AccountBundles

    Apple Watch

      Credit Limits

        Devices

          Fraud Requests

            FreeUnitsPackages

              Promotions

                Segments

                  Subscription Commercial Products

                    Subscriptions

                      Contracts