GetDeviceProvisioningHistory

Returns the provisioning history of a specified device during a selected time period.

Uses and Requirements

Each response includes a maximum of 500 records. To obtain more records, you can call the API multiple times, adjusting the OccurredAtFilter each time to start where the previous request finished.

Request Parameters

Parameter Type Description
Device
required
DeviceIdentifier

The device for which you want the provisioning history.

NOTE: You can use GetDeviceList to get a list of all devices in the account.

Kind
required
string The type of the device identifier. Valid types of identifiers are:
  • ESN (decimal)
  • ICCID (up to 20 digits)
  • IMEI (up to 16 digits)
  • MDN
  • MEID (hexadecimal)
  • MSISDN
Identifier
required
string The value of the device identifier.
OccurredAtFilter
required
InclusiveDateTimeRange Defines the reporting period to be included in the response.

For the first request, set Earliest and Latest to cover the time period for which you want data. Check the IsComplete value in the response. If it's "true" then you have received all of the events that occurred during that time. If IsComplete is "false," send another request with Earliest set to the CreatedAt time of the last returned event plus one millisecond. Continue adjusting the Earliest value and sending requests until IsComplete is "true."

Earliest
required
dateTime The earliest date and time in the range.
Latest
required
dateTime The latest date and time in the range.

Response Parameters

Parameter Type Description
Device DeviceIdentifier The device for which the provisioning history has been returned.
Kind string The type of the device identifier. Valid types of identifiers are:
  • ESN (decimal)
  • ICCID (up to 20 digits)
  • IMEI (up to 16 digits)
  • MDN
  • MEID (hexadecimal)
  • MIN
  • MSISDN
Identifier string The value of the device identifier.
ProvisioningHistory array of ProvisioningEvent List of device provisioning events, sorted by the OccurredAt timestamp, oldest first.
OccurredAt dateTime The date and time when the provisioning event occurred.
Status string The success or failure of the provisioning event.
EventBy string The user who performed the provisioning event.
EventType string The provisioning action:
  • Preactivation Confirmation
  • Activation Confirmed
  • Suspension Confirmed
  • Resume Confirmed
  • Deactivation Confirmed
  • Change Service Plan Confirmed
  • Change Cost Center Codes Confirmed
  • Account Update Confirmed
  • Mobile Originated SMS Message Received
  • Mobile Terminated SMS Message Sent
ServicePlan string The Service Plan of the device after the provisioning action occurred.
Mdn string The MDN assigned to the device.
Msisdn string The MSISDN assigned to the device.
ExtendedAttributes ExtendedAttributesObj Any extended attributes for the event, as Key and Value pairs.
Key string The key for an extended attribute.
Value string The value of an extended attribute.
IsComplete boolean Indicates whether all events have been returned. If IsComplete is "false," send another request with Earliest set to the OccurredAt time of the last returned event plus one millisecond. Continue adjusting the Earliest value and sending requests until IsComplete is "true."

Example SOAP Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
 xmlns:v2="http://nphase.com/unifiedwebservice/v2"
 xmlns:nph="http://schemas.datacontract.org/2004/07/NPhase.UnifiedWebService.APIs.v2.Contract.DeviceService"
 xmlns:nph1="http://schemas.datacontract.org/2004/07/NPhase.UnifiedWebService.APIs.v2.Contract.Common"">
  <soapenv:Header>
    <v2:token>a56832d9-b870-4e5d-85b8-57003a592a01</v2:token>
  </soapenv:Header>
  <soapenv:Body>
    <v2:GetDeviceProvisioningHistory>
      <v2:Input>
        <nph:Device>
          <nph:Kind>esn</nph1:Kind>
          <nph1:Identifier>09123456123</nph1:Identifier>
        </nph:Device>
        <nph:OccuredAtFilter>
          <nph:Earliest>2017-01-01</nph:Earliest>
          <nph:Latesst>2017-01-31</nph:Latesst>
        </nph:OccuredAtFilter>
      </v2:Input>
    </v2:GetDeviceProvisioningHistory>
  </soapenv:Body>
</soapenv:Envelope>

Example SOAP Response

<GetDeviceProvisioningHistoryResponse xmlns="http://nphase.com/unifiedwebservice/v2">
  <Output xmlns:a="http://schemas.datacontract.org/2004/07/NPhase.UnifiedWebService.APIs.v2.Contract.DeviceService"
   xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    <a:Device xmlns:b="http://schemas.datacontract.org/2004/07/NPhase.UnifiedWebService.APIs.v2.Contract.Common">
      <b:Kind>meid</b:Kind>
      <b:Identifier>54689785258599</b:Identifier>
    </a:Device>
    <a:ProvisioningHistory>
      <a:ProvisioningEvent>
        <a:OccurredAt>2017-01-02T12:00:48.21Z</a:OccurredAt>
        <a:Status>Success</a:Status>
        <a:EventBy>John Admin</a:EventBy>
        <a:EventType>Suspension Confirmed</a:EventType>
        <a:ServicePlan i:nil="true"/>
        <a:Mdn>5348152777</a:Mdn>
      </a:ProvisioningEvent>
      <a:ProvisioningEvent>
        <a:OccurredAt>2017-01-02T12:02:06.22Z</a:OccurredAt>
        <a:Status>Success</a:Status>
        <a:EventBy>John Admin</a:EventBy>
        <a:EventType>Resume Confirmed</a:EventType>
        <a:ServicePlan i:nil="true"/>
        <a:Mdn>5348152777</a:Mdn>
      </a:ProvisioningEvent>
    </a:ProvisioningHistory>
    <a:IsComplete>true</a:IsComplete>
  </Output>
</GetDeviceProvisioningHistoryResponse>

Request Schema Diagram

Response Schema Diagram