| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| GET | /tags | Get tags for the company | Returns tags for the current company, optionally filtered by scope and active status. |
|---|
"use strict";
/** @typedef {'Booking'|'Customer'} */
export var TagScope;
(function (TagScope) {
TagScope["Booking"] = "Booking"
TagScope["Customer"] = "Customer"
})(TagScope || (TagScope = {}));
export class TagQuery {
/** @param {{CompanyId?:string,Scope?:TagScope,Active?:boolean,Skip?:number,Take?:number,OrderBy?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {?string}
* @description The company id, if empty will use the company id for the user you are logged in with. */
CompanyId;
/**
* @type {?TagScope}
* @description Filter by tag scope. 0 = Booking, 1 = Customer. */
Scope;
/**
* @type {?boolean}
* @description Filter by active status. If not provided, only active tags are returned. */
Active;
/**
* @type {?number}
* @description Number of records to skip */
Skip;
/**
* @type {?number}
* @description Number of records to take */
Take;
/**
* @type {string}
* @description Sort field */
OrderBy;
}
export class AccessKeyTypeResponse {
/** @param {{Id?:number,KeyType?:string,Description?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
KeyType;
/** @type {string} */
Description;
}
/** @typedef T {any} */
export class QueryResponse {
/** @param {{Offset?:number,Total?:number,Results?:T[],Meta?:{ [index:string]: string; },ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Offset;
/** @type {number} */
Total;
/** @type {T[]} */
Results = [];
/** @type {?{ [index:string]: string; }} */
Meta;
/** @type {?ResponseStatus} */
ResponseStatus;
}
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.
GET /tags HTTP/1.1 Host: api.bookmore.com Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Offset":0,"Total":0,"Results":[{"Id":0,"Name":"String","Scope":0,"Color":"String","SortOrder":0,"Active":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}