Get Subscriber Packages
This API is used to retrieve SIM card packages and their details up to two levels. It includes the packages that were attached by the parent customer to their own subscriber, as well as the packages that were directly attached by the customer to their sub-customer’s subscriber.
NOTE: Currently only a single package is allowed per subscriber for a given time-frame.
| HTTP URL | |
|---|---|
| GET | api/v2/subscriber/{type}/{value}/package |
NOTE: All {type} and {value} pairs, define the search criteria. Valid {type} ENUMs are: ‘imsi’, ‘iccid’, ‘msisdn’, ‘imei’.
Eligibility
The Requestor is eligible to request for package information attached to the subscriber of his own customer or one of his sub-customers.
API Request
Request structure is not applicable.
API Response
Response Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| errorCode | String | O | Failure code. See list below, under ‘Error Codes’ section |
| errorMessage | String | O | Failure detailed description. See list below, under ‘Error Codes’ section |
| content | Object | O | Array of main response body object. Displayed when an API call was successful. For a failure it will be empty. |
| pageable | Object | O | Paging information object. Displayed when an API call was successful. For a failure it will be empty. |
Content
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| id | UUID | M | Package instance attached to the subscriber |
| name | String | M | Package name |
| description | String | O | Package description |
| nestedOffers | UUID | M | Array of offer IDs. At least one offer will be presented. Provided order of UUIDs in the array, represents offer priority of the package instance. |
| subscriberId | UUID | M | Subscriber universal unique identifier |
| customerId | UUID | M | Customer ID |
| customerName | String | M | Customer name |
pageable
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| page | Numeric | M | Page number |
| size | Numeric | M | Page size. Number of requested elements per page |
| totalPages | Numeric | M | Total amount of available pages per requested page size |
| totalElements | Numeric | M | Total amount of retrieved elements |
Error Codes
In addition to the general success and failure codes, the following error codes are possible:
| Code | Message |
|---|---|
| GLOBAL_1001 | Service unavailable. Please try again |
| SUBSCRIBER_1002 | Subscriber does not exist |
| SUBSCRIBER_1006 | Failed to retrieve subscriber details |
Examples
Request Body
Not applicable
Response Body Success ACK
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"name": "roaming package 20GB",
"description": "roaming package 20 GB",
"nestedOffers": [
"1b15048b-1ed4-4d34-a074-c7e26520e12a",
"ee74dca6-8e7f-4b85-a42b-13860913b3b1"
],
"subscriberId": "e1552d9f-5aa8-4958-9156-59e4878b6cc0",
"customerId": "89af6bfe-56bf-47d0-a3dd-a983e940fd4d",
"customerName": "Gualas"
},
{
"id": "e35977e8-719d-4df7-9803-8e75e7bab61c",
"name": "data package 10GB",
"description": "data package 20 GB",
"nestedOffers": [
"44928053-f669-4daa-a3a4-d3ed024120a5",
"dc9ca509-6a69-4ddf-bd35-01cf9c74e653"
],
"subscriberId": "283d72b8-0129-4748-979d-c46ed2be7430",
"customerId": "dea178a7-c80b-4e8c-902a-63f0a902d77e",
"customerName": "Motorola"
}
],
"pageable": {
"page": 0,
"size": 10,
"totalPages": 1,
"totalElements": 1
}
}
Response Body Failure NACK
{
"errorCode": "SUBSCRIBER_1006",
"errorMessage": "Failed to retrieve subscriber details",
"content": "",
"pageable": null
}