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).
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
using BokaMera.VossIntegration.ApiTools.Model;

namespace BokaMera.API.ServiceModel.Dtos
{
    [ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)]
    public partial class GetVossTargetGroups
    {
    }

    public partial class GetVossTargetGroupsResponse
    {
        public virtual int TotalCount { get; set; }
        public virtual List<TargetGroupResult> Items { get; set; } = [];
    }

}

namespace BokaMera.VossIntegration.ApiTools.Model
{
    [DataContract(Name="TargetGroupConfigurationResult")]
    public partial class TargetGroupConfigurationResult
    {
        [DataMember(Name="id", IsRequired=true)]
        public virtual Guid Id { get; set; }

        [DataMember(Name="organizationNumberRequired")]
        public virtual bool OrganizationNumberRequired { get; set; }

        [DataMember(Name="organizationNumberUnique")]
        public virtual bool OrganizationNumberUnique { get; set; }

        [DataMember(Name="customerNumberRequired")]
        public virtual bool CustomerNumberRequired { get; set; }

        [DataMember(Name="customerAddressRequired")]
        public virtual bool CustomerAddressRequired { get; set; }

        [DataMember(Name="contactPersonRequired")]
        public virtual bool ContactPersonRequired { get; set; }

        [DataMember(Name="expiryDateRequired")]
        public virtual bool ExpiryDateRequired { get; set; }

        [DataMember(Name="excludeCustomerFromInvoiceFile")]
        public virtual bool ExcludeCustomerFromInvoiceFile { get; set; }
    }

    [DataContract(Name="TargetGroupResult")]
    public partial class TargetGroupResult
    {
        [DataMember(Name="id", IsRequired=true)]
        public virtual Guid Id { get; set; }

        [DataMember(Name="name", IsRequired=true)]
        public virtual string Name { get; set; }

        [DataMember(Name="isDefault")]
        public virtual bool IsDefault { get; set; }

        [DataMember(Name="externalId")]
        public virtual string ExternalId { get; set; }

        [DataMember(Name="configuration", EmitDefaultValue=false)]
        public virtual TargetGroupConfigurationResult VarConfiguration { get; set; }

        [DataMember(Name="tags", EmitDefaultValue=false)]
        public virtual List<TargetGroupTagDto> Tags { get; set; } = [];
    }

    [DataContract(Name="TargetGroupTagDto")]
    public partial class TargetGroupTagDto
    {
        [DataMember(Name="type", IsRequired=true)]
        public virtual TypeEnum Type { get; set; }

        [DataMember(Name="tag", IsRequired=true)]
        public virtual string Tag { get; set; }
        public enum TypeEnum
        {
            Exclusivity,
        }

    }

}

C# GetVossTargetGroups 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 /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>