Subscription
Entity used in a system to manage the connectivity provided by an operator: a SIM or an ID for CDMA networks.
Read only fields are computed by AirVantage and can only be seen on response fragments sent by find, create, or edit requests.
Field | Description | Read Only | Type |
---|---|---|---|
uid | Subscription's unique identifier. | true | uid |
identifier | Identifier of the subscription. Integrated Circuit Card IDentifier (ICCID) for GSM network. Electronic Serial Number (ESN) or Mobile Equipment IDentifier (MEID) for CDMA network. |
false | string |
mobileNumber | Mobile number of the subscription. Mobile Station Integrated Services Digital Network-Number (MSISDN) for GSM network. Mobile Directory Number (MDN) for CDMA network. |
false | string |
mobileNumber2 | [DEPRECATED] The secondary mobile number of the subscription. | true | string |
networkIdentifier | Network identifier of the subscription. International Mobile Subscriber Identity (IMSI) for GSM network. Mobile Identification Number (MIN) for CDMA network. |
false | string |
eid | Embedded Universal Integrated Circuit Card IDentifier (eUICC-ID) of the subscription. | false | string |
ipAddress | IP address of the subscription. | false | string |
requestedIp | IP address that must be configured at the network level as static IP. | false | string |
state | Shows the state of the subscription. Possible values can be INVENTORY, ACTIVE, INACTIVE, SUSPENDED, RETIRED, UNKNOWN. | true | string |
operator | Operator of the subscription (mandatory). | false | string |
operatorAccount.uid | UID of the Operator account related to the subscription. | false | uid |
metadata | List of subscription metadata (name, type, value). Metadata types are : boolean, int, double, long, string, date, list, map. | true | string |
labels | Subscriptions can be labeled with a list of labels. | false | string array |
appletGeneration | The applet's version installed in the SIM card. Possible values: V1, V2, V3, V4. |
true | string |
formFactor | The SIM form factor. Possible values: 2FF, 3FF, 4FF, MFF, COMBO, WLCSP, DFN6. |
true | string |
confType | The SIM configuration type. Possible values: LITE, ADVANCED, ADVANCED_NODATA, TAILORED, BROADBAND, PASSIVE, MBQT_V1, MBQT_V2, MBQT_V3, LITE2, ADVANCED2, ADVANCED2_NODATA. |
true | string |
technology | The mobile technology supported by the SIM card. Possible values: 2G/3G, 4G. |
true | string |
orderId | The ID of the order made when this subscription was requested. | true | string |
productRefName | The name of the Product reference. | true | string |
activationImei | IMEI linked with the subscription. | true | string |
imeiLock.imeiLock | Status of subscription imeiLock. | true | boolean |
imeiLock.imeiLockDate | Date when the locking operation was performed. | true | timestamp |
imeiLock.imeiUnlockedDate | Date when the unlocking operation was performed. | true | timestamp |
This is a complete representation of a Subscription. This fragment can be used for create or edit requests. Please refer to the fields section to know which fields can be modified.
{ "uid": "", "state": "", "identifier" : "", "mobileNumber" : "", "networkIdentifier" : "", "ipAddress" : "", "requestedIp" : "", "eid" : "", "operator" : "", "appletGeneration" : "", "formFactor" : "", "confType" : "", "technology" : "", "orderId" : "", "productRefName" : "", "metadata": [ { "name" : "", "value" : "", "type" : "" }], "operatorAccount": { "uid" : "" } "labels": ["Label1", "Label2"], "activationImei" : "", "imeiLock" : { "imeiLock": "", "imeiLockDate": "", "imeiUnlockedDate": "" } }
API Methods
Find
/api/v1/subscriptions
Returns a paginated list of subscriptions with their complete details.
It is possible to restrain the result list using criteria parameters.
The fields parameter has to be defined in order to specify the attributes of the subscription which will be returned.
If
fields parameter is missing, only the following attributes of the subscription are returned: uid, operator, identifier,
mobileNumber, networkIdentifier, ipAddress, requestedIp, state, eid, appletGeneration, formFactor, confType, technology, productRefName, activationImei, imeiLock.
More information about paging, filtering, and sorting here
Request
GET https://na.airvantage.net/api/v1/subscriptions?fields=uid,operator,identifier,state ...
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json { "items": [ { "uid": "cbd1baff97a8444da6a887cefd1d14c6", "operator": "TELENOR", "identifier": "8023576088000004567", "state": "INVENTORY" }, { "uid": "ed8e9c5466d447f79ac77701398d8fcb", "operator": "KPN", "identifier": "8023235373000004566", "state": "INVENTORY" } ], "count": 2, "size": 2, "offset": 0 }
Name | Description | Use | Default | Type | Operand |
---|---|---|---|---|---|
uid | Return subscription whose uid match with the specified id. | optional | null | uid string | = |
company | Return all subscriptions available for the company. | optional | caller's company | uid string | = |
labels | Return all subscriptions labeled as the specified string. Several labels can be set. | optional | null | string list | in |
operator | Returns all subscriptions matching the given operator. | optional | null | string | = |
identifier | Returns all subscriptions whose identifier contains the given string. | optional | null | string | like |
mobileNumber | Returns all subscriptions whose mobile number contains the given string. | optional | null | string | like |
networkIdentifier | Returns all subscriptions whose network identifier contains the given string. | optional | null | string | like |
eid | Returns all subscriptions whose eUICC-ID contains the given string. | optional | null | string | like |
ipAddress | Returns all subscriptions whose IP address contains the given string. | optional | null | string | like |
assigned | Return all subscriptions assigned (or not) to a system. | optional | null | boolean | = |
states | Returns all subscriptions whose state is in the given list. States are INVENTORY, ACTIVE, INACTIVE, SUSPENDED, RETIRED, UNKNOWN. | optional | null | string list | in |
operatorAccount | Returns all subscriptions linked to a operator account matching the specified criteria. The possible criteria are :
|
optional | null | string map with the following format: uid:xxx,name:xxx,... | See description |
HTTP Method | GET |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | None |
Permissions | entities.subscriptions.view |
Order by | identifier |
Fields | uid, operator, identifier, mobileNumber, networkIdentifier, ipAddress, requestedIp, state, metadata, operatorAccount, labels, eid, appletGeneration, formFactor, confType, technology, productRefName, activationImei, imeiLock |
Create
/api/v1/subscriptions
Creates a new subscription. The result returns the new subscription with the uid.
At least one of identifier, mobileNumber or networkIdentifier must be set. These fields has to be unique. Read only fields will be ignored.
Request
POST https://na.airvantage.net/api/v1/subscriptions Content-Type: application/json ... // Some content which look like the specified above.
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "uid": "e810d8aff0bc46309cb3f1c7cd36c09d", "state": "INVENTORY", "metadata": [], "identifier": "124578", "labels": ["tata"], "operatorAccount": { "uid": "f349d676bab34f31838a351bb26d3245", "name": "MyOperatorAccount", "connection": { "name": "KPN", "uid": "e9d97269a05b4ce091da20f5cbdda93a" } }, "operator": "VODAFONE", "ipAddress": "192.168.0.1", "requestedIp": null, "mobileNumber": "1234567890", "networkIdentifier": "123456789", "eid" : null, "appletGeneration" : null, "formFactor" : null, "confType" : null, "technology" : null, "productRefName" : null }
Name | Description | Use | Default | Type |
---|---|---|---|---|
company | Set the context where the new subscription will be created. | optional | caller's company | uid string |
Name | Description | |
---|---|---|
subscription.missing.identifiers | At least one of 'identifier', 'mobileNumber' or 'networkIdentifier' has to be set. | Raised when subscription identifier is missing. |
subscription.not.unique.identifiers | One of 'identifier', 'mobileNumber' or 'networkIdentifier' is not unique. | |
subscription.missing.operator | Raised when operator is missing. | |
subscription.operator.not.authorized | Raised when operator is not authorized. | |
operator.account.unknown | Raised when operator account is unknown. | |
subscription.operator.and.operator.account.incompatible | Raised when operator account is not compatible with the operator of the subscription. | |
company.unknown | The given company is unkown. |
HTTP Method | POST |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: application/json |
Permissions | entities.subscriptions.create |
Edit
/api/v1/subscriptions/{uid}
Edits the subscription identified by the uid of the request. If the subscription is not in 'INVENTORY' state or if the subscription is linked to a system in 'READY', 'DEPLOYED', or 'BEING_TRANSFERED' state, then only the labels can be edited. Otherwise, you can edit all the fields.
NB: It is not necessary to send the whole JSON block to edit fields. Only fields sent to the service will be updated.
Request
PUT https://na.airvantage.net/api/v1/subscriptions/e810d8aff0bc46309cb3f1c7cd36c09d Content-Type: application/json ... // Some content which look like the specified above.
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "uid": "e810d8aff0bc46309cb3f1c7cd36c09d", "state": "MAINTENANCE", "metadata": [], "identifier": "124578", "labels": ["label","ownLabel"], "operatorAccount": { "uid": "f349d676bab34f31838a351bb26d3245", "name": "MyOperatorAccount", "connection": { "name": "KPN", "uid": "e9d97269a05b4ce091da20f5cbdda93a" } }, "operator": "ATT", "ipAddress": "192.168.0.1", "requestedIp": null, "mobileNumber": "0605123432", "networkIdentifier": "333222111", "eid" : null, "appletGeneration" : "V4", "formFactor" : "2FF", "confType" : "LITE", "technology" : "4G", "productRefName" : "LITE 2FF" }
Name | Description | |
---|---|---|
subscription.missing.identifiers | At least one of 'identifier', 'mobileNumber' or 'networkIdentifier' has to be set. | Raised when subscription identifier is missing. |
subscription.not.unique.identifiers | One of 'identifier', 'mobileNumber' or 'networkIdentifier' is not unique. | |
subscription.unknown | Raised when the uid of the subscription is unknown. | |
subscription.missing.operator | Raised when operator is missing. | |
subscription.invalid.state | Raised when subscription is in a state which does not allow the edition. | |
subscription.operator.not.authorized | Raised when operator is not authorized. | |
system.invalid.state | Raised when the system linked to the subscription is in a state which does not allow the edition. | |
operator.account.unknown | Raised when operator account is unknown. | |
subscription.operator.and.operator.account.incompatible | Raised when operator account is not compatible with the operator of the subscription. | |
subscription.cannot.update.activation.imei.lock.exists | Raised when activation imei is updated while imei lock exists. |
HTTP Method | PUT |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: application/json |
Permissions | entities.subscriptions.edit |
Details
/api/v1/subscriptions/{uid}
Gets the details of a subscription.
Request
GET https://na.airvantage.net/api/v1/subscriptions/89f81f1c2f2f46a880faf5a28668309e ...
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json { "state": "INVENTORY", "metadata": [ { "name" : "PIN1", "value" : "5698", "type" : "STRING" // Possible types are : boolean, int, double, long, string, date and map }, { "name" : "PIN2", "value" : "3612", "type" : "STRING" } ], "uid": "89f81f1c2f2f46a880faf5a28668309e", "identifier": "556985478521", "labels": [], "operatorAccount": { "uid": "1674675f1c464c489dd0c6daff0edad5", "name": "MyOperatorAccount", "connection": { "name": "KPN", "uid": "e9d97269a05b4ce091da20f5cbdda93a" } }, "operator": "VODAFONE", "ipAddress": "192.168.0.1", "requestedIp": null, "mobileNumber": "1234567890", "networkIdentifier": "123456789", "eid" : null, "appletGeneration" : "V4", "formFactor" : "2FF", "confType" : "LITE", "technology" : "4G", "productRefName" : "LITE 2FF" }
Name | Description |
---|---|
subscription.unknown | Raised when the 'uid' points to an unknown subscription. |
HTTP Method | GET |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | None |
Permissions | entities.subscriptions.view |
Delete
/api/v1/subcriptions/{uid}
Deletes a specific subscription from AirVantage. To delete a subscription it does not have to be assigned to any system.
Request
DELETE https://na.airvantage.net/api/v1/subscriptions/d5e62f8ec1340e79214f2113db75e86
Response
200 OK
HTTP/1.1 200 OK Content-Length: 0
Name | Description |
---|---|
subscription.unknown | Raised when the 'uid' points to an unknown subscription. |
subscription.assigned | Raised when the subscription is assigned to a system. |
subscription.undeletable | Raised when the subscription manages Semtech R2C (Ready-to-connect) connectivity. |
HTTP Method | DELETE |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | - |
Permissions | entities.subscriptions.delete |
Change labels
/api/v1/operations/subscriptions/label
Adds or removes labels to subscriptions matching a given criteria. When no criteria are set, all subscriptions in the company will be labelled.
Request
POST https://na.airvantage.net/api/v1/operations/subscriptions/label Content-Type: application/json { "labels" : { "add" : ["france"] }, "criteria" : { "operator" : "CARRIER", "labels" : ["test"] }, "identifiers" : { "identifier": ["sub1", "sub2", "sub3"] } }
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "operation":"4b89657f63aac4b299c1d46e98a495326" }
{ "notify" : true|false, "callback" : "callback URL", "labels" : { "add" : ["Label1", ...], "remove" : ["Label2", ...] }, "criteria" : { "uids" : [] "labels" : [], "identifier" : , "mobileNumber" : , "networkIdentifier" : , "eid" : , "ipAddress" : , "operator" : , "assigned" : , "states" : [], "operatorAccount" : { "uid" : , "name" : } }, "dependsOn" : { "operation" : "uid", "states" : ["FAILURE"] }, "identifiers": { "identifier" : ["iccid1", "iccid2"], "networkIdentifier" : ["imsi1", "imsi2"], "ipAddress" : ["ipAddr1", "ipAddr2"] } }
Add or remove labels should be required
Either 'criteria' or 'dependsOn' should be set.
Field | Description | Use | Default | Type |
---|---|---|---|---|
notify | Send an email notification to the user calling this method when the operation finishes | optional | boolean | |
callback | The endpoint URL to call when the operation state changes. The callback is done using HTTP 'POST' method. | optional | string | |
labels.add | The list of labels to add | required | string | |
labels.remove | The list of labels to remove | required | string | |
dependsOn.operation | Identifier of the operation to be used to launch this operation In other words, the tasks of the new operation will start only when the tasks of specified operation will be finished. |
required if 'dependsOn' set | uid | |
dependsOn.states | States of the tasks which will be used as input of this operation. Possible values are : SUCCESS, FAILURE and CANCELLED. If null or empty, all tasks from the parent operation will be used as input of this operation. |
optional | SUCCESS,FAILURE,CANCELLED | string array |
identifiers | List of identifiers to be used to identify systems. The understandable identifiers are :
ICCID, IMSI and IP address. A maximum of 5000 identifiers can be provided. |
optional | string | |
identifiers.identifier | List of subscription identifier (ICCID / ESN) to be used to identify subscriptions. A maximum of 5000 subscription identifiers can be provided. |
optional | string | |
identifiers.networkIdentifier | List of subscription network identifier (IMSI / MIN) to be used to identify subscriptions. A maximum of 5000 subscription network identifiers can be provided. |
optional | string | |
identifiers.ipAddress | List of subscription IP address to be used to identify subscriptions. A maximum of 5000 subscription IP addresses can be provided. |
optional | string | |
criteria.uids | Labels all subscriptions whose uid matches with the specified ids. | optional | uid | |
criteria.labels | Labels all subscriptions which have one of the specified label. | optional | string | |
criteria.identifier | Labels all subscriptions whose identifier contains the given string. | optional | string | |
criteria.mobileNumber | Labels all subscriptions whose mobileNumber contains the given string. | optional | string | |
criteria.networkIdentifier | Labels all subscriptions whose networkIdentifier contains the given string. | optional | string | |
criteria.eid | Labels all subscriptions whose eUICC-ID contains the given string. | optional | string | |
criteria.ipAddress | Labels all subscriptions whose ipAddress contains the given string. | optional | string | |
criteria.operator | Labels all subscriptions matching the given operator. | optional | string | |
criteria.assigned | Labels all subscriptions assigned (or not) to a system. Expected value : true/false. | optional | boolean | |
criteria.states | Labels all subscriptions matching the specified states. States are : INVENTORY, ACTIVE, INACTIVE, SUSPENDED, RETIRED, UNKNOWN |
optional | string | |
criteria.operatorAccount.uid | Labels all subscriptions linked to the operator account having the specified uid. | optional | string | |
criteria.operatorAccount.name | Labels all subscriptions linked to a operator account whose name contains the given string. | optional | string |
Name | Description | Use | Default | Type | Operand |
---|---|---|---|---|---|
company | Labels all subscriptions available for the company | optional | caller's company | uid string | = |
Name | Description |
---|---|
label.missing | The list of label to add or remove is empty. |
label.amount.exceeded | The number of labels to add or remove is greater than 100. |
selection.empty | There is no subscription matching the given criteria. |
selection.invalid | The selection is invalid. The possible causes are :
|
HTTP Method | POST |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: application/json |
Permissions | entities.subscriptions.edit |
Import
/api/v1/operations/subscriptions/import
Imports and creates subscriptions from a CSV file.
Request
POST https://na.airvantage.net/api/v1/operations/subscriptions/import Content-type: multipart/mixed; boundary="BoundaryUgix6QHMxLwJ4siU" --BoundaryUgix6QHMxLwJ4siU Content-Disposition: form-data; name="file"; filename="file.csv" Content-Type: text/csv // CSV attached ... --BoundaryUgix6QHMxLwJ4siU Content-Disposition: form-data; name="parameters"; filename="parameters.json" Content-Type: application/json // JSON attached { "notify" : true, "callback" : "callback_url" } --BoundaryUgix6QHMxLwJ4siU--
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "operation":"4b89657f63aac4b299c1d46e98a495326" }
Name | Description | Use | Default | Type |
---|---|---|---|---|
company | Set the context where the new subscriptions will be created. | optional | caller's company | uid string |
Header | Description | Use |
---|---|---|
OPERATOR | The operator of the new subscription. | required |
IDENTIFIER | The identifier (ICCID, ESN or MEID) of the new subscription. | optional |
NETWORK IDENTIFIER | The network identifier (IMSI or MIN) of the new subscription. | optional |
MOBILE NUMBER | The mobile number (MSISDN or MDN) of the new subscription. | optional |
IP | The IP address of the new subscription. | optional |
REQUESTED IP | The requested IP address that must be configured at the network level as static IP. | optional |
OPERATOR ACCOUNT | The operator account id for the new subscription. | optional |
LABELS | The labels of the new subscription, separated by a '|' character. | optional |
At least one of the subscription identifiers (Identifier, Mobile Number, Network Identifier) is expected.
{ "notify" : true|false, "callback" : "callback_url" }
Field | Description | Use | Default | Type |
---|---|---|---|---|
notify | Send an email notification to the user calling this method when the operation finishes. | optional | false | boolean |
callback | The endpoint URL to call when the operation state changes. The callback is done using HTTP 'POST' method. | optional | string |
Name | Description |
---|---|
file.unreadable | File is unreadable |
file.header.missing | CSV header is missing |
csv.header.unknown.column | CSV header column is unknown |
file.missing.data | File contains no data |
file.too.large | Files cannot be more than 10MB |
HTTP Method | POST |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: application/octet-stream |
Permissions | entities.subscriptions.create |
Delete multiple subscriptions
/api/v1/operations/subscriptions/delete
Deletes several subscriptions. As this operation may be long, depending on the number of subscriptions to delete, it is done asynchronously. Subscriptions linked to a system will not be deleted and the task associated to these subscriptions will fail.
Request
POST https://na.airvantage.net/api/v1/operations/subscriptions/delete Content-Type: application/json ... { "subscriptions" : { "uids" : ["16199496f6d24f0691fa006ef53e5592"] } }
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "operation":"4b89657f63aac4b299c1d46e98a495326" }
Name | Description | Use | Default | Type |
---|---|---|---|---|
company | Set the context company. | optional | caller's company | uid |
{ "notify" : true|false, "callback" : "callback URL", "subscriptions" : { "label" : "label", "uids" : ["uid1", ...], "dependsOn" : { "operation" : "uid", "states" : ["FAILURE"] }, "criteria" : { "uids" : [] "labels" : [], "identifier" : , "mobileNumber" : , "networkIdentifier" : , "eid" : , "ipAddress" : , "operator" : , "assigned" : , "states" : [], "operatorAccount" : { "uid" : , "name" : } } } }
Field | Description | Use | Default | Type |
---|---|---|---|---|
notify | Send an email notification to the user calling this method when the operation finishes. | optional | false | boolean |
callback | The endpoint URL to call when the operation state changes. The callback is done using HTTP 'POST' method. | optional | string | |
subscriptions.label | Label name. All subscriptions linked to the label will be incorporated to the operation | required | string | |
subscriptions.uids | List of subscription uids to be used to launch the operation | required | uid | |
subscriptions.dependsOn.operation | Identifier of the operation to be used to launch this operation In other words, the tasks of the new operation will start only when the tasks of specified operation will be finished. |
required if 'dependsOn' set | uid | |
subscriptions.dependsOn.states | States of the tasks which will be used as input of this operation. Possible values are : SUCCESS, FAILURE and CANCELLED. If null or empty, all tasks from the parent operation will be used as input of this operation. |
optional | SUCCESS,FAILURE,CANCELLED | string array |
subscriptions.criteria.uids | Selects all subscriptions whose uid matches with the specified ids. | optional | uid | |
subscriptions.criteria.labels | Selects all subscriptions which have one of the specified label. | optional | string | |
subscriptions.criteria.identifier | Selects all subscriptions whose identifier contains the given string. | optional | string | |
subscriptions.criteria.mobileNumber | Selects all subscriptions whose mobileNumber contains the given string. | optional | string | |
subscriptions.criteria.networkIdentifier | Selects all subscriptions whose networkIdentifier contains the given string. | optional | string | |
subscriptions.criteria.eid | Selects all subscriptions whose eUICC-ID contains the given string. | optional | string | |
subscriptions.criteria.ipAddress | Selects all subscriptions whose ipAddress contains the given string. | optional | string | |
subscriptions.criteria.operator | Selects all subscriptions matching the given operator. | optional | string | |
subscriptions.criteria.assigned | Selects all subscriptions assigned (or not) to a system. Expected value : true/false. | optional | boolean | |
subscriptions.criteria.states | Selects all subscriptions matching the specified states. States are : INVENTORY, ACTIVE, INACTIVE, SUSPENDED, RETIRED, UNKNOWN |
optional | string | |
subscriptions.criteria.operatorAccount.uid | Selects all subscriptions linked to the operator account having the specified uid. | optional | string | |
subscriptions.criteria.operatorAccount.name | Selects all subscriptions linked to a operator account whose name contains the given string. | optional | string |
Name | Description |
---|---|
selection.empty | The list of subscription uids is empty or no subscription found for the specified label or criteria. |
selection.invalid | The selection is invalid. Only one of the following attributes has to be set : label, uids, dependsOn, or criteria. |
selection.max.uid.reached | The list of subscription uids contains more than 100 uids. |
label.unknown | The specified label is unknown |
operation.unknown | The specified 'dependsOn' operation is unknown |
subscription.assigned | Shown in the operation task. Raised when the subscription cannot be deleted because it is still assigned to a system. |
subscription.unknown | Shown in the operation task. Raised when the subscription cannot be found in AirVantage. |
HTTP Method | POST |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: application/json |
Permissions | entities.subscriptions.delete |
Activate
/api/v1/operations/subscriptions/activate
Launches an operation to activate a set of subscriptions defined by a list of uids, a label, or criteria.
Request
POST https://na.airvantage.net/api/v1/operations/subscriptions/activate Content-Type: application/json ... { "subscriptions" : { "uids" : ["b0e44f9ef19a475ca237aeeeef92998a"] }, "accountParameters" : [ { "account" : "5c3a642f60514e01a9a4b4734ff60dde", "parameters" : { "PricePlan" : ["Primary"] } } ] }
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "operation":"4b89657f63aac4b299c1d46e98a495326" }
{ "notify" : true|false, "callback" : "callback URL", "scheduledTime": "scheduled_time", "subscriptions" : { "label" : "label", "uids" : ["uid1", ...], "dependsOn" : { "operation" : "uid", "states" : ["FAILURE"] }, "criteria" : { "uids" : [] "labels" : [], "identifier" : , "mobileNumber" : , "networkIdentifier" : , "eid" : , "ipAddress" : , "operator" : , "assigned" : , "states" : [], "operatorAccount" : { "uid" : , "name" : } } }, "accountParameters" : [ { "account" : "operator_account_uid", "parameters" : { "key1" : ["value1"], "key2" : ["value2", "value3"] } } ], "offerId" : "offer_uid" }
'label' or 'uids' or 'criteria' should be set to activate subscriptions
Field | Description | Use | Default | Type |
---|---|---|---|---|
notify | Send an email notification to the user calling this method when the operation finishes. | optional | caller's company | boolean |
callback | The endpoint URL to call when the operation state changes. The callback is done using HTTP 'POST' method. | optional | string | |
scheduledTime | Date time when the operation will be launched. If null, the operation starts immediately. The date must be lower than 90 days. |
optional | null | timestamp |
timeout | The date for which the operation is considered as expired. If null, the operation will expire in 7 days. |
optional | null | timestamp |
subscriptions.label | Label name. All subscriptions linked to the label will be incorporated to the operation | required | string | |
subscriptions.uids | List of subscription uids to be used to launch the operation | required | uid | |
subscriptions.dependsOn.operation | Identifier of the operation to be used to launch this operation In other words, the tasks of the new operation will start only when the tasks of specified operation will be finished. |
required if 'dependsOn' set | uid | |
subscriptions.dependsOn.states | States of the tasks which will be used as input of this operation. Possible values are : SUCCESS, FAILURE and CANCELLED. If null or empty, all tasks from the parent operation will be used as input of this operation. |
optional | SUCCESS,FAILURE,CANCELLED | string array |
subscriptions.criteria.uids | Selects all subscriptions whose uid matches with the specified ids. | optional | uid | |
subscriptions.criteria.labels | Selects all subscriptions which have one of the specified label. | optional | string | |
subscriptions.criteria.identifier | Selects all subscriptions whose identifier contains the given string. | optional | string | |
subscriptions.criteria.mobileNumber | Selects all subscriptions whose mobileNumber contains the given string. | optional | string | |
subscriptions.criteria.networkIdentifier | Selects all subscriptions whose networkIdentifier contains the given string. | optional | string | |
subscriptions.criteria.eid | Selects all subscriptions whose eUICC-ID contains the given string. | optional | string | |
subscriptions.criteria.ipAddress | Selects all subscriptions whose ipAddress contains the given string. | optional | string | |
subscriptions.criteria.operator | Selects all subscriptions matching the given operator. | optional | string | |
subscriptions.criteria.assigned | Selects all subscriptions assigned (or not) to a system. Expected value : true/false. | optional | boolean | |
subscriptions.criteria.states | Selects all subscriptions matching the specified states. States are : INVENTORY, ACTIVE, INACTIVE, SUSPENDED, RETIRED, UNKNOWN |
optional | string | |
subscriptions.criteria.operatorAccount.uid | Selects all subscriptions linked to the operator account having the specified uid. | optional | string | |
subscriptions.criteria.operatorAccount.name | Selects all subscriptions linked to a operator account whose name contains the given string. | optional | string | |
accountParameters.account | Uid of the Operator account for which operation parameters are set | optional | uid | |
accountParameters.parameters | List of parameters (key/value) to be used with all subscription linked to the defined operator account. The operation parameters to be set for an operator account are described by the Operator connection linked to this account. |
optional | string | |
offerId | The unique identifier of the Offer to be used to activate the systems. | optional | uid |
Name | Description | Use | Default | Type |
---|---|---|---|---|
company | Set the context where the operation has to be executed. | optional | caller's company | uid string |
Name | Description |
---|---|
operation.invalid.schedule.date | The specified schedule date is invalid (greater than 90 days). |
operation.invalid.timeout.date | The specified timeout is less than schedule date. |
selection.empty | The list of subscription uids is empty or no subscription found for the specified label or criteria. |
selection.invalid | The selection is invalid. Only one of the following attributes has to be set : label, uids, dependsOn, or criteria. |
selection.max.uid.reached | The list of subscription uids contains more than 100 uids. |
label.unknown | The specified label is unknown |
operation.unknown | The specified 'dependsOn' operation is unknown |
operation.subscription.prov.operator.account.unknown.connection | The operator associated to the operator account is unknown. |
operation.subscription.prov.operator.account.unsupported.operation | The operation is not supported by the operator associated to the operator account. |
operator.connection.account.parameters.invalid.type | The type of the parameter value is invalid. See the description of the operator connection. |
operator.connection.account.parameters.invalid.constraint | The constaints of the parameter value are invalid. See the description of the operator connection. |
operator.connection.account.parameters.invalid.cardinality | The cardinality of the parameter value is invalid. See the description of the operator connection. |
operator.connection.account.parameters.missing | A required provisioning parameter is missing. See the description of the operator connection. |
operation.subscription.prov.missing.operator.account | No operator account is defined for the subscription. |
operation.subscription.prov.unknown.operator.connection | The operator linked to the subscription is unknown. |
operation.subscription.prov.unsupported.operation | The operation is not supported by the operator of the subscription. |
operation.subscription.prov.invalid.subscription.state | The state of the subscription does not allow to launch the provisioning action. |
operation.subscription.prov.missing.communication.id | The communication identifier (Identifier, MobileNumber or NetworkIdentifier) is not set on the subscription. |
operation.subscription.prov.unknown.offer | The specified offer does not exist. |
HTTP Method | POST |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: application/json |
Permissions | entities.subscriptions.operations.launch |
Suspend
/api/v1/operations/subscriptions/suspend
Launches an operation to suspend a set of subscriptions defined by a list of uids, a label, or criteria.
Request
POST https://na.airvantage.net/api/v1/operations/subscriptions/suspend Content-Type: application/json ... { "subscriptions" : { "uids" : ["b0e44f9ef19a475ca237aeeeef92998a"] }, "accountParameters" : [ { "account" : "5c3a642f60514e01a9a4b4734ff60dde", "parameters" : { "name1" : ["value1"], "name2" : ["value2", "value3"] } } ] }
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "operation":"4b89657f63aac4b299c1d46e98a495326" }
{ "notify" : true|false, "callback" : "callback URL", "scheduledTime": "scheduled_time", "subscriptions" : { "label" : "label", "uids" : ["uid1", ...], "dependsOn" : { "operation" : "uid", "states" : ["FAILURE"] }, "criteria" : { "uids" : [] "labels" : [], "identifier" : , "mobileNumber" : , "networkIdentifier" : , "eid" : , "ipAddress" : , "operator" : , "assigned" : , "states" : [], "operatorAccount" : { "uid" : , "name" : } } }, "accountParameters" : [ { "account" : "operator_account_uid", "parameters" : { "key1" : ["value1"], "key2" : ["value2", "value3"] } } ] }
'label' or 'uids' or 'criteria' should be set to suspend subscriptions
Field | Description | Use | Default | Type |
---|---|---|---|---|
notify | Send an email notification to the user calling this method when the operation finishes. | optional | caller's company | boolean |
callback | The endpoint URL to call when the operation state changes. The callback is done using HTTP 'POST' method. | optional | string | |
scheduledTime | Date time when the operation will be launched. If null, the operation starts immediately. The date must be lower than 90 days. |
optional | null | timestamp |
timeout | The date for which the operation is considered as expired. If null, the operation will expire in 7 days. |
optional | null | timestamp |
subscriptions.label | Label name. All subscriptions linked to the label will be incorporated to the operation | required | string | |
subscriptions.uids | List of subscription uids to be used to launch the operation | required | uid | |
subscriptions.dependsOn.operation | Identifier of the operation to be used to launch this operation In other words, the tasks of the new operation will start only when the tasks of specified operation will be finished. |
required if 'dependsOn' set | uid | |
subscriptions.dependsOn.states | States of the tasks which will be used as input of this operation. Possible values are : SUCCESS, FAILURE and CANCELLED. If null or empty, all tasks from the parent operation will be used as input of this operation. |
optional | SUCCESS,FAILURE,CANCELLED | string array |
subscriptions.criteria.uids | Selects all subscriptions whose uid matches with the specified ids. | optional | uid | |
subscriptions.criteria.labels | Selects all subscriptions which have one of the specified label. | optional | string | |
subscriptions.criteria.identifier | Selects all subscriptions whose identifier contains the given string. | optional | string | |
subscriptions.criteria.mobileNumber | Selects all subscriptions whose mobileNumber contains the given string. | optional | string | |
subscriptions.criteria.networkIdentifier | Selects all subscriptions whose networkIdentifier contains the given string. | optional | string | |
subscriptions.criteria.eid | Selects all subscriptions whose eUICC-ID contains the given string. | optional | string | |
subscriptions.criteria.ipAddress | Selects all subscriptions whose ipAddress contains the given string. | optional | string | |
subscriptions.criteria.operator | Selects all subscriptions matching the given operator. | optional | string | |
subscriptions.criteria.assigned | Selects all subscriptions assigned (or not) to a system. Expected value : true/false. | optional | boolean | |
subscriptions.criteria.states | Selects all subscriptions matching the specified states. States are : INVENTORY, ACTIVE, INACTIVE, SUSPENDED, RETIRED, UNKNOWN |
optional | string | |
subscriptions.criteria.operatorAccount.uid | Selects all subscriptions linked to the operator account having the specified uid. | optional | string | |
subscriptions.criteria.operatorAccount.name | Selects all subscriptions linked to a operator account whose name contains the given string. | optional | string | |
accountParameters.account | Uid of the Operator account for which operation parameters are set | optional | uid | |
accountParameters.parameters | List of parameters (key/value) to be used with all subscription linked to the defined operator account. The operation parameters to be set for an operator account are described by the Operator connection linked to this account. |
optional | string |
Name | Description | Use | Default | Type |
---|---|---|---|---|
company | Set the context where the operation has to be executed. | optional | caller's company | uid string |
Name | Description |
---|---|
operation.invalid.schedule.date | The specified schedule date is invalid (greater than 90 days). |
operation.invalid.timeout.date | The specified timeout is less than schedule date. |
selection.empty | The list of subscription uids is empty or no subscription found for the specified label or criteria. |
selection.invalid | The selection is invalid. Only one of the following attributes has to be set : label, uids, dependsOn, or criteria. |
selection.max.uid.reached | The list of subscription uids contains more than 100 uids. |
label.unknown | The specified label is unknown |
operation.unknown | The specified 'dependsOn' operation is unknown |
operation.subscription.prov.operator.account.unknown.connection | The operator associated to the operator account is unknown. |
operation.subscription.prov.operator.account.unsupported.operation | The operation is not supported by the operator associated to the operator account. |
operator.connection.account.parameters.invalid.type | The type of the parameter value is invalid. See the description of the operator connection. |
operator.connection.account.parameters.invalid.constraint | The constaints of the parameter value are invalid. See the description of the operator connection. |
operator.connection.account.parameters.invalid.cardinality | The cardinality of the parameter value is invalid. See the description of the operator connection. |
operator.connection.account.parameters.missing | A required provisioning parameter is missing. See the description of the operator connection. |
operation.subscription.prov.missing.operator.account | No operator account is defined for the subscription. |
operation.subscription.prov.unknown.operator.connection | The operator linked to the subscription is unknown. |
operation.subscription.prov.unsupported.operation | The operation is not supported by the operator of the subscription. |
operation.subscription.prov.invalid.subscription.state | The state of the subscription does not allow to launch the provisioning action. |
operation.subscription.prov.missing.communication.id | The communication identifier (Identifier, MobileNumber or NetworkIdentifier) is not set on the subscription. |
HTTP Method | POST |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: application/json |
Permissions | entities.subscriptions.operations.launch |
Restore
/api/v1/operations/subscriptions/restore
Launches an operation to restore a set of subscriptions defined by a list of uids, a label, or criteria.
Request
POST https://na.airvantage.net/api/v1/operations/subscriptions/restore Content-Type: application/json ... { "scheduledTime" : "1335279732093", "subscriptions" : { "uids" : ["b0e44f9ef19a475ca237aeeeef92998a"] }, "accountParameters" : [ { "account" : "5c3a642f60514e01a9a4b4734ff60dde", "parameters" : { "name1" : ["value1"], "name2" : ["value2", "value3"] } } ] }
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "operation":"4b89657f63aac4b299c1d46e98a495326" }
{ "notify" : true|false, "callback" : "callback URL", "scheduledTime": "scheduled_time", "subscriptions" : { "label" : "label", "uids" : ["uid1", ...], "dependsOn" : { "operation" : "uid", "states" : ["FAILURE"] }, "criteria" : { "uids" : [] "labels" : [], "identifier" : , "mobileNumber" : , "networkIdentifier" : , "eid" : , "ipAddress" : , "operator" : , "assigned" : , "states" : [], "operatorAccount" : { "uid" : , "name" : } } }, "accountParameters" : [ { "account" : "operator_account_uid", "parameters" : { "key1" : ["value1"], "key2" : ["value2", "value3"] } } ] }
'label' or 'uids' or 'criteria' should be set to restore subscriptions
Field | Description | Use | Default | Type |
---|---|---|---|---|
notify | Send an email notification to the user calling this method when the operation finishes. | optional | caller's company | boolean |
callback | The endpoint URL to call when the operation state changes. The callback is done using HTTP 'POST' method. | optional | string | |
scheduledTime | Date time when the operation will be launched. If null, the operation starts immediately. The date must be lower than 90 days. |
optional | null | timestamp |
timeout | The date for which the operation is considered as expired. If null, the operation will expire in 7 days. |
optional | null | timestamp |
subscriptions.label | Label name. All subscriptions linked to the label will be incorporated to the operation | required | string | |
subscriptions.uids | List of subscription uids to be used to launch the operation | required | uid | |
subscriptions.dependsOn.operation | Identifier of the operation to be used to launch this operation In other words, the tasks of the new operation will start only when the tasks of specified operation will be finished. |
required if 'dependsOn' set | uid | |
subscriptions.dependsOn.states | States of the tasks which will be used as input of this operation. Possible values are : SUCCESS, FAILURE and CANCELLED. If null or empty, all tasks from the parent operation will be used as input of this operation. |
optional | SUCCESS,FAILURE,CANCELLED | string array |
subscriptions.criteria.uids | Selects all subscriptions whose uid matches with the specified ids. | optional | uid | |
subscriptions.criteria.labels | Selects all subscriptions which have one of the specified label. | optional | string | |
subscriptions.criteria.identifier | Selects all subscriptions whose identifier contains the given string. | optional | string | |
subscriptions.criteria.mobileNumber | Selects all subscriptions whose mobileNumber contains the given string. | optional | string | |
subscriptions.criteria.networkIdentifier | Selects all subscriptions whose networkIdentifier contains the given string. | optional | string | |
subscriptions.criteria.eid | Selects all subscriptions whose eUICC-ID contains the given string. | optional | string | |
subscriptions.criteria.ipAddress | Selects all subscriptions whose ipAddress contains the given string. | optional | string | |
subscriptions.criteria.operator | Selects all subscriptions matching the given operator. | optional | string | |
subscriptions.criteria.assigned | Selects all subscriptions assigned (or not) to a system. Expected value : true/false. | optional | boolean | |
subscriptions.criteria.states | Selects all subscriptions matching the specified states. States are : INVENTORY, ACTIVE, INACTIVE, SUSPENDED, RETIRED, UNKNOWN |
optional | string | |
subscriptions.criteria.operatorAccount.uid | Selects all subscriptions linked to the operator account having the specified uid. | optional | string | |
subscriptions.criteria.operatorAccount.name | Selects all subscriptions linked to a operator account whose name contains the given string. | optional | string | |
accountParameters.account | Uid of the Operator account for which operation parameters are set | optional | uid | |
accountParameters.parameters | List of parameters (key/value) to be used with all subscription linked to the defined operator account. The operation parameters to be set for an operator account are described by the Operator connection linked to this account. |
optional | string |
Name | Description | Use | Default | Type |
---|---|---|---|---|
company | Set the context where the operation has to be executed. | optional | caller's company | uid string |
Name | Description |
---|---|
operation.invalid.schedule.date | The specified schedule date is invalid (greater than 90 days). |
operation.invalid.timeout.date | The specified timeout is less than schedule date. |
selection.empty | The list of subscription uids is empty or no subscription found for the specified label or criteria. |
selection.invalid | The selection is invalid. Only one of the following attributes has to be set : label, uids, dependsOn, or criteria. |
selection.max.uid.reached | The list of subscription uids contains more than 100 uids. |
label.unknown | The specified label is unknown |
operation.unknown | The specified 'dependsOn' operation is unknown |
operation.subscription.prov.operator.account.unknown.connection | The operator associated to the operator account is unknown. |
operation.subscription.prov.operator.account.unsupported.operation | The operation is not supported by the operator associated to the operator account. |
operator.connection.account.parameters.invalid.type | The type of the parameter value is invalid. See the description of the operator connection. |
operator.connection.account.parameters.invalid.constraint | The constaints of the parameter value are invalid. See the description of the operator connection. |
operator.connection.account.parameters.invalid.cardinality | The cardinality of the parameter value is invalid. See the description of the operator connection. |
operator.connection.account.parameters.missing | A required provisioning parameter is missing. See the description of the operator connection. |
operation.subscription.prov.missing.operator.account | No operator account is defined for the subscription. |
operation.subscription.prov.unknown.operator.connection | The operator linked to the subscription is unknown. |
operation.subscription.prov.unsupported.operation | The operation is not supported by the operator of the subscription. |
operation.subscription.prov.invalid.subscription.state | The state of the subscription does not allow to launch the provisioning action. |
operation.subscription.prov.missing.communication.id | The communication identifier (Identifier, MobileNumber or NetworkIdentifier) is not set on the subscription. |
HTTP Method | POST |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: application/json |
Permissions | entities.subscriptions.operations.launch |
Terminate
/api/v1/operations/subscriptions/terminate
Launches an operation to terminate a set of subscriptions defined by a list of uids, a label, or criteria.
Request
POST https://na.airvantage.net/api/v1/operations/subscriptions/terminate Content-Type: application/json ... { "scheduledTime" : "1335279732093", "subscriptions" : { "uids" : ["b0e44f9ef19a475ca237aeeeef92998a"] }, "accountParameters" : [ { "account" : "5c3a642f60514e01a9a4b4734ff60dde", "parameters" : { "name1" : ["value1"], "name2" : ["value2", "value3"] } } ] }
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "operation":"4b89657f63aac4b299c1d46e98a495326" }
{ "notify" : true|false, "callback" : "callback URL", "scheduledTime": "scheduled_time", "subscriptions" : { "label" : "label", "uids" : ["uid1", ...], "dependsOn" : { "operation" : "uid", "states" : ["FAILURE"] }, "criteria" : { "uids" : [] "labels" : [], "identifier" : , "mobileNumber" : , "networkIdentifier" : , "eid" : , "ipAddress" : , "operator" : , "assigned" : , "states" : [], "operatorAccount" : { "uid" : , "name" : } } }, "accountParameters" : [ { "account" : "operator_account_uid", "parameters" : { "key1" : ["value1"], "key2" : ["value2", "value3"] } } ] }
'label' or 'uids' or 'criteria' should be set to terminate subscriptions
Field | Description | Use | Default | Type |
---|---|---|---|---|
notify | Send an email notification to the user calling this method when the operation finishes. | optional | caller's company | boolean |
callback | The endpoint URL to call when the operation state changes. The callback is done using HTTP 'POST' method. | optional | string | |
scheduledTime | Date time when the operation will be launched. If null, the operation starts immediately. The date must be lower than 90 days. |
optional | null | timestamp |
timeout | The date for which the operation is considered as expired. If null, the operation will expire in 7 days. |
optional | null | timestamp |
subscriptions.label | Label name. All subscriptions linked to the label will be incorporated to the operation | required | string | |
subscriptions.uids | List of subscription uids to be used to launch the operation | required | uid | |
subscriptions.dependsOn.operation | Identifier of the operation to be used to launch this operation In other words, the tasks of the new operation will start only when the tasks of specified operation will be finished. |
required if 'dependsOn' set | uid | |
subscriptions.dependsOn.states | States of the tasks which will be used as input of this operation. Possible values are : SUCCESS, FAILURE and CANCELLED. If null or empty, all tasks from the parent operation will be used as input of this operation. |
optional | SUCCESS,FAILURE,CANCELLED | string array |
subscriptions.criteria.uids | Selects all subscriptions whose uid matches with the specified ids. | optional | uid | |
subscriptions.criteria.labels | Selects all subscriptions which have one of the specified label. | optional | string | |
subscriptions.criteria.identifier | Selects all subscriptions whose identifier contains the given string. | optional | string | |
subscriptions.criteria.mobileNumber | Selects all subscriptions whose mobileNumber contains the given string. | optional | string | |
subscriptions.criteria.networkIdentifier | Selects all subscriptions whose networkIdentifier contains the given string. | optional | string | |
subscriptions.criteria.eid | Selects all subscriptions whose eUICC-ID contains the given string. | optional | string | |
subscriptions.criteria.ipAddress | Selects all subscriptions whose ipAddress contains the given string. | optional | string | |
subscriptions.criteria.operator | Selects all subscriptions matching the given operator. | optional | string | |
subscriptions.criteria.assigned | Selects all subscriptions assigned (or not) to a system. Expected value : true/false. | optional | boolean | |
subscriptions.criteria.states | Selects all subscriptions matching the specified states. States are : INVENTORY, ACTIVE, INACTIVE, SUSPENDED, RETIRED, UNKNOWN |
optional | string | |
subscriptions.criteria.operatorAccount.uid | Selects all subscriptions linked to the operator account having the specified uid. | optional | string | |
subscriptions.criteria.operatorAccount.name | Selects all subscriptions linked to a operator account whose name contains the given string. | optional | string | |
accountParameters.account | Uid of the Operator account for which operation parameters are set | optional | uid | |
accountParameters.parameters | List of parameters (key/value) to be used with all subscription linked to the defined operator account. The operation parameters to be set for an operator account are described by the Operator connection linked to this account. |
optional | string |
Name | Description | Use | Default | Type |
---|---|---|---|---|
company | Set the context where the operation has to be executed. | optional | caller's company | uid string |
Name | Description |
---|---|
operation.invalid.schedule.date | The specified schedule date is invalid (greater than 90 days). |
operation.invalid.timeout.date | The specified timeout is less than schedule date. |
selection.empty | The list of subscription uids is empty or no subscription found for the specified label or criteria. |
selection.invalid | The selection is invalid. Only one of the following attributes has to be set : label, uids, dependsOn, or criteria. |
selection.max.uid.reached | The list of subscription uids contains more than 100 uids. |
label.unknown | The specified label is unknown |
operation.unknown | The specified 'dependsOn' operation is unknown |
operation.subscription.prov.operator.account.unknown.connection | The operator associated to the operator account is unknown. |
operation.subscription.prov.operator.account.unsupported.operation | The operation is not supported by the operator associated to the operator account. |
operator.connection.account.parameters.invalid.type | The type of the parameter value is invalid. See the description of the operator connection. |
operator.connection.account.parameters.invalid.constraint | The constaints of the parameter value are invalid. See the description of the operator connection. |
operator.connection.account.parameters.invalid.cardinality | The cardinality of the parameter value is invalid. See the description of the operator connection. |
operator.connection.account.parameters.missing | A required provisioning parameter is missing. See the description of the operator connection. |
operation.subscription.prov.missing.operator.account | No operator account is defined for the subscription. |
operation.subscription.prov.unknown.operator.connection | The operator linked to the subscription is unknown. |
operation.subscription.prov.unsupported.operation | The operation is not supported by the operator of the subscription. |
operation.subscription.prov.invalid.subscription.state | The state of the subscription does not allow to launch the provisioning action. |
operation.subscription.prov.missing.communication.id | The communication identifier (Identifier, MobileNumber or NetworkIdentifier) is not set on the subscription. |
operation.subscription.prov.under.contract | Termination is not allowed until contract period is over. |
HTTP Method | POST |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: application/json |
Permissions | entities.subscriptions.operations.launch |
Synchronize
/api/v1/operations/subscriptions/synchronize
Launches an operation to synchronize a set of subscriptions defined by a list of uids, a label, or criteria.
Request
POST https://na.airvantage.net/api/v1/operations/subscriptions/synchronize Content-Type: application/json ... { "scheduledTime" : "1335279732093", "subscriptions" : { "uids" : ["b0e44f9ef19a475ca237aeeeef92998a"] }, "accountParameters" : [ { "account" : "5c3a642f60514e01a9a4b4734ff60dde", "parameters" : { "name1" : ["value1"], "name2" : ["value2", "value3"] } } ] }
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "operation":"4b89657f63aac4b299c1d46e98a495326" }
{ "notify" : true|false, "callback" : "callback URL", "scheduledTime": "scheduled_time", "subscriptions" : { "label" : "label", "uids" : ["uid1", ...], "dependsOn" : { "operation" : "uid", "states" : ["FAILURE"] }, "criteria" : { "uids" : [] "labels" : [], "identifier" : , "mobileNumber" : , "networkIdentifier" : , "eid" : , "ipAddress" : , "operator" : , "assigned" : , "states" : [], "operatorAccount" : { "uid" : , "name" : } } }, "accountParameters" : [ { "account" : "operator_account_uid", "parameters" : { "key1" : ["value1"], "key2" : ["value2", "value3"] } } ] }
'label' or 'uids' or 'criteria' should be set to synchronize subscriptions
Field | Description | Use | Default | Type |
---|---|---|---|---|
notify | Send an email notification to the user calling this method when the operation finishes. | optional | caller's company | boolean |
callback | The endpoint URL to call when the operation state changes. The callback is done using HTTP 'POST' method. | optional | string | |
scheduledTime | Date time when the operation will be launched. If null, the operation starts immediately. The date must be lower than 90 days. |
optional | null | timestamp |
timeout | The date for which the operation is considered as expired. If null, the operation will expire in 7 days. |
optional | null | timestamp |
subscriptions.label | Label name. All subscriptions linked to the label will be incorporated to the operation | required | string | |
subscriptions.uids | List of subscription uids to be used to launch the operation | required | uid | |
subscriptions.dependsOn.operation | Identifier of the operation to be used to launch this operation In other words, the tasks of the new operation will start only when the tasks of specified operation will be finished. |
required if 'dependsOn' set | uid | |
subscriptions.dependsOn.states | States of the tasks which will be used as input of this operation. Possible values are : SUCCESS, FAILURE and CANCELLED. If null or empty, all tasks from the parent operation will be used as input of this operation. |
optional | SUCCESS,FAILURE,CANCELLED | string array |
subscriptions.criteria.uids | Selects all subscriptions whose uid matches with the specified ids. | optional | uid | |
subscriptions.criteria.labels | Selects all subscriptions which have one of the specified label. | optional | string | |
subscriptions.criteria.identifier | Selects all subscriptions whose identifier contains the given string. | optional | string | |
subscriptions.criteria.mobileNumber | Selects all subscriptions whose mobileNumber contains the given string. | optional | string | |
subscriptions.criteria.networkIdentifier | Selects all subscriptions whose networkIdentifier contains the given string. | optional | string | |
subscriptions.criteria.eid | Selects all subscriptions whose eUICC-ID contains the given string. | optional | string | |
subscriptions.criteria.ipAddress | Selects all subscriptions whose ipAddress contains the given string. | optional | string | |
subscriptions.criteria.operator | Selects all subscriptions matching the given operator. | optional | string | |
subscriptions.criteria.assigned | Selects all subscriptions assigned (or not) to a system. Expected value : true/false. | optional | boolean | |
subscriptions.criteria.states | Selects all subscriptions matching the specified states. States are : INVENTORY, ACTIVE, INACTIVE, SUSPENDED, RETIRED, UNKNOWN |
optional | string | |
subscriptions.criteria.operatorAccount.uid | Selects all subscriptions linked to the operator account having the specified uid. | optional | string | |
subscriptions.criteria.operatorAccount.name | Selects all subscriptions linked to a operator account whose name contains the given string. | optional | string | |
accountParameters.account | Uid of the Operator account for which operation parameters are set | optional | uid | |
accountParameters.parameters | List of parameters (key/value) to be used with all subscription linked to the defined operator account. The operation parameters to be set for an operator account are described by the Operator connection linked to this account. |
optional | string |
Name | Description | Use | Default | Type |
---|---|---|---|---|
company | Set the context where the operation has to be executed. | optional | caller's company | uid string |
Name | Description |
---|---|
operation.invalid.schedule.date | The specified schedule date is invalid (greater than 90 days). |
operation.invalid.timeout.date | The specified timeout is less than schedule date. |
selection.empty | The list of subscription uids is empty or no subscription found for the specified label or criteria. |
selection.invalid | The selection is invalid. Only one of the following attributes has to be set : label, uids, dependsOn, or criteria. |
selection.max.uid.reached | The list of subscription uids contains more than 100 uids. |
label.unknown | The specified label is unknown |
operation.unknown | The specified 'dependsOn' operation is unknown |
operation.subscription.prov.operator.account.unknown.connection | The operator associated to the operator account is unknown. |
operation.subscription.prov.operator.account.unsupported.operation | The operation is not supported by the operator associated to the operator account. |
operator.connection.account.parameters.invalid.type | The type of the parameter value is invalid. See the description of the operator connection. |
operator.connection.account.parameters.invalid.constraint | The constaints of the parameter value are invalid. See the description of the operator connection. |
operator.connection.account.parameters.invalid.cardinality | The cardinality of the parameter value is invalid. See the description of the operator connection. |
operator.connection.account.parameters.missing | A required provisioning parameter is missing. See the description of the operator connection. |
operation.subscription.prov.missing.operator.account | No operator account is defined for the subscription. |
operation.subscription.prov.unknown.operator.connection | The operator linked to the subscription is unknown. |
operation.subscription.prov.unsupported.operation | The operation is not supported by the operator of the subscription. |
operation.subscription.prov.invalid.subscription.state | The state of the subscription does not allow to launch the provisioning action. |
operation.subscription.prov.missing.communication.id | The communication identifier (Identifier, MobileNumber or NetworkIdentifier) is not set on the subscription. |
HTTP Method | POST |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: application/json |
Permissions | entities.subscriptions.operations.launch |
IMEI Lock/Unlock
/api/v1/operations/subscriptions/imei/lock
Launches an operation to lock or unlock an ICCID with IMEI from a CSV file
Request
POST https://na.airvantage.net/api/v1/operations/subscriptions/imei/lock Content-type: multipart/mixed; boundary="BoundaryUgix6QHMxLwJ4siU" --BoundaryUgix6QHMxLwJ4siU Content-Disposition: form-data; name="file"; filename="file.csv" Content-Type: text/csv // CSV attached ... --BoundaryUgix6QHMxLwJ4siU Content-Disposition: form-data; name="parameters"; filename="parameters.json" Content-Type: application/json // JSON attached { "notify" : false, "callback" : "callback_url" } --BoundaryUgix6QHMxLwJ4siU--
Response
200 OK
HTTP/1.1 200 OK Content-Type: application/json ... { "operation":"4b89657f63aac4b299c1d46e98a495326" }
Name | Description | Use | Default | Type |
---|---|---|---|---|
company | Set the context where the locking or unlocking operation will be performed. | optional | caller's company | uid string |
Header | Description | Use |
---|---|---|
IDENTIFIER | The identifier (aka ICCID) used to identify subscription info. | required |
IMEI | The IMEI to pair and lock. This value is required when IMEI_LOCK is true. | optional* |
IMEI_LOCK | The IMEI lock state. The state can be either true or false. | required |
{ "notify" : true|false, "callback" : "callback_url" }
Field | Description | Use | Default | Type |
---|---|---|---|---|
notify | Send an email notification to the user calling this method when the operation finishes. | optional | false | boolean |
callback | The endpoint URL to call when the operation state changes. The callback is done using HTTP 'POST' method. | optional | string |
Name | Description |
---|---|
file.unreadable | File is unreadable |
file.header.missing | CSV header is missing |
csv.header.unknown.column | CSV header column is unknown |
csv.missing.required.columns | CSV required columns are missing |
file.missing.data | File contains no data |
file.too.large | Files cannot be more than 100MB |
subscription.missing | No subscription was found for the provided identifier |
subscription.invalid.imei | The imei is invalid. The possible causes are :
|
subscription.lock.already.exists.on.iccid | The ICCID is already in locked state when lock operation is requested |
subscription.no.lock.exists.on.iccid | The ICCID is already in unlocked state when unlock operation is requested |
HTTP Method | POST |
Requires Authentication | Yes |
Rate Limited | Yes |
Headers | Content-type: multipart/mixed |
Permissions | entities.subscriptions.imeiLock |