| 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.*;
public class dtos
{
@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
public static class SearchVossCustomers
{
/**
* Organization number to search for.
*/
@ApiMember(Description="Organization number to search for.")
public String OrganizationNumber = null;
/**
* Voss customer number to search for.
*/
@ApiMember(Description="Voss customer number to search for.")
public Integer CustomerNumber = null;
/**
* External id to search for.
*/
@ApiMember(Description="External id to search for.")
public String ExternalId = null;
public String getOrganizationNumber() { return OrganizationNumber; }
public SearchVossCustomers setOrganizationNumber(String value) { this.OrganizationNumber = value; return this; }
public Integer getCustomerNumber() { return CustomerNumber; }
public SearchVossCustomers setCustomerNumber(Integer value) { this.CustomerNumber = value; return this; }
public String getExternalId() { return ExternalId; }
public SearchVossCustomers setExternalId(String value) { this.ExternalId = value; return this; }
}
public static class SearchVossCustomersResponse
{
public Integer TotalCount = null;
public ArrayList<CustomerResult> Items = new ArrayList<CustomerResult>();
public Integer getTotalCount() { return TotalCount; }
public SearchVossCustomersResponse setTotalCount(Integer value) { this.TotalCount = value; return this; }
public ArrayList<CustomerResult> getItems() { return Items; }
public SearchVossCustomersResponse setItems(ArrayList<CustomerResult> value) { this.Items = value; return this; }
}
@DataContract(Name="CustomerResult")
public static class CustomerResult
{
@DataMember(Name="countryCode")
@SerializedName("countryCode")
public CountryCodeEnum CountryCode = null;
@DataMember(Name="id", IsRequired=true)
@SerializedName("id")
public UUID Id = null;
@DataMember(Name="name", IsRequired=true)
@SerializedName("name")
public String Name = null;
@DataMember(Name="customerNumber")
@SerializedName("customerNumber")
public Integer CustomerNumber = null;
@DataMember(Name="organizationNumber")
@SerializedName("organizationNumber")
public String OrganizationNumber = null;
@DataMember(Name="email")
@SerializedName("email")
public String Email = null;
@DataMember(Name="careOf")
@SerializedName("careOf")
public String CareOf = null;
@DataMember(Name="address")
@SerializedName("address")
public String Address = null;
@DataMember(Name="postalCode")
@SerializedName("postalCode")
public String PostalCode = null;
@DataMember(Name="city")
@SerializedName("city")
public String City = null;
@DataMember(Name="electronicInvoiceOperatorCode")
@SerializedName("electronicInvoiceOperatorCode")
public String ElectronicInvoiceOperatorCode = null;
@DataMember(Name="electronicInvoiceAddress")
@SerializedName("electronicInvoiceAddress")
public String ElectronicInvoiceAddress = null;
@DataMember(Name="customerGroup")
@SerializedName("customerGroup")
public Integer CustomerGroup = null;
@DataMember(Name="contactPerson")
@SerializedName("contactPerson")
public CustomerContactPersonDto ContactPerson = null;
@DataMember(Name="targetGroups", EmitDefaultValue=false)
@SerializedName("targetGroups")
public ArrayList<CustomerTargetGroupDto> TargetGroups = new ArrayList<CustomerTargetGroupDto>();
@DataMember(Name="expiryDate")
@SerializedName("expiryDate")
public Date ExpiryDate = null;
@DataMember(Name="created", IsRequired=true)
@SerializedName("created")
public Date Created = null;
@DataMember(Name="externalId")
@SerializedName("externalId")
public String ExternalId = null;
public CountryCodeEnum getCountryCode() { return CountryCode; }
public CustomerResult setCountryCode(CountryCodeEnum value) { this.CountryCode = value; return this; }
public UUID getId() { return Id; }
public CustomerResult setId(UUID value) { this.Id = value; return this; }
public String getName() { return Name; }
public CustomerResult setName(String value) { this.Name = value; return this; }
public Integer getCustomerNumber() { return CustomerNumber; }
public CustomerResult setCustomerNumber(Integer value) { this.CustomerNumber = value; return this; }
public String getOrganizationNumber() { return OrganizationNumber; }
public CustomerResult setOrganizationNumber(String value) { this.OrganizationNumber = value; return this; }
public String getEmail() { return Email; }
public CustomerResult setEmail(String value) { this.Email = value; return this; }
public String getCareOf() { return CareOf; }
public CustomerResult setCareOf(String value) { this.CareOf = value; return this; }
public String getAddress() { return Address; }
public CustomerResult setAddress(String value) { this.Address = value; return this; }
public String getPostalCode() { return PostalCode; }
public CustomerResult setPostalCode(String value) { this.PostalCode = value; return this; }
public String getCity() { return City; }
public CustomerResult setCity(String value) { this.City = value; return this; }
public String getElectronicInvoiceOperatorCode() { return ElectronicInvoiceOperatorCode; }
public CustomerResult setElectronicInvoiceOperatorCode(String value) { this.ElectronicInvoiceOperatorCode = value; return this; }
public String getElectronicInvoiceAddress() { return ElectronicInvoiceAddress; }
public CustomerResult setElectronicInvoiceAddress(String value) { this.ElectronicInvoiceAddress = value; return this; }
public Integer getCustomerGroup() { return CustomerGroup; }
public CustomerResult setCustomerGroup(Integer value) { this.CustomerGroup = value; return this; }
public CustomerContactPersonDto getContactPerson() { return ContactPerson; }
public CustomerResult setContactPerson(CustomerContactPersonDto value) { this.ContactPerson = value; return this; }
public ArrayList<CustomerTargetGroupDto> getTargetGroups() { return TargetGroups; }
public CustomerResult setTargetGroups(ArrayList<CustomerTargetGroupDto> value) { this.TargetGroups = value; return this; }
public Date getExpiryDate() { return ExpiryDate; }
public CustomerResult setExpiryDate(Date value) { this.ExpiryDate = value; return this; }
public Date getCreated() { return Created; }
public CustomerResult setCreated(Date value) { this.Created = value; return this; }
public String getExternalId() { return ExternalId; }
public CustomerResult setExternalId(String value) { this.ExternalId = value; return this; }
}
public static 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;
}
@DataContract(Name="CustomerContactPersonDto")
public static class CustomerContactPersonDto
{
@DataMember(Name="email", IsRequired=true)
@SerializedName("email")
public String Email = null;
@DataMember(Name="firstName", IsRequired=true)
@SerializedName("firstName")
public String FirstName = null;
@DataMember(Name="lastName", IsRequired=true)
@SerializedName("lastName")
public String LastName = null;
@DataMember(Name="phoneNumber")
@SerializedName("phoneNumber")
public String PhoneNumber = null;
public String getEmail() { return Email; }
public CustomerContactPersonDto setEmail(String value) { this.Email = value; return this; }
public String getFirstName() { return FirstName; }
public CustomerContactPersonDto setFirstName(String value) { this.FirstName = value; return this; }
public String getLastName() { return LastName; }
public CustomerContactPersonDto setLastName(String value) { this.LastName = value; return this; }
public String getPhoneNumber() { return PhoneNumber; }
public CustomerContactPersonDto setPhoneNumber(String value) { this.PhoneNumber = value; return this; }
}
@DataContract(Name="CustomerTargetGroupDto")
public static class CustomerTargetGroupDto
{
@DataMember(Name="id", IsRequired=true)
@SerializedName("id")
public UUID Id = null;
@DataMember(Name="name", IsRequired=true)
@SerializedName("name")
public String Name = null;
@DataMember(Name="isDefault")
@SerializedName("isDefault")
public Boolean IsDefault = null;
@DataMember(Name="externalId")
@SerializedName("externalId")
public String ExternalId = null;
public UUID getId() { return Id; }
public CustomerTargetGroupDto setId(UUID value) { this.Id = value; return this; }
public String getName() { return Name; }
public CustomerTargetGroupDto setName(String value) { this.Name = value; return this; }
public Boolean getIsDefault() { return IsDefault; }
public CustomerTargetGroupDto setIsDefault(Boolean value) { this.IsDefault = value; return this; }
public String getExternalId() { return ExternalId; }
public CustomerTargetGroupDto setExternalId(String value) { this.ExternalId = value; return this; }
}
}
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:
[
{
}
]
}