| POST | /cmd/locations |
|---|
"use strict";
export class Ref {
/** @param {{id?:string,val?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
val;
}
export class RefEx extends Ref {
/** @param {{data?:RecordDictionary<string, string>,id?:string,val?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {RecordDictionary<string, string>} */
data;
}
export class GPSCoordinates {
/** @param {{lat?:number,lng?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
lat;
/** @type {number} */
lng;
}
export class Address {
/** @param {{street?:string,city?:string,state?:string,postalCode?:string,country?:Ref,gps?:GPSCoordinates,data?:RecordDictionary<string, string>}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
street;
/** @type {string} */
city;
/** @type {string} */
state;
/** @type {string} */
postalCode;
/** @type {Ref} */
country;
/** @type {GPSCoordinates} */
gps;
/** @type {RecordDictionary<string, string>} */
data;
}
/** @typedef {number} */
export var DeviceUsageMode;
(function (DeviceUsageMode) {
DeviceUsageMode[DeviceUsageMode["ClerkServiced"] = 0] = "ClerkServiced"
DeviceUsageMode[DeviceUsageMode["Personal"] = 1] = "Personal"
DeviceUsageMode[DeviceUsageMode["SelfService"] = 2] = "SelfService"
DeviceUsageMode[DeviceUsageMode["Unknown"] = -1] = "Unknown"
})(DeviceUsageMode || (DeviceUsageMode = {}));
/** @typedef {number} */
export var DeviceUserInterface;
(function (DeviceUserInterface) {
DeviceUserInterface[DeviceUserInterface["Tablet"] = 0] = "Tablet"
DeviceUserInterface[DeviceUserInterface["Kiosk"] = 1] = "Kiosk"
DeviceUserInterface[DeviceUserInterface["Default"] = 2] = "Default"
DeviceUserInterface[DeviceUserInterface["Unknown"] = -1] = "Unknown"
})(DeviceUserInterface || (DeviceUserInterface = {}));
/** @typedef {number} */
export var DeviceManagement;
(function (DeviceManagement) {
DeviceManagement[DeviceManagement["Partner"] = 1] = "Partner"
DeviceManagement[DeviceManagement["Platform"] = 2] = "Platform"
})(DeviceManagement || (DeviceManagement = {}));
export class DeviceProfile {
/** @param {{usageMode?:DeviceUsageMode,userInterface?:DeviceUserInterface,wallet?:Ref,managedBy?:DeviceManagement}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {DeviceUsageMode} */
usageMode;
/** @type {DeviceUserInterface} */
userInterface;
/** @type {?Ref} */
wallet;
/** @type {?DeviceManagement} */
managedBy;
}
export class Device {
/** @param {{id?:string,name?:string,isActive?:boolean,profile?:DeviceProfile,integrationsData?:RecordDictionary<string, string>}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
id;
/** @type {?string} */
name;
/** @type {boolean} */
isActive;
/** @type {?DeviceProfile} */
profile;
/** @type {?RecordDictionary<string, string>} */
integrationsData;
}
export class ProductReference {
/** @param {{id?:string,value?:string,category?:string,productProvider?:Ref}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
id;
/** @type {?string} */
value;
/** @type {?string} */
category;
/** @type {?Ref} */
productProvider;
}
export class ProductInstanceRef {
/** @param {{id?:string,name?:string,title?:string,product?:ProductReference}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
id;
/** @type {?string} */
name;
/** @type {?string} */
title;
/** @type {?ProductReference} */
product;
}
export class Locale {
/** @param {{timeZone?:Ref,currency?:Ref,language?:Ref}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?Ref} */
timeZone;
/** @type {?Ref} */
currency;
/** @type {?Ref} */
language;
}
export class OpenLocation {
/** @param {{id?:string,name?:string,organization?:RefEx,region?:Ref,group?:Ref,address?:Address,devices?:Device[],productInstances?:ProductInstanceRef[],locale?:Locale,integrationsData?:{ [index:string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
id;
/** @type {?string} */
name;
/** @type {?RefEx} */
organization;
/** @type {?Ref} */
region;
/** @type {?Ref} */
group;
/** @type {?Address} */
address;
/** @type {?Device[]} */
devices;
/** @type {?ProductInstanceRef[]} */
productInstances;
/** @type {?Locale} */
locale;
/** @type {?{ [index:string]: string; }} */
integrationsData;
}
class Dictionary {}
/** @typedef TKey {any} */
/** @typedef TVal {any} */
export class RecordDictionary extends Dictionary {
constructor(init) { super(init); Object.assign(this, init) }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /cmd/locations HTTP/1.1
Host: api.bettor.webhop.biz
Accept: application/json
Content-Type: application/json
Content-Length: length
{"id":"String","name":"String","organization":{"data":{"String":"String"},"id":"String","val":"String"},"region":{"id":"String","val":"String"},"group":{"id":"String","val":"String"},"address":{"street":"String","city":"String","state":"String","postalCode":"String","country":{"id":"String","val":"String"},"gps":{"lat":0,"lng":0},"data":{"String":"String"}},"devices":[{"id":"String","name":"String","isActive":false,"profile":{"usageMode":0,"userInterface":0,"wallet":{"id":"String","val":"String"},"managedBy":0},"integrationsData":{"String":"String"}}],"productInstances":[{"id":"String","name":"String","title":"String","product":{"id":"String","value":"String","category":"String","productProvider":{"id":"String","val":"String"}}}],"locale":{"timeZone":{"id":"String","val":"String"},"currency":{"id":"String","val":"String"},"language":{"id":"String","val":"String"}},"integrationsData":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}