| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| GET | /voss/customers | Search voss customers by organization number, customer number or external id | Raw passthrough to the Voss customer search. Returns all matching customers with their full fields (externalId, customerNumber, expiryDate, ...). |
|---|
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*
import com.google.gson.annotations.*
import com.google.gson.reflect.*
@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
open class SearchVossCustomers
{
/**
* Organization number to search for.
*/
@ApiMember(Description="Organization number to search for.")
open var OrganizationNumber:String? = null
/**
* Voss customer number to search for.
*/
@ApiMember(Description="Voss customer number to search for.")
open var CustomerNumber:Int? = null
/**
* External id to search for.
*/
@ApiMember(Description="External id to search for.")
open var ExternalId:String? = null
}
open class SearchVossCustomersResponse
{
open var TotalCount:Int? = null
open var Items:ArrayList<CustomerResult> = ArrayList<CustomerResult>()
}
@DataContract(Name="CustomerResult")
open class CustomerResult
{
@DataMember(Name="countryCode")
@SerializedName("countryCode")
open var CountryCode:CountryCodeEnum? = null
@DataMember(Name="id", IsRequired=true)
@SerializedName("id")
open var Id:UUID? = null
@DataMember(Name="name", IsRequired=true)
@SerializedName("name")
open var Name:String? = null
@DataMember(Name="customerNumber")
@SerializedName("customerNumber")
open var CustomerNumber:Int? = null
@DataMember(Name="organizationNumber")
@SerializedName("organizationNumber")
open var OrganizationNumber:String? = null
@DataMember(Name="email")
@SerializedName("email")
open var Email:String? = null
@DataMember(Name="careOf")
@SerializedName("careOf")
open var CareOf:String? = null
@DataMember(Name="address")
@SerializedName("address")
open var Address:String? = null
@DataMember(Name="postalCode")
@SerializedName("postalCode")
open var PostalCode:String? = null
@DataMember(Name="city")
@SerializedName("city")
open var City:String? = null
@DataMember(Name="electronicInvoiceOperatorCode")
@SerializedName("electronicInvoiceOperatorCode")
open var ElectronicInvoiceOperatorCode:String? = null
@DataMember(Name="electronicInvoiceAddress")
@SerializedName("electronicInvoiceAddress")
open var ElectronicInvoiceAddress:String? = null
@DataMember(Name="customerGroup")
@SerializedName("customerGroup")
open var CustomerGroup:Int? = null
@DataMember(Name="contactPerson")
@SerializedName("contactPerson")
open var ContactPerson:CustomerContactPersonDto? = null
@DataMember(Name="targetGroups", EmitDefaultValue=false)
@SerializedName("targetGroups")
open var TargetGroups:ArrayList<CustomerTargetGroupDto> = ArrayList<CustomerTargetGroupDto>()
@DataMember(Name="expiryDate")
@SerializedName("expiryDate")
open var ExpiryDate:Date? = null
@DataMember(Name="created", IsRequired=true)
@SerializedName("created")
open var Created:Date? = null
@DataMember(Name="externalId")
@SerializedName("externalId")
open var ExternalId:String? = null
}
enum class 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,
}
@DataContract(Name="CustomerContactPersonDto")
open class CustomerContactPersonDto
{
@DataMember(Name="email", IsRequired=true)
@SerializedName("email")
open var Email:String? = null
@DataMember(Name="firstName", IsRequired=true)
@SerializedName("firstName")
open var FirstName:String? = null
@DataMember(Name="lastName", IsRequired=true)
@SerializedName("lastName")
open var LastName:String? = null
@DataMember(Name="phoneNumber")
@SerializedName("phoneNumber")
open var PhoneNumber:String? = null
}
@DataContract(Name="CustomerTargetGroupDto")
open class CustomerTargetGroupDto
{
@DataMember(Name="id", IsRequired=true)
@SerializedName("id")
open var Id:UUID? = null
@DataMember(Name="name", IsRequired=true)
@SerializedName("name")
open var Name:String? = null
@DataMember(Name="isDefault")
@SerializedName("isDefault")
open var IsDefault:Boolean? = null
@DataMember(Name="externalId")
@SerializedName("externalId")
open var ExternalId:String? = null
}
Kotlin SearchVossCustomers DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
TotalCount: 0,
Items:
[
{
}
]
}