Platform API

<back to all web services

RegisterDevice

Saves/Updates a Devices details and registers that device with an appliance.

Requires Authentication
RegisterDevice Parameters:
NameParameterData TypeRequiredDescription
ApplianceIdqueryGuidYesGuid of the Appliance this Device is Registering under.
DeviceIdqueryGuidYesGuid of the Device. If empty the Device will be inserted, if provided the device will be updated.
ManufacturerDeviceNumberquerystringNoThe Device manufacturers number.
MacAddressquerystringNoThe Device MAC Address.
ModelNamequerystringYesThe Device Model Name.
FormFactorquerystringYesThe Device Form, e.g Phone | Tablet.
BrandquerystringNoThe Device Brand.
DimensionsquerystringNoThe Device Dimensions (Height x Width x Depth).
DisplayResolutionWidthPixelsqueryintNoThe Device display resolution width in pixels.
DisplayResolutionHeightPixelsqueryintNoThe Device display resolution height in pixels.
DisplaySizeWidthInchesquerydecimalNoThe Device display width size in inches.
DisplaySizeHeightInchesquerydecimalNoThe Device display height size in inches.
OperatingSystemquerystringNoThe Device operating system.
OperatingSystemVersionquerystringNoThe Device operating system version.
IpAddressquerystringNoThe Device IP Address.
NotesquerystringNoAny Notes about the device.
TotalMemorySizequerystringNoTotal memory size available (in bytes).
CellularProviderNamequerystringNoThe Network provider name.
ISOCountryCodequerystringNoThe ISO Country Code of the country the device is currently located in.
MobileCountryCodequerystringNoThe Mobile Country Code the device is currently located in.
MobileNetworkCodequerystringNoThe Mobile Network Code the device is currently using.
LanguageCodeIdentifierquerystringNoThe Language Code Identifier that represents the language used on the device.
LastKnownTimeZonequerystringNoThe name of the Timezone the device was last used in.
LastKnownTimeZoneOffsetquerystringNoThe UTC Offset of the Timezone the device was last used in. Formatted as +-##:##
LatitudequerydoubleYesThe latitude the device was last located at.
LongitudequerydoubleYesThe longitude the device was last located at.
InstanceSeedqueryintYesThe current value of InstanceSeed that the device has stored.
InstanceCounterLastValuequeryintYesThe current value of InstanceCounterLastValue that the device has stored
DeviceModel Parameters:
NameParameterData TypeRequiredDescription
DeviceIdqueryGuidNoGuid representing the saved Device
DeviceTypequeryDeviceTypeModelNoDetails of the Type of Device
CurrentHistoryqueryDeviceHistoryModelNoCurrent saved settings of the Device
ModelNamequerystringYesThe Device Model Name.
ModelNumberquerystringNoThe Device model number.
SerialNumberquerystringNoThe Device serial number.
ManufacturerDeviceNumberquerystringNoThe Device manufacturers number.
MacAddressquerystringNoThe Device MAC Address.
InstanceSeedqueryintYesThe current value of InstanceSeed that the device has stored. If InstanceCounterLastValue has gone over 99999, this will contain a new seed value for the device.
InstanceCounterLastValuequeryintYesThe current value of InstanceCounterLastValue that the device has stored
ResponseStatusqueryResponseStatusNoServiceStack ResponseStatus.
DeviceTypeModel Parameters:
NameParameterData TypeRequiredDescription
DeviceTypeIdqueryGuidNoGuid representing the saved Device Type
DeviceClassIdqueryGuidNoGuid representing the saved Device Class
DeviceClassNamequerystringNoThe Device Class Name
BrandquerystringNoThe Device Brand.
ModelNamequerystringYesThe Device Model Name.
FormFactorquerystringNoThe Device Form, e.g Phone | Tablet.
DimensionsquerystringNoThe Device Dimensions (Height x Width x Depth).
DisplayResolutionWidthPixelsqueryintNoThe Device display resolution width in pixels.
DisplayResolutionHeightPixelsqueryintNoThe Device display resolution height in pixels.
DisplaySizeWidthInchesquerydecimalNoThe Device display width size in inches.
DisplaySizeHeightInchesquerydecimalNoThe Device display height size in inches.
DeviceHistoryModel Parameters:
NameParameterData TypeRequiredDescription
DeviceHistoryIdqueryGuidNoGuid representing the current Device History
PrimaryDeviceHistoryDeviceConfigurationIdqueryGuidNoGuid representing the current Device History Device Configuration record.
DeviceNamequerystringNoThe Device name.
OperatingSystemquerystringNoThe Device operating system.
OperatingSystemVersionquerystringNoThe Device operating system version.
IpAddressquerystringNoThe Device IP Address.
NotesquerystringNoAny Notes about the device.
TotalMemorySizequerystringNoTotal memory size available (in bytes).
CellularProviderNamequerystringNoThe Network provider name.
MobileCountryCodequerystringNoThe Mobile Country Code the device is currently located in.
MobileNetworkCodequerystringNoThe Mobile Network Code the device is currently using.
LanguageCodeIdentifierquerystringNoThe Language Code Identifier that represents the language used on the device.
LatitudequerydoubleNoThe latitude the device was last located at.
LongitudequerydoubleNoThe longitude the device was last located at.

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /xml/reply/RegisterDevice HTTP/1.1 
Host: pfapi.pstpf.com.au 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<RegisterDevice xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
  <ApplianceId>00000000-0000-0000-0000-000000000000</ApplianceId>
  <Brand>String</Brand>
  <CellularProviderName>String</CellularProviderName>
  <DeviceId>00000000-0000-0000-0000-000000000000</DeviceId>
  <Dimensions>String</Dimensions>
  <DisplayResolutionHeightPixels>0</DisplayResolutionHeightPixels>
  <DisplayResolutionWidthPixels>0</DisplayResolutionWidthPixels>
  <DisplaySizeHeightInches>0</DisplaySizeHeightInches>
  <DisplaySizeWidthInches>0</DisplaySizeWidthInches>
  <FormFactor>String</FormFactor>
  <ISOCountryCode>String</ISOCountryCode>
  <InstanceCounterLastValue>0</InstanceCounterLastValue>
  <InstanceSeed>0</InstanceSeed>
  <IpAddress>String</IpAddress>
  <LanguageCodeIdentifier>String</LanguageCodeIdentifier>
  <LastKnownTimeZone>String</LastKnownTimeZone>
  <LastKnownTimeZoneOffset>String</LastKnownTimeZoneOffset>
  <Latitude>0</Latitude>
  <Longitude>0</Longitude>
  <MacAddress>String</MacAddress>
  <ManufacturerDeviceNumber>String</ManufacturerDeviceNumber>
  <MobileCountryCode>String</MobileCountryCode>
  <MobileNetworkCode>String</MobileNetworkCode>
  <ModelName>String</ModelName>
  <Notes>String</Notes>
  <OperatingSystem>String</OperatingSystem>
  <OperatingSystemVersion>String</OperatingSystemVersion>
  <TotalMemorySize>0</TotalMemorySize>
</RegisterDevice>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<DeviceModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
  <CurrentHistory>
    <CellularProviderName>String</CellularProviderName>
    <DeviceHistoryId>00000000-0000-0000-0000-000000000000</DeviceHistoryId>
    <DeviceName>String</DeviceName>
    <IpAddress>String</IpAddress>
    <LanguageCodeIdentifier>String</LanguageCodeIdentifier>
    <Latitude>0</Latitude>
    <Longitude>0</Longitude>
    <MobileCountryCode>String</MobileCountryCode>
    <MobileNetworkCode>String</MobileNetworkCode>
    <Notes>String</Notes>
    <OperatingSystem>String</OperatingSystem>
    <OperatingSystemVersion>String</OperatingSystemVersion>
    <PrimaryDeviceHistoryDeviceConfigurationId>00000000-0000-0000-0000-000000000000</PrimaryDeviceHistoryDeviceConfigurationId>
    <TotalMemorySize>0</TotalMemorySize>
  </CurrentHistory>
  <DeviceId>00000000-0000-0000-0000-000000000000</DeviceId>
  <DeviceType>
    <Brand>String</Brand>
    <DeviceClassId>00000000-0000-0000-0000-000000000000</DeviceClassId>
    <DeviceClassName>String</DeviceClassName>
    <DeviceTypeId>00000000-0000-0000-0000-000000000000</DeviceTypeId>
    <Dimensions>String</Dimensions>
    <DisplayResolutionHeightPixels>0</DisplayResolutionHeightPixels>
    <DisplayResolutionWidthPixels>0</DisplayResolutionWidthPixels>
    <DisplaySizeHeightInches>0</DisplaySizeHeightInches>
    <DisplaySizeWidthInches>0</DisplaySizeWidthInches>
    <FormFactor>String</FormFactor>
    <ModelName>String</ModelName>
  </DeviceType>
  <InstanceCounterLastValue>0</InstanceCounterLastValue>
  <InstanceSeed>0</InstanceSeed>
  <MacAddress>String</MacAddress>
  <ManufacturerDeviceNumber>String</ManufacturerDeviceNumber>
  <ModelName>String</ModelName>
  <ModelNumber>String</ModelNumber>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <SerialNumber>String</SerialNumber>
</DeviceModel>