You can submit 1 SIM per request, or up to 1,000 when bulk content control is enabled for your account.
Content Control
Applies a content control policy to one or more SIMs.
urn:grt:gemmapplication/jsonhttps://gemmapi2.granitenet.com/v2/api/gemm/v1Uses and Requirements
Mobility sends an asynchronous SubscriberService callback for each SIM in the request when its content control settings are updated, or if the update fails.
Note
HTTP Status Codes
| Status | When |
|---|---|
200 | The request was accepted and a transactionID was returned. The content control change is applied asynchronously and the result for each SIM is sent later in a callback. |
400 | Validation failed (for example, contentControl is missing or not one of the listed values, contentControlId does not match a listed value, an ICCID is invalid or duplicated, or more SIMs were sent than allowed (1, or up to 1,000 when bulk content control is enabled for your account)), or a SIM is not eligible: it was not found, is not under the macnum account, is not Activated or Suspended, the SIMs are on different carriers, or content control is not supported for the SIM's carrier. No SIM is processed. |
401 | The bearer token is missing, invalid or expired, or you do not have access to the account in the macnum header. |
403 | Your token's role does not allow this action, or the SIM belongs to an account you do not have access to or that is not under the account in the macnum header. |
429 | Too many requests were sent in a short period. Wait briefly and retry. |
500 | An unexpected server error occurred. |
503 | The system is under scheduled maintenance. Retry after the maintenance window. |
504 | A dependent service did not respond in time. Retry the request. |
Available For
- Granite Multi Carrier SIM
- Granite Multi Carrier SIM: SIMs with a dynamic or public dynamic IP only.
Headers
| Header | Value |
|---|---|
Authorization | Bearer access-token |
Content-Type | application/json |
macnum | Macnum of the top level account for your organization. |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sims | array of simInfo objects | Yes | The SIMs to apply the content control policy to, specified by simInfo objects. You can submit 1 SIM per request, or up to 1,000 when bulk content control is enabled for your account. |
simInfo | object | Yes | SIM information. |
iccid | string | Yes | 19-20 digits. An F is allowed as the 20th character. |
contentControlId | integer | Conditional | The numeric ID of the content control policy that restricts the content the SIM can access. Send either contentControlId or contentControl. |
contentControl | string | Conditional | The name of the content control policy that restricts the content the SIM can access. Valid values are:
contentControlId or contentControl. |
Request Examples
Request to apply content control to an Activated or Suspended SIM using contentControlId:
Request to apply content control to an Activated or Suspended SIM using contentControl:
Responses
Immediate Success Response (200 OK)
Response Fields
| Parameter | Type | Description |
|---|---|---|
transactionID | string | A unique string that associates the request with the results sent in callbacks. Mobility sends a separate callback for each SIM that matched the request, showing whether the operation succeeded for that SIM and containing any requested information. All callbacks for the request have the same transactionID. |
Callback Success Response
Callback Response Fields
| Parameter | Type | Description |
|---|---|---|
requestType | string | Name of the requested action. For content control, the value is ContentControl. |
transactionID | string | A unique string that associates the request with the results sent in callbacks. Mobility sends a separate callback for each SIM that matched the request, showing whether the operation succeeded for that SIM and containing any requested information. All callbacks for the request have the same transactionID. |
simInfo | object | SIM information. |
iccid | string | 19-20 digits. |
msisdn | string | 10 digits. |
result | object | An object containing the result status. |
status | string | Result status: success or failure. |
message | string | Result message. |
errors | object | A list of error objects, if any. |
errorCode | string | Error code. |
errorMessage | string | Error message. |
callbackCount | integer | The number of times this callback message has been sent. |
maxCallbackThreshold | integer | The maximum number of times this callback message will be sent if it is not correctly acknowledged. |
Failure Responses
Immediate Error Message
The example below is an HTTP 403 response, returned when the SIM belongs to an account you do not have access to.
Error Response Fields
| Parameter | Type | Description |
|---|---|---|
result | object | An object containing the result status. |
status | string | Result status: success or failure. |
errors | object | A list of error objects, if any. |
errorCode | string | Error code. |
errorMessage | string | Error message. |
SIM Eligibility Error (HTTP 400)
When a SIM is not eligible (for example, it was not found, is not Activated or Suspended, or the SIMs are on different carriers), the response is HTTP 400 with a per-SIM validation body instead of the format above. validationErrorInfo gives the overall message, and data.simCardDetails lists each SIM with its error in status.