| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| GET | /voss/targetGroups | Get all Voss target groups | Returns 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 .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetVossTargetGroupsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<Items xmlns:d2p1="http://schemas.datacontract.org/2004/07/BokaMera.VossIntegration.ApiTools.Model">
<d2p1:TargetGroupResult i:nil="true" />
</Items>
<TotalCount>0</TotalCount>
</GetVossTargetGroupsResponse>