Skip to main content

Bulk Network Preferences for SIM cards

PUT 
/actions/network_preferences/sim_cards

This API allows dispatching the same operation described for the PUT sim_cards/:id/network_preferences API for multiple SIM cards at once.

Although, a SIM card network preference may fail individually under any validation triggered as a consequence of its state. For example, a SIM can't have an in-progress OTA update for applying a Network Preference, so they'll fail when requested in this API. In that scenario, the specific error will be present in the response along with the successful definitions in the "errors" response node.

Request

Body

    sim_card_ids uuid[]

    mobile_network_operators_preferences

    object[]

    A list of mobile network operators and the priority that should be applied when the SIM is connecting to the network.

  • Array [

  • mobile_network_operator_id uuid

    The mobile network operator resource identification UUID.

    priority integer

    It determines what is the priority of a specific network operator that should be assumed by a SIM card when connecting to a network. The highest priority is 0, the second highest is 1 and so on.

  • ]

  • A list of mobile network operators and the priority that should be applied when the SIM is connecting to the network.

Responses

202:

422: Unprocessable entity. Check the 'detail' field in response for details.

Request samples


curl -L -X PUT 'https://api.telnyx.com/v2/actions/network_preferences/sim_cards' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"sim_card_ids": [
"6b14e151-8493-4fa1-8664-1cc4e6d14158",
"6b14e151-8493-4fa1-8664-1cc4e6d14158"
],
"mobile_network_operators_preferences": [
{
"mobile_network_operator_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"priority": 0
}
]
}'

Response samples


{
"data": [
{
"record_type": "sim_card_network_preferences",
"sim_card_id": "6b14e151-8493-4fa1-8664-1cc4e6d14158",
"mobile_network_operators_preferences": [
{
"mobile_network_operator_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"mobile_network_operator_name": "AT&T Mobility (USACG)",
"priority": 0
}
],
"ota_updates": [
{
"created_at": "2018-02-02T22:25:27.521Z",
"id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"record_type": "ota_update",
"settings": {
"mobile_network_operators_preferences": [
{
"mobile_network_operator_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"mobile_network_operator_name": "AT&T Mobility (USACG)",
"priority": 0
}
]
},
"sim_card_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
"status": "in-progress",
"type": "sim_card_network_preferences",
"updated_at": "2018-02-02T22:25:27.521Z"
}
],
"created_at": "2018-02-02T22:25:27.521Z",
"updated_at": "2018-02-02T22:25:27.521Z"
}
],
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}