POST v1/accounts/{foreignaccountkey}/hardware/sims

Create a new SIM on the ApiAccount. Each SIM must have a unique CLI, otherwise a failure result with a 409 error code is returned.<br/><br/> Note that is endpoint returns a 202 code as the request is queued. A status url is returned in the return meta-data that can be used to poll the status of this request. When the SIM is created successfully it's Status property will be set as 'complete'

Request Information

URI Parameters

NameDescriptionTypeAdditional information
foreignaccountkey

The Api Account to create the SIM on

string

Required

Body Parameters

The details of the new SIM

SIMCard
NameDescriptionTypeAdditional information
CLI

The MSISDN or IMSI of the SIM. This is the unique identifier for a SIM

string

Required

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

SIMNumber

Gets and sets the ICCID of the SIM - this is optional

string

None.

Description

Gets and sets the optional description of the SIM

string

None.

InventoryRef

An optional inventory reference. This is just stored and returned to the api caller as needed

string

None.

State

Gets and sets the SIM state. This can be of the following values:-<br/><br/> notactivated = 0 ready = 1 test = 2 live = 3 suspend = 4 bar = 5 unknown = 6 terminated = 100

SimCardStateValues

None.

Version

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

integer

None.

ActorStatus

The SIMCard 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.

ForeignAttributes

This holds optional extra details about the SIM that may be required for example to drive an underlying SIM management api

Dictionary of string [key] and string [value]

None.

Tariff

Gets and sets the tariff the SIM is set to on the operators platform. Support for this is dependent on the operator and the integration.

string

None.

Bundle

Gets and sets the bundle the SIM is set to on the operators platform. Support for this is dependent on the operator and the integration.

string

None.

Operator

Gets and sets the operator that the SIM is belongs too

string

None.

Hints

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

AccountHints

None.

NetworkStatus

Gets the connection status of the SIM on the operator network. Support for this is dependent on the operator and the integration. It can be one of the following values:- <br/> disconnected = 0 connected = 1 activation = 10

NetworkStatusValues

None.

Created

Gets the date the SIMCard was created on the API

date

None.

SOC

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

string

None.

InternalSOC

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

string

None.

PurchaseOrder

Gets and sets the purchase order number associated with the SIMCard when is was purchased. This is optional and dependent on the billing arrangements.

string

None.

Provider

Gets and sets the name of the entity that provided the SIMCard. This is optional and dependent on the billing arrangements.

string

None.

ProviderTariff

Gets and sets the tariff applied by the SIMCard provider. This is optional and dependent on the billing arrangements.

string

None.

ProviderPrice

Gets and sets the price applied by the SIMCard provider. This is optional and dependent on the billing arrangements.

string

None.

ProviderStartDate

Gets and sets the date the SIMCard is considered billable by the SIMCard provider. This is optional and dependent on the billing arrangements.

date

None.

Request Formats

application/json, text/json

Sample:
{
  "CLI": "sample string 1",
  "SIMNumber": "sample string 2",
  "Description": "sample string 3",
  "InventoryRef": "sample string 4",
  "State": 0,
  "Version": 5,
  "ActorStatus": 0,
  "ForeignAttributes": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "Tariff": "sample string 6",
  "Bundle": "sample string 7",
  "Operator": "sample string 8",
  "Hints": {
    "BillingCycleDay": 1,
    "EmailContact": "sample string 2",
    "TenantId": "sample string 3"
  },
  "NetworkStatus": 0,
  "Created": "2018-12-14T07:39:36.9412822+00:00",
  "SOC": "sample string 10",
  "InternalSOC": "sample string 11",
  "PurchaseOrder": "sample string 12",
  "Provider": "sample string 13",
  "ProviderTariff": "sample string 14",
  "ProviderPrice": "sample string 15",
  "ProviderStartDate": "2018-12-14T07:39:36.9412822+00:00"
}

application/xml, text/xml

Sample:
<SIMCard xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API">
  <ActorStatus>stable</ActorStatus>
  <Bundle>sample string 7</Bundle>
  <CLI>sample string 1</CLI>
  <Created>2018-12-14T07:39:36.9412822+00:00</Created>
  <Description>sample string 3</Description>
  <ForeignAttributes 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>
  </ForeignAttributes>
  <Hints>
    <BillingCycleDay>1</BillingCycleDay>
    <EmailContact>sample string 2</EmailContact>
    <TenantId>sample string 3</TenantId>
  </Hints>
  <InternalSOC>sample string 11</InternalSOC>
  <InventoryRef>sample string 4</InventoryRef>
  <NetworkStatus>disconnected</NetworkStatus>
  <Operator>sample string 8</Operator>
  <Provider>sample string 13</Provider>
  <ProviderPrice>sample string 15</ProviderPrice>
  <ProviderStartDate>2018-12-14T07:39:36.9412822+00:00</ProviderStartDate>
  <ProviderTariff>sample string 14</ProviderTariff>
  <PurchaseOrder>sample string 12</PurchaseOrder>
  <SIMNumber>sample string 2</SIMNumber>
  <SOC>sample string 10</SOC>
  <State>notactivated</State>
  <Tariff>sample string 6</Tariff>
  <Version>5</Version>
</SIMCard>

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 'SIMCard'.

Response Information

Resource Description

PBPRReturnOfSIMCard
NameDescriptionTypeAdditional information
Data

SIMCard

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",
    "Description": "sample string 3",
    "InventoryRef": "sample string 4",
    "State": 0,
    "Version": 5,
    "ActorStatus": 0,
    "ForeignAttributes": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    "Tariff": "sample string 6",
    "Bundle": "sample string 7",
    "Operator": "sample string 8",
    "Hints": {
      "BillingCycleDay": 1,
      "EmailContact": "sample string 2",
      "TenantId": "sample string 3"
    },
    "NetworkStatus": 0,
    "Created": "2018-12-14T07:39:36.9412822+00:00",
    "SOC": "sample string 10",
    "InternalSOC": "sample string 11",
    "PurchaseOrder": "sample string 12",
    "Provider": "sample string 13",
    "ProviderTariff": "sample string 14",
    "ProviderPrice": "sample string 15",
    "ProviderStartDate": "2018-12-14T07:39:36.9412822+00:00"
  },
  "ErrorSubCode": 4,
  "ErrorDescription": "sample string 5",
  "StatusUrl": "sample string 6",
  "ContinuationToken": "dGIzLmZ3WiYNPmBoaSM1Bw%3D%3D"
}

application/xml, text/xml

Sample:
<PBPRReturnOfSIMCard7NMnQmOk xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AS.Models.API">
  <Code>2</Code>
  <ContinuationToken>dGIzLmZ3WiYNPmBoaSM1Bw%3D%3D</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>
    <Bundle>sample string 7</Bundle>
    <CLI>sample string 1</CLI>
    <Created>2018-12-14T07:39:36.9412822+00:00</Created>
    <Description>sample string 3</Description>
    <ForeignAttributes 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>
    </ForeignAttributes>
    <Hints>
      <BillingCycleDay>1</BillingCycleDay>
      <EmailContact>sample string 2</EmailContact>
      <TenantId>sample string 3</TenantId>
    </Hints>
    <InternalSOC>sample string 11</InternalSOC>
    <InventoryRef>sample string 4</InventoryRef>
    <NetworkStatus>disconnected</NetworkStatus>
    <Operator>sample string 8</Operator>
    <Provider>sample string 13</Provider>
    <ProviderPrice>sample string 15</ProviderPrice>
    <ProviderStartDate>2018-12-14T07:39:36.9412822+00:00</ProviderStartDate>
    <ProviderTariff>sample string 14</ProviderTariff>
    <PurchaseOrder>sample string 12</PurchaseOrder>
    <SIMNumber>sample string 2</SIMNumber>
    <SOC>sample string 10</SOC>
    <State>notactivated</State>
    <Tariff>sample string 6</Tariff>
    <Version>5</Version>
  </Data>
</PBPRReturnOfSIMCard7NMnQmOk>