BokaMera.API.Host

<back to all web services

TagQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/tagsGet tags for the companyReturns 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(){}
}


Swift TagQuery DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<QueryResponseOfTagResponseWg5EthtI xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Offset>0</Offset>
  <Total>0</Total>
  <Results xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
    <d2p1:TagResponse>
      <d2p1:Active>false</d2p1:Active>
      <d2p1:Color>String</d2p1:Color>
      <d2p1:CompanyId>00000000-0000-0000-0000-000000000000</d2p1:CompanyId>
      <d2p1:CreatedDate>0001-01-01T00:00:00</d2p1:CreatedDate>
      <d2p1:Id>0</d2p1:Id>
      <d2p1:Name>String</d2p1:Name>
      <d2p1:ResponseStatus>
        <ErrorCode>String</ErrorCode>
        <Message>String</Message>
        <StackTrace>String</StackTrace>
        <Errors>
          <ResponseError>
            <ErrorCode>String</ErrorCode>
            <FieldName>String</FieldName>
            <Message>String</Message>
            <Meta xmlns:d7p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
              <d7p1:KeyValueOfstringstring>
                <d7p1:Key>String</d7p1:Key>
                <d7p1:Value>String</d7p1:Value>
              </d7p1:KeyValueOfstringstring>
            </Meta>
          </ResponseError>
        </Errors>
        <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Meta>
      </d2p1:ResponseStatus>
      <d2p1:Scope>0</d2p1:Scope>
      <d2p1:SortOrder>0</d2p1:SortOrder>
    </d2p1:TagResponse>
  </Results>
  <Meta xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>String</d2p1:Key>
      <d2p1:Value>String</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Meta>
  <ResponseStatus>
    <ErrorCode>String</ErrorCode>
    <Message>String</Message>
    <StackTrace>String</StackTrace>
    <Errors>
      <ResponseError>
        <ErrorCode>String</ErrorCode>
        <FieldName>String</FieldName>
        <Message>String</Message>
        <Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </Meta>
      </ResponseError>
    </Errors>
    <Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Meta>
  </ResponseStatus>
</QueryResponseOfTagResponseWg5EthtI>