| 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 java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
@ValidateRequest(Validator="IsAuthenticated")
open class TagQuery
{
/**
* 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.")
open var CompanyId:UUID? = null
/**
* Filter by tag scope. 0 = Booking, 1 = Customer.
*/
@ApiMember(Description="Filter by tag scope. 0 = Booking, 1 = Customer.")
open var Scope:TagScope? = null
/**
* 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.")
open var Active:Boolean? = null
/**
* Number of records to skip
*/
@ApiMember(Description="Number of records to skip")
open var Skip:Int? = null
/**
* Number of records to take
*/
@ApiMember(Description="Number of records to take")
open var Take:Int? = null
/**
* Sort field
*/
@ApiMember(Description="Sort field")
open var OrderBy:String? = null
}
enum class TagScope
{
Booking,
Customer,
}
@DataContract
open class QueryResponse<T>
{
@DataMember(Order=1)
open var Offset:Int? = null
@DataMember(Order=2)
open var Total:Int? = null
@DataMember(Order=3)
open var Results:ArrayList<AccessKeyTypeResponse> = ArrayList<AccessKeyTypeResponse>()
@DataMember(Order=4)
open var Meta:HashMap<String,String>? = null
@DataMember(Order=5)
open var ResponseStatus:ResponseStatus? = null
}
open class AccessKeyTypeResponse
{
open var Id:Int? = null
open var KeyType:String? = null
open var Description:String? = null
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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/csv
HTTP/1.1 200 OK
Content-Type: text/csv
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"}}}