Devices

Access to subscriptions devices


Parameters

Name In Type Required Description
org_id path string true Organization name
id path string true subscription unique identifier
category query string false device category filter
only_active query boolean false boolean to indicate if just active device details are required. For retrieving pending and already processed device change requests, use false value

Enumerated Values

Property Values
category one of [SIM, OTHER]

Request example

1
2
3
4

curl -X GET https://subscriptions.masstack.com/v1/orgs/yoigo/subscriptions/5652763/devices?category='SIM'&only_active='true' \
  -H "Accept: application/json"

Responses

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

200 - instance of GetSubscriptionDevice

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
[
  {
    "id": 1233094,
    "device_id": "P045A1SNC",
    "category": "SIM",
    "status": "ACTIVO",
    "contract_document_id": "string",
    "device_additional_details": {
      "iccid": 8934011411551283000,
      "imsi": 214035453370793,
      "pin": 1234,
      "puk": 1234,
      "pin2": 1234,
      "puk2": 1234,
      "fabrication_type": "eSIM"
    },
    "subscription_device_change_requests": [
      {
        "status": "PROCESSED",
        "request_date": "2017-09-15T22:00:00Z",
        "user_name": "test@test.com",
        "change_reason": "sim lost",
        "contract_document_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
        "fabrication_type": "eSIM",
        "iccid": 8934011411551283000,
        "imsi": 214035453370793
      }
    ]
  }
]
Name Type Required Description
anonymous SubscriptionDevice 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
device_id path string true subscription device unique identifier
only_active query boolean false boolean to indicate if just active device details are required. For retrieving pending and already processed device change requests, use false value

Request example

1
2
3
4

curl -X GET https://subscriptions.masstack.com/v1/orgs/yoigo/subscriptions/5652763/devices/5652763?only_active='true' \
  -H "Accept: application/json"

Responses

Code Meaning Description Schema
200 OK OK GetSubscriptionDevice
404 Not Found A subscription or device 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
device_id path string true subscription device unique identifier
body body PatchSubscriptionDevice true ‘none’

Request body - instance of PatchSubscriptionDevice

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
{
  "category": "SIM",
  "user_name": "test@test.com",
  "change_reason": "sim lost",
  "subscription_device_change_request": {
    "fabrication_type": "eSIM",
    "signature_process_id": "string",
    "signature_type": "PAPER",
    "iccid": 8934011411551283000,
    "imsi": 214035453370793,
    "new_iccid": "8934011411551283145",
    "new_imsi": "214035453370793"
  }
}
Name Type Required Description
category string true device category
user_name string false user name of the user performing the subscription device request. If there is a token in place generated with real user credentials, there is no need to send this value since it will be obtained using the token claims
change_reason string false device change reason
subscription_device_change_request PatchSubscriptionDeviceChangeRequest true none

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19

curl -X POST https://subscriptions.masstack.com/v1/orgs/yoigo/subscriptions/5652763/devices/5652763/replacement \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'category': 'SIM',
  'user_name': 'test@test.com',
  'change_reason': 'sim lost',
  'subscription_device_change_request': {
    'fabrication_type': 'eSIM',
    'signature_process_id': 'string',
    'signature_type': 'PAPER',
    'iccid': 8934011411551283000,
    'imsi': 214035453370793,
    'new_iccid': '8934011411551283145',
    'new_imsi': '214035453370793'
  }
}" 

Responses

Code Meaning Description Schema
202 Accepted subscription device change request successfully received None
400 Bad Request Invalid body ErrorMessage
404 Not Found A subscription or a subscription device with the specified ids were 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

Endpoints

AccountBundles

    Apple Watch

      Credit Limits

        Devices

          Fraud Requests

            FreeUnitsPackages

              Promotions

                Segments

                  Subscription Commercial Products

                    Subscriptions

                      Contracts