| POST | /cmd/locations/devices/add |
|---|
export enum DeviceType
{
ClerkServicedKiosk = 0,
PersonalOnline = 1,
SelfServiceKiosk = 2,
Unknown = -1,
}
export class Device
{
public id: string;
public name: string;
public isActive: boolean;
public type: DeviceType;
public integrationsData: RecordDictionary<string, string>;
public constructor(init?: Partial<Device>) { (Object as any).assign(this, init); }
}
export class AddLocationDevice
{
public id: string;
public device: Device;
public constructor(init?: Partial<AddLocationDevice>) { (Object as any).assign(this, init); }
}
export class Dictionary<T> { [Key: string]: T; }
export class RecordDictionary<TKey, TVal> extends Dictionary<TVal>
{
public constructor(init?: Partial<RecordDictionary<TKey, TVal>>) { super(); (Object as any).assign(this, init); }
}
TypeScript AddLocationDevice DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /cmd/locations/devices/add HTTP/1.1
Host: api.beto2.webhop.biz
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: String,
device:
{
id: String,
name: String,
isActive: False,
type: 0,
integrationsData:
{
String: String
}
}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
errorCode: String,
message: String,
stackTrace: String,
errors:
[
{
errorCode: String,
fieldName: String,
message: String,
meta:
{
String: String
}
}
],
meta:
{
String: String
}
}