Skip to main content

IoT Portal APIs (v2.2)

Download OpenAPI specification:Download

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):

  • Account Management;
  • Billing;
  • SIM usage and lifecycle management;
  • Attributes and Tags;
  • Sending SMS;
  • Rules;
  • Reports;
  • Notifications;
  • Audit Trail;

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

  • Requests with mandatory attributes must always send an empty attribute or an empty array (if no items are provided).Arrays with single items must always be sent as a single item array. There is no need to include null/empty fields inrequests with optional attributes.

Responses

  • The name of the fields is always camelCased ASCII strings. The first character is a letter, an underscore (_)or a dollar sign ($).

  • Date attributes use always the UTC ISO format (i.e., %Y-%m-%dT%H:%M:%S.%f+00:00).

  • Arrays without any items are always returned as empty arrays in responses (e.g., {'field': []}).

  • Empty values are always returned as an empty field in the JSON response (e.g., {'field': ''}).

  • Null values, except for strings, are always returned as a null field in the JSON response (e.g., {'field': null}).

  • Null strings are always returned as '' instead of null.

  • Unknown response fields should be ignored by the user.

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

Authentication

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

Account Management

Manage account details

Get Organizations

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.

query Parameters
page
integer <int32>
per_page
integer <int32>
name
string

Organization Name

email
string

Email Address

dateCreated_from
string

Earliest Date Created

dateCreated_to
string

Latest Date Created

parentOrganization
string

Organization Name

Responses

Response Schema: application/json
Array
bill_cycle_start_day
required
integer <int64>

Bill Cycle Start Day

dateCreated
required
string <date-time>

Date Created

email
required
string
faxPhoneNumber
required
string

Fax Number - To be discontinued

name
required
string
parentOrganization
required
string

Parent Organization Name

phoneNumber
required
string

Phone Number - To be discontinued

segment
required
string

Segment - To be discontinued

vertical
required
string

Vertical - To be discontinued

website
required
string

Website - To be discontinued

Response samples

Content type
application/json
[
  • {
    • "name": "string",
    • "email": "string",
    • "dateCreated": "2019-08-24T14:15:22Z",
    • "segment": "string",
    • "vertical": "string",
    • "parentOrganization": "string",
    • "phoneNumber": "string",
    • "website": "string",
    • "faxPhoneNumber": "string",
    • "bill_cycle_start_day": 0
    }
]

Get Sub-Organization details

Access the details of a specific sub-organization given its unique id.

path Parameters
pk
required
string

Responses

Response Schema: application/json
company_description
required
string

Organization description

date_created
required
string <date-time>

Date when the organization was created

email
required
string

Email Address

id
required
string

Organization unique identifier

name
required
string

Organization name

Response samples

Content type
application/json
{
  • "email": "string",
  • "name": "string",
  • "company_description": "string",
  • "date_created": "2019-08-24T14:15:22Z",
  • "id": "string"
}

Delete Sub-Organization

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.

path Parameters
pk
required
string

Responses

Response Schema: application/json
object (NoBody)

Response samples

Content type
application/json
{ }

Modify Sub-Organization

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.

path Parameters
pk
required
string
Request Body schema: application/json
name
string

Organization name

company_description
string

Organization description

Responses

Response Schema: application/json
object (NoBody)

Request samples

Content type
application/json
{
  • "name": "string",
  • "company_description": "string"
}

Response samples

Content type
application/json
{ }

Get Sub-Organizations

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.

query Parameters
page
integer <int32>
per_page
integer <int32>
name
string

Organization Name

email
string

Email Address

dateCreated_from
string

Created from

dateCreated_to
string

Created until

Responses

Response Schema: application/json
Array
company_description
required
string

Organization description

date_created
required
string <date-time>

Date when the organization was created

email
required
string

Email Address

id
required
string

Organization unique identifier

name
required
string

Organization name

Response samples

Content type
application/json
[
  • {
    • "email": "string",
    • "name": "string",
    • "company_description": "string",
    • "date_created": "2019-08-24T14:15:22Z",
    • "id": "string"
    }
]

Create Sub-Organization

Create a sub-organization for the user's current organization.

This endpoint is idempotent.

Request Body schema: application/json
email
required
string

Email Address

name
required
string

Organization name

password
required
string

User's password

role
required
string

User's role in the organization

company_description
string

Organization description

Responses

Response Schema: application/json
object (NoBody)

Request samples

Content type
application/json
{
  • "email": "string",
  • "password": "string",
  • "role": "string",
  • "name": "string",
  • "company_description": "string"
}

Response samples

Content type
application/json
{ }

User Management

Manage user details

Get User details

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.

path Parameters
id
required
string
query Parameters
id
string

User ID

organization
string

Organization Name

firstName
string

First Name

lastName
string

Last Name

email
string

Email Address

dateJoined_from
string

Earliest Date Joined

dateJoined_to
string

Latest Date Joined

Responses

Response Schema: application/json
dateJoined
required
string <date-time>

Date user has joined

email
required
string

User's Email

firstName
required
string

User's First Name

id
required
string

User's unique ID

lastName
required
string

User's Last Name

organization
required
string

User's organization

role
required
string

User's role in the organization

Response samples

Content type
application/json
{
  • "id": "string",
  • "firstName": "string",
  • "lastName": "string",
  • "email": "string",
  • "role": "string",
  • "dateJoined": "2019-08-24T14:15:22Z",
  • "organization": "string"
}

Delete User

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.
path Parameters
id
required
string
query Parameters
id
string

User ID

organization
string

Organization Name

firstName
string

First Name

lastName
string

Last Name

email
string

Email Address

dateJoined_from
string

Earliest Date Joined

dateJoined_to
string

Latest Date Joined

Responses

Response Schema: application/json
object (NoBody)

Response samples

Content type
application/json
{ }

Modify User

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.
path Parameters
id
required
string
Request Body schema: application/json
firstName
string

First Name

lastName
string

Last Name

email
string

Email Address

role
string

User's role in the organization

organization
string

Organization Name

Responses

Response Schema: application/json
object (NoBody)

Request samples

Content type
application/json
{
  • "firstName": "string",
  • "lastName": "string",
  • "email": "string",
  • "role": "string",
  • "organization": "string"
}

Response samples

Content type
application/json
{ }

Get Users

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.

query Parameters
page
integer <int32>
per_page
integer <int32>
id
string

User ID

organization
string

Organization Name

firstName
string

First Name

lastName
string

Last Name

email
string

Email Address

dateJoined_from
string

Earliest Date Joined

dateJoined_to
string

Latest Date Joined

Responses

Response Schema: application/json
Array
dateJoined
required
string <date-time>

Date user has joined

email
required
string

User's Email

firstName
required
string

User's First Name

id
required
string

User's unique ID

lastName
required
string

User's Last Name

organization
required
string

User's organization

role
required
string

User's role in the organization

Response samples

Content type
application/json
[
  • {
    • "id": "string",
    • "firstName": "string",
    • "lastName": "string",
    • "email": "string",
    • "role": "string",
    • "dateJoined": "2019-08-24T14:15:22Z",
    • "organization": "string"
    }
]

Create User

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.
Request Body schema: application/json
email
required
string

Email Address

organization
required
string

Organization Name

password
required
string

User's password

role
required
string

User's role in the organization

firstName
string

First Name

lastName
string

Last Name

Responses

Response Schema: application/json
object (NoBody)

Request samples

Content type
application/json
{
  • "firstName": "string",
  • "lastName": "string",
  • "email": "string",
  • "password": "string",
  • "organization": "string",
  • "role": "string"
}

Response samples

Content type
application/json
{ }

SIM Cards

Change Data Status

Change the Data Status for one or more SIM cards

This endpoint is idempotent.

Request Body schema: application/json
iccid
required
Array of strings

List of strings of ICCIDs

status
required
string

New Data Status (options: ACTIVE, SUSPENDED)

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Request samples

Content type
application/json
Example
{
  • "iccid": [
    • "8944479999999999999"
    ],
  • "status": "SUSPENDED"
}

Response samples

Content type
application/json
{
  • "detail": "OK"
}

Get Ongoing Sessions

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)

query Parameters
page
integer <int32>
per_page
integer <int32>
iccid
string

ICCID

fromStartDate
string

Start Date From

toStartDate
string

Start Date To

ipAddress
string

IP Adress

fromDuration
string

Duration from

toDuration
string

Duration to

mcc
string

MCC

mnc
string

MNC

Responses

Response Schema: application/json
Array
duration
required
string
iccid
required
string
ipAddress
required
string
mcc
required
string
mnc
required
string
startDate
required
string <date-time>

Response samples

Content type
application/json
[
  • {
    • "iccid": "8944479999999999999",
    • "startDate": "2022-01-07T09:17:44+00:00",
    • "ipAddress": "1.2.3.4",
    • "duration": "50",
    • "mcc": "234",
    • "mnc": "025"
    }
]

Get SIM Card Subscription

Access to the subscription information for a specific SIM Card.

path Parameters
iccid
required
string

Responses

Response Schema: application/json
required
object (SIMCardSubscriptionV2ot0Serializer)

Response samples

Content type
application/json
{
  • "subscription": {
    • "bearerServices": {
      • "voiceMo": "string",
      • "voiceMt": "string",
      • "smsMo": "string",
      • "smsMt": "string",
      • "gprs": "string",
      • "csd": "string",
      • "ussd": "string"
      },
    • "servicePackId": "string",
    • "subscriptionStatus": "string",
    • "apn": {
      • "name": "string",
      • "description": "string"
      }
    }
}

Modify SIM Card Subscription

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

  • Unknown Rate Plan with label {servicePackId}. - The Rate Plan with the Label = {servicePackId} does not exists.

Error 404 - Not Found

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

path Parameters
iccid
required
string
Request Body schema: application/json
servicePackId
string

SIM Card Service Pack Id (i.e. Rate Plan)

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Request samples

Content type
application/json
{
  • "servicePackId": "string"
}

Response samples

Content type
application/json
{
  • "detail": "string"
}

Change SIM status

Change the status of one or more SIM cards

This endpoint is idempotent.

Request Body schema: application/json
iccid
required
Array of strings

List of strings of ICCIDs

status
required
string

New SIM Card Status (options: TEST, PROVISIONED, PRE-ACTIVE, ACTIVE, SUSPENDED, RETIRED)

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Request samples

Content type
application/json
Example
{
  • "iccid": [
    • "8944479999999999999"
    ],
  • "status": "PRE_ACTIVE"
}

Response samples

Content type
application/json
{
  • "detail": "OK"
}

Get SMS status

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.

query Parameters
page
integer <int32>
per_page
integer <int32>
id
string

ID

dateSubmitted
string

Submitted Date

content
string

Content

dateSubmitted_from
string

Earliest Submitted Date

dateSubmitted_to
string

Latest Submitted Date

iccid
string

ICCID

deliveryStatus
string

Delivery Status

o
string
Value: "-id"

Ordering

Responses

Response Schema: application/json
Array
content
required
string
dateSubmitted
required
string <date-time>
required
Array of objects (SendSMSDeliveryReportDestinationV2dot0Serializer)
id
required
string

Response samples

Content type
application/json
[
  • {
    • "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"
        }
      ]
    }
]

Send SMS

Send an SMS to one or more SIM cards

This endpoint is idempotent.

Request Body schema: application/json
iccid
required
Array of strings

List of strings of ICCIDs

text
required
string

Text for the SMS

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

resourceURL
string

Link to URL delivery report

Request samples

Content type
application/json
{
  • "iccid": [
    • "8944479999999999999"
    ],
  • "text": "This is a text message"
}

Response samples

Content type
application/json

Get SMS details

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.

path Parameters
id
required
string
query Parameters
id
string

ID

dateSubmitted
string

Submitted Date

content
string

Content

dateSubmitted_from
string

Earliest Submitted Date

dateSubmitted_to
string

Latest Submitted Date

iccid
string

ICCID

deliveryStatus
string

Delivery Status

o
string
Value: "-id"

Ordering

Responses

Response Schema: application/json
content
required
string
dateSubmitted
required
string <date-time>
required
Array of objects (SendSMSDeliveryReportDestinationV2dot0Serializer)
id
required
string

Response samples

Content type
application/json
{
  • "id": "string",
  • "dateSubmitted": "2019-08-24T14:15:22Z",
  • "content": "string",
  • "deliveryReport": [
    • {
      • "iccid": "string",
      • "deliveryStatus": "string"
      }
    ]
}

Get SIM Card details

Access the details of a specific SIM card.

path Parameters
iccid
required
string

Responses

Response Schema: application/json
required
Array of objects (AttributeOnlyLabelValueV2dot0Serializer)

Array with attributes

required
object (SIMCardDatesV2dot1Serializer)
description
required
string

Description

required
object (SIMCardGsmKeysV2ot0Serializer)
iccid
required
string

Integrated Circuit Card IDentifier

imei
required
string
imsis
required
Array of strings

List of IMSI available for the SIM Card

label
required
string

Label

required
object (LocationTagV2dot0Serializer)
msisdns
required
Array of strings

List of MSISDN available for the SIM Card

organization
required
string

Organization Name

primaryImsi
required
string

Primary IMSI Selected

primaryMsisdn
required
string

Primary MSISDN Selected

simType
required
string
required
object (SIMCardSubscriptionV2ot0Serializer)
required
Array of objects (TagOnlyLabelV2dot0Serializer)

Array with tags

Response samples

Content type
application/json
{
  • "iccid": "string",
  • "label": "string",
  • "description": "string",
  • "simType": "string",
  • "primaryMsisdn": "string",
  • "msisdns": [
    • "string"
    ],
  • "primaryImsi": "string",
  • "imsis": [
    • "string"
    ],
  • "gsmKeys": {
    • "pin1": "string",
    • "pin2": "string",
    • "puk1": "string",
    • "puk2": "string"
    },
  • "dates": {
    • "provisionDate": "2019-08-24T14:15:22Z",
    • "shippingDate": "2019-08-24T14:15:22Z",
    • "deliveryDate": "2019-08-24T14:15:22Z",
    • "firstActivationDate": "string",
    • "testStateStartDate": "string"
    },
  • "imei": "string",
  • "subscription": {
    • "bearerServices": {
      • "voiceMo": "string",
      • "voiceMt": "string",
      • "smsMo": "string",
      • "smsMt": "string",
      • "gprs": "string",
      • "csd": "string",
      • "ussd": "string"
      },
    • "servicePackId": "string",
    • "subscriptionStatus": "string",
    • "apn": {
      • "name": "string",
      • "description": "string"
      }
    },
  • "attributes": [
    • {
      • "label": "string",
      • "value": "string"
      }
    ],
  • "tags": [
    • {
      • "label": "string"
      }
    ],
  • "location_tag": {
    • "label": "string",
    • "lng": 0,
    • "lat": 0
    },
  • "organization": "string"
}

Modify SIM Card

Update some fields from the selected SIM Cards.

You can also change the SIM Card Organization and

path Parameters
iccid
required
string
Request Body schema: application/json
label
string

SIM Card Label

description
string

SIM Cards Description

organization
string

Organization Name

Responses

Response Schema: application/json
object (NoBody)

Request samples

Content type
application/json
Example
{
  • "organization": "Truphone Test 1000"
}

Response samples

Content type
application/json
{ }

Change SMS Status

Change the SMS (Mobile Originated or Terminated) Services for one or more SIM cards.

This endpoint is idempotent.

Request Body schema: application/json
iccid
required
Array of strings

List of strings of ICCIDs

sms_service
required
string
Enum: "MO" "MT"

Select which SMS Service to apply the change.

status
required
string
Enum: "ACTIVE" "SUSPENDED"

Select the change to perform to the SMS Service

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Request samples

Content type
application/json
Example
{
  • "iccid": [
    • "8944479999999999999"
    ],
  • "sms_service": "MO",
  • "status": "SUSPENDED"
}

Response samples

Content type
application/json
{
  • "detail": "OK"
}

Get SIM Card Status

Check the SIM card service status.

path Parameters
iccid
required
string

Responses

Response Schema: application/json
allowed_data
required
string

SIM Card Test mode allowed Data usage (in Kb). Note: Only available if the SIM Card is in Test mode

allowed_time
required
string

SIM Card Test mode allowed time (in minutes). Note: Only available if the SIM Card is in Test mode

date
required
string

Request Date

iccid
required
string

Integrated Circuit Card IDentifier

remaining_data
required
string

SIM Card Test mode remaining Data usage (in Kb). Note: Only available if the SIM Card is in Test mode

remaining_time
required
string

SIM Card Test mode remaining time (in minutes). Note: Only available if the SIM Card is in Test mode

status
required
string

Possible States: PRE-TEST, TEST, PROVISION, PRE-ACTIVE, ACTIVE, SUSPENDED, BLOCKED, RETIRED, REMOVED

test_state_start_date
required
string <date-time>

SIM Card Test mode starting date. Note: Only available if the SIM Card is in Test mode

Response samples

Content type
application/json
{
  • "iccid": "string",
  • "status": "string",
  • "date": "string",
  • "test_state_start_date": "2019-08-24T14:15:22Z",
  • "allowed_data": "string",
  • "allowed_time": "string",
  • "remaining_data": "string",
  • "remaining_time": "string"
}

Get SIM Cards

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
query Parameters
page
integer <int32>
per_page
integer <int32>
iccid
string

ICCID

label
string

Label

description
string

Description

primaryMsisdn
string

Primary MSISDN

msisdns
string

MSISDN

primaryImsi
string

Primary IMSI

imsis
string

IMSI

servicePackId
string
tags
string
attributes
string
pin1
string

PIN1

pin2
string

PIN2

puk1
string

PUK1

puk2
string

PUK2

provisionDate_from
string

Earliest Provision Date

provisionDate_to
string

Latest Provision Date

shippingDate_from
string

Earliest Shipping Date

shippingDate_to
string

Latest Delivery Date

deliveryDate_from
string

Earliest Delivery Date

deliveryDate_to
string

Latest Delivery Date

firstActivationDate_from
string

Earliest Date of First Activation

firstActivationDate_to
string

Latest Date of First Activation

subscriptionStatus
string

Status

apn
string

Access Point Name

simType
string
locationTag_label
string
testStateStartDate_from
string

Earliest Test State Start Date

testStateStartDate_to
string

Latest Test State Start Date

organization
string

Organization Name

Responses

Response Schema: application/json
Array
required
Array of objects (AttributeOnlyLabelValueV2dot0Serializer)

Array with attributes

required
object (SIMCardDatesV2dot1Serializer)
description
required
string

Description

required
object (SIMCardGsmKeysV2ot0Serializer)
iccid
required
string

Integrated Circuit Card IDentifier

imei
required
string
imsis
required
Array of strings

List of IMSI available for the SIM Card

label
required
string

Label

required
object (LocationTagV2dot0Serializer)
msisdns
required
Array of strings

List of MSISDN available for the SIM Card

organization
required
string

Organization Name

primaryImsi
required
string

Primary IMSI Selected

primaryMsisdn
required
string

Primary MSISDN Selected

simType
required
string
required
object (SIMCardSubscriptionV2ot0Serializer)
required
Array of objects (TagOnlyLabelV2dot0Serializer)

Array with tags

Response samples

Content type
application/json
[
  • {
    • "iccid": "string",
    • "label": "string",
    • "description": "string",
    • "simType": "string",
    • "primaryMsisdn": "string",
    • "msisdns": [
      • "string"
      ],
    • "primaryImsi": "string",
    • "imsis": [
      • "string"
      ],
    • "gsmKeys": {
      • "pin1": "string",
      • "pin2": "string",
      • "puk1": "string",
      • "puk2": "string"
      },
    • "dates": {
      • "provisionDate": "2019-08-24T14:15:22Z",
      • "shippingDate": "2019-08-24T14:15:22Z",
      • "deliveryDate": "2019-08-24T14:15:22Z",
      • "firstActivationDate": "string",
      • "testStateStartDate": "string"
      },
    • "imei": "string",
    • "subscription": {
      • "bearerServices": {
        • "voiceMo": "string",
        • "voiceMt": "string",
        • "smsMo": "string",
        • "smsMt": "string",
        • "gprs": "string",
        • "csd": "string",
        • "ussd": "string"
        },
      • "servicePackId": "string",
      • "subscriptionStatus": "string",
      • "apn": {
        • "name": "string",
        • "description": "string"
        }
      },
    • "attributes": [
      • {
        • "label": "string",
        • "value": "string"
        }
      ],
    • "tags": [
      • {
        • "label": "string"
        }
      ],
    • "location_tag": {
      • "label": "string",
      • "lng": 0,
      • "lat": 0
      },
    • "organization": "string"
    }
]

SIM Tags and Attributes

Get SIMs with Tag

Access the Tag details with the selected label.

path Parameters
label
required
string
query Parameters
page
integer <int32>
per_page
integer <int32>

Responses

Response Schema: application/json
Array
simCards
required
Array of strings

Response samples

Content type
application/json
[
  • {
    • "simCards": [
      • "string"
      ]
    }
]

Assign Tag to SIM Card

Associate a Tag to a SIM Card.

path Parameters
label
required
string
Request Body schema: application/json
simCards
Array of strings

String list of SIM Card ICCID(s)

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Request samples

Content type
application/json
{
  • "simCards": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "detail": "string"
}

Unassign Tag from SIM Card

Remove a Tag from a SIM Card.

path Parameters
label
required
string
Request Body schema: application/json
simCards
Array of strings

String list of SIM Card ICCID(s)

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Request samples

Content type
application/json
{
  • "simCards": [
    • "string"
    ]
}

Response samples

Content type
application/json
{
  • "detail": "string"
}

Get Tag details

Access the Tag details with the selected label.

path Parameters
label
required
string

Responses

Response Schema: application/json
description
required
string

Add a description for your Tag. Max 500 characters.

label
required
string
simCards
required
Array of strings

Response samples

Content type
application/json
{
  • "simCards": [
    • "string"
    ],
  • "label": "string",
  • "description": "string"
}

Delete Tag

Delete a Tag associated to your Organization.

path Parameters
label
required
string

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Response samples

Content type
application/json
{
  • "detail": "string"
}

Delete Attribute

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

path Parameters
label
required
string

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Response samples

Content type
application/json
{
  • "detail": "string"
}

Set Attribute Value

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

  • This field is required. - simCards is required in the PATCH body.
  • This list may not be empty - Need to add a list of SIM Card to your request.
  • SIM card(s) with ICCID(s) ['iccid_1', ... ] unknown - One or more SIM Cards do not exists in 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

path Parameters
label
required
string
Request Body schema: application/json
simCards
Array of strings

String list of SIM Card ICCID(s)

value
string

Value to associate the Attribute

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Request samples

Content type
application/json
{
  • "simCards": [
    • "string"
    ],
  • "value": "string"
}

Response samples

Content type
application/json
{
  • "detail": "string"
}

Get Tags

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.

query Parameters
page
integer <int32>
per_page
integer <int32>
simCard
string

SIM Card ICCID

label
string

Label

Responses

Response Schema: application/json
Array
description
required
string

Add a description for your Tag. Max 500 characters.

label
required
string
simCards
required
Array of strings

Response samples

Content type
application/json
[
  • {
    • "simCards": [
      • "string"
      ],
    • "label": "string",
    • "description": "string"
    }
]

Create Tag

Add a new tag to the Organization.

Request Body schema: application/json
description
required
string

Small text to describe the Tag

label
required
string

Valid Tag label - must contain only alphanumeric and whitespaces

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Request samples

Content type
application/json
{
  • "label": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "detail": "string"
}

Get Attributes

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.

query Parameters
page
integer <int32>
per_page
integer <int32>
simCard
string

SIM Card ICCID

label
string

Label

value
string

Value

Responses

Response Schema: application/json
Array
label
required
string

Label

simCard
required
string
value
required
string

Value

Response samples

Content type
application/json
[
  • {
    • "simCard": "string",
    • "label": "string",
    • "value": "string"
    }
]

Create Attribute

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

  • This field is required. - Label is required in the POST body.
  • This field may not be blank. - This field must not be blank.
  • Only alphanumeric or whitespace characters are allowed. - Remove any special characters from the Label.

Description

  • This field is required. - Description is required in the POST body but can be blank. (e.g. { "description":""} ).

Error 409 - Conflict

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

Request Body schema: application/json
description
required
string

Small text to describe the Attribute

label
required
string

Valid Attribute label - must contain only alphanumeric and whitespaces

Responses

Response Schema: application/json
detail
required
string

This is the Detail response

Request samples

Content type
application/json
{
  • "label": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{
  • "detail": "string"
}

Usage and Event Rules

Rules enable automatic connectivity management

Get Rules

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.

query Parameters
page
integer <int32>

The page to retrieve

per_page
integer <int32>

The maximum number of items to retrieve

Responses

Response Schema: application/json
Array
required
object (RulesActionsV2dot0Serializer)
condition
required
object (Serializer)
dateCreated
required
string <date-time>
extended
required
string
required
object (RulesFiltersV2dot0Serializer)
label
required
string
type
required
string

Response samples

Content type
application/json
[
  • {
    • "dateCreated": "2019-08-24T14:15:22Z",
    • "label": "string",
    • "type": "string",
    • "filter": {
      • "all": true,
      • "simCard": [
        • { }
        ]
      },
    • "condition": { },
    • "action": {
      • "email": "string",
      • "mobilePhoneNumber": "string",
      • "url": "string",
      • "snmpHost": "string",
      • "snmpPort": "string",
      • "changeRatePlan": "string"
      },
    • "extended": "string"
    }
]

Get Rule Events

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).

query Parameters
page
integer <int32>
per_page
integer <int32>
date
string

Date

label
string

Label

simCard
string

SIM Card ICCID

type
string

Type

message
string

Message (filters based on substring)

email
string

Email

mobilePhoneNumber
string

Mobile Number

url
string

URL

date_from
string

Earliest Date

date_to
string

Latest Date

Responses

Response Schema: application/json
Array
changeDataStatus
required
string
changeSimStatus
required
string
date
required
string <date-time>
email
required
string
label
required
string
message
required
string
mobilePhoneNumber
required
string
ruleTrigger
required
string
ruleType
required
string
simCard
required
string
url
required
string

Response samples

Content type
application/json
[
  • {
    • "date": "2019-08-24T14:15:22Z",
    • "label": "string",
    • "simCard": "string",
    • "ruleType": "string",
    • "ruleTrigger": "string",
    • "changeSimStatus": "string",
    • "changeDataStatus": "string",
    • "email": "string",
    • "mobilePhoneNumber": "string",
    • "url": "string",
    • "message": "string"
    }
]

Get Event Rule details

path Parameters
pk
required
string

Responses

Response Schema: application/json
required
object (RulesActionSerializer)
required
object (EventRuleConditionSerializer)
description
required
string

Additional description of the rule

required
object (RulesFilterSerializer)
id
required
string
label
required
string

Title of the rule

required
object (RulesNotificationSerializer)

Response samples

Content type
application/json
{
  • "id": "string",
  • "label": "string",
  • "description": "string",
  • "filters": {
    • "sim_cards": [
      • "string"
      ],
    • "tags": [
      • "string"
      ],
    • "rate_plan": "string"
    },
  • "action": {
    • "change_sim_card_status": "ACTIVE",
    • "change_data_status": "ACTIVATE_DATA",
    • "schedule_data_status_change": {
      • "when": "CALENDER_DAY",
      • "change_to": "ACTIVATE"
      },
    • "schedule_rate_plan_change": {
      • "change_to": "string",
      • "change_next_billing_cycle": true
      }
    },
  • "notifications": {
    • "email": "string",
    • "sms_notification": {
      • "send_sms_to": "0",
      • "mobile_phone_number": "string",
      • "custom_message": "string"
      },
    • "webhook_url": "string"
    },
  • "condition": {
    • "type": "New Short Message",
    • "from_device": "NO_DEVICE",
    • "from_imei_prefix": "string",
    • "to_device": "ANY",
    • "to_imei_prefix": "string",
    • "triggers_when_location": 1,
    • "country_list": [
      • "string"
      ],
    • "network_list": [
      • "string"
      ],
    • "triggers_when_session": 1,
    • "from_sim_state": "ANY",
    • "to_sim_state": "ANY"
    }
}

Delete Event Rule

path Parameters
pk
required
string

Responses

Response Schema: application/json
required
object (RulesActionSerializer)
required
object (EventRuleConditionSerializer)
description
required
string

Additional description of the rule

required
object (RulesFilterSerializer)
id
required
string
label
required
string

Title of the rule

required
object (RulesNotificationSerializer)

Response samples

Content type
application/json
{
  • "id": "string",
  • "label": "string",
  • "description": "string",
  • "filters": {
    • "sim_cards": [
      • "string"
      ],
    • "tags": [
      • "string"
      ],
    • "rate_plan": "string"
    },
  • "action": {
    • "change_sim_card_status": "ACTIVE",
    • "change_data_status": "ACTIVATE_DATA",
    • "schedule_data_status_change": {
      • "when": "CALENDER_DAY",
      • "change_to": "ACTIVATE"
      },
    • "schedule_rate_plan_change": {
      • "change_to": "string",
      • "change_next_billing_cycle": true
      }
    },
  • "notifications": {
    • "email": "string",
    • "sms_notification": {
      • "send_sms_to": "0",
      • "mobile_phone_number": "string",
      • "custom_message": "string"
      },
    • "webhook_url": "string"
    },
  • "condition": {
    • "type": "New Short Message",
    • "from_device": "NO_DEVICE",
    • "from_imei_prefix": "string",
    • "to_device": "ANY",
    • "to_imei_prefix": "string",
    • "triggers_when_location": 1,
    • "country_list": [
      • "string"
      ],
    • "network_list": [
      • "string"
      ],
    • "triggers_when_session": 1,
    • "from_sim_state": "ANY",
    • "to_sim_state": "ANY"
    }
}

Modify Event Rule

path Parameters
pk
required
string
Request Body schema: application/json
label
string

Title of the rule

description
string

Additional description of the rule

filters
string

The rule will be applied to the elements specified here

action
string

The action(s) to be executed upon the occurrence of the condition

notifications
string

The notification to be triggered upon the occurrence of the condition

condition
string

The rule will be triggered once this condition is met

Responses

Response Schema: application/json
required
object (RulesActionSerializer)
required
object (EventRuleConditionSerializer)
description
required
string

Additional description of the rule

required
object (RulesFilterSerializer)
id
required
string
label
required
string

Title of the rule

required
object (RulesNotificationSerializer)

Request samples

Content type
application/json
{
  • "label": "string",
  • "description": "string",
  • "filters": "string",
  • "action": "string",
  • "notifications": "string",
  • "condition": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "label": "string",
  • "description": "string",
  • "filters": {
    • "sim_cards": [
      • "string"
      ],
    • "tags": [
      • "string"
      ],
    • "rate_plan": "string"
    },
  • "action": {
    • "change_sim_card_status": "ACTIVE",
    • "change_data_status": "ACTIVATE_DATA",
    • "schedule_data_status_change": {
      • "when": "CALENDER_DAY",
      • "change_to": "ACTIVATE"
      },
    • "schedule_rate_plan_change": {
      • "change_to": "string",
      • "change_next_billing_cycle": true
      }
    },
  • "notifications": {
    • "email": "string",
    • "sms_notification": {
      • "send_sms_to": "0",
      • "mobile_phone_number": "string",
      • "custom_message": "string"
      },
    • "webhook_url": "string"
    },
  • "condition": {
    • "type": "New Short Message",
    • "from_device": "NO_DEVICE",
    • "from_imei_prefix": "string",
    • "to_device": "ANY",
    • "to_imei_prefix": "string",
    • "triggers_when_location": 1,
    • "country_list": [
      • "string"
      ],
    • "network_list": [
      • "string"
      ],
    • "triggers_when_session": 1,
    • "from_sim_state": "ANY",
    • "to_sim_state": "ANY"
    }
}

Get Usage Rules

query Parameters
page
integer <int32>
per_page
integer <int32>

Responses

Response Schema: application/json
Array
required
object (RulesActionSerializer)
required
object (UsageRuleConditionSerializer)
description
required
string

Additional description of the rule

required
object (RulesFilterSerializer)
id
required
string
label
required
string

Title of the rule

required
object (RulesNotificationSerializer)

Response samples

Content type
application/json
[
  • {
    • "id": "string",
    • "label": "string",
    • "description": "string",
    • "filters": {
      • "sim_cards": [
        • "string"
        ],
      • "tags": [
        • "string"
        ],
      • "rate_plan": "string"
      },
    • "action": {
      • "change_sim_card_status": "ACTIVE",
      • "change_data_status": "ACTIVATE_DATA",
      • "schedule_data_status_change": {
        • "when": "CALENDER_DAY",
        • "change_to": "ACTIVATE"
        },
      • "schedule_rate_plan_change": {
        • "change_to": "string",
        • "change_next_billing_cycle": true
        }
      },
    • "notifications": {
      • "email": "string",
      • "sms_notification": {
        • "send_sms_to": "0",
        • "mobile_phone_number": "string",
        • "custom_message": "string"
        },
      • "webhook_url": "string"
      },
    • "condition": {
      • "when": "Inbound call",
      • "of": "Per SIM Card",
      • "is_greater_than": 0,
      • "units": 1,
      • "over_the": {
        • "period": "Calendar Month",
        • "of": 0,
        • "units": 1
        }
      }
    }
]

Create Usage Rule

Request Body schema: application/json
label
string

Title of the rule

description
string

Additional description of the rule

filters
string

The rule will be applied to the elements specified here

action
string

The action(s) to be executed upon the occurrence of the condition

notifications
string

The notification to be triggered upon the occurrence of the condition

condition
string

The rule will be triggered once this condition is met

Responses

Response Schema: application/json
required
object (RulesActionSerializer)
required
object (UsageRuleConditionSerializer)
description
required
string

Additional description of the rule

required
object (RulesFilterSerializer)
id
required
string
label
required
string

Title of the rule

required
object (RulesNotificationSerializer)

Request samples

Content type
application/json
{
  • "label": "string",
  • "description": "string",
  • "filters": "string",
  • "action": "string",
  • "notifications": "string",
  • "condition": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "label": "string",
  • "description": "string",
  • "filters": {
    • "sim_cards": [
      • "string"
      ],
    • "tags": [
      • "string"
      ],
    • "rate_plan": "string"
    },
  • "action": {
    • "change_sim_card_status": "ACTIVE",
    • "change_data_status": "ACTIVATE_DATA",
    • "schedule_data_status_change": {
      • "when": "CALENDER_DAY",
      • "change_to": "ACTIVATE"
      },
    • "schedule_rate_plan_change": {
      • "change_to": "string",
      • "change_next_billing_cycle": true
      }
    },
  • "notifications": {
    • "email": "string",
    • "sms_notification": {
      • "send_sms_to": "0",
      • "mobile_phone_number": "string",
      • "custom_message": "string"
      },
    • "webhook_url": "string"
    },
  • "condition": {
    • "when": "Inbound call",
    • "of": "Per SIM Card",
    • "is_greater_than": 0,
    • "units": 1,
    • "over_the": {
      • "period": "Calendar Month",
      • "of": 0,
      • "units": 1
      }
    }
}

Get Event Rules

query Parameters
page
integer <int32>
per_page
integer <int32>

Responses

Response Schema: application/json
Array
required
object (RulesActionSerializer)
required
object (EventRuleConditionSerializer)
description
required
string

Additional description of the rule

required
object (RulesFilterSerializer)
id
required
string
label
required
string

Title of the rule

required
object (RulesNotificationSerializer)

Response samples

Content type
application/json
[
  • {
    • "id": "string",
    • "label": "string",
    • "description": "string",
    • "filters": {
      • "sim_cards": [
        • "string"
        ],
      • "tags": [
        • "string"
        ],
      • "rate_plan": "string"
      },
    • "action": {
      • "change_sim_card_status": "ACTIVE",
      • "change_data_status": "ACTIVATE_DATA",
      • "schedule_data_status_change": {
        • "when": "CALENDER_DAY",
        • "change_to": "ACTIVATE"
        },
      • "schedule_rate_plan_change": {
        • "change_to": "string",
        • "change_next_billing_cycle": true
        }
      },
    • "notifications": {
      • "email": "string",
      • "sms_notification": {
        • "send_sms_to": "0",
        • "mobile_phone_number": "string",
        • "custom_message": "string"
        },
      • "webhook_url": "string"
      },
    • "condition": {
      • "type": "New Short Message",
      • "from_device": "NO_DEVICE",
      • "from_imei_prefix": "string",
      • "to_device": "ANY",
      • "to_imei_prefix": "string",
      • "triggers_when_location": 1,
      • "country_list": [
        • "string"
        ],
      • "network_list": [
        • "string"
        ],
      • "triggers_when_session": 1,
      • "from_sim_state": "ANY",
      • "to_sim_state": "ANY"
      }
    }
]

Create Event Rule

Request Body schema: application/json
label
string

Title of the rule

description
string

Additional description of the rule

filters
string

The rule will be applied to the elements specified here

action
string

The action(s) to be executed upon the occurrence of the condition

notifications
string

The notification to be triggered upon the occurrence of the condition

condition
string

The rule will be triggered once this condition is met

Responses

Response Schema: application/json
required
object (RulesActionSerializer)
required
object (EventRuleConditionSerializer)
description
required
string

Additional description of the rule

required
object (RulesFilterSerializer)
id
required
string
label
required
string

Title of the rule

required
object (RulesNotificationSerializer)

Request samples

Content type
application/json
{
  • "label": "string",
  • "description": "string",
  • "filters": "string",
  • "action": "string",
  • "notifications": "string",
  • "condition": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "label": "string",
  • "description": "string",
  • "filters": {
    • "sim_cards": [
      • "string"
      ],
    • "tags": [
      • "string"
      ],
    • "rate_plan": "string"
    },
  • "action": {
    • "change_sim_card_status": "ACTIVE",
    • "change_data_status": "ACTIVATE_DATA",
    • "schedule_data_status_change": {
      • "when": "CALENDER_DAY",
      • "change_to": "ACTIVATE"
      },
    • "schedule_rate_plan_change": {
      • "change_to": "string",
      • "change_next_billing_cycle": true
      }
    },
  • "notifications": {
    • "email": "string",
    • "sms_notification": {
      • "send_sms_to": "0",
      • "mobile_phone_number": "string",
      • "custom_message": "string"
      },
    • "webhook_url": "string"
    },
  • "condition": {
    • "type": "New Short Message",
    • "from_device": "NO_DEVICE",
    • "from_imei_prefix": "string",
    • "to_device": "ANY",
    • "to_imei_prefix": "string",
    • "triggers_when_location": 1,
    • "country_list": [
      • "string"
      ],
    • "network_list": [
      • "string"
      ],
    • "triggers_when_session": 1,
    • "from_sim_state": "ANY",
    • "to_sim_state": "ANY"
    }
}

Get Usage Rule details

path Parameters
pk
required
string

Responses

Response Schema: application/json
required
object (RulesActionSerializer)
required
object (UsageRuleConditionSerializer)
description
required
string

Additional description of the rule

required
object (RulesFilterSerializer)
id
required
string
label
required
string

Title of the rule

required
object (RulesNotificationSerializer)

Response samples

Content type
application/json
{
  • "id": "string",
  • "label": "string",
  • "description": "string",
  • "filters": {
    • "sim_cards": [
      • "string"
      ],
    • "tags": [
      • "string"
      ],
    • "rate_plan": "string"
    },
  • "action": {
    • "change_sim_card_status": "ACTIVE",
    • "change_data_status": "ACTIVATE_DATA",
    • "schedule_data_status_change": {
      • "when": "CALENDER_DAY",
      • "change_to": "ACTIVATE"
      },
    • "schedule_rate_plan_change": {
      • "change_to": "string",
      • "change_next_billing_cycle": true
      }
    },
  • "notifications": {
    • "email": "string",
    • "sms_notification": {
      • "send_sms_to": "0",
      • "mobile_phone_number": "string",
      • "custom_message": "string"
      },
    • "webhook_url": "string"
    },
  • "condition": {
    • "when": "Inbound call",
    • "of": "Per SIM Card",
    • "is_greater_than": 0,
    • "units": 1,
    • "over_the": {
      • "period": "Calendar Month",
      • "of": 0,
      • "units": 1
      }
    }
}

Delete Usage Rule

path Parameters
pk
required
string

Responses

Response Schema: application/json
required
object (RulesActionSerializer)
required
object (UsageRuleConditionSerializer)
description
required
string

Additional description of the rule

required
object (RulesFilterSerializer)
id
required
string
label
required
string

Title of the rule

required
object (RulesNotificationSerializer)

Response samples

Content type
application/json
{
  • "id": "string",
  • "label": "string",
  • "description": "string",
  • "filters": {
    • "sim_cards": [
      • "string"
      ],
    • "tags": [
      • "string"
      ],
    • "rate_plan": "string"
    },
  • "action": {
    • "change_sim_card_status": "ACTIVE",
    • "change_data_status": "ACTIVATE_DATA",
    • "schedule_data_status_change": {
      • "when": "CALENDER_DAY",
      • "change_to": "ACTIVATE"
      },
    • "schedule_rate_plan_change": {
      • "change_to": "string",
      • "change_next_billing_cycle": true
      }
    },
  • "notifications": {
    • "email": "string",
    • "sms_notification": {
      • "send_sms_to": "0",
      • "mobile_phone_number": "string",
      • "custom_message": "string"
      },
    • "webhook_url": "string"
    },
  • "condition": {
    • "when": "Inbound call",
    • "of": "Per SIM Card",
    • "is_greater_than": 0,
    • "units": 1,
    • "over_the": {
      • "period": "Calendar Month",
      • "of": 0,
      • "units": 1
      }
    }
}

Modify Usage Rule

path Parameters
pk
required
string
Request Body schema: application/json
label
string

Title of the rule

description
string

Additional description of the rule

filters
string

The rule will be applied to the elements specified here

action
string

The action(s) to be executed upon the occurrence of the condition

notifications
string

The notification to be triggered upon the occurrence of the condition

condition
string

The rule will be triggered once this condition is met

Responses

Response Schema: application/json
required
object (RulesActionSerializer)
required
object (UsageRuleConditionSerializer)
description
required
string

Additional description of the rule

required
object (RulesFilterSerializer)
id
required
string
label
required
string

Title of the rule

required
object (RulesNotificationSerializer)

Request samples

Content type
application/json
{
  • "label": "string",
  • "description": "string",
  • "filters": "string",
  • "action": "string",
  • "notifications": "string",
  • "condition": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "label": "string",
  • "description": "string",
  • "filters": {
    • "sim_cards": [
      • "string"
      ],
    • "tags": [
      • "string"
      ],
    • "rate_plan": "string"
    },
  • "action": {
    • "change_sim_card_status": "ACTIVE",
    • "change_data_status": "ACTIVATE_DATA",
    • "schedule_data_status_change": {
      • "when": "CALENDER_DAY",
      • "change_to": "ACTIVATE"
      },
    • "schedule_rate_plan_change": {
      • "change_to": "string",
      • "change_next_billing_cycle": true
      }
    },
  • "notifications": {
    • "email": "string",
    • "sms_notification": {
      • "send_sms_to": "0",
      • "mobile_phone_number": "string",
      • "custom_message": "string"
      },
    • "webhook_url": "string"
    },
  • "condition": {
    • "when": "Inbound call",
    • "of": "Per SIM Card",
    • "is_greater_than": 0,
    • "units": 1,
    • "over_the": {
      • "period": "Calendar Month",
      • "of": 0,
      • "units": 1
      }
    }
}

SIM Usage

Get Call Detail Record Details

Access the details of a specific Call Detail Record.

path Parameters
iccid
required
string
cdr_id
required
string

Responses

Response Schema: application/json
country
required
string
destination
required
integer or null <int64> [ -9223372036854776000 .. 9223372036854776000 ]
duration
required
integer <int64> [ 0 .. 4294967295 ]
endDate
required
string <date-time>
id
required
string
network
required
string
origin
required
integer or null <int64> [ -9223372036854776000 .. 9223372036854776000 ]
simCard
required
string
startDate
required
string <date-time>
type
required
string
Enum: "SMS_IN" "SMS_OUT" "DATA"

Response samples

Content type
application/json
{
  • "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"
}

Get Call Detail Records

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).

path Parameters
iccid
required
string
query Parameters
page
integer <int32>
per_page
integer <int32>
id
string

ID

duration
string

Duration

origin
string

Origin

destination
string

Destination

location
string

Location

country
string

Country

network
string

Network

type
string
Enum: "SMS_IN" "SMS_OUT" "DATA"
startDate_from
string

Earliest Start Date

startDate_to
string

Latest Start Date

endDate_from
string

Earliest End Date

endDate_to
string

Latest End Date

duration__gte
string

Duration Greater of Equal Than

duration__lte
string

Duration Lower or Equal Than

Responses

Response Schema: application/json
Array
country
required
string
destination
required
integer or null <int64> [ -9223372036854776000 .. 9223372036854776000 ]
duration
required
integer <int64> [ 0 .. 4294967295 ]
endDate
required
string <date-time>
id
required
string
network
required
string
origin
required
integer or null <int64> [ -9223372036854776000 .. 9223372036854776000 ]
simCard
required
string
startDate
required
string <date-time>
type
required
string
Enum: "SMS_IN" "SMS_OUT" "DATA"

Response samples

Content type
application/json
[
  • {
    • "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"
    }
]

Location Updates

Get location updates

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.

path Parameters
iccid
required
string
query Parameters
page
integer <int32>
per_page
integer <int32>
id
string

ID

date
string

Date

country
string

Country

network_name
string

Network Name

date_from
string

Earliest Date

date_to
string

Latest Date

Responses

Response Schema: application/json
Array
country
required
string
date
required
string <date-time>
id
required
integer <int64>
networkName
required
string
simCard
required
string

Response samples

Content type
application/json
[
  • {
    • "id": 0,
    • "simCard": "string",
    • "date": "2019-08-24T14:15:22Z",
    • "country": "string",
    • "networkName": "string"
    }
]

Get location update details

Access the details of a specific Location Update.

path Parameters
iccid
required
string
id
required
string
query Parameters
id
string

ID

date
string

Date

country
string

Country

network_name
string

Network Name

date_from
string

Earliest Date

date_to
string

Latest Date

Responses

Response Schema: application/json
country
required
string
date
required
string <date-time>
id
required
integer <int64>
networkName
required
string
simCard
required
string

Response samples

Content type
application/json
{
  • "id": 0,
  • "simCard": "string",
  • "date": "2019-08-24T14:15:22Z",
  • "country": "string",
  • "networkName": "string"
}

Devices

Get Device details

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.

path Parameters
imei
required
string

Responses

Response Schema: application/json
dateFirstRegistered
required
string <date-time>

Date First Registered

dateLatestUpdate
required
string <date-time>

Date Last Registered

description
required
string

Description

iccid
required
string

ICCID of the related SIM card

imei
required
string

International Mobile Station Equipment Identity

label
required
string

Label

organization
required
string

Organization which the device belongs to

Response samples

Content type
application/json
{
  • "imei": "string",
  • "organization": "string",
  • "dateFirstRegistered": "2019-08-24T14:15:22Z",
  • "dateLatestUpdate": "2019-08-24T14:15:22Z",
  • "label": "string",
  • "description": "string",
  • "iccid": "string"
}

Modify Device

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.

path Parameters
imei
required
string
Request Body schema: application/json
label
string

Label

description
string

Description

Responses

Response Schema: application/json
object (NoBody)

Request samples

Content type
application/json
{
  • "label": "string",
  • "description": "string"
}

Response samples

Content type
application/json
{ }

Get Devices

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.

query Parameters
page
integer <int32>
per_page
integer <int32>
imei
string

International Mobile Station Equipment Identity

organization
string
dateFirstRegistered
string

Date when the device was first registered

dateLatestUpdate
string

Latest update date

label
string
description
string
iccid
string

Responses

Response Schema: application/json
Array
dateFirstRegistered
required
string <date-time>

Date First Registered

dateLatestUpdate
required
string <date-time>

Date Last Registered

description
required
string

Description

iccid
required
string

ICCID of the related SIM card

imei
required
string

International Mobile Station Equipment Identity

label
required
string

Label

organization
required
string

Organization which the device belongs to

Response samples

Content type
application/json
[
  • {
    • "imei": "string",
    • "organization": "string",
    • "dateFirstRegistered": "2019-08-24T14:15:22Z",
    • "dateLatestUpdate": "2019-08-24T14:15:22Z",
    • "label": "string",
    • "description": "string",
    • "iccid": "string"
    }
]

Reports

Generate Reports

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.

Request Body schema: application/json
granularity
required
string
Enum: "Month" "Cycle" "Day" "Hour"

Select the report granularity - Hourly (Max: 7 Days) Daily (Max: 6 Months).

output_format
required
string
Enum: "CSV" "JSON"

Select the output format you prefer.

report_type
required
string
Enum: "INVENTORY" "LOCATION" "DATA_USAGE" "SMS_USAGE" "EVENT_RULES" "USAGE_RULES" "NOTIFICATIONS"

Choose the report type

iccid
Array of objects

List of ICCIDs - each separated by a comma (e.g. iccid1,iccid2).

tag
Array of objects

List of Tags - each separated by a comma (e.g. tag1,tag2).

all_sim_cards
boolean

Uses All SIM Cards from the organization.

billing_cycle
integer <int64>

Select the starting day of the billing cycle (e.g. 5, 20).

period
string
Enum: "PAST_7_DAYS" "PAST_14_DAYS" "PAST_30_DAYS" "PAST_3_MONTHS" "PAST_6_MONTHS" "PAST_1_YEAR"

The period selected ends in the current day.

startDate
string <date-time>

Date format: YYYY-MM-DD HH:MM:SS

endDate
string <date-time>

Date format: YYYY-MM-DD HH:MM:SS

Responses

Response Schema: application/json
downloadUrl
string

Download URL

validUntil
string

Report expiration date

detail
string

Detailed message

Request samples

Content type
application/json
{
  • "report_type": "DATA_USAGE",
  • "all_sim_cards": true,
  • "granularity": "Day",
  • "period": "PAST_7_DAYS",
  • "output_format": "CSV"
}

Response samples

Content type
application/json
{}

Download Report

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.

path Parameters
pk
required
string

Responses

Response samples

Content type
application/json
[
  • {
    • "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"
    }
]

Billing

Get Rateplan Details

Access to the subscription information for a specific Rate Plan. This version contains the Test Mode information.

path Parameters
servicePackId
required
string

Responses

Response Schema: application/json
required
object (SubscriptionBearerServicesV2ot0Serializer)
servicePackId
required
string

Service Pack ID (i.e. Rate Plan label)

supportsTestMode
required
boolean

Indicates if the Rate Plan supports Test Mode for the SIM cards

required
object (TestModeV2dot1Serializer)

Response samples

Content type
application/json
{
  • "servicePackId": "string",
  • "bearerServices": {
    • "voiceMo": "string",
    • "voiceMt": "string",
    • "smsMo": "string",
    • "smsMt": "string",
    • "gprs": "string",
    • "csd": "string",
    • "ussd": "string"
    },
  • "supportsTestMode": true,
  • "testMode": {
    • "dataUsageLimit": 0,
    • "allowedTestTime": 0
    }
}

Get Rateplans

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.
query Parameters
page
integer <int32>
per_page
integer <int32>
servicePackId
string

Service Pack ID

supportsTestMode
string

Responses

Response Schema: application/json
Array
required
object (SubscriptionBearerServicesV2ot0Serializer)
servicePackId
required
string

Service Pack ID (i.e. Rate Plan label)

supportsTestMode
required
boolean

Indicates if the Rate Plan supports Test Mode for the SIM cards

required
object (TestModeV2dot1Serializer)

Response samples

Content type
application/json
[
  • {
    • "servicePackId": "string",
    • "bearerServices": {
      • "voiceMo": "string",
      • "voiceMt": "string",
      • "smsMo": "string",
      • "smsMt": "string",
      • "gprs": "string",
      • "csd": "string",
      • "ussd": "string"
      },
    • "supportsTestMode": true,
    • "testMode": {
      • "dataUsageLimit": 0,
      • "allowedTestTime": 0
      }
    }
]

Notifications

Get Notifications

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).

query Parameters
page
integer <int32>
per_page
integer <int32>
type
string

Type

sourceType
string

Source Type

source
string

Source

date
string

Date

value
string

Value

attributeType
string

Attribute Type

state
string

State

date_from
string

Earliest Date

date_to
string

Latest Date

Responses

Response Schema: application/json
Array
date
required
string <date-time>
object
required
string
source
required
string
sourceType
required
string
state
required
string
Enum: "PRE_TEST" "PROVISIONED" "PRE_ACTIVE" "TEST" "ACTIVE" "SUSPENDED" "BLOCKED" "UNLOCKED" "NOT_ALLOWED" "SWAPPED" "RETIRED" "SET"
type
required
string
Enum: "SIM Card Updated" "SIM Card state update order submitted to Order Manager" "SIM Card state update order submission failed to Order Manager"
value
required
string

Response samples

Content type
application/json
[
  • {
    • "type": "SIM Card Updated",
    • "sourceType": "string",
    • "source": "string",
    • "date": "2019-08-24T14:15:22Z",
    • "object": "string",
    • "state": "PRE_TEST",
    • "value": "string"
    }
]

Audit Trail

Get Audit Trail

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).

query Parameters
page
integer <int32>
per_page
integer <int32>
date
string

Date

user
string

User

interface
string

Interface

object_type
string

Object Type

object
string

Object

action
string

Action

description
string

Description

date_from
string

Earliest Date

date_to
string

Latest Date

Responses

Response Schema: application/json
Array
action
required
string
date
required
string <date-time>
description
required
string
interface
required
string
object
required
string
objectType
required
string
user
required
string

Response samples

Content type
application/json
[
  • {
    • "date": "2019-08-24T14:15:22Z",
    • "user": "string",
    • "interface": "string",
    • "objectType": "string",
    • "object": "string",
    • "action": "string",
    • "description": "string"
    }
]