BokaMera.API.Host

<back to all web services

GetVossTargetGroups

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/voss/targetGroupsGet all Voss target groupsReturns every target group in the Voss tenant (all pages).
import Foundation
import ServiceStack

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
public class GetVossTargetGroups : Codable
{
    required public init(){}
}

public class GetVossTargetGroupsResponse : Codable
{
    public var totalCount:Int
    public var items:[TargetGroupResult] = []

    required public init(){}
}

// @DataContract(Name="TargetGroupResult")
public class TargetGroupResult : Codable
{
    // @DataMember(Name="id", IsRequired=true)
    public var id:String

    // @DataMember(Name="name", IsRequired=true)
    public var name:String

    // @DataMember(Name="isDefault")
    public var isDefault:Bool

    // @DataMember(Name="externalId")
    public var externalId:String

    // @DataMember(Name="configuration", EmitDefaultValue=false)
    public var configuration:TargetGroupConfigurationResult

    // @DataMember(Name="tags", EmitDefaultValue=false)
    public var tags:[TargetGroupTagDto] = []

    required public init(){}
}

// @DataContract(Name="TargetGroupConfigurationResult")
public class TargetGroupConfigurationResult : Codable
{
    // @DataMember(Name="id", IsRequired=true)
    public var id:String

    // @DataMember(Name="organizationNumberRequired")
    public var organizationNumberRequired:Bool

    // @DataMember(Name="organizationNumberUnique")
    public var organizationNumberUnique:Bool

    // @DataMember(Name="customerNumberRequired")
    public var customerNumberRequired:Bool

    // @DataMember(Name="customerAddressRequired")
    public var customerAddressRequired:Bool

    // @DataMember(Name="contactPersonRequired")
    public var contactPersonRequired:Bool

    // @DataMember(Name="expiryDateRequired")
    public var expiryDateRequired:Bool

    // @DataMember(Name="excludeCustomerFromInvoiceFile")
    public var excludeCustomerFromInvoiceFile:Bool

    required public init(){}
}

// @DataContract(Name="TargetGroupTagDto")
public class TargetGroupTagDto : Codable
{
    // @DataMember(Name="type", IsRequired=true)
    public var type:TypeEnum

    // @DataMember(Name="tag", IsRequired=true)
    public var tag:String

    required public init(){}
}

public enum TypeEnum : String, Codable
{
    case Exclusivity
}


Swift GetVossTargetGroups DTOs

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

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /voss/targetGroups HTTP/1.1 
Host: testapi.bokamera.se 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"TotalCount":0,"Items":[{}]}