Skip to main content

How to update multiple SIMs at once

You can update SIM properties in bulk in the Onomondo app or via a PATCH request sent to the Onomondo API.

Written by Jakub Kubinski

Environment

Question

  • How to update multiple SIMs at once?

  • Is it possible to update multiple SIMs at the same time?

  • How to bulk update SIMs?

  • Can I update many SIMs in the app or do I have to use the API?

Answer

You can update SIM properties on a large number of SIMs directly in the Onomondo app.

  1. Go to SIMs.

  2. Apply table filters to refine the view. Combine filters to identify the exact group of SIMs to act on.

  3. Select SIMs.

    1. Individual SIMs - tick the checkbox next to each SIM ID you intend to update.

    2. All SIMs visible on the page - tick the checkbox on top of the SIM ID array.

    3. All SIMs that match your criteria - tick the checkbox on top of the SIM ID array and click on “Select all X SIMs”.

  4. Click on “Edit selected SIMs” in the top right corner of the page.

  5. Choose attributes to edit (e.g. Tags, Network List, data limit, etc.)

  6. Click “Continue”.

  7. Review changes carefully.

  8. Click “Save changes”.

💡 SIM attributes you can update:

  • Label

  • Tags

  • Network list

  • Technologies

  • Connectors

  • Data limit and alert threshold

  • Cost alert and alert threshold

You can update a maximum of 5000 SIMs per bulk action. Processing the update may take a few moments depending on selection size.



Workaround A:

Alternatively, you can update multiple SIMs at once via the Onomondo API.


If you are updating more than 20 SIMs at once, run a PATCH Update specific SIM request that goes separately through each SIM ID you want to update.

  1. Create an API Key in the Onomondo app.

  2. Create a list of SIM IDs that need updating.

    • The list should be an array in the following format:

      "sim_id" 
      "000123456",
      "000123457",
      "000123458", ...

  3. Prepare the PATCH Update SIM request, following the API documentation.

    • Specify cURL path:

      curl --location -g --request PATCH '<https://api.onomondo.com/sims/{{sim_id}>}' \

    • Specify the following in the request header:

      --header 'Authorization: YOUR_API_KEY' \ --header 'Content-Type: application/json' \

    • In the request body, include only the properties that need updating:

      --data '{
      "label": "test-device",
      "activated": true,
      "network_whitelist": "test-whitelist",
      "tags": "a5023f47-1db8-425e-b664-dc0b8921f644",
      "connector": "test-connector",
      "data_limit": {
      "total": 1000000,
      "type": "hourly",
      "alert_threshold": 800000
      },
      "technologies": {
      "sms": true,
      "2g_3g": true,
      "4g": true
      }
      }'

  4. Loop the PATCH request through the SIM list. Automate this either with:

    • custom scripts, written in Python, JavaScript, or any language that supports HTTP requests.

    • a REST API client, fx. Postman.

💡 Tip: Postman's Collection Runner feature allows you to upload a CSV file containing SIM IDs and run the PATCH request on a loop.



Workaround B:

If you are updating 20 SIMs or less, consider a PATCH Bulk SIM Update instead.

  1. Create an API Key in the Onomondo app.

  2. Prepare request body for PATCH Bulk SIM Update, following the API documentation, similarly to the above.

  3. Include SIM IDs in the request body.

  4. Send the PATCH request.

PATCH Bulk SIM Update request is limited to 20 SIMs per API call. PATCH Update specific SIM is subject to rate limiting of 600 calls per minute.

Did this answer your question?