Bar Service Config
This call allows setting the state of Bars and Services on a sim.
API Call Flow
To create a bar-service-config submission you'll need to call the Get Sim Services endpoint or Get Network Services which returns a list of available services for the sim / network specified. You can then build up a payload with the Bars / Services and valid values (from the Get Services response) and send it to the Submission endpoint.
Service Values
Setting the status of different Bars and Services can be counterintuitive, for a service of type Bar
setting the value to false
will enable the bar.
However, for a service of type Service
setting the value to false
will disable the service.
In the example below the Data
bar is enabled (blocking data use on the sim) but the VoiceRoaming
service is disabled (preventing Voice Roaming).
{ "name" : "data", "value": "false" },
{ "name" : "voiceRoaming", "value": "false" }
Bar Service Config Submission
Request
Name | Type | Description | Restrictions |
---|---|---|---|
serialNumbers | string array | serialNumbers | Required |
services | object array | An array of Services corresponding to the SIMs you wish to update | At least one |
Services
Name | Type | Description | Restrictions |
---|---|---|---|
name | string | The name of the service to change | Required |
value | string | The value to set the service to | Required |
curl --location 'https://api.cellhire.com/api/simSubmission/BarServiceConfig' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjRBMDlENTFBMDhEOEUxMTU0OTkyODFDN...' \
--data '{
"serialNumbers":["01234567890"],
"services": [
{ "name" : "admin", "value": "true" },
{ "name" : "data", "value": "false" }
]
}'
Get available Services for Sim
Request
curl --location 'https://api.cellhire.com/api/sim/{serialNumber}/services' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjRBMDlENTFBMDhEOEUxMTU0OTkyODFDN...' \
Response
Name | Type | Description |
---|---|---|
groupName | string | Name of the service group |
services | object array | An array of Services corresponding to the group |
Services
Name | Type | Description |
---|---|---|
name | string | The name of the service |
value | string | The value the service is current set to |
readOnly | bool | Whether the service can be changed |
type | string | Can be Bar or Service , see Service Values |
availableOptions | string array | An array of valid values for this Service |
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
[
{
"groupName": "main",
"services": [
{
"optionValue": "true",
"readOnly": false,
"name": "admin",
"type": "Bar",
"availableOptions": [
"true",
"false",
null
]
}
]
}
]
Get available Services for network
Request
curl --location 'https://api.cellhire.com/api/network/{networkId}/services' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjRBMDlENTFBMDhEOEUxMTU0OTkyODFDN...' \
Response
Name | Type | Description |
---|---|---|
groupName | string | Name of the service group |
services | object array | An array of Services corresponding to the group |
Services
Name | Type | Description |
---|---|---|
name | string | The name of the service |
readOnly | bool | Whether the service can be changed |
type | string | Can be Bar or Service , see Service Values |
availableOptions | string array | An array of valid values for this Service |
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
[
{
"groupName": "main",
"services": [
{
"readOnly": false,
"name": "admin",
"type": "Bar",
"availableOptions": [
"true",
"false",
null
]
}
]
}
]
Get available Services for Network and Tariff
Request
curl --location 'https://api.cellhire.com/api/network/{networkId}/services?tariffNo={tariffNumber}' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjRBMDlENTFBMDhEOEUxMTU0OTkyODFDN...'
Response
Name | Type | Description |
---|---|---|
groupName | string | Name of the service group |
services | object array | An array of Services corresponding to the group |
Services
Name | Type | Description |
---|---|---|
name | string | The name of the service |
readOnly | bool | Whether the service can be changed |
type | string | Can be Bar or Service , see Service Values |
availableOptions | string array | An array of valid values for this Service |
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
[
{
"groupName": "main",
"services": [
{
"readOnly": false,
"name": "admin",
"type": "Bar",
"availableOptions": [
"true",
"false",
null
]
}
]
}
]