openapi: 3.0.1 info: title: IoT Portal APIs version: v2.2 description: >- ## Introduction The purpose of the IoT Portal API is for external systems to integrate with the platform to automate operations that would otherwise be performed manually (e.g., active SIM orchange rate plan).

This page includes the specification and operations of the API, with examples where relevant.The documentation is interactive so you may perform operations directly on the API documentation andsee the responses.

Scope

The following operations are in the scope of the API (but some may not yet be available in the latest version):

Specification

This is a REST-based API that relies heavily on JSON. Below is a list of the relevant characteristics of the API.

URIs

The root of the API is at https://iot.truphone.com/api/. Each API "operation" has an URI (e.g.,/api/v2.0/sims/) and may include a reference to a specific resources (e.g.,/api/v2.0/sims/12345/). Only URIs that finish with forward-slash are valid.

The name of the resources in the URI is always plural. If resources or actions need to be represented with two or more words,all the words will be lower case and separated by underscore (e.g., /api/v2.0/sims/send_sms/), instead of dash or camelCase.

URIs may have parameters for the purpose of filtering or ordering (see below).

Versioning

URIs are prefixed with a specific version. The URI without version is an alias to the latest version of the API.Below are examples of valid URI formats:

/api/resources/
/api/v1.0/resources/
/api/v1.1/resources/
/api/v2.0/resources/

Minor versions are backwards compatible (e.g., just adding a new operation or a new attribute to a response).Major versions may not be backwards compatible. We suggest you work with the latest version

We don't currently have a deprecation policy so all the versions of the API will continue to be supported untilfurther notice.

Methods

Requests must use the appropriated HTTP request method. Below is the list of methods:

MethodDescription
GETReturn objects or data
POSTPerform an action (e.g., change status or send SMS)
DELETEDelete a related resource(s) (e.g., delete attributes)
PATCHUpdating an existing resource(s) (e.g., change SIM Card attribute Value)
OPTIONSReturn information about endpoint

Note: Methods HEAD, PUT, CONNECT and TRACER are not used in any operation.

Body

The body of the requests and responses must use a JSON content type (i.e., Content-Typeis 'application/json').

Request

Responses

Response HTTP Codes

API responses always include an appropriated HTTP response code. Below is a non-comprehensive list of used HTTP response codes:

CodeDescription
200 OKWhen request succeeded for a GET or POST request
202 AcceptedWhen a request accepted for a POST that will be completed asynchronously
301 Moved PermanentlyWhen request is placed in a URI without final forward slash
400 Bad RequestWhen request is wrongly format (e.g., doesn't include body)
401 UnauthorizedMissing credentials
403 ForbiddenWrong credentials
404 Not FoundWhen resources are not found
405 Method Not AllowedWhen request uses wrong method (e.g., change_status action using GET)
409 ConflictIndicates that the request could not be processed because of conflict in the request (e.g., object already created)
429 Too Many RequestsWhen a user exceeds the maximum number of requests. Check Throttling section for more information.
415 Unsupported Media TypeWhen request uses wrong content type (e.g., application/xml)
500 Internal Server ErrorWhen there are unexpected server side conditions
503 Service UnavailableTemporary unavailability of the service

The body of the response includes always a 'detail' attribute in the case of errors with information about the error.

Filtering

The URI of the operations returning objects can include parameters to filter the results. The name of the parameter isthe same name of the attribute of the object. For example, to filter the SIM Card list with "label" exactly equal to "car",the URI would be /api/v2.0/sims/?label=Car.

To filter results by date the URI needs to use the date attribute name with the _from and_to suffixes. For example, to filter the Call Detail Records list by "startDate" the URI is:/api/v2.0/sims/123456/cdr/?startDate_from=2014-07-22 00:00:00

For some operations, filtering of nested attributes may be allowed. For example, to filter the SIM Card list by shipping date,the URI would be /api/v2.0/sims/?shippingDate_from=2014-07-22 00:00:00. It is not possible to filterresults based on nested filtering of attributes not returned in the response.

Ordering

The URI of the operations returning objects can include a ordering parameter to order the results. The name of theparameter is the same name of the attribute of the object. For example, to order SIM cards based on "label", the URIis /api/v2.0/sims/?ordering=label.

If the attribute name has dash as a prefix (-), the results will be in descending order.

The results can be ordering based on multiple attributes. For example, to order SIM cards in descending order basedon "label" and ascending order based on MSISDN, the URI is /api/v2./sims/?ordering=-label,msisdn.

Pagination

The endpoints that return a list of object implement pagination. This means that only a maximumnumber of results in returned per request. To control paginated results, you can pass optionalparameters to the endpoint URI.

Below are the valid URI parameters:

ParameterDescriptionAllowed ValuesDefault
pageNumber of the page with resultsPositive integer or last1
per_pageNumber of results per pagePositive integer from 1 to 50050

Example 1: Get two Notifications per page, get the second page.
URI: /api/v2.0/notifications/?per_page=2&page2

The Link header is included in the responses where pagination is relevant (e.g., when returning a list of objects).The header includes links to return specific paginated results on the endpoint. The following are all the possiblerel values:

rel ValueDescription
firstLink to first page of results. This is always included.
lastLink to last page of results. This is always included.
prevLink to previous page of results. Only included when there is a previous page of results.
nextLink to next page of results. Only included when there is a next page of results.

Example 2: Get two Notifications per page, get the last page.
URI: /api/v2.0/notifications/?page=last&per_page=2

Atomicity

Some operations may be atomic (see endpoint description). Atomic operations are performed in all or noneof the objects. Non-atomic operations like Send SMS could result in the SMS being sent only to some SIMs iffor some reason the system was not able to send the SMS to all the SIMs. Your should always confirm the response detailsto make sure the result is what you expected.

Idempotency

To safely retry an API request without accidentally performing the same operation twice, you can attach a unique key to POST requests of idempotent endpoints via the Idempotency-Key: <key> header.

For example, if a request to send an SMS fails due to an error, you can make a second request with the same key to guarantee that only one SMS is sent.

The creation of the key is completely up to you - we suggest using random strings or UUIDs but any value can be used. We'll always send back the same response for requests made with the same key, even if you make the request with different request parameters. The keys are unique per user and endpoint and expire after 24 hours.

Throttling

All requests are throttled to prevent malfunction of the API to users.

The following headers are currently used to guide the API client:

X-RateLimit-LimitNumber of requests available per period
X-RateLimit-ResetMilliseconds left to start a new period
X-RateLimit-RemainingNumber of requests remaining in the current period
servers: - url: https://iot.truphone.com tags: - name: Authentication description: >- A Token key must be included in the Authorization HTTP header.The key should be prefixed by the string literal "Token", with whitespace separating the two strings. For example:
Authorization: Token
      9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b

The Token associated with an account can be accessed from the control panel (in the settings section). The Token is always the same for the account (i.e., there is no need to request it every time a new API request is made).

Unauthenticated responses that are denied permission will result in an HTTP 401 Unauthorized responsewith an appropriate WWW-Authenticate header. For example:

WWW-Authenticate: Token
- name: Account Management description: Manage account details - name: User Management description: Manage user details - name: SIM Cards - name: SIM Tags and Attributes - name: Usage and Event Rules description: Rules enable automatic connectivity management - name: SIM Usage - name: Location Updates - name: Devices - name: Reports - name: Billing - name: Notifications - name: Audit Trail paths: /api/v2.0/rules: get: tags: - Usage and Event Rules summary: Get Rules description: >- Access the list and the details of the rules active in the account.

Ordering

The results are ordered by default based on ascending date of creation.

Note: This endpoint does not support filtering nor configured ordering.

operationId: Rules_V2Dot0_list parameters: - name: page in: query description: The page to retrieve schema: type: integer format: int32 - name: per_page in: query description: The maximum number of items to retrieve schema: type: integer format: int32 responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/RulesV2dot0Serializer' /api/v2.0/notifications: get: tags: - Notifications summary: Get Notifications description: >- Access the list and the details of the account notifications.

Filter

You can filter the Notifications list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/notifications/?date_from=2014-03-05 12:00:00 -> This link will give you the Notifications that happened after 2014-03-05 12:00:00

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/notifications?ordering=date -> This link will give you the results in ascending order of date. The results are ordered by default based on descending date (i.e., most recent first).

operationId: Notifications_V2Dot0_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: type in: query description: Type schema: type: string - name: sourceType in: query description: Source Type schema: type: string - name: source in: query description: Source schema: type: string - name: date in: query description: Date schema: type: string - name: value in: query description: Value schema: type: string - name: attributeType in: query description: Attribute Type schema: type: string - name: state in: query description: State schema: type: string - name: date_from in: query description: Earliest Date schema: type: string - name: date_to in: query description: Latest Date schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/NotificationV2dot0Serializer' /api/v2.0/sims/change_data_status: post: tags: - SIM Cards summary: Change Data Status description: |- Change the Data Status for one or more SIM cards

This endpoint is idempotent.

operationId: Change_Sim_Cards_Data_Status_Request_Api_POST requestBody: content: application/json: schema: $ref: '#/components/schemas/SIMCardsDataStatusV2dot0RequestSerializer' examples: Suspend data - Single SIM: summary: Suspend data - Single SIM value: iccid: - '8944479999999999999' status: SUSPENDED Activate data - Single SIM: summary: Activate data - Single SIM value: iccid: - '8944479999999999999' status: ACTIVE Activate data - Multiple SIMs: summary: Activate data - Multiple SIMs value: iccid: - '8944478888888888888' - '8944479999999999999' status: ACTIVE required: true responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/WriteV2dot0ResponseSerializer' examples: success: summary: Successful response value: detail: OK '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/WriteV2dot0ResponseSerializer' examples: success: summary: Bad request value: detail: >- SIM card(s) with ICCID(s) [u'89444799999999999990'] unknown /api/v2.0/sims/{iccid}/cdrs/{cdr_id}: get: tags: - SIM Usage summary: Get Call Detail Record Details description: Access the details of a specific Call Detail Record.

operationId: Call_Detail_Record_V2Dot0_retrieve parameters: - name: iccid in: path required: true schema: type: string - name: cdr_id in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/CallDetailRecordV2dot0Serializer' examples: Get Call Detail Records for SIM: summary: Get Call Detail Records for SIM value: id: '856346526' simCard: '8944479999999999999' startDate: '2022-01-07T09:39:15+00:00' endDate: '2022-01-07T09:39:20+00:00' duration: 50 origin: null destination: null country: United Kingdom network: Truphone UK type: DATA /api/v2.0/tags/{label}/sims: get: tags: - SIM Tags and Attributes summary: Get SIMs with Tag description: Access the Tag details with the selected label.

operationId: Tag_Object_Sim_Cards_V2Dot0_list parameters: - name: label in: path required: true schema: type: string - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/TagSIMCardsV2dot0Serializer' post: tags: - SIM Tags and Attributes summary: Assign Tag to SIM Card description: Associate a Tag to a SIM Card.

operationId: Tag_Object_Sim_Cards_V2Dot0_create parameters: - name: label in: path required: true schema: type: string requestBody: content: application/json: schema: properties: simCards: type: array description: String list of SIM Card ICCID(s) items: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/V2dot0ResponseSerializer' delete: tags: - SIM Tags and Attributes summary: Unassign Tag from SIM Card description: Remove a Tag from a SIM Card.

operationId: Tag_Object_Sim_Cards_V2Dot0_destroy parameters: - name: label in: path required: true schema: type: string requestBody: content: application/json: schema: properties: simCards: type: array description: String list of SIM Card ICCID(s) items: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/V2dot0ResponseSerializer' /api/v2.0/sims/{iccid}/locations: get: tags: - Location Updates summary: Get location updates description: >- Access the list and the details of the Location Updates associated with SIM cards in your account

Filter

You can filter the Location Updates list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/sims/12345/location/?country=spain&date_from=2014-03-05 12:00:00 -> This link will give you the Location Update that have the country "Spain" was received after 2014-03-05 12:00:00 The results are ordered by default based on descending date (i.e., most recent first).

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/sims/12345/location/?ordering=-country -> This link will give you the results in descending order of country.

operationId: Location_Update_V2Dot0_list parameters: - name: iccid in: path required: true schema: type: string - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: id in: query description: ID schema: type: string - name: date in: query description: Date schema: type: string - name: country in: query description: Country schema: type: string - name: network_name in: query description: Network Name schema: type: string - name: date_from in: query description: Earliest Date schema: type: string - name: date_to in: query description: Latest Date schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/LocationUpdateV2dot0Serializer' /api/v2.0/sims/{iccid}/cdrs: get: tags: - SIM Usage summary: Get Call Detail Records description: >- Access the list and the details of the Call Detail Records associated with SIM cards in your account.

Filter

You can filter the Call Detail Records list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/sims/12345/cdr/?country=spain&startDate_from=2014-03-05 12:00:00 -> This link will give you the Call Detail Records that have the country "spain" were started after 2014-03-05 12:00:00

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/sims/12345/cdr/?ordering=-country -> This link will give you the results in descending order of country. The results are ordered by default based on descending start date (i.e., most recent first).

operationId: Call_Detail_Record_V2Dot0_list parameters: - name: iccid in: path required: true schema: type: string - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: id in: query description: ID schema: type: string - name: duration in: query description: Duration schema: type: string - name: origin in: query description: Origin schema: type: string - name: destination in: query description: Destination schema: type: string - name: location in: query description: Location schema: type: string - name: country in: query description: Country schema: type: string - name: network in: query description: Network schema: type: string - name: type in: query schema: type: string enum: - SMS_IN - SMS_OUT - DATA - name: startDate_from in: query description: Earliest Start Date schema: type: string - name: startDate_to in: query description: Latest Start Date schema: type: string - name: endDate_from in: query description: Earliest End Date schema: type: string - name: endDate_to in: query description: Latest End Date schema: type: string - name: duration__gte in: query description: Duration Greater of Equal Than schema: type: string - name: duration__lte in: query description: Duration Lower or Equal Than schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/CallDetailRecordV2dot0Serializer' examples: Get Call Detail Records for SIM: summary: Get Call Detail Records for SIM value: - id: '856346526' simCard: '8944479999999999999' startDate: '2022-01-07T09:39:15+00:00' endDate: '2022-01-07T09:39:20+00:00' duration: 50 origin: null destination: null country: United Kingdom network: Truphone UK type: DATA /api/v2.0/organizations: get: tags: - Account Management summary: Get Organizations description: >- Access the list and the details of the organization.

Filter

You can filter the users list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/organizations/?name=ACME&dateCreated_from=2014-03-05 12:00:00 -> This link will give you the organizations that have the name "ACME" and were created after 2014-03-05 12:00:00

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/organizations/?ordering=-dateCreated -> This link will give you the organization in descending order of creation. The results are ordered by default based on ascending name of the organizations.

operationId: Organization_V2Dot0_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: name in: query description: Organization Name schema: type: string - name: email in: query description: Email Address schema: type: string - name: dateCreated_from in: query description: Earliest Date Created schema: type: string - name: dateCreated_to in: query description: Latest Date Created schema: type: string - name: parentOrganization in: query description: Organization Name schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/OrganizationV2dot0Serializer' /api/v2.0/sims/ongoing_sessions: get: tags: - SIM Cards summary: Get Ongoing Sessions description: >- Access the list and the details of the ongoing data sessions.

Filter

You can filter the Ongoing Sessions list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes)

operationId: Ongoing_Sessions_V2Dot0_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: iccid in: query description: ICCID schema: type: string - name: fromStartDate in: query description: Start Date From schema: type: string - name: toStartDate in: query description: Start Date To schema: type: string - name: ipAddress in: query description: IP Adress schema: type: string - name: fromDuration in: query description: Duration from schema: type: string - name: toDuration in: query description: Duration to schema: type: string - name: mcc in: query description: MCC schema: type: string - name: mnc in: query description: MNC schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/OngoingSessionsV2dot0Serializer' examples: Get Ongoing Sessions for SIM: summary: Get Ongoing Sessions for SIM value: - iccid: '8944479999999999999' startDate: '2022-01-07T09:17:44+00:00' ipAddress: 1.2.3.4 duration: '50' mcc: '234' mnc: '025' /api/v2.0/reports/generate: post: tags: - Reports summary: Generate Reports description: >- Generate reports with the same conditions as the report session wizard in the Portal. This endpoint will generate a CSV or JSON response, depending on the options you choose, the download link is available for one hour.

operationId: Report_Genarate_Api_POST requestBody: content: application/json: schema: required: - granularity - output_format - report_type properties: report_type: type: string description: Choose the report type enum: - INVENTORY - LOCATION - DATA_USAGE - SMS_USAGE - EVENT_RULES - USAGE_RULES - NOTIFICATIONS iccid: type: array description: >- List of ICCIDs - each separated by a comma (e.g. iccid1,iccid2). items: type: object properties: {} tag: type: array description: List of Tags - each separated by a comma (e.g. tag1,tag2). items: type: object properties: {} all_sim_cards: type: boolean description: Uses All SIM Cards from the organization. granularity: type: string description: >- Select the report granularity - Hourly (Max: 7 Days) Daily (Max: 6 Months). enum: - Month - Cycle - Day - Hour billing_cycle: type: integer description: Select the starting day of the billing cycle (e.g. 5, 20). format: int64 period: type: string description: The period selected ends in the current day. enum: - PAST_7_DAYS - PAST_14_DAYS - PAST_30_DAYS - PAST_3_MONTHS - PAST_6_MONTHS - PAST_1_YEAR startDate: type: string description: 'Date format: YYYY-MM-DD HH:MM:SS' format: date-time endDate: type: string description: 'Date format: YYYY-MM-DD HH:MM:SS' format: date-time output_format: type: string description: Select the output format you prefer. enum: - CSV - JSON examples: DATA_USAGE: summary: Data usage value: report_type: DATA_USAGE all_sim_cards: true granularity: Day period: PAST_7_DAYS output_format: CSV required: true responses: '200': description: Success content: application/json: schema: properties: downloadUrl: type: string description: Download URL validUntil: type: string description: Report expiration date detail: type: string description: Detailed message examples: success: summary: Successful response value: downloadUrl: >- https://iot.truphone.com/api/v2.0/reports/download/012ea5b7-a6bc-4892-ac69-06f1af2ea8d5/ validUntil: '2022-01-01T00:00:00' detail: OK '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/WriteV2dot0ResponseSerializer' examples: Missing SIM filter: summary: Missing SIM filter value: detail: Please select 'iccid', 'tag' or 'all_sim_cards'. More than one SIM filter: summary: More than one SIM filter value: detail: Only choose 'iccid', 'tag' or 'all_sim_cards Too many SIM cards: summary: Too many SIM cards value: detail: >- Too many SIM Cards. This field has TOTAL_SIMS iccid's (max: MAX_SIMS), please use less or assign tags and use them. Unknown ICCIDs: summary: Unknown ICCIDs value: detail: One or more ICCIDs are incorrect, or do not belong to you. Unknown Tag: summary: Unknown Tag value: detail: Tag 'TAG_NAME' not created. Unassigned Tag: summary: Unassigned Tag value: detail: >- Tag 'TAG_NAME' does not have SIM cards assign - Assign SIM Cards to Tag in the portal. Missing timeframe: summary: Missing timeframe value: detail: >- Please choose a 'period' option or a 'startDate' and 'endDate'. - Missing one of the options. Missing start or end date: summary: Missing start or end date value: detail: >- Need both fields 'startDate' and 'endDate' - More then one fields startDate or endDate. More than one timeframe: summary: More than one timeframe value: detail: >- Cannot choose 'period' option with 'startDate' and 'endDate' options selected. - Select only one of the options. Too many days: summary: Too many days value: detail: >- Please choose 7 days or less to see the graph in a hourly basis. - Too many days for a hourly granularity. Too many months: summary: Too many months value: detail: >- Please choose 6 months or less to see the graph in a daily basis. - Too many months for a daily granularity. Missing bill cycle: summary: Missing bill cycle value: detail: >- Cannot choose 'granularity' with option 'Cycle' and no 'billing_cycle' selected. - Add the field billing_cycle - check the rate plans to know the values. No SIM Cards in the Selected Billing Cycle: summary: No SIM Cards in the Selected Billing Cycle value: detail: >- No SIM Cards in the Selected Billing Cycle. - Check the rate plan to view what day the billing cycle starts, otherwise there is no SIM Cards in that Billing Cycle. /api/v2.0/sims/{iccid}/subscription: get: tags: - SIM Cards summary: Get SIM Card Subscription description: Access to the subscription information for a specific SIM Card.

operationId: Sim_Card_Subscription_V2Dot0_retrieve parameters: - name: iccid in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SIMCardSubscriptionV2dot0Serializer' patch: tags: - SIM Cards summary: Modify SIM Card Subscription description: >- Modify elements for the SIM Card the subscription. Only some fields are eligible to be patch such as:

servicePackId (i.e. SIM Card Rate Plan):

- The new Service Pack will only be applicable at the next
        Billing Cycle

        - If there is a new Service Pack to be applied at the next Billing
        Cycle, you can revert the action by sending a PATCH request

        with the servicePackId that is currently used.

        

Note: The remaining fields are directed correlated to the changeable fields or cannot be patched.

Error 400 - Bad Request

This error appears when the body requests is malformed. Possible errors:

servicePackId

Error 404 - Not Found

This error appears if the SIM Cards with {iccid} is not in your Organization.

operationId: Sim_Card_Subscription_V2Dot0_update parameters: - name: iccid in: path required: true schema: type: string requestBody: content: application/json: schema: properties: servicePackId: type: string description: SIM Card Service Pack Id (i.e. Rate Plan) responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/V2dot0ResponseSerializer' /api/v2.0/tags/{label}: get: tags: - SIM Tags and Attributes summary: Get Tag details description: Access the Tag details with the selected label.

operationId: Tag_Object_V2Dot0_retrieve parameters: - name: label in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/TagV2dot0Serializer' delete: tags: - SIM Tags and Attributes summary: Delete Tag description: Delete a Tag associated to your Organization.

operationId: Tag_Object_V2Dot0_destroy parameters: - name: label in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/V2dot0ResponseSerializer' /api/v2.0/sims/{iccid}/locations/{id}: get: tags: - Location Updates summary: Get location update details description: Access the details of a specific Location Update.

operationId: Location_Update_V2Dot0_retrieve parameters: - name: iccid in: path required: true schema: type: string - name: id in: path required: true schema: type: string - name: id in: query description: ID schema: type: string - name: date in: query description: Date schema: type: string - name: country in: query description: Country schema: type: string - name: network_name in: query description: Network Name schema: type: string - name: date_from in: query description: Earliest Date schema: type: string - name: date_to in: query description: Latest Date schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/LocationUpdateV2dot0Serializer' /api/v2.0/sims/change_status: post: tags: - SIM Cards summary: Change SIM status description: |- Change the status of one or more SIM cards

This endpoint is idempotent.

operationId: Change_Sim_Cards_Status_Request_Api_POST requestBody: content: application/json: schema: required: - iccid - status properties: iccid: type: array description: List of strings of ICCIDs items: type: string status: type: string description: >- New SIM Card Status (options: TEST, PROVISIONED, PRE-ACTIVE, ACTIVE, SUSPENDED, RETIRED) examples: Move SIM to PRE-ACTIVE: summary: Move SIM to PRE-ACTIVE value: iccid: - '8944479999999999999' status: PRE_ACTIVE Move SIM to ACTIVE: summary: Move SIM to ACTIVE value: iccid: - '8944479999999999999' status: ACTIVE Move SIM to SUSPENDED: summary: Move SIM to SUSPENDED value: iccid: - '8944479999999999999' status: SUSPENDED required: true responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/WriteV2dot0ResponseSerializer' examples: success: summary: Successful response value: detail: OK '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/WriteV2dot0ResponseSerializer' examples: success: summary: Bad Request value: detail: >- SIM card(s) with ICCID(s) [u'89444799999999999999'] unknown /api/v2.0/sims/send_sms/status: get: tags: - SIM Cards summary: Get SMS status description: >- Access the delivery report of an SMS sent using the API.

Filter

You can filter the Notifications list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/send_sms/status/?date_from=2014-03-05 12:00:00 -> This link will give you the reports of SMSs that were submitted after 2014-03-05 12:00:00

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/send_sms/status/?ordering=dateSubmitted -> This link will give you the results in ascending order of submission date. The results are ordered by default based on ID in descending order.

operationId: Send_Sms_Delivery_Report_V2Dot0_V2Dot0_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: id in: query description: ID schema: type: string - name: dateSubmitted in: query description: Submitted Date schema: type: string - name: content in: query description: Content schema: type: string - name: dateSubmitted_from in: query description: Earliest Submitted Date schema: type: string - name: dateSubmitted_to in: query description: Latest Submitted Date schema: type: string - name: iccid in: query description: ICCID schema: type: string - name: deliveryStatus in: query description: Delivery Status schema: type: string - name: o in: query description: Ordering schema: type: string enum: - '-id' responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/SendSMSDeliveryReportV2dot0Serializer' examples: Get SMS status: summary: Get SMS status value: - id: '00000001' dateSubmitted: '2022-01-01T00:00:00+00:00' content: SMS body 1 deliveryReport: - iccid: '8944479999999999999' deliveryStatus: DELIVERED - id: '00000002' dateSubmitted: '2022-01-01T00:00:01+00:00' content: SMS body 2 deliveryReport: - iccid: '8944479999999999999' deliveryStatus: DELIVERED /api/v2.0/reports/download/{pk}: get: tags: - Reports summary: Download Report description: >- Download the generated reports previously, the download link has a expired time of 1 Hour and the response comes as JSON or CSV depending on the options selected.

operationId: Download_Report_V2Dot0_V2Dot0_retrieve parameters: - name: pk in: path required: true schema: type: string responses: '200': description: Success content: application/json: examples: Inventory JSON: summary: Inventory JSON value: - Date: '2021-10-25 08:33:20+00:00' Source: 8944480000000000000 State: SUSPENDED - Date: '2021-11-08 13:44:45+00:00' Source: 8944478888888889000 State: SUSPENDED - Date: '2021-11-08 14:01:05+00:00' Source: 8944480000000000000 State: ACTIVE '400': description: Bad request content: application/json: schema: required: - detail type: object properties: detail: type: string description: This is the Detail response examples: Report not available: summary: Report not available value: detail: Report not available - Link expired or wrong link. No SIM Cards available: summary: No SIM Cards available value: detail: >- No SIM Cards available - The selected SIM Cards are no longer available. Tag not created: summary: Tag not created value: detail: >- Tag 'TAG_NAME' not created. Please create a tag and associate SIM Cards - This error appears if the selected tag was deleted in the meantime. Tag not assigned: summary: Tag not assigned value: detail: >- Tag 'TAG_NAME' does not have SIM cards assign. Please associate SIM Cards - Assign SIM Cards to Tag in the portal. /api/v2.0/attributes/{label}: delete: tags: - SIM Tags and Attributes summary: Delete Attribute description: >- Delete an Attribute associated to your Organization.

Error 404 - Not Found

This error appears if an Attribute with {label} is not created in your Organization. Use the method POST /api/v2.0/attributes/ to create a new Attribute

operationId: Attribute_Object_V2Dot0_destroy parameters: - name: label in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/V2dot0ResponseSerializer' patch: tags: - SIM Tags and Attributes summary: Set Attribute Value description: >- Set the value of the Attribute in one or more SIM Cards in the list. This operation only affects the SIM(s) included in the body of the request. The value of the attribute of the other SIMs will remain unchanged.

To unset a value associated to an attribute, please send an empty value in the body of the request. For example: {"label="label name", "simCards": ['iccid_1'], "value" : ""}

Error 400 - Bad Request

This error appears when the requests is malformed. Possible errors:

SIM Cards

Error 404 - Not Found

This error appears if an Attribute with {label} is not created in your Organization. Use the method POST /api/v2.0/attributes/ to create a new Attribute

operationId: Attribute_Object_V2Dot0_update parameters: - name: label in: path required: true schema: type: string requestBody: content: application/json: schema: properties: simCards: type: array description: String list of SIM Card ICCID(s) items: type: string value: type: string description: Value to associate the Attribute responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/V2dot0ResponseSerializer' /api/v2.0/sims/send_sms: post: tags: - SIM Cards summary: Send SMS description: |- Send an SMS to one or more SIM cards

This endpoint is idempotent.

operationId: Send_Sms_V2Dot0_Request_Api_POST requestBody: content: application/json: schema: $ref: '#/components/schemas/SendSMSV2dot0RequestSerializer' examples: Send SMS: summary: Send SMS value: iccid: - '8944479999999999999' text: This is a text message required: true responses: '200': description: Success content: application/json: schema: required: - detail type: object properties: resourceURL: type: string description: Link to URL delivery report detail: type: string description: This is the Detail response examples: Send SMS: summary: Send SMS value: resourceURL: >- https://iot.truphone.com/api/v2.0/sims/send_sms/status/0000001/ detail: OK '400': description: Bad Request content: application/json: schema: required: - detail type: object properties: detail: type: string description: This is the Detail response examples: Bad Request: summary: Bad Request value: detail: >- SIM card(s) with ICCID(s) [u'89444799999999999998'] unknown /api/v2.0/rules/events: get: tags: - Usage and Event Rules summary: Get Rule Events description: >- Access the list and the details of the events related with the rules.

Filter

You can filter the Rules Events list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/rules/events/?date_from=2014-03-05 12:00:00 -> This link will give you the rules events that happened after 2014-03-05 12:00:00

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/rules/events?ordering=date -> This link will give you the results in ascending order of date. The results are ordered by default based on descending date (i.e., most recent first).

operationId: Rules_Events_V2Dot0_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: date in: query description: Date schema: type: string - name: label in: query description: Label schema: type: string - name: simCard in: query description: SIM Card ICCID schema: type: string - name: type in: query description: Type schema: type: string - name: message in: query description: Message (filters based on substring) schema: type: string - name: email in: query description: Email schema: type: string - name: mobilePhoneNumber in: query description: Mobile Number schema: type: string - name: url in: query description: URL schema: type: string - name: date_from in: query description: Earliest Date schema: type: string - name: date_to in: query description: Latest Date schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/RulesEventsV2dot0Serializer' '404': description: Not Found content: application/json: examples: NotFound: summary: Not Found value: detail: Not Found /api/v2.0/audit_trail: get: tags: - Audit Trail summary: Get Audit Trail description: >- Access the list and the details of the account audit trail entries.

Filter

You can filter the AuditTrail list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/audit_trail/?date_from=2014-03-05 12:00:00 -> This link will give you the Audit Trail entries that happened after 2014-03-05 12:00:00

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/audit_trail?ordering=user -> This link will give you the results in ascending order of user. The results are ordered by default based on descending date (i.e., most recent first).

operationId: Audit_Trail_V2Dot0_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: date in: query description: Date schema: type: string - name: user in: query description: User schema: type: string - name: interface in: query description: Interface schema: type: string - name: object_type in: query description: Object Type schema: type: string - name: object in: query description: Object schema: type: string - name: action in: query description: Action schema: type: string - name: description in: query description: Description schema: type: string - name: date_from in: query description: Earliest Date schema: type: string - name: date_to in: query description: Latest Date schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/AuditTrailV2dot0Serializer' /api/v2.0/tags: get: tags: - SIM Tags and Attributes summary: Get Tags description: >- Access the list and the details of the account tags.

Filter

You can filter the Tags list using the name of the attributes associated with the model, e.g. /api/tags/?label=test -> This link will give you the Tags that have label test

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/tags?ordering=-label -> This link will give you the results in desscending order of label. The results are ordered by default based on ascending label.

operationId: Tag_V2Dot0_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: simCard in: query description: SIM Card ICCID schema: type: string - name: label in: query description: Label schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/TagV2dot0Serializer' post: tags: - SIM Tags and Attributes summary: Create Tag description: Add a new tag to the Organization.

operationId: Tag_V2Dot0_create requestBody: content: application/json: schema: required: - description - label properties: label: type: string description: >- Valid Tag label - must contain only alphanumeric and whitespaces description: type: string description: Small text to describe the Tag required: true responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/V2dot0ResponseSerializer' /api/v2.0/attributes: get: tags: - SIM Tags and Attributes summary: Get Attributes description: >- Access the list and details for the organization Attributes. Each entry will have the associated SIM card and a value if it was added.

Filter

You can filter the Attributes list using the name of the attributes associated with the model. e.g. /api/attributes/?label=test -> This link will give you the Attributes with the label 'test'

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/attributes?ordering=-label -> This link will give you the results in descending order for field 'label'. Note: The results are ordered by default based on ascending label.

operationId: Attribute_V2Dot0_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: simCard in: query description: SIM Card ICCID schema: type: string - name: label in: query description: Label schema: type: string - name: value in: query description: Value schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/AttributeV2dot0Serializer' post: tags: - SIM Tags and Attributes summary: Create Attribute description: >- Add a new Attribute to the Organization SIM Cards. The SIM Card value associated with the Attribute will be empty. Use the method PATCH /api/v2.0/attributes/{label}/ to associate a value.

Error 400 - Bad Request

This error appears when the body requests is malformed. Possible errors:

Label

Description

Error 409 - Conflict

This error appears if an Attribute is already created in your Organization. The response body detail will contain further details.

operationId: Attribute_V2Dot0_create requestBody: content: application/json: schema: required: - description - label properties: label: type: string description: >- Valid Attribute label - must contain only alphanumeric and whitespaces description: type: string description: Small text to describe the Attribute required: true responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/V2dot0ResponseSerializer' /api/v2.0/sims/send_sms/status/{id}: get: tags: - SIM Cards summary: 'Get SMS details ' description: >- Access the delivery report of an SMS sent using the API.

Filter

You can filter the Notifications list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/send_sms/status/?date_from=2014-03-05 12:00:00 -> This link will give you the reports of SMSs that were submitted after 2014-03-05 12:00:00

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/send_sms/status/?ordering=dateSubmitted -> This link will give you the results in ascending order of submission date. The results are ordered by default based on ID in descending order.

operationId: Send_Sms_Delivery_Report_V2Dot0_V2Dot0_retrieve parameters: - name: id in: path required: true schema: type: string - name: id in: query description: ID schema: type: string - name: dateSubmitted in: query description: Submitted Date schema: type: string - name: content in: query description: Content schema: type: string - name: dateSubmitted_from in: query description: Earliest Submitted Date schema: type: string - name: dateSubmitted_to in: query description: Latest Submitted Date schema: type: string - name: iccid in: query description: ICCID schema: type: string - name: deliveryStatus in: query description: Delivery Status schema: type: string - name: o in: query description: Ordering schema: type: string enum: - '-id' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SendSMSDeliveryReportV2dot0Serializer' /api/v2.1/rate_plans/{servicePackId}: get: tags: - Billing summary: Get Rateplan Details description: >- Access to the subscription information for a specific Rate Plan. This version contains the Test Mode information.

operationId: Rate_Plan_V2Dot1_retrieve parameters: - name: servicePackId in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/RatePlanTestModeV2dot1Serializer' /api/v2.1/rate_plans: get: tags: - Billing summary: Get Rateplans description: >- Access the Rate Plans list and related details associated to your account. This version contains the Test Mode information.

Filter

You can filter the Rate Plans list using the following fields:

- servicePackId

        - supportsTestMode

        

Examples:

- /api/rate_plan/?servicePackId=Pre%20Paid -> This link
        will give you the Rate Plans with "Pre Paid" in the servicePackId

        - /api/rate_plan/?supportsTestMode=True -> This link will give you
        the Rate Plans that support the Test State

        

Ordering

You can only order the results using the servicePackId field.

- /api/users/?ordering=-servicePackId -> This link will
        give you the RAte Plans in descending order by servicePackId.

        
operationId: Rate_Plan_V2Dot1_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: servicePackId in: query description: Service Pack ID schema: type: string - name: supportsTestMode in: query schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/RatePlanTestModeV2dot1Serializer' /api/v2.2/rules/event/{pk}: get: summary: Get Event Rule details tags: - Usage and Event Rules operationId: Get_Event_Rule_details parameters: - name: pk in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EventRuleSerializer' delete: summary: Delete Event Rule tags: - Usage and Event Rules operationId: Delete_Event_Rule parameters: - name: pk in: path required: true schema: type: string responses: '200': description: Success '404': description: Not Found content: application/json: examples: NotFound: summary: Not Found value: detail: Not Found patch: summary: Modify Event Rule tags: - Usage and Event Rules operationId: Modify_Event_Rule parameters: - name: pk in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/WriteEventRuleSerializer' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EventRuleSerializer' /api/v2.2/sims/{iccid}: get: tags: - SIM Cards summary: Get SIM Card details description: Access the details of a specific SIM card.

operationId: Sim_Card_V2Dot2_retrieve parameters: - name: iccid in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SIMCardV2dot2Serializer' patch: tags: - SIM Cards summary: Modify SIM Card description: |- Update some fields from the selected SIM Cards.

You can also change the SIM Card Organization and

operationId: Sim_Card_V2Dot2_update parameters: - name: iccid in: path required: true schema: type: string requestBody: content: application/json: schema: properties: label: type: string description: SIM Card Label description: type: string description: SIM Cards Description organization: type: string description: Organization Name examples: Move SIM to Sub-Organization: summary: Move SIM to Sub-Organization value: organization: Truphone Test 1000 Modify SIM label: summary: Modify SIM label value: label: Dummy responses: '202': description: Accepted content: application/json: schema: $ref: '#/components/schemas/NoBody' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/WriteV2dot0ResponseSerializer' examples: Bad Request: summary: Bad Request value: detail: Organization "Truphone Test 100" does not exist! /api/v2.2/users/{id}: get: tags: - User Management summary: Get User details description: >- Access the the details of a specific users of an organization.

Error 404 - Not Found

This error will be returned in case there is no user with the selected key.

operationId: User_V2Dot2_retrieve parameters: - name: id in: path required: true schema: type: string - name: id in: query description: User ID schema: type: string - name: organization in: query description: Organization Name schema: type: string - name: firstName in: query description: First Name schema: type: string - name: lastName in: query description: Last Name schema: type: string - name: email in: query description: Email Address schema: type: string - name: dateJoined_from in: query description: Earliest Date Joined schema: type: string - name: dateJoined_to in: query description: Latest Date Joined schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/UserV2dot2Serializer' delete: tags: - User Management summary: Delete User description: >- Delete a user corresponding to the given ID.

Error 403 - Forbidden

This error is returned in case you don't have permission to, either:

- Access the user's organization.

        - Delete users of the user's current role.

        
operationId: User_V2Dot2_destroy parameters: - name: id in: path required: true schema: type: string - name: id in: query description: User ID schema: type: string - name: organization in: query description: Organization Name schema: type: string - name: firstName in: query description: First Name schema: type: string - name: lastName in: query description: Last Name schema: type: string - name: email in: query description: Email Address schema: type: string - name: dateJoined_from in: query description: Earliest Date Joined schema: type: string - name: dateJoined_to in: query description: Latest Date Joined schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/NoBody' patch: tags: - User Management summary: Modify User description: >- Updates a specific user of an organization. This operation only affects the user identified in the URL of the request.

This endpoint is idempotent.

To unset a value associated to an attribute, please provide an empty value in the body of the request. For example: {"firstName": ""}

Error 400 - Bad Request

This error might be returned in case of errors in the request's body. In case this occurs, the description of the error will be sent in the response body, regarding each one of the fields with errors.

Error 403 - Forbidden

This error is returned in case you don't have permission to, either:

- Create users of the Role you want to update the user to.

        - Move the user to an organization you don't have access to.

        - Update users of the user's current role.

        - Access user's current organization.

        
operationId: User_V2Dot2_update parameters: - name: id in: path required: true schema: type: string requestBody: content: application/json: schema: properties: firstName: type: string description: First Name lastName: type: string description: Last Name email: type: string description: Email Address role: type: string description: User's role in the organization organization: type: string description: Organization Name responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/NoBody' /api/v2.2/sims/change_sms_service: post: tags: - SIM Cards summary: Change SMS Status description: >- Change the SMS (Mobile Originated or Terminated) Services for one or more SIM cards.

This endpoint is idempotent.

operationId: Change_Sim_Cards_Sms_Service_Request_Api_POST requestBody: content: application/json: schema: required: - iccid - sms_service - status properties: iccid: type: array description: List of strings of ICCIDs items: type: string sms_service: type: string description: Select which SMS Service to apply the change. enum: - MO - MT status: type: string description: Select the change to perform to the SMS Service enum: - ACTIVE - SUSPENDED examples: Suspend SIM SMS MO: summary: Suspend SIM SMS MO value: iccid: - '8944479999999999999' sms_service: MO status: SUSPENDED Activate SIM SMS MO: summary: Activate SIM SMS MO value: iccid: - '8944479999999999999' sms_service: MO status: ACTIVE Suspend SIM SMS MT: summary: Suspend SIM SMS MT value: iccid: - '8944479999999999999' sms_service: MT status: SUSPENDED Activate SIM SMS MT: summary: Activate SIM SMS MT value: iccid: - '8944479999999999999' sms_service: MT status: ACTIVE required: true responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/WriteV2dot0ResponseSerializer' examples: success: summary: Successful response value: detail: OK '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/WriteV2dot0ResponseSerializer' examples: bad_request: summary: Bad request value: detail: >- SIM card(s) with ICCID(s) [u'89444799999999999990'] unknown /api/v2.2/sims/{iccid}/status: get: tags: - SIM Cards summary: Get SIM Card Status description: Check the SIM card service status.

operationId: Sim_Card_V2Dot2_status parameters: - name: iccid in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/SIMCardTestStateStatusV2dot1Serializer' /api/v2.2/devices/{imei}: get: tags: - Devices summary: Get Device details description: >- Access the the details of a specific device, based on the provided IMEI number.

Error 404 - Not Found

This error will be returned in case there is no devices with the selected key.

operationId: Devices_V2Dot2_get parameters: - name: imei in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DeviceV2dot2Serializer' '404': description: Not Found content: application/json: schema: $ref: '#/components/schemas/NoBody' patch: tags: - Devices summary: Modify Device description: >- Updates a specific device. This operation only affects the device identified in the URL of the request, by its IMEI number.

This endpoint is idempotent.

To unset a value associated to an attribute, please provide an empty value for that field in the body of the request. For example: {"label": ""}

Error 400 - Bad Request

This error might be returned in case of errors in the request's body. In case this occurs, the description of the error will be sent in the response body, regarding each one of the fields with errors.

operationId: Devices_V2Dot2_partial_update parameters: - name: imei in: path required: true schema: type: string requestBody: content: application/json: schema: properties: label: type: string description: Label description: type: string description: Description responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/NoBody' /api/v2.2/sub-organizations/{pk}: get: tags: - Account Management summary: Get Sub-Organization details description: >- Access the details of a specific sub-organization given its unique id.

operationId: Sub_Organization_V2Dot2_retrieve parameters: - name: pk in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/OrganizationV2dot2Serializer' delete: tags: - Account Management summary: Delete Sub-Organization description: >- Delete a sub-organization corresponding to the given ID.

Error 404 - Not Found

This error code will be returned in case the organization with the provided ID either: - Doesn't exist; - You have no permissions to access the organization with provided ID.

operationId: Sub_Organization_V2Dot2_destroy parameters: - name: pk in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/NoBody' patch: tags: - Account Management summary: Modify Sub-Organization description: >- Partially updates an Organization object. This operation only affects the organization identified in the URL of the request.

This endpoint is idempotent.

To unset a value associated to an attribute, please provide an empty value in the body of the request. For example: {"description": ""}

Error 400 - Bad Request

This error might be returned in case of errors in the request's body. In case this occurs, the description of the error will be sent in the response body, regarding each one of the fields with errors.

Error 404 - Not Found

This error would mean that the organization identified by the provided ID was not found or you don't have permission to access it.

operationId: Sub_Organization_V2Dot2_partial_update parameters: - name: pk in: path required: true schema: type: string requestBody: content: application/json: schema: properties: name: type: string description: Organization name company_description: type: string description: Organization description responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/NoBody' /api/v2.2/rules/usage: get: tags: - Usage and Event Rules summary: Get Usage Rules operationId: Get_Usage_Rules parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/UsageRuleSerializer' post: tags: - Usage and Event Rules summary: Create Usage Rule operationId: Create_Usage_Rule requestBody: content: application/json: schema: $ref: '#/components/schemas/WriteUsageRuleSerializer' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/UsageRuleSerializer' /api/v2.2/users: get: tags: - User Management summary: Get Users description: >- Access the list and the details of users of your organization.

Filter

You can filter the users list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/users/?firstName=John&dateJoined_from=2014-03-05 12:00:00 -> This link will give you the users that have the first name "John" and joined after 2014-03-05 12:00:00

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/users/?ordering=-dateJoined -> This link will give you the users in descending order of joining. The results are ordered by default based on ascending date that users joined.

operationId: User_V2Dot2_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: id in: query description: User ID schema: type: string - name: organization in: query description: Organization Name schema: type: string - name: firstName in: query description: First Name schema: type: string - name: lastName in: query description: Last Name schema: type: string - name: email in: query description: Email Address schema: type: string - name: dateJoined_from in: query description: Earliest Date Joined schema: type: string - name: dateJoined_to in: query description: Latest Date Joined schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/UserV2dot2Serializer' post: tags: - User Management summary: Create User description: >- Create a user for your organization or for one of your sub organization.

This endpoint is idempotent.

Error 400 - Bad Request

This error might be returned in case of errors in the request's body. In case this occurs, the description of the error will be sent in the response body, regarding each one of the fields with errors.

Error 403 - Forbidden

This error is returned in case you don't have permission to, either:

- Create users with the Role you provided.

        - Create users for an organization you don't have access to.

        
operationId: User_V2Dot2_create requestBody: content: application/json: schema: required: - email - organization - password - role properties: firstName: type: string description: First Name lastName: type: string description: Last Name email: type: string description: Email Address password: type: string description: User's password organization: type: string description: Organization Name role: type: string description: User's role in the organization required: true responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/NoBody' /api/v2.2/sims: get: tags: - SIM Cards summary: Get SIM Cards description: >- Access the list and the details of the SIM cards in your account.

Filter

You can filter the SIM Card list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes)

/api/sims/?label=Car&firstActivationDate_from=2014-03-05
        12:00:00

        This link will give you the SIM Cards that have a label with "Car" and
        were activated after 2014-03-05 12:00:00

        

Ordering

You can order the results using the name of the attributes associated with the model.

/api/sims/?ordering=-iccid

        This link will give you the SIM Cards in descending order of ICCID. The
        results are ordered by default based on ascending

        ICCID of the SIM cards.

        

Changelog

From v2.1 to v2.2

- Added organization field to the Response Model

        
operationId: Sim_Card_V2Dot2_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: iccid in: query description: ICCID schema: type: string - name: label in: query description: Label schema: type: string - name: description in: query description: Description schema: type: string - name: primaryMsisdn in: query description: Primary MSISDN schema: type: string - name: msisdns in: query description: MSISDN schema: type: string - name: primaryImsi in: query description: Primary IMSI schema: type: string - name: imsis in: query description: IMSI schema: type: string - name: servicePackId in: query schema: type: string - name: tags in: query schema: type: string - name: attributes in: query schema: type: string - name: pin1 in: query description: PIN1 schema: type: string - name: pin2 in: query description: PIN2 schema: type: string - name: puk1 in: query description: PUK1 schema: type: string - name: puk2 in: query description: PUK2 schema: type: string - name: provisionDate_from in: query description: Earliest Provision Date schema: type: string - name: provisionDate_to in: query description: Latest Provision Date schema: type: string - name: shippingDate_from in: query description: Earliest Shipping Date schema: type: string - name: shippingDate_to in: query description: Latest Delivery Date schema: type: string - name: deliveryDate_from in: query description: Earliest Delivery Date schema: type: string - name: deliveryDate_to in: query description: Latest Delivery Date schema: type: string - name: firstActivationDate_from in: query description: Earliest Date of First Activation schema: type: string - name: firstActivationDate_to in: query description: Latest Date of First Activation schema: type: string - name: subscriptionStatus in: query description: Status schema: type: string - name: apn in: query description: Access Point Name schema: type: string - name: simType in: query schema: type: string - name: locationTag_label in: query schema: type: string - name: testStateStartDate_from in: query description: Earliest Test State Start Date schema: type: string - name: testStateStartDate_to in: query description: Latest Test State Start Date schema: type: string - name: organization in: query description: Organization Name schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/SIMCardV2dot2Serializer' /api/v2.2/sub-organizations: get: tags: - Account Management summary: Get Sub-Organizations description: >- Access the list and the details of the organization.

Filter

You can filter the users list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/sub-organizations/?name=ACME&dateCreated_from=2014-03-05 12:00:00 -> This link will give you the organizations that have the name "ACME" and were created after 2014-03-05 12:00:00

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/sub-organizations/?ordering=-dateCreated -> This link will give you the organization in descending order of creation. The results are ordered by default based on ascending name of the organizations.

operationId: Sub_Organization_V2Dot2_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: name in: query description: Organization Name schema: type: string - name: email in: query description: Email Address schema: type: string - name: dateCreated_from in: query description: Created from schema: type: string - name: dateCreated_to in: query description: Created until schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/OrganizationV2dot2Serializer' post: tags: - Account Management summary: Create Sub-Organization description: |- Create a sub-organization for the user's current organization.

This endpoint is idempotent.

operationId: Sub_Organization_V2Dot2_create requestBody: content: application/json: schema: required: - email - name - password - role properties: email: type: string description: Email Address password: type: string description: User's password role: type: string description: User's role in the organization name: type: string description: Organization name company_description: type: string description: Organization description required: true responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/NoBody' /api/v2.2/rules/event: get: tags: - Usage and Event Rules summary: Get Event Rules operationId: Get_Event_Rules parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/EventRuleSerializer' post: tags: - Usage and Event Rules summary: Create Event Rule operationId: Create_Event_Rule requestBody: content: application/json: schema: $ref: '#/components/schemas/WriteEventRuleSerializer' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EventRuleSerializer' '400': description: Bad Request content: application/json: examples: bad_request: summary: Bad request value: action: schedule_rate_plan_change: change_to: - Object with label=Dummy Plan does not exist. change_sim_card_status: - '"SUSPENDEDED" is not a valid choice.' notifications: sms_notification: send_sms_to: - '"Triggered SIMX" is not a valid choice.' filters: sim_cards: - Object with iccid=8944479999999999999 does not exist. /api/v2.2/rules/usage/{pk}: get: tags: - Usage and Event Rules summary: Get Usage Rule details operationId: Get_Usage_Rule_details parameters: - name: pk in: path required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/UsageRuleSerializer' delete: summary: Delete Usage Rule tags: - Usage and Event Rules operationId: Delete_Usage_Rule parameters: - name: pk in: path required: true schema: type: string responses: '200': description: Success '404': description: Not Found content: application/json: examples: NotFound: summary: Not Found value: detail: Not Found patch: summary: Modify Usage Rule tags: - Usage and Event Rules operationId: Modify_Usage_Rule parameters: - name: pk in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/WriteUsageRuleSerializer' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/UsageRuleSerializer' /api/v2.2/devices: get: tags: - Devices summary: Get Devices description: >- Access the list and the details of devices of your organization (including sub-organizations).

Filter

You can filter the devices list using the name of the attributes associated with the model, except for the attributes related to dates (see Attributes) e.g. /api/devices?organization=ExampleOrg&iccid=1234 -> This link will give you the devices that belong to organization named "ExampleOrg" and are associated to SIM cards identified by ICCID containing "1234".

Ordering

You can order the results using the name of the attributes associated with the model. e.g. /api/devices?ordering=-imei -> This link will give you the devices in descending IMEI order.

operationId: Devices_V2Dot2_list parameters: - name: page in: query schema: type: integer format: int32 - name: per_page in: query schema: type: integer format: int32 - name: imei in: query description: International Mobile Station Equipment Identity schema: type: string - name: organization in: query schema: type: string - name: dateFirstRegistered in: query description: Date when the device was first registered schema: type: string - name: dateLatestUpdate in: query description: Latest update date schema: type: string - name: label in: query schema: type: string - name: description in: query schema: type: string - name: iccid in: query schema: type: string responses: '200': description: Success content: application/json: schema: type: array items: $ref: '#/components/schemas/DeviceV2dot2Serializer' components: schemas: WriteSIMCardSubscriptionV2dot0Serializer: required: - subscription type: object properties: subscription: $ref: '#/components/schemas/SIMCardSubscriptionV2ot0Serializer' WriteUserV2dot0Serializer: required: - dateJoined - email - firstName - lastName - organization type: object properties: organization: type: string description: Organization Name firstName: type: string description: First Name lastName: type: string description: Last Name email: type: string description: Email Address dateJoined: type: string description: Date Joined format: date-time SIMCardStatusSerializer: required: - date - iccid - status type: object properties: iccid: type: string description: Integrated Circuit Card IDentifier status: type: string description: >- Possible States: PRE-TEST, TEST, PROVISION, PRE-ACTIVE, ACTIVE, SUSPENDED, BLOCKED, RETIRED, REMOVED date: type: string description: Request Date WriteSIMCardsStatusV2dot0RequestSerializer: required: - iccid - status type: object properties: iccid: type: array description: List of strings of ICCIDs items: type: object properties: {} status: type: string description: >- New SIM Card Status (options: TEST, PROVISIONED, PRE-ACTIVE, ACTIVE, SUSPENDED, RETIRED) SIMCardsDataStatusV2dot0RequestSerializer: required: - iccid - status type: object properties: iccid: type: array description: List of strings of ICCIDs items: type: string status: type: string description: 'New Data Status (options: ACTIVE, SUSPENDED)' RatePlanV2dot0Serializer: required: - bearerServices - servicePackId type: object properties: servicePackId: type: string description: Service Pack ID (i.e. Rate Plan label) bearerServices: $ref: '#/components/schemas/SubscriptionBearerServicesV2ot0Serializer' ApnV2ot0Serializer: required: - description - name type: object properties: name: type: string description: Name of the APN assign description: type: string description: Additional information related to the APN RulesActionsV2dot0Serializer: required: - changeRatePlan - email - mobilePhoneNumber - snmpHost - snmpPort - url type: object properties: email: type: string description: Email mobilePhoneNumber: type: string description: Mobile Number url: type: string description: URL to send the Push API message snmpHost: type: string description: SNMP Host to send the SNMP trap snmpPort: type: string description: SNMP port to send the SNMP trap changeRatePlan: type: string description: Name of the new rate plan to change to RulesEventsV2dot0Serializer: required: - changeDataStatus - changeSimStatus - date - email - label - message - mobilePhoneNumber - ruleTrigger - ruleType - simCard - url type: object properties: date: type: string format: date-time label: type: string simCard: type: string ruleType: type: string ruleTrigger: type: string changeSimStatus: type: string changeDataStatus: type: string email: type: string mobilePhoneNumber: type: string url: type: string message: type: string TagOnlyLabelV2dot0Serializer: required: - label type: object properties: label: type: string AttributeV2dot0Serializer: required: - label - simCard - value type: object properties: simCard: type: string label: type: string description: Label value: type: string description: Value WriteSubscriptionBearerServicesV2ot0Serializer: type: object SIMCardSubscriptionV2dot0Serializer: required: - subscription type: object properties: subscription: $ref: '#/components/schemas/SIMCardSubscriptionV2ot0Serializer' SIMCardsStatusV2dot0RequestSerializer: required: - iccid - status type: object properties: iccid: type: array description: List of strings of ICCIDs items: type: string status: type: string description: >- New SIM Card Status (options: TEST, PROVISIONED, PRE-ACTIVE, ACTIVE, SUSPENDED, RETIRED) Serializer: type: object SIMCardSubscriptionV2ot0Serializer: required: - apn - bearerServices - servicePackId - subscriptionStatus type: object properties: bearerServices: $ref: '#/components/schemas/SubscriptionBearerServicesV2ot0Serializer' servicePackId: type: string description: Service Pack ID subscriptionStatus: type: string description: Status of the subscription associated with SIM card apn: $ref: '#/components/schemas/ApnV2ot0Serializer' WriteTagOnlyLabelV2dot0Serializer: required: - label type: object properties: label: type: string WriteOngoingSessionsV2dot0Serializer: required: - duration - iccid - ipAddress - mcc - mnc - startDate type: object properties: iccid: type: string startDate: type: string format: date-time ipAddress: type: string duration: type: string mcc: type: string mnc: type: string RulesFiltersV2dot0Serializer: required: - all - simCard type: object properties: all: type: boolean description: >- True of rules applies to all the SIM cards in the account, false if applies only to selected SIM cards simCard: type: array description: Array with ICCIDs of the SIM cards that this rule applies to items: $ref: '#/components/schemas/SIMCardIccidField' WriteDownloadReportV2dot0Serializer: required: - id type: object properties: id: type: string WriteAttributeV2dot0Serializer: required: - label - simCard type: object properties: simCard: type: string label: type: string description: Label value: type: string description: Value SIMCardV2dot0Serializer: required: - attributes - dates - description - gsmKeys - iccid - imei - imsis - label - location_tag - msisdns - primaryImsi - primaryMsisdn - simType - subscription - tags type: object properties: iccid: type: string description: Integrated Circuit Card IDentifier label: type: string description: Label description: type: string description: Description simType: type: string primaryMsisdn: type: string description: Primary MSISDN Selected msisdns: type: array description: List of MSISDN available for the SIM Card items: type: string primaryImsi: type: string description: Primary IMSI Selected imsis: type: array description: List of IMSI available for the SIM Card items: type: string gsmKeys: $ref: '#/components/schemas/SIMCardGsmKeysV2ot0Serializer' dates: $ref: '#/components/schemas/SIMCardDatesV2ot0Serializer' imei: type: string subscription: $ref: '#/components/schemas/SIMCardSubscriptionV2ot0Serializer' attributes: type: array description: Array with attributes items: $ref: '#/components/schemas/AttributeOnlyLabelValueV2dot0Serializer' tags: type: array description: Array with tags items: $ref: '#/components/schemas/TagOnlyLabelV2dot0Serializer' location_tag: $ref: '#/components/schemas/LocationTagV2dot0Serializer' OrganizationV2dot0Serializer: required: - bill_cycle_start_day - dateCreated - email - faxPhoneNumber - name - parentOrganization - phoneNumber - segment - vertical - website type: object properties: name: type: string email: type: string dateCreated: type: string description: Date Created format: date-time segment: type: string description: Segment - To be discontinued vertical: type: string description: Vertical - To be discontinued parentOrganization: type: string description: Parent Organization Name phoneNumber: type: string description: Phone Number - To be discontinued website: type: string description: Website - To be discontinued faxPhoneNumber: type: string description: Fax Number - To be discontinued bill_cycle_start_day: type: integer description: Bill Cycle Start Day format: int64 NotificationV2dot0Serializer: required: - date - object - source - sourceType - state - type - value type: object properties: type: type: string enum: - SIM Card Updated - SIM Card state update order submitted to Order Manager - SIM Card state update order submission failed to Order Manager sourceType: type: string source: type: string date: type: string format: date-time object: type: string state: type: string enum: - PRE_TEST - PROVISIONED - PRE_ACTIVE - TEST - ACTIVE - SUSPENDED - BLOCKED - UNLOCKED - NOT_ALLOWED - SWAPPED - RETIRED - SET value: type: string CallDetailRecordV2dot0Serializer: required: - country - destination - duration - endDate - id - network - origin - simCard - startDate - type type: object properties: id: type: string simCard: type: string startDate: type: string format: date-time endDate: type: string format: date-time duration: maximum: 4294967295 minimum: 0 type: integer format: int64 origin: maximum: 9223372036854776000 minimum: -9223372036854776000 type: integer format: int64 nullable: true destination: maximum: 9223372036854776000 minimum: -9223372036854776000 type: integer format: int64 nullable: true country: type: string network: type: string type: type: string enum: - SMS_IN - SMS_OUT - DATA AttributeOnlyLabelValueV2dot0Serializer: required: - label - value type: object properties: label: type: string description: Label value: type: string description: Value LocationTagV2dot0Serializer: required: - label - lat - lng type: object properties: label: type: string description: Name of a location lng: type: number description: Location longitude format: float lat: type: number description: Location latitude format: float WriteRulesEventsV2dot0Serializer: required: - date - email - message - mobilePhoneNumber - ruleTrigger - simCard - url type: object properties: date: type: string format: date-time label: type: string simCard: type: string ruleTrigger: type: string email: type: string mobilePhoneNumber: type: string url: type: string message: type: string WriteSIMCardGsmKeysV2ot0Serializer: type: object properties: pin1: type: string description: PIN code number 1 pin2: type: string description: PIN code number 2 puk1: type: string description: PUK code number 1 puk2: type: string description: PUK code number 2 SendSMSDeliveryReportDestinationV2dot0Serializer: required: - deliveryStatus - iccid type: object properties: iccid: type: string deliveryStatus: type: string WriteOrganizationV2dot0Serializer: required: - bill_cycle_start_day - email - name - parentOrganization type: object properties: name: type: string email: type: string parentOrganization: type: string description: Parent Organization Name bill_cycle_start_day: type: integer description: Bill Cycle Start Day format: int64 WriteRulesV2dot0Serializer: required: - action - condition - dateCreated - filter - label type: object properties: dateCreated: type: string format: date-time label: type: string filter: $ref: '#/components/schemas/RulesFiltersV2dot0Serializer' condition: $ref: '#/components/schemas/Serializer' action: $ref: '#/components/schemas/RulesActionsV2dot0Serializer' WriteApnV2ot0Serializer: required: - name type: object properties: name: type: string description: Name of the APN assign WriteNotificationV2dot0Serializer: required: - date - object - source - sourceType - type type: object properties: type: type: string enum: - SIM Card Updated - SIM Card state update order submitted to Order Manager - SIM Card state update order submission failed to Order Manager sourceType: type: string source: type: string date: type: string format: date-time object: type: string state: type: string enum: - PRE_TEST - PROVISIONED - PRE_ACTIVE - TEST - ACTIVE - SUSPENDED - BLOCKED - UNLOCKED - NOT_ALLOWED - SWAPPED - RETIRED - SET value: type: string WriteSIMCardIccidField: type: object WriteSIMCardSubscriptionV2ot0Serializer: required: - apn - bearerServices - servicePackId type: object properties: bearerServices: $ref: '#/components/schemas/SubscriptionBearerServicesV2ot0Serializer' servicePackId: type: string description: Service Pack ID apn: $ref: '#/components/schemas/ApnV2ot0Serializer' WriteSerializer: type: object WriteRatePlanV2dot0Serializer: required: - bearerServices - servicePackId type: object properties: servicePackId: type: string description: Service Pack ID (i.e. Rate Plan label) bearerServices: $ref: '#/components/schemas/SubscriptionBearerServicesV2ot0Serializer' WriteSIMCardV2dot0Serializer: required: - attributes - dates - gsmKeys - iccid - primaryImsi - primaryMsisdn - subscription - tags type: object properties: iccid: type: string description: Integrated Circuit Card IDentifier label: type: string description: Label description: type: string description: Description primaryMsisdn: type: string description: Primary MSISDN Selected primaryImsi: type: string description: Primary IMSI Selected gsmKeys: $ref: '#/components/schemas/SIMCardGsmKeysV2ot0Serializer' dates: $ref: '#/components/schemas/SIMCardDatesV2ot0Serializer' subscription: $ref: '#/components/schemas/SIMCardSubscriptionV2ot0Serializer' attributes: type: array description: Array with attributes items: $ref: '#/components/schemas/AttributeOnlyLabelValueV2dot0Serializer' tags: type: array description: Array with tags items: $ref: '#/components/schemas/TagOnlyLabelV2dot0Serializer' V2dot0ResponseSerializer: required: - detail type: object properties: detail: type: string description: This is the Detail response WriteRulesActionsV2dot0Serializer: required: - changeRatePlan - email - mobilePhoneNumber - snmpHost - url type: object properties: email: type: string description: Email mobilePhoneNumber: type: string description: Mobile Number url: type: string description: URL to send the Push API message snmpHost: type: string description: SNMP Host to send the SNMP trap changeRatePlan: type: string description: Name of the new rate plan to change to WriteCallDetailRecordV2dot0Serializer: required: - country - endDate - id - network - simCard - startDate - type type: object properties: id: type: string simCard: type: string startDate: type: string format: date-time endDate: type: string format: date-time duration: maximum: 4294967295 minimum: 0 type: integer format: int64 origin: maximum: 9223372036854776000 minimum: -9223372036854776000 type: integer format: int64 destination: maximum: 9223372036854776000 minimum: -9223372036854776000 type: integer format: int64 country: type: string network: type: string type: type: string DownloadReportV2dot0Serializer: required: - id type: object properties: id: type: string WriteLocationTagV2dot0Serializer: required: - label - lat - lng type: object properties: label: type: string description: Name of a location lng: type: number description: Location longitude format: float lat: type: number description: Location latitude format: float SIMCardGsmKeysV2ot0Serializer: required: - pin1 - pin2 - puk1 - puk2 type: object properties: pin1: type: string description: PIN code number 1 pin2: type: string description: PIN code number 2 puk1: type: string description: PUK code number 1 puk2: type: string description: PUK code number 2 UserV2dot0Serializer: required: - dateJoined - email - faxPhoneNumber - firstName - lastName - mobilePhoneNumber - organization - phoneNumber type: object properties: organization: type: string description: Organization Name firstName: type: string description: First Name lastName: type: string description: Last Name email: type: string description: Email Address phoneNumber: type: string description: Phone Number - To be discontinued mobilePhoneNumber: type: string description: Fax Number - To be discontinued faxPhoneNumber: type: string description: Fax Number - To be discontinued dateJoined: type: string description: Date Joined format: date-time SIMCardIccidField: type: object WriteSIMCardsDataStatusV2dot0RequestSerializer: required: - iccid - status type: object properties: iccid: type: array description: List of strings of ICCIDs items: type: object properties: {} status: type: string description: 'New Data Status (options: ACTIVE, SUSPENDED)' WriteSendSMSV2dot0RequestSerializer: required: - iccid - text type: object properties: iccid: type: array description: List of strings of ICCIDs items: type: object properties: {} text: type: string description: Text for the SMS AuditTrailV2dot0Serializer: required: - action - date - description - interface - object - objectType - user type: object properties: date: type: string format: date-time user: type: string interface: type: string objectType: type: string object: type: string action: type: string description: type: string SendSMSV2dot0RequestSerializer: required: - iccid - text type: object properties: iccid: type: array description: List of strings of ICCIDs items: type: string text: type: string description: Text for the SMS TagSIMCardsV2dot0Serializer: required: - simCards type: object properties: simCards: type: array items: type: string WriteReportGenerateV2dot0RequestSerializer: required: - granularity - output_format - report_type type: object properties: report_type: type: string description: Choose the report type enum: - INVENTORY - LOCATION - DATA_USAGE - SMS_USAGE - EVENT_RULES - USAGE_RULES - NOTIFICATIONS iccid: type: array description: List of ICCIDs - each separated by a comma (e.g. iccid1,iccid2). items: type: object properties: {} tag: type: array description: List of Tags - each separated by a comma (e.g. tag1,tag2). items: type: object properties: {} all_sim_cards: type: boolean description: Uses All SIM Cards from the organization. granularity: type: string description: >- Select the report granularity - Hourly (Max: 7 Days) Daily (Max: 6 Months). enum: - Month - Cycle - Day - Hour billing_cycle: maximum: 31 minimum: 1 type: integer description: Select the starting day of the billing cycle (e.g. 5, 20). format: int64 period: type: string description: The period selected ends in the current day. enum: - PAST_7_DAYS - PAST_14_DAYS - PAST_30_DAYS - PAST_3_MONTHS - PAST_6_MONTHS - PAST_1_YEAR startDate: type: string description: 'Date format: YYYY-MM-DD HH:MM:SS' format: date-time endDate: type: string description: 'Date format: YYYY-MM-DD HH:MM:SS' format: date-time output_format: type: string description: Select the output format you prefer. enum: - CSV - JSON LocationUpdateV2dot0Serializer: required: - country - date - id - networkName - simCard type: object properties: id: type: integer format: int64 simCard: type: string date: type: string format: date-time country: type: string networkName: type: string WriteSendSMSDeliveryReportV2dot0Serializer: required: - content - dateSubmitted - deliveryReport - id type: object properties: id: type: string dateSubmitted: type: string format: date-time content: type: string deliveryReport: type: array items: $ref: >- #/components/schemas/SendSMSDeliveryReportDestinationV2dot0Serializer WriteSendSMSDeliveryReportDestinationV2dot0Serializer: required: - deliveryStatus - iccid type: object properties: iccid: type: string deliveryStatus: type: string WriteLocationUpdateV2dot0Serializer: required: - country - date - networkName - simCard type: object properties: simCard: type: string date: type: string format: date-time country: type: string networkName: type: string RulesV2dot0Serializer: required: - action - condition - dateCreated - extended - filter - label - type type: object properties: dateCreated: type: string format: date-time label: type: string type: type: string filter: $ref: '#/components/schemas/RulesFiltersV2dot0Serializer' condition: $ref: '#/components/schemas/Serializer' action: $ref: '#/components/schemas/RulesActionsV2dot0Serializer' extended: type: string WriteRulesFiltersV2dot0Serializer: required: - all - simCard type: object properties: all: type: boolean description: >- True of rules applies to all the SIM cards in the account, false if applies only to selected SIM cards simCard: type: array description: Array with ICCIDs of the SIM cards that this rule applies to items: $ref: '#/components/schemas/SIMCardIccidField' SendSMSDeliveryReportV2dot0Serializer: required: - content - dateSubmitted - deliveryReport - id type: object properties: id: type: string dateSubmitted: type: string format: date-time content: type: string deliveryReport: type: array items: $ref: >- #/components/schemas/SendSMSDeliveryReportDestinationV2dot0Serializer TagV2dot0Serializer: required: - description - label - simCards type: object properties: simCards: type: array items: type: string label: type: string description: type: string description: Add a description for your Tag. Max 500 characters. WriteAuditTrailV2dot0Serializer: required: - description - object - user type: object properties: date: type: string format: date-time user: type: string object: type: string description: type: string WriteSIMCardDatesV2ot0Serializer: required: - deliveryDate - provisionDate - shippingDate type: object properties: provisionDate: type: string description: Provision Date format: date-time shippingDate: type: string description: Shipping Date format: date-time deliveryDate: type: string description: Delivery Date format: date-time ReportGenerateV2dot0RequestSerializer: required: - all_sim_cards - billing_cycle - endDate - granularity - iccid - output_format - period - report_type - startDate - tag type: object properties: report_type: type: string description: Choose the report type enum: - INVENTORY - LOCATION - DATA_USAGE - SMS_USAGE - EVENT_RULES - USAGE_RULES - NOTIFICATIONS iccid: type: array description: List of ICCIDs - each separated by a comma (e.g. iccid1,iccid2). items: type: object properties: {} tag: type: array description: List of Tags - each separated by a comma (e.g. tag1,tag2). items: type: object properties: {} all_sim_cards: type: boolean description: Uses All SIM Cards from the organization. granularity: type: string description: >- Select the report granularity - Hourly (Max: 7 Days) Daily (Max: 6 Months). enum: - Month - Cycle - Day - Hour billing_cycle: maximum: 31 minimum: 1 type: integer description: Select the starting day of the billing cycle (e.g. 5, 20). format: int64 period: type: string description: The period selected ends in the current day. enum: - PAST_7_DAYS - PAST_14_DAYS - PAST_30_DAYS - PAST_3_MONTHS - PAST_6_MONTHS - PAST_1_YEAR startDate: type: string description: 'Date format: YYYY-MM-DD HH:MM:SS' format: date-time endDate: type: string description: 'Date format: YYYY-MM-DD HH:MM:SS' format: date-time output_format: type: string description: Select the output format you prefer. enum: - CSV - JSON WriteTagSIMCardsV2dot0Serializer: type: object WriteTagV2dot0Serializer: required: - label type: object properties: label: type: string description: type: string description: Add a description for your Tag. Max 500 characters. SubscriptionBearerServicesV2ot0Serializer: required: - csd - gprs - smsMo - smsMt - ussd - voiceMo - voiceMt type: object properties: voiceMo: type: string description: Voice Mobile Originated voiceMt: type: string description: Voice Mobile Terminated smsMo: type: string description: SMS Mobile Originated smsMt: type: string description: SMS Mobile Terminated gprs: type: string description: General Packet Radio Service csd: type: string description: Circuit Switched Data ussd: type: string description: Unstructured Supplementary Service Data WriteV2dot0ResponseSerializer: required: - detail type: object properties: detail: type: string description: This is the Detail response WriteSIMCardStatusSerializer: required: - iccid type: object properties: iccid: type: string description: Integrated Circuit Card IDentifier OngoingSessionsV2dot0Serializer: required: - duration - iccid - ipAddress - mcc - mnc - startDate type: object properties: iccid: type: string startDate: type: string format: date-time ipAddress: type: string duration: type: string mcc: type: string mnc: type: string SIMCardDatesV2ot0Serializer: required: - deliveryDate - firstActivationDate - provisionDate - shippingDate type: object properties: provisionDate: type: string description: Provision Date format: date-time shippingDate: type: string description: Shipping Date format: date-time deliveryDate: type: string description: Delivery Date format: date-time firstActivationDate: type: string description: Date of First Activation WriteAttributeOnlyLabelValueV2dot0Serializer: required: - label type: object properties: label: type: string description: Label value: type: string description: Value SIMCardDatesV2dot1Serializer: required: - deliveryDate - firstActivationDate - provisionDate - shippingDate - testStateStartDate type: object properties: provisionDate: type: string description: Provision Date format: date-time shippingDate: type: string description: Shipping Date format: date-time deliveryDate: type: string description: Delivery Date format: date-time firstActivationDate: type: string description: Date of First Activation testStateStartDate: type: string description: Date when the test state started for this SIM WriteTestModeV2dot1Serializer: required: - allowedTestTime - dataUsageLimit type: object properties: dataUsageLimit: type: integer description: Test State usage limit format: int64 allowedTestTime: type: integer description: Remaining time while this Rate Plan is valid format: int64 WriteSIMCardV2dot1Serializer: required: - attributes - dates - gsmKeys - iccid - primaryImsi - primaryMsisdn - subscription - tags type: object properties: iccid: type: string description: Integrated Circuit Card IDentifier label: type: string description: Label description: type: string description: Description primaryMsisdn: type: string description: Primary MSISDN Selected primaryImsi: type: string description: Primary IMSI Selected gsmKeys: $ref: '#/components/schemas/SIMCardGsmKeysV2ot0Serializer' dates: $ref: '#/components/schemas/SIMCardDatesV2dot1Serializer' subscription: $ref: '#/components/schemas/SIMCardSubscriptionV2ot0Serializer' attributes: type: array description: Array with attributes items: $ref: '#/components/schemas/AttributeOnlyLabelValueV2dot0Serializer' tags: type: array description: Array with tags items: $ref: '#/components/schemas/TagOnlyLabelV2dot0Serializer' SIMCardV2dot1Serializer: required: - attributes - dates - description - gsmKeys - iccid - imei - imsis - label - location_tag - msisdns - primaryImsi - primaryMsisdn - simType - subscription - tags type: object properties: iccid: type: string description: Integrated Circuit Card IDentifier label: type: string description: Label description: type: string description: Description simType: type: string primaryMsisdn: type: string description: Primary MSISDN Selected msisdns: type: array description: List of MSISDN available for the SIM Card items: type: string primaryImsi: type: string description: Primary IMSI Selected imsis: type: array description: List of IMSI available for the SIM Card items: type: string gsmKeys: $ref: '#/components/schemas/SIMCardGsmKeysV2ot0Serializer' dates: $ref: '#/components/schemas/SIMCardDatesV2dot1Serializer' imei: type: string subscription: $ref: '#/components/schemas/SIMCardSubscriptionV2ot0Serializer' attributes: type: array description: Array with attributes items: $ref: '#/components/schemas/AttributeOnlyLabelValueV2dot0Serializer' tags: type: array description: Array with tags items: $ref: '#/components/schemas/TagOnlyLabelV2dot0Serializer' location_tag: $ref: '#/components/schemas/LocationTagV2dot0Serializer' WriteSIMCardDatesV2dot1Serializer: required: - deliveryDate - provisionDate - shippingDate type: object properties: provisionDate: type: string description: Provision Date format: date-time shippingDate: type: string description: Shipping Date format: date-time deliveryDate: type: string description: Delivery Date format: date-time TestModeV2dot1Serializer: required: - allowedTestTime - dataUsageLimit type: object properties: dataUsageLimit: type: integer description: Test State usage limit format: int64 allowedTestTime: type: integer description: Remaining time while this Rate Plan is valid format: int64 SIMCardTestStateStatusV2dot1Serializer: required: - allowed_data - allowed_time - date - iccid - remaining_data - remaining_time - status - test_state_start_date type: object properties: iccid: type: string description: Integrated Circuit Card IDentifier status: type: string description: >- Possible States: PRE-TEST, TEST, PROVISION, PRE-ACTIVE, ACTIVE, SUSPENDED, BLOCKED, RETIRED, REMOVED date: type: string description: Request Date test_state_start_date: type: string description: >- SIM Card Test mode starting date. Note: Only available if the SIM Card is in Test mode format: date-time allowed_data: type: string description: >- SIM Card Test mode allowed Data usage (in Kb). Note: Only available if the SIM Card is in Test mode allowed_time: type: string description: >- SIM Card Test mode allowed time (in minutes). Note: Only available if the SIM Card is in Test mode remaining_data: type: string description: >- SIM Card Test mode remaining Data usage (in Kb). Note: Only available if the SIM Card is in Test mode remaining_time: type: string description: >- SIM Card Test mode remaining time (in minutes). Note: Only available if the SIM Card is in Test mode WriteSIMCardTestStateStatusV2dot1Serializer: required: - iccid - test_state_start_date type: object properties: iccid: type: string description: Integrated Circuit Card IDentifier test_state_start_date: type: string description: >- SIM Card Test mode starting date. Note: Only available if the SIM Card is in Test mode format: date-time WriteRatePlanTestModeV2dot1Serializer: required: - bearerServices - servicePackId - supportsTestMode - testMode type: object properties: servicePackId: type: string description: Service Pack ID (i.e. Rate Plan label) bearerServices: $ref: '#/components/schemas/SubscriptionBearerServicesV2ot0Serializer' supportsTestMode: type: boolean description: Indicates if the Rate Plan supports Test Mode for the SIM cards testMode: $ref: '#/components/schemas/TestModeV2dot1Serializer' RatePlanTestModeV2dot1Serializer: required: - bearerServices - servicePackId - supportsTestMode - testMode type: object properties: servicePackId: type: string description: Service Pack ID (i.e. Rate Plan label) bearerServices: $ref: '#/components/schemas/SubscriptionBearerServicesV2ot0Serializer' supportsTestMode: type: boolean description: Indicates if the Rate Plan supports Test Mode for the SIM cards testMode: $ref: '#/components/schemas/TestModeV2dot1Serializer' WriteSIMCardsSMSServiceStatusRequestV2dot2Serializer: required: - iccid - sms_service - status type: object properties: iccid: type: array description: List of strings of ICCIDs items: type: object properties: {} sms_service: type: string description: Select which SMS Service to apply the change. enum: - MO - MT status: type: string description: Select the change to perform to the SMS Service enum: - ACTIVE - SUSPENDED WriteSIMCardV2dot2Serializer: required: - attributes - dates - gsmKeys - iccid - organization - primaryImsi - primaryMsisdn - subscription - tags type: object properties: iccid: type: string description: Integrated Circuit Card IDentifier label: type: string description: Label description: type: string description: Description primaryMsisdn: type: string description: Primary MSISDN Selected primaryImsi: type: string description: Primary IMSI Selected gsmKeys: $ref: '#/components/schemas/SIMCardGsmKeysV2ot0Serializer' dates: $ref: '#/components/schemas/SIMCardDatesV2dot1Serializer' subscription: $ref: '#/components/schemas/SIMCardSubscriptionV2ot0Serializer' attributes: type: array description: Array with attributes items: $ref: '#/components/schemas/AttributeOnlyLabelValueV2dot0Serializer' tags: type: array description: Array with tags items: $ref: '#/components/schemas/TagOnlyLabelV2dot0Serializer' organization: type: string description: Organization Name RulesFilterSerializer: required: - rate_plan - sim_cards - tags type: object properties: sim_cards: type: array description: List of ICCIDs items: type: string tags: type: array description: List of Tag's labels items: type: string rate_plan: type: string description: Rate plan name WriteRulesNotificationSerializer: required: - sms_notification type: object properties: email: type: string sms_notification: $ref: '#/components/schemas/RulesSMSNotificationSerializer' webhook_url: type: string WriteEventRuleSerializer: type: object properties: label: type: string description: Title of the rule description: type: string description: Additional description of the rule filters: $ref: '#/components/schemas/RulesFilterSerializer' action: $ref: '#/components/schemas/RulesActionSerializer' notifications: $ref: '#/components/schemas/RulesNotificationSerializer' condition: $ref: '#/components/schemas/EventRuleConditionSerializer' WriteRulesActionSerializer: required: - schedule_rate_plan_change type: object properties: change_sim_card_status: type: string enum: - ACTIVE - SUSPENDED - BLOCKED - RETIRED change_data_status: type: string enum: - ACTIVATE_DATA - SUSPEND_DATA schedule_data_status_change: $ref: '#/components/schemas/ScheduleDataStatusChange' schedule_rate_plan_change: $ref: '#/components/schemas/ScheduleRatePlanChange' WriteEventRuleConditionSerializer: required: - country_list - from_device - from_imei_prefix - from_sim_state - network_list - to_device - to_imei_prefix - to_sim_state - triggers_when_location - triggers_when_session - type type: object properties: type: type: string enum: - New Short Message - New Device - New Location - New Data Session - New SIM State - Expires From Date - Expires From Rate Plan from_device: type: string description: Fill only if type=New Device enum: - NO_DEVICE - ANY - IMEI_IN from_imei_prefix: type: string description: >- Prefix or full IMEI number which would trigger the rule. Fill only if from_device=IMEI_IN to_device: type: string description: Fill only if type=New Device enum: - ANY - IMEI_IN - IMEI_NOT_IN to_imei_prefix: type: string description: >- Prefix or full IMEI number which would trigger the rule. Fill only if to_device=IMEI_IN triggers_when_location: type: integer description: Fill only if type=New Location format: int32 enum: - 1 - 5 - 6 - 2 - 3 - 4 country_list: type: array description: Must be uppercase such as ["AUSTRIA", "SPAIN", ...]. items: type: string network_list: type: array items: type: string triggers_when_session: type: integer description: >- Available options ['The Session Ends', 'The Session Starts']. Fill only if type=New Data Session. format: int32 enum: - 1 - 2 from_sim_state: type: string description: Fill only if type=New SIM State enum: - ANY - PROVISIONED - TEST - PRE_ACTIVE - ACTIVE - SUSPENDED - BLOCKED - RETIRED to_sim_state: type: string description: Fill only if type=New SIM State enum: - ANY - PROVISIONED - TEST - PRE_ACTIVE - ACTIVE - SUSPENDED - BLOCKED - RETIRED - REMOVED WriteScheduleDataStatusChange: required: - change_to - when type: object properties: when: type: string enum: - CALENDER_DAY - CALENDAR_MONTH - BILLING_CYCLE change_to: type: string enum: - ACTIVATE - SUSPEND RulesActionSerializer: required: - change_data_status - change_sim_card_status - schedule_data_status_change - schedule_rate_plan_change type: object properties: change_sim_card_status: type: string enum: - ACTIVE - SUSPENDED - BLOCKED - RETIRED change_data_status: type: string enum: - ACTIVATE_DATA - SUSPEND_DATA schedule_data_status_change: $ref: '#/components/schemas/ScheduleDataStatusChange' schedule_rate_plan_change: $ref: '#/components/schemas/ScheduleRatePlanChange' WriteOrganizationV2dot2Serializer: required: - email - name - password - role type: object properties: email: type: string description: Email Address password: type: string description: User's password role: type: string description: User's role in the organization name: type: string description: Organization name company_description: type: string description: Organization description RulePeriodSerializer: required: - of - period - units type: object properties: period: type: string enum: - Calendar Month - Billing Cycle - Calendar Week - Calendar Day - Past 24 hours - Past 7 days - Past 14 days - Past 30 days - Custom Period - Per Session - Current Rate Plan of: type: integer description: Fill only if period=Custom Period format: int64 units: type: integer description: >- Available options ['Minutes', 'Hours', 'Days']. Fill only if period=Custom Period format: int32 enum: - 1 - 60 - 1440 WriteScheduleRatePlanChange: required: - change_next_billing_cycle type: object properties: change_to: type: string description: Rate Plan name change_next_billing_cycle: type: boolean description: >- If true, the rate plan will be changed on the start of the next billing cycle UserV2dot2Serializer: required: - dateJoined - email - firstName - id - lastName - organization - role type: object properties: id: type: string description: User's unique ID firstName: type: string description: User's First Name lastName: type: string description: User's Last Name email: type: string description: User's Email role: type: string description: User's role in the organization dateJoined: type: string description: Date user has joined format: date-time organization: type: string description: User's organization WriteRulesFilterSerializer: type: object properties: sim_cards: type: array description: List of ICCIDs items: type: string tags: type: array description: List of Tag's labels items: type: string rate_plan: type: string description: Rate plan name UsageRuleConditionSerializer: required: - is_greater_than - of - over_the - units - when type: object properties: when: type: string enum: - Inbound call - Outbound call - Inbound SMS - Outbound SMS - Data session - Number of Sessions of: type: string enum: - Per SIM Card - All SIM Card is_greater_than: type: integer format: int64 units: type: integer description: >- Available options ['KB', 'MB', 'GB', 'Seconds', 'Minutes', 'Hours', 'SMS'] format: int32 enum: - 1 - 1024 - 1048576 - 60 - 3600 over_the: $ref: '#/components/schemas/RulePeriodSerializer' ScheduleRatePlanChange: required: - change_next_billing_cycle - change_to type: object properties: change_to: type: string description: Rate Plan name change_next_billing_cycle: type: boolean description: >- If true, the rate plan will be changed on the start of the next billing cycle WriteUserV2dot2Serializer: required: - dateJoined - email - firstName - lastName - organization type: object properties: firstName: type: string description: User's First Name lastName: type: string description: User's Last Name email: type: string description: User's Email dateJoined: type: string description: Date user has joined format: date-time organization: type: string description: User's organization EventRuleSerializer: required: - action - condition - description - filters - id - label - notifications type: object properties: id: type: string label: type: string description: Title of the rule description: type: string description: Additional description of the rule filters: $ref: '#/components/schemas/RulesFilterSerializer' action: $ref: '#/components/schemas/RulesActionSerializer' notifications: $ref: '#/components/schemas/RulesNotificationSerializer' condition: $ref: '#/components/schemas/EventRuleConditionSerializer' WriteUsageRuleConditionSerializer: required: - is_greater_than - of - over_the - units - when type: object properties: when: type: string enum: - Inbound call - Outbound call - Inbound SMS - Outbound SMS - Data session - Number of Sessions of: type: string enum: - Per SIM Card - All SIM Card is_greater_than: type: integer format: int64 units: type: integer description: >- Available options ['KB', 'MB', 'GB', 'Seconds', 'Minutes', 'Hours', 'SMS'] format: int32 enum: - 1 - 1024 - 1048576 - 60 - 3600 over_the: $ref: '#/components/schemas/RulePeriodSerializer' ScheduleDataStatusChange: required: - change_to - when type: object properties: when: type: string enum: - CALENDER_DAY - CALENDAR_MONTH - BILLING_CYCLE change_to: type: string enum: - ACTIVATE - SUSPEND OrganizationV2dot2Serializer: required: - company_description - date_created - email - id - name type: object properties: email: type: string description: Email Address name: type: string description: Organization name company_description: type: string description: Organization description date_created: type: string description: Date when the organization was created format: date-time id: type: string description: Organization unique identifier WriteRulesSMSNotificationSerializer: required: - send_sms_to type: object properties: send_sms_to: type: string description: >- Available options ['0 - Triggered SIM', '1 - Custom Number'] or empty string to deactivate enum: - '0' - '1' mobile_phone_number: type: string description: >- Is send_sms_to="Custom Number", this number will be used. Must be Truphone's. custom_message: type: string description: Leave blank for default message RulesSMSNotificationSerializer: required: - custom_message - mobile_phone_number - send_sms_to type: object properties: send_sms_to: type: string description: >- Available options ['0 - Triggered SIM', '1 - Custom Number'] or empty string to deactivate enum: - '0' - '1' mobile_phone_number: type: string description: >- Is send_sms_to="Custom Number", this number will be used. Must be Truphone's. custom_message: type: string description: Leave blank for default message EventRuleConditionSerializer: required: - country_list - from_device - from_imei_prefix - from_sim_state - network_list - to_device - to_imei_prefix - to_sim_state - triggers_when_location - triggers_when_session - type type: object properties: type: type: string enum: - New Short Message - New Device - New Location - New Data Session - New SIM State - Expires From Date - Expires From Rate Plan from_device: type: string description: Fill only if type=New Device enum: - NO_DEVICE - ANY - IMEI_IN from_imei_prefix: type: string description: >- Prefix or full IMEI number which would trigger the rule. Fill only if from_device=IMEI_IN to_device: type: string description: Fill only if type=New Device enum: - ANY - IMEI_IN - IMEI_NOT_IN to_imei_prefix: type: string description: >- Prefix or full IMEI number which would trigger the rule. Fill only if to_device=IMEI_IN triggers_when_location: type: integer description: Fill only if type=New Location format: int32 enum: - 1 - 5 - 6 - 2 - 3 - 4 country_list: type: array description: Must be uppercase such as ["AUSTRIA", "SPAIN", ...]. items: type: string network_list: type: array items: type: string triggers_when_session: type: integer description: >- Available options ['The Session Ends', 'The Session Starts']. Fill only if type=New Data Session. format: int32 enum: - 1 - 2 from_sim_state: type: string description: Fill only if type=New SIM State enum: - ANY - PROVISIONED - TEST - PRE_ACTIVE - ACTIVE - SUSPENDED - BLOCKED - RETIRED to_sim_state: type: string description: Fill only if type=New SIM State enum: - ANY - PROVISIONED - TEST - PRE_ACTIVE - ACTIVE - SUSPENDED - BLOCKED - RETIRED - REMOVED WriteDeviceV2dot2Serializer: type: object properties: label: type: string description: Label description: type: string description: Description DeviceV2dot2Serializer: required: - dateFirstRegistered - dateLatestUpdate - description - iccid - imei - label - organization type: object properties: imei: type: string description: International Mobile Station Equipment Identity organization: type: string description: Organization which the device belongs to dateFirstRegistered: type: string description: Date First Registered format: date-time dateLatestUpdate: type: string description: Date Last Registered format: date-time label: type: string description: Label description: type: string description: Description iccid: type: string description: ICCID of the related SIM card SIMCardV2dot2Serializer: required: - attributes - dates - description - gsmKeys - iccid - imei - imsis - label - location_tag - msisdns - organization - primaryImsi - primaryMsisdn - simType - subscription - tags type: object properties: iccid: type: string description: Integrated Circuit Card IDentifier label: type: string description: Label description: type: string description: Description simType: type: string primaryMsisdn: type: string description: Primary MSISDN Selected msisdns: type: array description: List of MSISDN available for the SIM Card items: type: string primaryImsi: type: string description: Primary IMSI Selected imsis: type: array description: List of IMSI available for the SIM Card items: type: string gsmKeys: $ref: '#/components/schemas/SIMCardGsmKeysV2ot0Serializer' dates: $ref: '#/components/schemas/SIMCardDatesV2dot1Serializer' imei: type: string subscription: $ref: '#/components/schemas/SIMCardSubscriptionV2ot0Serializer' attributes: type: array description: Array with attributes items: $ref: '#/components/schemas/AttributeOnlyLabelValueV2dot0Serializer' tags: type: array description: Array with tags items: $ref: '#/components/schemas/TagOnlyLabelV2dot0Serializer' location_tag: $ref: '#/components/schemas/LocationTagV2dot0Serializer' organization: type: string description: Organization Name WriteUsageRuleSerializer: type: object properties: label: type: string description: Title of the rule description: type: string description: Additional description of the rule filters: $ref: '#/components/schemas/RulesFilterSerializer' action: $ref: '#/components/schemas/RulesActionSerializer' notifications: $ref: '#/components/schemas/RulesNotificationSerializer' condition: $ref: '#/components/schemas/UsageRuleConditionSerializer' UsageRuleSerializer: required: - action - condition - description - filters - id - label - notifications type: object properties: id: type: string label: type: string description: Title of the rule description: type: string description: Additional description of the rule filters: $ref: '#/components/schemas/RulesFilterSerializer' action: $ref: '#/components/schemas/RulesActionSerializer' notifications: $ref: '#/components/schemas/RulesNotificationSerializer' condition: $ref: '#/components/schemas/UsageRuleConditionSerializer' SIMCardsSMSServiceStatusRequestV2dot2Serializer: required: - iccid - sms_service - status type: object properties: iccid: type: array description: List of strings of ICCIDs items: type: object properties: {} sms_service: type: string description: Select which SMS Service to apply the change. enum: - MO - MT status: type: string description: Select the change to perform to the SMS Service enum: - ACTIVE - SUSPENDED RulesNotificationSerializer: required: - email - sms_notification - webhook_url type: object properties: email: type: string sms_notification: $ref: '#/components/schemas/RulesSMSNotificationSerializer' webhook_url: type: string WriteRulePeriodSerializer: required: - period type: object properties: period: type: string enum: - Calendar Month - Billing Cycle - Calendar Week - Calendar Day - Past 24 hours - Past 7 days - Past 14 days - Past 30 days - Custom Period - Per Session - Current Rate Plan of: type: integer description: Fill only if period=Custom Period format: int64 units: type: integer description: >- Available options ['Minutes', 'Hours', 'Days']. Fill only if period=Custom Period format: int32 enum: - 1 - 60 - 1440 NoBody: type: object