Retrieve Poken Devices

Description

This method returns the details of all the poken devices associated to the users account.

HTTP Method

GET

Path

/devices

Authentication

Requires an authenticated user.

Parameters

No Parameters.

Error Codes

150001 ( Common )

The endpoint requires an authenticated account

20000 ( Device )

An unhandled exception has occured.

Response Schema

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://xsd.poken.com" xmlns:tns="http://xsd.poken.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:element name="devices">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="device" type="tns:Device" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="Device">
    <xs:sequence>
      <xs:element name="name" type="xs:string" minOccurs="0"/>
      <xs:element name="id" type="xs:long" minOccurs="0"/>
      <xs:element name="message" type="xs:string" minOccurs="0"/>
      <xs:element name="icon" type="xs:string" minOccurs="0"/>
      <xs:element name="status" type="xs:string" minOccurs="0"/>
      <xs:element name="campaign" type="xs:string" minOccurs="0"/>
      <xs:element name="campaignName" type="xs:string" minOccurs="0"/>
      <xs:element name="lastSyncedDate" type="xs:dateTime" minOccurs="0"/>
      <xs:element name="lastUsedDate" type="xs:dateTime" minOccurs="0"/>
      <xs:element name="pendingHits" type="xs:boolean" minOccurs="0"/>
      <xs:element name="deviceType" type="xs:string" minOccurs="0"/>
      <xs:element name="sharedIdentities" type="tns:SharedIdentities" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SharedIdentities">
    <xs:sequence>
      <xs:element name="sharedIdentity" type="tns:SharedIdentity" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>

  <xs:complexType name="SharedIdentity">
    <xs:sequence>
      <xs:element name="id" type="xs:long"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="PokenDeviceStatus">
    <xs:restriction base="xs:string">
      <xs:enumeration value="ENABLED"/>
      <xs:enumeration value="LOST"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>

Sample Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<devices xmlns="http://xsd.poken.com">
  <device>
    <name></name>
    <id>1254209</id>
    <message></message>
    <icon>bee</icon>
    <status>ENABLED</status>
    <deviceType>POKEN_HARDWARE</deviceType>
    <sharedIdentities>
      <sharedIdentity>
        <id>614080</id>
      </sharedIdentity>
    </sharedIdentities>
  </device>
</devices>