Create Customer External Params
Create Customer External Params API is used to create new External Parameters instance (one or more) for its own customer and for a given entity at a time (Customer, Subscriber, Offer, Package). When sending a request to create multiple External Parameters instances in a single call, the result will treat them all hence it is either all External Parameters instances were succeeded, or all resulted with a failure.
| HTTP URL | |
|---|---|
| POST | /api/v2/customer/{id}/external-params/{id} |
NOTE: {entity} can be one of the following ENUMs: ‘customer’, ’subscriber’, ’plan’, ‘package’. To create a ‘Product’ related External Param, use ‘plan’ entity. Example: api/v2/customer/{id}/external-params/customer/a5ad9f06-0164-4475-8919-fcf1d4a4befe
NOTE: Second {id} is the requested entity UUID (Customer [sub-account], Subscriber, or Plan or Package).
Eligibility
The Requestor is eligible to create new External Parameters instance for his own customer or his own entities (sub-customers, its own subscribers, sell plans, sell packages). It is not eligible to create new External Parameters instance to any other customer level.
API Request
Request Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| externalParams | Object | M | Array of External Parameter instance objects. |
externalParams data objects
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| extParamConfigId | UUID | M | External Parameter Configuration unique identifier |
| value | String | M | External Parameter value |
API Response
Response Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| errorCode | String | O | Failure code. |
| errorMessage | String | O | Failure message. |
| 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 data objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| requestId | UUID | M |
Request instance ID. To be used by external systems to query the call (operation) status:
|
Pageable data objects
| Element | 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 |
|---|---|
| CUSTOMER_1024 | Failed to create external params item |
| GLOBAL_1001 | Service unavailable. Please try again |
Examples
Request Body
{
"externalParams": [
{
"extParamConfigId": "b8ad9f06-0104-9475-7919-ace1d4a4babe",
"value": "9876543212"
},
{
"extParamConfigId": "a5ad9f06-0164-4475-8919-fcf1d4a4befe",
"value": "13465798"
}
]
}
Response Body: Success ACK
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"requestId": "ff74dca6-8e7f-4b85-a42b-13860913b370"
}
],
"pageable": {
"page": 0,
"size": 10,
"totalPages": 1,
"totalElements": 1
}
}
Response Body: Failure NAK
{
"errorCode": "GLOBAL_1001",
"errorMessage": "Service unavailable. Please try again",
"content": "",
"pageable": ""
}