Get My Packages
This API is used to retrieve information on attached (allocated) packages. The user can choose whether to retrieve information on the packages attached to their account or on the packages attached to one of their sub-customers.
NOTE: A list of multiple packages can be retrieved; however, currently, only one package can be attached to a single subscriber at any given time.
| Method | Path |
|---|---|
| GET | api/v2/customer/{id}/package/my-packages |
Eligibility
The requestor is eligible to request information on packages assigned to them by their parent customer or on packages assigned to their sub-customers’ subscribers. The Customer {id} can be either the user’s own customer ID or one of the customer’s sub-customer IDs:
- Own customer ID: Retrieves information on all packages that were created and attached (allocated) to the user's account.
- Sub-customer ID: Retrieves information on all packages that were created and attached (allocated) to the specified sub-account.
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 provided order of 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": ""
}