BokaMera.API.Host

<back to all web services

GetVossTier

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/voss/tiers/{TierId}gets voss tiers
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports BokaMera.API.ServiceModel.Dtos
Imports BokaMera.VossIntegration.ApiTools.Model
Imports BokaMera.VossIntegration.ApiTools.Enums

Namespace Global

    Namespace BokaMera.API.ServiceModel.Dtos

        <ApiResponse(Description:="You were unauthorized to call this service", StatusCode:=401)>
        Public Partial Class GetVossTier
            '''<Summary>
            '''The company id, if empty will use the company id for the user you are logged in with.
            '''</Summary>
            <ApiMember(Description:="The company id, if empty will use the company id for the user you are logged in with.")>
            Public Overridable Property TierId As Guid

            Public Overridable Property PackageId As Guid?
        End Class
    End Namespace

    Namespace BokaMera.VossIntegration.ApiTools.Enums

        Public Enum ProductGroupTypeEnum
            [Optional]
            Included
        End Enum

        Public Enum ProductTypeEnum
            Main
            Addon
            License
            Usage
        End Enum
    End Namespace

    Namespace BokaMera.VossIntegration.ApiTools.Model

        <DataContract(Name:="ProductGroupTagDto")>
        Public Partial Class ProductGroupTagDto
            <DataMember(Name:="type", IsRequired:=true)>
            Public Overridable Property Type As TypeEnum

            <DataMember(Name:="tag", IsRequired:=true)>
            Public Overridable Property Tag As String

            Public Enum TypeEnum
                AtSubscriptionBillingPeriodEnd
                AtBindingPeriodEnd
                Immediately
            End Enum
        End Class

        <DataContract(Name:="TierProductDto")>
        Public Partial Class TierProductDto
            <DataMember(Name:="type", IsRequired:=true)>
            Public Overridable Property ProductType As ProductTypeEnum

            <DataMember(Name:="status", IsRequired:=true)>
            Public Overridable Property Status As StatusEnum

            <DataMember(Name:="id", IsRequired:=true)>
            Public Overridable Property Id As Guid

            <DataMember(Name:="name", IsRequired:=true)>
            Public Overridable Property Name As String

            <DataMember(Name:="externalId")>
            Public Overridable Property ExternalId As String

            <DataMember(Name:="articleNumber", IsRequired:=true)>
            Public Overridable Property ArticleNumber As String

            Public Enum StatusEnum
                Active
                Terminated
            End Enum
        End Class

        <DataContract(Name:="TierProductGroupDto")>
        Public Partial Class TierProductGroupDto
            <DataMember(Name:="productGroupType", IsRequired:=true)>
            Public Overridable Property ProductGroupType As ProductGroupTypeEnum

            <DataMember(Name:="id", IsRequired:=true)>
            Public Overridable Property Id As Guid

            <DataMember(Name:="name", IsRequired:=true)>
            Public Overridable Property Name As String

            <DataMember(Name:="externalId")>
            Public Overridable Property ExternalId As String

            <DataMember(Name:="tags", EmitDefaultValue:=false)>
            Public Overridable Property Tags As List(Of ProductGroupTagDto) = New List(Of ProductGroupTagDto)

            <DataMember(Name:="products", EmitDefaultValue:=false)>
            Public Overridable Property Products As List(Of TierProductDto) = New List(Of TierProductDto)
        End Class

        <DataContract(Name:="TierResult")>
        Public Partial Class TierResult
            <DataMember(Name:="id", IsRequired:=true)>
            Public Overridable Property Id As Guid

            <DataMember(Name:="versionId", IsRequired:=true)>
            Public Overridable Property VersionId As Guid

            <DataMember(Name:="name", IsRequired:=true)>
            Public Overridable Property Name As String

            <DataMember(Name:="externalId")>
            Public Overridable Property ExternalId As String

            <DataMember(Name:="rank")>
            Public Overridable Property Rank As Integer

            <DataMember(Name:="productGroups", EmitDefaultValue:=false)>
            Public Overridable Property ProductGroups As List(Of TierProductGroupDto) = New List(Of TierProductGroupDto)
        End Class
    End Namespace
End Namespace

VB.NET GetVossTier 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/tiers/{TierId} HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<TierResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.VossIntegration.ApiTools.Model">
  <externalId>String</externalId>
  <id>00000000-0000-0000-0000-000000000000</id>
  <name>String</name>
  <productGroups>
    <TierProductGroupDto i:nil="true" />
  </productGroups>
  <rank>0</rank>
  <versionId>00000000-0000-0000-0000-000000000000</versionId>
</TierResult>