emnify subpackage_sim API

The subpackage_sim API from emnify — 9 operation(s) for subpackage_sim.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

emnify-subpackage-sim-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: emnify REST subpackage_applicationTokens subpackage_sim API
  version: 1.0.0
  description: 'The emnify REST API gives programmatic access to the emnify IoT SuperNetwork — global cellular connectivity for IoT devices. Manage SIMs, endpoints (devices), service and tariff profiles, events, SMS, eSIM (SGP.32) profiles, organizations, users, API callbacks, and the Data Streamer. Authenticate with application tokens or user credentials; tokens are short-lived JWTs.


    Source: emnify developer documentation (https://docs.emnify.com/developers/api). This spec is assembled from the per-operation OpenAPI fragments published in the emnify llms-full.txt feed.'
  contact:
    name: emnify Developer Support
    url: https://docs.emnify.com/developers
  license:
    name: Proprietary
    url: https://www.emnify.com/legal
servers:
- url: https://cdn.emnify.net
  description: emnify REST API base host
security:
- BearerAuth: []
tags:
- name: subpackage_sim
  x-display-name: Sim
paths:
  /api/v1/sim:
    get:
      operationId: sim-per-page-sort-by-q-and-page-get
      summary: List SIMs
      description: Returns a list of SIMs filtered, sorted, and paged according to query parameters.
      tags:
      - subpackage_sim
      parameters:
      - name: q
        in: query
        description: 'Filter parameter in `<field>:<criteria>` format.

          Expects a comma-separated list from the allowed fields:


          * `id`

          * `issuer_org`

          * `reseller_org`

          * `customer_org`

          * `iccid`

          * `iccid_with_luhn`

          * `status`

          * `production_date`

          * `imsi`

          * `msisdn`

          * `endpoint`

          * `model`

          * `eid`

          * `satellite_capable`

          '
        required: false
        schema:
          type: string
      - name: sort
        in: query
        description: 'Sort parameter in `<operator><field>` format.

          Sort properties according to a comma-separated list from the allowed fields:


          * `id`

          * `issuer_org`

          * `reseller_org`

          * `customer_org`

          * `iccid`

          * `eid`

          * `status`

          * `production_date`

          * `endpoint`

          * `model`


          If no sorting options are specified, the response will be sorted by `id`.


          Supported operators:

          * `-`: Descending order

          * `+`: Ascending order


          The response will be shown in ascending order if no operator is specified.

          '
        required: false
        schema:
          type: string
      - name: page
        in: query
        description: Current page number
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        description: Defines the number of items per page (max. 2500)
        required: false
        schema:
          type: integer
          default: 2000
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successfully returned a list of SIMs.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiV1SimGetResponsesContentApplicationJsonSchemaItems'
  /api/v1/sim/migration/workspace:
    post:
      operationId: sim-migration-workspace
      summary: Migrate SIMs between Workspaces
      description: "Migrate SIMs from one Workspace to another.\n\n## Requirements\n\n- The calling user must have **Administrator** permissions on both the target and source Workspaces\n- The target Workspace must be an enterprise Workspace\n- Only 500 SIMs can be migrated per request\n- You must provide exactly one of: `sims`, `iccids`, or `iccid_range`\n\n<Note>\n  This endpoint requires authentication with [user credentials](/developers/auth/user-credentials), as application tokens are scoped to a single Workspace.\n</Note>\n\n## Behavior\n\n- **Dry run mode**: The `dry_run` parameter defaults to `true`.\n  Set it to `false` to execute the migration.\n- **Activated SIMs**: SIMs in status `ACTIVATED` are automatically suspended during migration.\n- **Attached devices**: If SIMs are attached to devices, set `auto_detach_devices: true` or the request fails.\n\n<Warning>\n  The request fails if one or more SIMs don't meet the requirements for migration.\n  Check the `errors` array in the response for details.\n</Warning>\n"
      tags:
      - subpackage_sim
      parameters:
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: 'Successful migration request.

            If `dry_run` was set to `false`, the migration is processed.

            If `dry_run` was set to `true`, the response contains a summary of the changes that would be executed.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SIM_SimMigrationWorkspace_Response_200'
        '400':
          description: 'The request is malformed.


            Common causes:


            - Exceeds the maximum count of 500 SIMs

            - Multiple SIM identifiers provided (only one of `sims`, `iccids`, or `iccid_range` is allowed)

            - Invalid ICCID format (must be exactly 19 digits)

            - ICCID range `end` value is less than `start`

            '
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: 'One or more SIMs or the target Workspace couldn''t be found or are inaccessible.

            '
          content:
            application/json:
              schema:
                description: Any type
        '409':
          description: 'One or more SIMs don''t meet the requirements for migration.


            The response includes an `errors` array with details about which SIMs failed and why.


            | Error Code | Message | Resolution |

            |------------|---------|------------|

            | 1502 | SIM(s) attached to devices | Set `auto_detach_devices: true` to automatically detach SIMs before migration |

            | 1503 | SIM(s) in disallowed status | Adjust the `allowed_sim_statuses` filter or change the SIM status before migrating |

            | 1504 | No admin access on source workspace | Request **Administrator** permissions on the source Workspace |

            | 1505 | Migration between Brazilian and non-Brazilian workspaces is not allowed | This is a regulatory restriction and cannot be bypassed |

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimMigrationWorkspaceRequestConflictError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                sims:
                  type: array
                  items:
                    $ref: '#/components/schemas/ApiV1SimMigrationWorkspacePostRequestBodyContentApplicationJsonSchemaSimsItems'
                  description: "List of SIMs to migrate.\nThe list may include up to 500 SIMs.\n\n<Info>\n  Cannot be used in combination with the `iccids` or the `iccid_range` field.\n</Info>\n"
                iccids:
                  type: array
                  items:
                    type: string
                  description: "List of ICCIDs to migrate.\nAll SIMs must belong to the source Workspace.\nThe list may include up to 500 ICCIDs.\n\n<Info>\n  Cannot be used in combination with the `sims` or the `iccid_range` field.\n</Info>\n"
                iccid_range:
                  $ref: '#/components/schemas/ApiV1SimMigrationWorkspacePostRequestBodyContentApplicationJsonSchemaIccidRange'
                  description: "ICCID range to migrate.\nAll SIMs within the range must belong to the source Workspace.\nThe range may include up to 500 ICCIDs.\nThe `end` value must be greater than or equal to the `start` value.\n\n<Info>\n  Cannot be used in combination with the `iccids` or the `sims` field.\n</Info>\n"
                allowed_sim_statuses:
                  type: array
                  items:
                    $ref: '#/components/schemas/ApiV1SimMigrationWorkspacePostRequestBodyContentApplicationJsonSchemaAllowedSimStatusesItems'
                  description: 'List of SIM statuses that are allowed to be migrated.

                    The request is rejected if a SIM has a status that isn''t in this list.

                    If not provided, all SIM statuses are allowed.

                    '
                dry_run:
                  type: boolean
                  default: true
                  description: "Controls whether the migration is executed or simulated.\n\n- `true` (default): Returns a preview of SIMs that would be migrated without making changes\n- `false`: Executes the migration\n\n<Tip>\n  Always test with a dry run first to verify the SIMs match your expectations.\n</Tip>\n"
                target_workspace:
                  $ref: '#/components/schemas/ApiV1SimMigrationWorkspacePostRequestBodyContentApplicationJsonSchemaTargetWorkspace'
                  description: 'Target Workspace to migrate SIMs to.

                    Must be an enterprise Workspace.

                    The calling user must have **Administrator** permissions on the target Workspace.

                    '
                auto_detach_devices:
                  type: boolean
                  description: 'If set to `true`, the SIMs automatically detach from the devices before being migrated.

                    Otherwise, the request is rejected if one or more SIMs are attached to devices.

                    '
              required:
              - target_workspace
  /api/v1/sim/multi:
    delete:
      operationId: bulk-sim-delete
      summary: Bulk delete SIMs
      description: "Deletes multiple SIMs based on the provided list of IDs.\n\n<Error>\n  Deleted SIMs cannot be recovered.\n</Error>\n"
      tags:
      - subpackage_sim
      parameters:
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '204':
          description: SIMs deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: Request body is malformed
          content:
            application/json:
              schema:
                description: Any type
        '403':
          description: 'User doesn''t have permission to bulk delete SIMs

            '
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: 'A given SIM ID isn''t found

            '
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ApiV1SimMultiDeleteRequestBodyContentApplicationJsonSchemaItems'
  /api/v1/sim/status:
    get:
      operationId: sim-status-get
      summary: List SIM statuses
      description: 'Returns a list of available [SIM statuses](/developers/reference/sim#sim-statuses).

        '
      tags:
      - subpackage_sim
      parameters:
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiV1SimStatusGetResponsesContentApplicationJsonSchemaItems'
  /api/v1/sim/{sim_id}:
    get:
      operationId: sim-by-id-get
      summary: SIM details
      description: Retrieves SIM details for a given ID.
      tags:
      - subpackage_sim
      parameters:
      - name: sim_id
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successfully returned the SIM details associated with the provided `id`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SIM_SimByIdGet_Response_200'
    delete:
      operationId: sim-by-id-delete
      summary: Delete a SIM
      description: "<Error>\n  Deleted SIMs cannot be recovered.\n</Error>\n\nDeletes a SIM.\n\nThe following restrictions apply when deleting SIMs:\n* SIMs with an assigned endpoint cannot be deleted.\n* Resellers cannot delete SIMs they have sold.\n"
      tags:
      - subpackage_sim
      parameters:
      - name: sim_id
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully fulfilled the request with no additional content to send in the response payload body.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '403':
          description: Request couldn't be satisfied. Typically happens when the `reseller_org_id` field isn't `null` and the value matches the organization ID making the request.
          content:
            application/json:
              schema:
                description: Any type
    patch:
      operationId: sim-by-id-patch
      summary: Update a SIM
      description: "Updates a SIM resource.\n\nYou can provide the following fields with this request:\n* `issuer_org` (Object optional) - change to a direct child organization of the appropriate type\n* `reseller_org` (Object optional) - change to a direct child organization of the appropriate type or empty (`\"reseller_org\": { \"id\": null }` or `\"reseller_org\": {}`)\n* `customer_org` (Object optional) - change to own organization or a direct child organization of type \"Enterprise\" or empty (`\"customer_org\": { \"id\": null }` or `\"customer_org\": {}`)\n* `status` (Object optional) - update the SIM status\n\nThe following restrictions apply when updating SIMs:\n* Users from the issuer organization can change any updatable field\n* Users from the reseller organization can update the `reseller_org` or `customer_org` fields\n* Users from the customer organization can only update the `status` field\n* `issuer_org` can change to a child organization of the type \"Mobile Network Operator\" or \"Service Provider\"\n* `reseller_org` can change to child organization of the following types: \"Mobile Network Operator\", \"Service Provider\", or \"Reseller\"\n* `customer_org` can change to a child organization of an \"Enterprise\" type\n* `status` can update from \"Issued\" (`\"id\": 0`) to either \"Activated\" (`\"id\": 1`) or \"Factory Test\" (`\"id\": 4`)\n* `status` can only update from \"Factory Test\" (`\"id\": 4`) to \"Activated\" (`\"id\": 1`)\n* `status` can switch between \"Activated\" (`\"id\": 1`) and \"Suspended\" (`\"id\": 2`)\n\n<Warning>\n  emnify charges for activated SIMs. To avoid accruing unexpected charges, update the SIM `status` to \"Suspended\" (`\"id\": 2`).\n</Warning>\n"
      tags:
      - subpackage_sim
      parameters:
      - name: sim_id
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully fulfilled the request with no additional content to send in the response payload body.
          content:
            application/json:
              schema:
                type: object
                properties: {}
        '400':
          description: Unexpected error in the API call. See the HTTP response body for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimByIdPatchRequestBadRequestError'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                issuer_org:
                  $ref: '#/components/schemas/ApiV1SimSimIdPatchRequestBodyContentApplicationJsonSchemaIssuerOrg'
                reseller_org:
                  $ref: '#/components/schemas/ApiV1SimSimIdPatchRequestBodyContentApplicationJsonSchemaResellerOrg'
                customer_org:
                  $ref: '#/components/schemas/ApiV1SimSimIdPatchRequestBodyContentApplicationJsonSchemaCustomerOrg'
                status:
                  $ref: '#/components/schemas/ApiV1SimSimIdPatchRequestBodyContentApplicationJsonSchemaStatus'
              required:
              - issuer_org
              - reseller_org
              - customer_org
              - status
  /api/v1/sim/{sim_id}/event:
    get:
      operationId: sim-event-page-per-page-sort-by-sim-id-and-q-get
      summary: List SIM events
      description: "Returns the list of events, filtered, sorted and paged according to query parameters.\n\n<Error>\n  This API endpoint deviates from the specified conventions and may not return the same HTTP Codes as the higher layer call (`/api/v1/sim/{sim_id}`).\n\n  In case the requested `{sim_id}` doesn't exist or is not accessible for the user, **HTTP 200** will be returned with empty **[]** as long as the provided `{sim_id}` is a number and all parameters are valid.\n\n  Please take that into consideration when building automation on top of the error behavior of this endpoint.\n</Error>\n"
      tags:
      - subpackage_sim
      parameters:
      - name: sim_id
        in: path
        description: Numeric ID of a SIM
        required: true
        schema:
          type: integer
      - name: page
        in: query
        description: Current page number
        required: false
        schema:
          type: integer
      - name: per_page
        in: query
        description: Defines the number of items per page
        required: false
        schema:
          type: integer
      - name: sort
        in: query
        description: 'Sort properties according to a comma separated list of accepted fields. Valid fields are:


          * `id` - (**event id**)

          * `timestamp` - (**event timestamp**)

          * `source` - (**event source**)

          * `severity` - (**event severity**)

          * `alert` - (**alert status**)

          * `organisation` - (**organisation name**)

          * `user` - (**user id**)

          * `endpoint` - (**endpoint name**)

          * `tags` - (**endpoint tags**)

          * `ip_address` - (**endpoint ip_address**)

          * `iccid` - (**sim iccid**)

          * `imsi` - (**sim imsi**)

          * `type` - (**event type**)

          '
        required: false
        schema:
          type: string
      - name: q
        in: query
        description: 'Filter parameter in `<filter>:<value>` format.

          Multiple filters must be a comma-separated list of the following fields:


          * `from` (**date**, format `YYYY-MM-DDTHH:mm:ssZ`, **only valid with until**)

          * `until` (**date**, format `YYYY-MM-DDTHH:mm:ssZ`, **only valid with from**)

          * `type` (**event_type**, numerical)

          * `source` (**event_type**, numerical, e.g. 0 = Network), 1 = Policy Control, 2 = API)

          * `severity` (**event_severity**, numerical, e.g. 0 = Info, 1 = Warn), 2 = Critical)

          * `alert` (boolean, e.g. true, false)

          * `description` (**event description**, string)

          * `organisation` (**organisation name**, string)

          * `user` (**user name**, string)

          * `endpoint` (**endpoint name**, string)

          * `tags` (**endpoint tags**, string)

          * `ip_address` (**endpoint IP address**, valid IPv4/IPv6 address)

          * `imei` (**endpoint imei**, numerical string)

          * `iccid` (**sim iccid**, numerical string)

          * `imsi` (**sim imsi**, numerical string)

          * `timestamp` (**date**, format `YYYY-MM-DDTHH:mm:ssZ`, for querying events of 1 day, deprecated in future)

          * `iccid_with_luhn` (**sim iccid with Luhn**, numerical string)

          * `network` (**endpoint network**, string, e.g. Telekom)

          * `rat` (**event pdp context rat type**, numerical string, e.g. 6)

          * `country` (**endpoint country**, string, e.g. Germany)


          Some filters can accept up to 6 values which must be separated by the pipe symbol (`|`) or url-encoded as (`%7C`):


          * `iccid` (q: iccid:1234567890123456789|8988303000123456789)

          * `iccid_with_luhn` (q: iccid:12345678901234567891|89883030001234567891)

          * `endpoint` (q: endpoint:example_endpoint_name|another_endpoint_name)

          * `type` (q: type:example_event_type|another_event_type)

          * `network` (q: network:example_network|another_network)

          * `rat` (q: rat:example_rat|another_rat)

          * `country` (q: country:example_country|another_country)

          '
        required: false
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successfully returned a list of SIM events
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiV1SimSimIdEventGetResponsesContentApplicationJsonSchemaItems'
        '400':
          description: '**Bad Request** due to incorrect **Paging** Parameters, **Sorting** Parameter or incorrect `{sim_id}`

            '
          content:
            application/json:
              schema:
                description: Any type
        '422':
          description: '**Unprocessable Entity** due to incorrect **Query** parameters

            '
          content:
            application/json:
              schema:
                description: Any type
  /api/v1/sim/{sim_id}/stats:
    get:
      operationId: sim-stats-by-id-get
      summary: SIM usage and cost statistics
      description: "<Warning>\n  You can only retrieve data traffic costs for organizations without multi-inclusive volumes.\n</Warning>\n\nRetrieves SIM usage and cost statistics for a given ID.\nUsage statistics are sorted by `data` and `sms`.\n\nReturns statistics from the following periods:\n* `last_month`: Previous billing month, from the first to last day (for example, February 1-29, 2024, when you send the request in March 2024).\n* `current_month`: Current month, with statistics calculated up to and including the date requested (for example, March 1-8, 2024, when you sent the request on March 8, 2024).\n* `last_hour`: Previous 60 minutes, accumulated per minute and organized by data or SMS received by the device (`rx`) and transmitted by the device (`tx`).\n\n<Info>\n  `last_month` and `current_month` are only included in the responses if traffic exists.\n  Those responses include a generated `id` value that's comprised of the SIM ID, year, month, and traffic type ID (`5` for data and `6` for SMS).\n\n  For example, if you send a request in March 2024 for SIM ID `123456`, the `id` for data in the current month is `1234562024035`.\n</Info>\n"
      tags:
      - subpackage_sim
      parameters:
      - name: sim_id
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successfully returned the SIM statistics associated with the provided `id`.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiV1SimSimIdStatsGetResponsesContentApplicationJsonSchemaItems'
  /api/v1/sim/{sim_id}/stats/daily:
    get:
      operationId: sim-statistics-daily-by-id-get
      summary: Daily SIM usage statistics
      description: "<Warning>\n  Data traffic cost statistics (`cost` field in the `data` object) have been deprecated.\n</Warning>\n\nRetrieves SIM usage statistics accumulated per day.\nBy default, the response includes statistics for the current month.\n\n`start_date` and an `end_date` can be provided as query parameters to retrieve statistics for a specific time frame.\n\nExample request: `/api/v1/sim/123/stats/daily?end_date=2019-03-21&start_date=2019-03-01`\n"
      tags:
      - subpackage_sim
      parameters:
      - name: sim_id
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successfully returned the daily SIM statistics for the provided dates and ID.
          content:
            application/json:
              schema:
                description: Any type
  /api/v1/sim_batch/bic/{bic}:
    get:
      operationId: validate-sim-batch-by-bic
      summary: Validate SIM batch by BIC
      description: 'Checks the given BIC code and the contained SIMs if they can be registered.

        '
      tags:
      - subpackage_sim
      parameters:
      - name: bic
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Batch is valid and can be registered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SIM_ValidateSIMBatchByBIC_Response_200'
        '400':
          description: Batch is already registered
          content:
            application/json:
              schema:
                description: Any type
        '404':
          description: No Batch with the given BIC found
          content:
            application/json:
              schema:
                description: Any type
        '422':
          description: Batch contains SIMs registered to another organisation
          content:
            application/json:
              schema:
                description: Any type
    patch:
      operationId: register-sim-batch-by-bic
      summary: Register a given batch by BIC
      description: 'Registers the given SIM batch, assigns all SIMs to the organisation,

        and sets the status of all contained SIMs to the given value.


        If the `factory_test_mode_allowed` flag is set to true on the tariff plan assignment

        or it is enabled in the tariff plan, the SIM batch can be also registered with an initial

        status of `4 = Factory Test`, thus setting all of the contained SIMs to factory test

        status. In turn, the `activation_date` of these SIMs will not be set yet, but when the factory

        test volume is consumed, the auto activation date is reached or they are patched to `Activated`

        state afterwards.

        '
      tags:
      - subpackage_sim
      parameters:
      - name: bic
        in: path
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        description: 'An `auth_token` should be provided to authenticate a session.


          To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

          '
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Batch successfully registered and assigned all SIMS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SIM_RegisterSIMBatchByBIC_Response_200'
        '422':
          description: 'Could not register the given batch. Reasons may be:

            * Could find no batch with that BIC

            * Batch already registered

            * Batch contains SIMs registered to other organisations

            * Attempted to register to `Factory Test` status when it is disabled in tariff plan

            '
          content:
            application/json:
              schema:
                description: Any type
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                sim_status:
                  $ref: '#/components/schemas/ApiV1SimBatchBicBicPatchRequestBodyContentApplicationJsonSchemaSimStatus'
components:
  schemas:
    SIM_RegisterSIMBatchByBIC_Response_200:
      type: object
      properties:
        sim:
          type: array
          items:
            $ref: '#/components/schemas/ApiV1SimBatchBicBicPatchResponsesContentApplicationJsonSchemaSimItems'
      title: SIM_RegisterSIMBatchByBIC_Response_200
    ApiV1SimSimIdGetResponsesContentApplicationJsonSchemaEndpoint:
      type: object
      properties:
        id:
          type: integer
      title: ApiV1SimSimIdGetResponsesContentApplicationJsonSchemaEndpoint
    ApiV1SimBatchBicBicGetResponsesContentApplicationJsonSchemaStatus:
      type: object
      properties:
        id:
          type: integer
        description:
          type: string
      required:
      - id
      title: ApiV1SimBatchBicBicGetResponsesContentApplicationJsonSchemaStatus
    ApiV1SimSimIdStatsGetResponsesContentApplicationJsonSchemaItemsCurr

# --- truncated at 32 KB (78 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/emnify/refs/heads/main/openapi/emnify-subpackage-sim-api-openapi.yml