POST v1/Devices

Add or update a customer 'Push Notification' device

URI template

v1/Devices

Request Information

URI Parameters

None.

Body Parameters

Information of the device being registered

InCustomerDevice
NameDescriptionTypeAdditional information
DeviceId

Device Id of the device used by a customer

string

Required

Max length: 450

CustomerId

Customer Id if the device belongs to a registered customer. Null if registering device of a guest customer

globally unique identifier

None.

Platform

The platform of the device

DevicePlatform

Required

PlatformVersion

The version of the device's platform

string

Required

Max length: 25

AppVersion

The version of the mobile app

string

Required

Max length: 25

Handle

Handle used by the specified push notification service to send push notification to the device

string

Required

PushNotificationService

The push notification service associated with the handle provided

PushNotificationService

Required

Request Formats

application/json, text/json

Sample:
{
  "DeviceId": "sample string 1",
  "CustomerId": "124a5ec8-84af-4986-bb22-525e13e07886",
  "Platform": 0,
  "PlatformVersion": "sample string 3",
  "AppVersion": "sample string 4",
  "Handle": "sample string 5",
  "PushNotificationService": 0
}

application/xml, text/xml

Sample:
<InCustomerDevice xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/OnlineOrderingAPI.Inbound">
  <AppVersion>sample string 4</AppVersion>
  <CustomerId>124a5ec8-84af-4986-bb22-525e13e07886</CustomerId>
  <DeviceId>sample string 1</DeviceId>
  <Handle>sample string 5</Handle>
  <Platform>iOS</Platform>
  <PlatformVersion>sample string 3</PlatformVersion>
  <PushNotificationService>APNS</PushNotificationService>
</InCustomerDevice>

Response Information

Resource Description

HttpResponseMessage
NameDescriptionTypeAdditional information
Version

Version

None.

Content

HttpContent

None.

StatusCode

HttpStatusCode

None.

ReasonPhrase

string

None.

Headers

Collection of Object

None.

RequestMessage

HttpRequestMessage

None.

IsSuccessStatusCode

boolean

None.