BokaMera.API.Host

<back to all web services

SearchVossCustomers

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/voss/customersSearch voss customers by organization number, customer number or external idRaw passthrough to the Voss customer search. Returns all matching customers with their full fields (externalId, customerNumber, expiryDate, ...).
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 SearchVossCustomers
            '''<Summary>
            '''Organization number to search for.
            '''</Summary>
            <ApiMember(Description:="Organization number to search for.")>
            Public Overridable Property OrganizationNumber As String

            '''<Summary>
            '''Voss customer number to search for.
            '''</Summary>
            <ApiMember(Description:="Voss customer number to search for.")>
            Public Overridable Property CustomerNumber As Integer?

            '''<Summary>
            '''External id to search for.
            '''</Summary>
            <ApiMember(Description:="External id to search for.")>
            Public Overridable Property ExternalId As String
        End Class

        Public Partial Class SearchVossCustomersResponse
            Public Overridable Property TotalCount As Integer
            Public Overridable Property Items As List(Of CustomerResult) = New List(Of CustomerResult)
        End Class
    End Namespace

    Namespace BokaMera.VossIntegration.ApiTools.Enums

        Public Enum CountryCodeEnum
            AD
            AE
            AF
            AG
            AI
            AL
            AM
            AO
            AQ
            AR
            AS
            AT
            AU
            AW
            AX
            AZ
            BA
            BB
            BD
            BE
            BF
            BG
            BH
            BI
            BJ
            BL
            BM
            BN
            BO
            BQ
            BR
            BS
            BT
            BV
            BW
            BY
            BZ
            CA
            CC
            CD
            CF
            CG
            CH
            CI
            CK
            CL
            CM
            CN
            CO
            CR
            CU
            CV
            CW
            CX
            CY
            CZ
            DE
            DJ
            DK
            DM
            DO
            DZ
            EC
            EE
            EG
            EH
            ER
            ES
            ET
            FI
            FJ
            FK
            FM
            FO
            FR
            GA
            GB
            GD
            GE
            GF
            GG
            GH
            GI
            GL
            GM
            GN
            GP
            GQ
            GR
            GS
            GT
            GU
            GW
            GY
            HK
            HM
            HN
            HR
            HT
            HU
            ID
            IE
            IL
            IM
            IN
            IO
            IQ
            IR
            IS
            IT
            JE
            JM
            JO
            JP
            KE
            KG
            KH
            KI
            KM
            KN
            KP
            KR
            KW
            KY
            KZ
            LA
            LB
            LC
            LI
            LK
            LR
            LS
            LT
            LU
            LV
            LY
            MA
            MC
            MD
            ME
            MF
            MG
            MH
            MK
            ML
            MM
            MN
            MO
            MP
            MQ
            MR
            MS
            MT
            MU
            MV
            MW
            MX
            MY
            MZ
            NA
            NC
            NE
            NF
            NG
            NI
            NL
            NO
            NP
            NR
            NU
            NZ
            OM
            PA
            PE
            PF
            PG
            PH
            PK
            PL
            PM
            PN
            PR
            PS
            PT
            PW
            PY
            QA
            RE
            RO
            RS
            RU
            RW
            SA
            SB
            SC
            SD
            SE
            SG
            SH
            SI
            SJ
            SK
            SL
            SM
            SN
            SO
            SR
            SS
            ST
            SV
            SX
            SY
            SZ
            TC
            TD
            TF
            TG
            TH
            TJ
            TK
            TL
            TM
            TN
            TO
            TR
            TT
            TV
            TW
            TZ
            UA
            UG
            UM
            US
            UY
            UZ
            VA
            VC
            VE
            VG
            VI
            VN
            VU
            WF
            WS
            YE
            YT
            ZA
            ZM
            ZW
        End Enum
    End Namespace

    Namespace BokaMera.VossIntegration.ApiTools.Model

        <DataContract(Name:="CustomerContactPersonDto")>
        Public Partial Class CustomerContactPersonDto
            <DataMember(Name:="email", IsRequired:=true)>
            Public Overridable Property Email As String

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

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

            <DataMember(Name:="phoneNumber")>
            Public Overridable Property PhoneNumber As String
        End Class

        <DataContract(Name:="CustomerResult")>
        Public Partial Class CustomerResult
            <DataMember(Name:="countryCode")>
            Public Overridable Property CountryCode As CountryCodeEnum?

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

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

            <DataMember(Name:="customerNumber")>
            Public Overridable Property CustomerNumber As Integer?

            <DataMember(Name:="organizationNumber")>
            Public Overridable Property OrganizationNumber As String

            <DataMember(Name:="email")>
            Public Overridable Property Email As String

            <DataMember(Name:="careOf")>
            Public Overridable Property CareOf As String

            <DataMember(Name:="address")>
            Public Overridable Property Address As String

            <DataMember(Name:="postalCode")>
            Public Overridable Property PostalCode As String

            <DataMember(Name:="city")>
            Public Overridable Property City As String

            <DataMember(Name:="electronicInvoiceOperatorCode")>
            Public Overridable Property ElectronicInvoiceOperatorCode As String

            <DataMember(Name:="electronicInvoiceAddress")>
            Public Overridable Property ElectronicInvoiceAddress As String

            <DataMember(Name:="customerGroup")>
            Public Overridable Property CustomerGroup As Integer?

            <DataMember(Name:="contactPerson")>
            Public Overridable Property ContactPerson As CustomerContactPersonDto

            <DataMember(Name:="targetGroups", EmitDefaultValue:=false)>
            Public Overridable Property TargetGroups As List(Of CustomerTargetGroupDto) = New List(Of CustomerTargetGroupDto)

            <DataMember(Name:="expiryDate")>
            Public Overridable Property ExpiryDate As Date?

            <DataMember(Name:="created", IsRequired:=true)>
            Public Overridable Property Created As Date

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

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

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

            <DataMember(Name:="isDefault")>
            Public Overridable Property IsDefault As Boolean

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

VB.NET SearchVossCustomers 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/customers HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SearchVossCustomersResponse 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:CustomerResult i:nil="true" />
  </Items>
  <TotalCount>0</TotalCount>
</SearchVossCustomersResponse>