| 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. |
|---|
import Foundation
import ServiceStack
// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ValidateRequest(Validator="IsAuthenticated")
public class TagQuery : Codable
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
// @ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
public var companyId:String?
/**
* Filter by tag scope. 0 = Booking, 1 = Customer.
*/
// @ApiMember(Description="Filter by tag scope. 0 = Booking, 1 = Customer.")
public var scope:TagScope?
/**
* Filter by active status. If not provided, only active tags are returned.
*/
// @ApiMember(Description="Filter by active status. If not provided, only active tags are returned.")
public var active:Bool?
/**
* Number of records to skip
*/
// @ApiMember(Description="Number of records to skip")
public var skip:Int?
/**
* Number of records to take
*/
// @ApiMember(Description="Number of records to take")
public var take:Int?
/**
* Sort field
*/
// @ApiMember(Description="Sort field")
public var orderBy:String
required public init(){}
}
public enum TagScope : String, Codable
{
case Booking
case Customer
}
public class AccessKeyTypeResponse : Codable
{
public var id:Int
public var keyType:String
public var Description:String
required public 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.
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"}}}