| 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 DeviceType;
(function (DeviceType) {
DeviceType[DeviceType["ClerkServicedKiosk"] = 0] = "ClerkServicedKiosk"
DeviceType[DeviceType["PersonalOnline"] = 1] = "PersonalOnline"
DeviceType[DeviceType["SelfServiceKiosk"] = 2] = "SelfServiceKiosk"
DeviceType[DeviceType["Unknown"] = -1] = "Unknown"
})(DeviceType || (DeviceType = {}));
export class Device {
/** @param {{id?:string,name?:string,isActive?:boolean,type?:DeviceType,integrationsData?:RecordDictionary<string, string>}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
id;
/** @type {string} */
name;
/** @type {boolean} */
isActive;
/** @type {DeviceType} */
type;
/** @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 .other suffix or ?format=other
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.sbbet.ath.cx
Accept: text/jsonl
Content-Type: text/jsonl
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,"type":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: text/jsonl
Content-Length: length
{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}