POST v1/accounts/{foreignaccountkey}/networks/{foreignkey}/devices/apns

Create a new APN device on the network.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
foreignaccountkey

The Api Account to create the APN Device on

string

Required

foreignkey

The network on the account create the APN Device on

string

Required

Body Parameters

The details of the new APN device

APNDevice
NameDescriptionTypeAdditional information
CLI

The MSISDN or IMSI for the device.

string

Required

Matching regular expression pattern: ^(?<msisdn>\(\+*(\d{1,5})\)(\d{5,16}))$|^(?<imsi>\d{14,16})$

SIMNumber

Gets and sets the ICCID for the device

string

None.

SOC

Gets and sets the SOC code assigned to the APNDevice by the API consumer. This is optional and dependent on the billing arrangements.

string

None.

InternalSOC

The SOC code assigned to the APNDevice by the Asavie. This is optional and dependent on the billing arrangements.

string

None.

Description

Gets and sets an optional description for the device

string

None.

IPAddress

Gets the IP address assigned to the device. Depending on the topology of the AccountNetwork the device is a member of this may not be applicable

string

None.

StartDate

Gets the date the APNDevice was created

date

None.

EndDate

Gets the date the APNDevice was removed

date

None.

FriendlyName

Gets and sets an optional friendly name for the device

string

None.

Hints

The Hints allow the auto creation of the Account resource. If the account doesn't exist when a APNDevice is created the Hints can contain information to assist in auto created the Account resource.

AccountHints

None.

ProvisioningMetaData

Gets and sets optional provisioning data that may be required to be suppled on APNDevice creation. This will depend on the integration

Dictionary of string [key] and string [value]

None.

Status

StatusValues

None.

Version

The version of the Agent actor. Every time a change is made to the Agent its version is incremented.

integer

None.

ActorStatus

The APNDevice actor status. Every resource in the api is represented by an actor. The actor status represents the health of the resource. The ActorStatus can be one of the following values:-<br/> stable = 0 /* everything is ok */ pending = 1 /* an operation is long running */ stalled = 10 /* an unrecoverable error has occurred that will require support desk intervention */

ActorStatusValues

None.

NetworkStatus

Gets the connection status of the device to the Passbridge core. It can have one of the following values:-<br/><br/> disconnected = 0 connected = 1 activation = 10

NetworkStatusValues

None.

Enabled

Gets and sets whether the APNDeivce is enabled or disabled on the Passbridge Core

boolean

None.

LockIMEI

Gets and sets the IMEI locking status. If set to true then the next time the device connects to the Passbridge core its IMEI will be recorded. From then on the device will only be allowed connect if it has the same IMIE

boolean

None.

IMEI

Gets the devices IMEI (only available if IMEI locking has been enabled)

string

None.

LastSync

date

None.

LastConnected_Start

Gets the date and time of the start of the last session the device established with the Passbridge core

date

None.

LastConnected_End

Gets the date and time of the end of the last session the device established with the Passbridge core

date

None.

LastConnected_MCC

Get the MCC of the last session the device established with the Passbridge core.

string

None.

LastConnected_MNC

Gets the MNC of the last session the device established with the Passbridge core

string

None.

Request Formats

application/json, text/json

Sample:
{
  "CLI": "sample string 1",
  "SIMNumber": "sample string 2",
  "SOC": "sample string 3",
  "InternalSOC": "sample string 4",
  "Description": "sample string 5",
  "IPAddress": "sample string 6",
  "StartDate": "2024-04-19T05:50:03.1147245+00:00",
  "EndDate": "2024-04-19T05:50:03.1147245+00:00",
  "FriendlyName": "sample string 8",
  "Hints": {
    "BillingCycleDay": 1,
    "EmailContact": "sample string 2",
    "TenantId": "sample string 3"
  },
  "ProvisioningMetaData": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "Status": 0,
  "Version": 9,
  "ActorStatus": 0,
  "NetworkStatus": 0,
  "Enabled": true,
  "LockIMEI": true,
  "IMEI": "sample string 12",
  "LastSync": "2024-04-19T05:50:03.1147245+00:00",
  "LastConnected_Start": "2024-04-19T05:50:03.1147245+00:00",
  "LastConnected_End": "2024-04-19T05:50:03.1147245+00:00",
  "LastConnected_MCC": "sample string 14",
  "LastConnected_MNC": "sample string 15"
}

application/xml, text/xml

Sample:
<APNDevice xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API">
  <ActorStatus>stable</ActorStatus>
  <CLI>sample string 1</CLI>
  <Description>sample string 5</Description>
  <Enabled>true</Enabled>
  <EndDate>2024-04-19T05:50:03.1147245+00:00</EndDate>
  <FriendlyName>sample string 8</FriendlyName>
  <Hints>
    <BillingCycleDay>1</BillingCycleDay>
    <EmailContact>sample string 2</EmailContact>
    <TenantId>sample string 3</TenantId>
  </Hints>
  <IMEI>sample string 12</IMEI>
  <IPAddress>sample string 6</IPAddress>
  <InternalSOC>sample string 4</InternalSOC>
  <LastConnected_End>2024-04-19T05:50:03.1147245+00:00</LastConnected_End>
  <LastConnected_MCC>sample string 14</LastConnected_MCC>
  <LastConnected_MNC>sample string 15</LastConnected_MNC>
  <LastConnected_Start>2024-04-19T05:50:03.1147245+00:00</LastConnected_Start>
  <LastSync>2024-04-19T05:50:03.1147245+00:00</LastSync>
  <LockIMEI>true</LockIMEI>
  <NetworkStatus>disconnected</NetworkStatus>
  <ProvisioningMetaData xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </ProvisioningMetaData>
  <SIMNumber>sample string 2</SIMNumber>
  <SOC>sample string 3</SOC>
  <StartDate>2024-04-19T05:50:03.1147245+00:00</StartDate>
  <Status>pending</Status>
  <Version>9</Version>
</APNDevice>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'APNDevice'.

Response Information

Resource Description

The newly created APN device

PBPRReturnOfAPNDevice
NameDescriptionTypeAdditional information
Data

APNDevice

None.

Success

Gets the success status of the API call

boolean

None.

Meta

Gets the optional meta-data

Dictionary of string [key] and string [value]

None.

Code

Get the http code of the API call e.g. 200, 202, 409

integer

None.

ErrorCode

Get the failure error code of the API call. This is available if Success is false

integer

None.

ErrorSubCode

Gets the error sub code if available

integer

None.

ErrorDescription

Gets a textual description of the error

string

None.

StatusUrl

Gets the status url for any ACCEPTed API commands. Any command (POST,DELETE,PATCh,PUT) to the API usually returns a 202 response code. The status of the command can be queried using the URL provided

string

None.

ContinuationToken

Gets the token to be used for paged queries

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Meta": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "Code": 2,
  "ErrorCode": 3,
  "Data": {
    "CLI": "sample string 1",
    "SIMNumber": "sample string 2",
    "SOC": "sample string 3",
    "InternalSOC": "sample string 4",
    "Description": "sample string 5",
    "IPAddress": "sample string 6",
    "StartDate": "2024-04-19T05:50:03.1444614+00:00",
    "EndDate": "2024-04-19T05:50:03.1444614+00:00",
    "FriendlyName": "sample string 8",
    "Hints": {
      "BillingCycleDay": 1,
      "EmailContact": "sample string 2",
      "TenantId": "sample string 3"
    },
    "ProvisioningMetaData": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    "Status": 0,
    "Version": 9,
    "ActorStatus": 0,
    "NetworkStatus": 0,
    "Enabled": true,
    "LockIMEI": true,
    "IMEI": "sample string 12",
    "LastSync": "2024-04-19T05:50:03.1444614+00:00",
    "LastConnected_Start": "2024-04-19T05:50:03.1444614+00:00",
    "LastConnected_End": "2024-04-19T05:50:03.1444614+00:00",
    "LastConnected_MCC": "sample string 14",
    "LastConnected_MNC": "sample string 15"
  },
  "ErrorSubCode": 4,
  "ErrorDescription": "sample string 5",
  "StatusUrl": "sample string 6",
  "ContinuationToken": "sample string 7"
}

application/xml, text/xml

Sample:
<PBPRReturnOfAPNDevice7NMnQmOk xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API">
  <Code>2</Code>
  <ContinuationToken>sample string 7</ContinuationToken>
  <ErrorCode>3</ErrorCode>
  <ErrorDescription>sample string 5</ErrorDescription>
  <ErrorSubCode>4</ErrorSubCode>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
  <StatusUrl>sample string 6</StatusUrl>
  <Success>true</Success>
  <Data>
    <ActorStatus>stable</ActorStatus>
    <CLI>sample string 1</CLI>
    <Description>sample string 5</Description>
    <Enabled>true</Enabled>
    <EndDate>2024-04-19T05:50:03.1444614+00:00</EndDate>
    <FriendlyName>sample string 8</FriendlyName>
    <Hints>
      <BillingCycleDay>1</BillingCycleDay>
      <EmailContact>sample string 2</EmailContact>
      <TenantId>sample string 3</TenantId>
    </Hints>
    <IMEI>sample string 12</IMEI>
    <IPAddress>sample string 6</IPAddress>
    <InternalSOC>sample string 4</InternalSOC>
    <LastConnected_End>2024-04-19T05:50:03.1444614+00:00</LastConnected_End>
    <LastConnected_MCC>sample string 14</LastConnected_MCC>
    <LastConnected_MNC>sample string 15</LastConnected_MNC>
    <LastConnected_Start>2024-04-19T05:50:03.1444614+00:00</LastConnected_Start>
    <LastSync>2024-04-19T05:50:03.1444614+00:00</LastSync>
    <LockIMEI>true</LockIMEI>
    <NetworkStatus>disconnected</NetworkStatus>
    <ProvisioningMetaData xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </ProvisioningMetaData>
    <SIMNumber>sample string 2</SIMNumber>
    <SOC>sample string 3</SOC>
    <StartDate>2024-04-19T05:50:03.1444614+00:00</StartDate>
    <Status>pending</Status>
    <Version>9</Version>
  </Data>
</PBPRReturnOfAPNDevice7NMnQmOk>