Get My Eligible Packages
This API is used to retrieve a list of all eligible packages (‘Buy Package’) granted by the parent customer. If the customer has been tagged by the parent customer as allowed for self-service, they may receive a list of all eligible packages defined by the parent customer, provided that such packages exist.
NOTE: Multiple packages can be defined as eligible to a sub account, yet currently, only one package can be attached to a subscriber in a given time<table>
| Method | Path |
|---|---|
| GET | api/v2/customer/{id}/package/my-eligible-packages |
Eligibility
The requestor is eligible to request information on packages assigned to them by their parent customer if their account has been tagged as allowed for self-service.
NOTE: A package with the ‘ALL’ keyword is also included in the list of eligible packages.
API Request
Request Structure
Not applicable
API Response
Response Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| errorCode | String | O | Failure code. |
| errorMessage | String | O | Failure detailed description. |
| content | Object | O | Array of main response body object. Displayed when an API call is successful. For a failure, it will be empty. |
| pageable | Object | O | Paging information object. Displayed when an API call is successful. For a failure, it will be empty. |
Content
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| id | UUID | M | Package ID |
| name | String | M | Package name |
| description | String | O | Package description |
| nestedOffers | UUID | M | Array of offer IDs. At least one offer will be presented. The order of offer UUIDs in the array represents offer priority within the package. |
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 |
| CUSTOMER_1002 | Customer does not exist |
| CUSTOMER_1006 | Failed to retrieve customer details |
Examples
Request Body
Not applicable
Response Body Success ACK
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f47a7",
"name": "roaming",
"description": "roaming bundle",
"nestedOffers": [
"1b15048b-1ed4-4d34-a074-c7e26520e12a",
"ee74dca6-8e7f-4b85-a42b-13860913b3b1"
]
},
{
"id": "ff74dca6-8e7f-4b85-a42b-13860913b370",
"name": "regular",
"description": "regular bundle",
"nestedOffers": [
"fb3e01cf-3798-4d53-b2b4-914b3e36c83c"
]
}
],
"pageable": {
"page": 1,
"size": 10,
"totalPages": 1,
"totalElements": 2
}
}
Response Body Failure NAK
{
"errorCode": "GLOBAL_1001",
"errorMessage": "Service unavailable. Please try again",
"content": "",
"pageable": ""
}