9- Set eSIM confirmation code
POST {{baseUrl}}/contracting/basket?sessionId=866f69e3-4e67-4025-bfa7-692cb36eca58
Modify contract
- Find contract to modify using:
GET /contract/all
- Check if contract modification is possible for selected contract using:
GET /order/operations
. Check flags formodify
in response (visible
andenabled
are set to true). - Initialize basket using selected contract:
POST /contracting/basket
{ "contractId": [id of contract to be modified] }
- Get basket content (including products tree):
GET /contracting/basket
- Now you can select and deselect products (you can send more than one - every change will be proceeded one after another) using:
POST /contracting/basket
Sending multiply changes should be used mainly if you are sure all changes can be applied (i.e. one action won't exclude following ones). Step 4 and 5 can be repeated multiply times.{ "productActions": [{ "productId": [id field from tree], "amount": [optional number of products to be put - important only for PUT action, min 1, max 100, default 1], "type": ["PUT" | "REMOVE"] }] }
- You can create order with introduced changes via
POST /contracting/basket/order
{ "referenceNumber": [reference number], "wishDate": [date when the order is going to be started] }
Create new contract
- Find subscriber for whom you want to create new contract, e.g.
GET /hierarchy/subscribers
- Initialize basket using selected account (subscriber):
POST /contracting/basket
{ "accountGroupId": [subscriber id found in previous step] }
- Get basket content (including products tree):
GET /contracting/basket
- Select and deselect products - in the same way as during contract modification
- Right now you can fill in some characteristic values. Characteristics are all values which are needed to fully configured
the future contract. The set of characteristics depends on previously selected products (for example you will receive
different values for mobile subscription and for fixed one). What is more, it is possible that setting some characteristics
can enable another ones. So after every such action you should check basket content. Let's assume you've selected in the previous
step
IP Centrex
. In such situation you will get in your basket something like this:
Some of these characteristics are read-only as they have only one possible value which is prefilled and can't be changed to anything else (for example(...) "characteristics": { "firstName": { "name": "firstName", "value": "Jan", "possibleValues": [{"value": "Jan"}] }, "lastName": { "name": "lastName", "value": "Kowalski", "possibleValues": [{"value": "Kowalski"}] }, "loginExtension": { "name": "loginExtension" }, "loginExtensionPrefix": { "name": "loginExtensionPrefix", "value": "", "possibleValues": [{"value": ""}] }, "deviceOption": { "name": "deviceOption", "possibleValues": [ { "value": "Off-The-Shelf", "caption": {"en": "Off-The-Shelf", "nl": "Off-The-Shelf"} }, { "value": "Deviceless", "caption": {"en": "Deviceless", "nl": "Deviceless"} }, { "value": "Existing Shared", "caption": {"en": "Existing Shared", "nl": "Existing Shared"} } ] }, "fixedNumber": { "name": "fixedNumber" }, "email": { "name": "email", "value": "jan.kowalski@comarch.com", "possibleValues": [{"value": "jan.kowalski@comarch.com"}] }, "group": { "name": "group", "possibleValues": [ { "value": "166715563", "caption": {"en": "Codemaster Group 1", "nl": "Codemaster Group 1"} }, { "value": "166715564", "caption": {"en": "Codemaster Group 2", "nl": "Codemaster Group 2"} } ] } } (...)
firstName
,lastName
). They are included in the response for informational purpose and can be presented on a front-end. The rest of characteristics should be entered:loginExtension
,deviceOption
,fixedNumber
,group
. Setting characteristic value is done through the samePOST /contracting/basket
endpoint, but now we are going to usecharacteristicActions
key, for example:
After{ "characteristicActions": [{ "name": "deviceOption", "value": "Off-The-Shelf" }] }
deviceOption
is set toOff-The-Shelf
you will receive additionallydeviceType
characteristic to set. Theoretically, you can merge many characteristic requests into one request by passing a list of actions instead of single one. But please be aware, that in such case they are proceeded sequentially one-by-one, so their order may be important (for example you need setdeviceOption
characteristic beforedeviceType
). Or you can just make separated request for each individual value. It's up to you. The process of consulting basket content and setting characteristics value should be repeated until all required values are set.6. Next, if you decide to give a new sim card (possible only when you haven't ordered a new one), you shouldPOST /basket
the following object:{"simCardNumber": <short uiccid>}
- You can create order with introduced changes via
POST /contracting/basket/order
Please note that if you selected some order you have to extend this object with address section.{ "referenceNumber": [reference number], "wishDate": [date when the order is going to be started] }
Create new contract (by template)
- Find subscriber for whom you want to create new contract, e.g.
GET /hierarchy/subscribers
- Initialize basket using selected account (subscriber):
POST /contracting/basket
{ "accountGroupId": [subscriber id found in previous step] }
- From now you can get template list using
GET /contracing/basket/templates
- You can use one of those templates (select it) using
POST /contracting/basket
:{ "templateId": [template id] }
- Get basket content (including products tree):
GET /contracting/basket
The rest of steps is analogous to standard way of creating contract.
Reactivate contract
- Find subscriber for whom you want to create new contract, e.g.
GET /hierarchy/subscribers
- Find service request in which contract was terminated, e.g.
GET /track-and-trace/service-requests
- Initialize basket using selected account (subscriber) and contract:
POST /contracting/basket
{ "accountGroupId": [subscriber id found in previous step], "orderId": [termination order id found in previous step] }
- A read-only characteristic
previousPhoneNumber
is initialized. You can use it to get the previous phone number and present it to an end user.
The rest of steps is analogous to standard way of creating contract.
Port in number
Initials steps are the same as for creating a new contract. After configuring products tree (by hand or by template) you should be able to set porting characteristics. Please note that this characteristic will be only available if you select mobile product. You can check possible list of characteristics to be set using: GET /basket
or GET /basket/characteristics
. Example response after selecting mobile product (fragment of GET /basket
response):
(...)
"characteristics": {
"porting": {
"name": "porting",
"value": "false",
"possibleValues": [
{
"value": "false",
"caption": {
"en": "false",
"nl": "false"
}
},
{
"value": "true",
"caption": {
"en": "true",
"nl": "true"
}
}
]
}
}
(...)
The response says that:
- you can set
porting
characteristic (fieldname
), - current value is
false
(fieldvalue
), - it can take one of two values:
true
orfalse
(fieldpossibleValues
).
To switch porting value to true
, you have to make the following request:
{
"characteristicActions": [{
"name": "porting",
"value": "true"
}]
}
After setting porting to true
there will be possibility to set few more porting-specific parameters (you can get new list of characteristics again using GET /basket
):
phoneNumber
- required, regex:316\d{8} | 3197\d{9}
customerNumber
- required, length <= 70customerName
, lenght <= 20keepExistingSimCard
- defaultfalse
note
- length <= 60
Theoretically, you can merge characteristic requests into one request by passing a list of actions instead of single action. But please be aware, that in such case they are proceeded sequentially one-by-one, so their order may be important (for example you need set porting
characteristic before phoneNumber
). Or you can just make separated request for each individual value. It's up to you.
Turning on porting
flag additionally disable possibility to get more main products and contract additional main products such as handsets, sim cards etc. During porting contracting such products is not possible.
If sent characteristic value does not met validation criteria an error is raised (400 Bad Request
) with possible code values:
INVALID_CUSTOMER_NAME
,INVALID_CUSTOMER_NUMBER
,INVALID_NOTE
,BASKET_INVALID
,INVALID_MSISDN_ALREADY_EXISTS_FOR_A_CUSTOMER
,INVALID_MSISDN_IS_BLOCKED
,INVALID_MSISDN_FORMAT_NOT_VALID
,INVALID_MSISDN_LENGTH_FOR_THIS_PRODUCT
,INVALID_MSISDN_FOR_CUSTOMER_OFFER
,
Next, if you decide to give a new sim card (possible only when keepExistingSimCard
= false
), you should POST /basket
the following object:
{
"simCardNumber": <short uiccid>
}
to pass short UICCD of ported number.
Keeping existing sim card is only possible for phone number registered currently in KPN (internal porting).
Start a new order is possible via 'POST /basket/order'. You can pass:
wishDate
- preferred date of porting (null is treated as ASAP),referenceNumber
.
We do not pass address to backend.
Possible error codes (for 400 Bad Request
response):
BASKET_INVALID
- not all parameters have been set, or product tree is in error state,INVALID_WISH_DATE
- as wish date should be <= current date + 90, and can not be set on holiday.
Combine fixed and mobile contract
- Find first contract to combine using:
GET /contract/all
- Check if contract combination is possible for selected contract using:
GET /order/operations
. Check flags forcombineFixedMobile
in response (visible
andenabled
are set to true). - Depending on previous contract type find second contract using
GET /contracting/id/{id}/vamo/fixed-numbers
orGET /contracting/id/{id}/vamo/mobile-numbers
- Initialize basket using selected contracts:
POST /contracting/basket
{ "fixedContractId": [id of fixed contract], "mobileContractId": [id of mobile contract], }
- Get list of possible characterists to bet set (for example pbx groups, service types, combine types). The response contains also current value of every characteristics: `GET /contracting/basket/characteristics
- Set selected characteristics using modify basket (you can send more than one - every change will be proceeded one after another)
{ "characteristicActions": [{ "name": [characteristic name], "value": [characteristic value] }] } Step 5 and 6 can be repeated multiply times.
- Get products tree:
GET /contracting/basket/products
The rest of steps are still not implemented.
Modify existing template
- Find valid template to modify using:
GET /contracting/templates
- Initialize basket using selected template:
POST /contracting/basket
{ "templatedIdToModify": [id of template to be modified] }
- You can preview and modify basket state the same way as during create new subscrition or dduring contract modification
- When the basket is in valid state you can save all change using
POST /contracting/basket/modify-template
Required privileges (one of the following):
- privilegesun-authorizedorderscreation
- privilegesorders_authorization
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
sessionId | string |
Request Body
{"characteristicActions"=>[{"name"=>"eSimConfirmationCode", "value"=>"9"}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Authorization | string |
RESPONSES
status: OK
""