BokaMera.API.Host

<back to all web services

CreateBookingUserQueue

The following routes are available for this service:
POST/bookinguserqueueJoin user to the booking queue
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class CreateBookingUserQueue
    {
        public UUID CompanyId = null;
        public UUID CustomerId = null;
        public CustomerToHandle Customer = null;
        public Integer ServiceId = null;
        public Date From = null;
        public Date To = null;
        public ArrayList<QuantityToBook> Quantities = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public CreateBookingUserQueue setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public UUID getCustomerId() { return CustomerId; }
        public CreateBookingUserQueue setCustomerId(UUID value) { this.CustomerId = value; return this; }
        public CustomerToHandle getCustomer() { return Customer; }
        public CreateBookingUserQueue setCustomer(CustomerToHandle value) { this.Customer = value; return this; }
        public Integer getServiceId() { return ServiceId; }
        public CreateBookingUserQueue setServiceId(Integer value) { this.ServiceId = value; return this; }
        public Date getFrom() { return From; }
        public CreateBookingUserQueue setFrom(Date value) { this.From = value; return this; }
        public Date getTo() { return To; }
        public CreateBookingUserQueue setTo(Date value) { this.To = value; return this; }
        public ArrayList<QuantityToBook> getQuantities() { return Quantities; }
        public CreateBookingUserQueue setQuantities(ArrayList<QuantityToBook> value) { this.Quantities = value; return this; }
    }

    public static class CustomerToHandle
    {
        public UUID CustomerId = null;
        public String Firstname = null;
        public String Lastname = null;
        public String Email = null;
        public String Phone = null;
        public Boolean SubscribedToNewsletter = null;
        
        public UUID getCustomerId() { return CustomerId; }
        public CustomerToHandle setCustomerId(UUID value) { this.CustomerId = value; return this; }
        public String getFirstname() { return Firstname; }
        public CustomerToHandle setFirstname(String value) { this.Firstname = value; return this; }
        public String getLastname() { return Lastname; }
        public CustomerToHandle setLastname(String value) { this.Lastname = value; return this; }
        public String getEmail() { return Email; }
        public CustomerToHandle setEmail(String value) { this.Email = value; return this; }
        public String getPhone() { return Phone; }
        public CustomerToHandle setPhone(String value) { this.Phone = value; return this; }
        public Boolean isSubscribedToNewsletter() { return SubscribedToNewsletter; }
        public CustomerToHandle setSubscribedToNewsletter(Boolean value) { this.SubscribedToNewsletter = value; return this; }
    }

    public static class QuantityToBook
    {
        /**
        * If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book)
        */
        @ApiMember(Description="If service has a price, enter the price id for that price. If no price exists for the service set 0 as PriceId. If you put 0 and a price exists, it will use that price (only works if just one price exists for the current selected date to book)", IsRequired=true)
        public Integer PriceId = null;

        /**
        * Set the number of spots or resources you want to book on the specific price category
        */
        @ApiMember(Description="Set the number of spots or resources you want to book on the specific price category", IsRequired=true)
        public Integer Quantity = null;

        /**
        * If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.
        */
        @ApiMember(Description="If the quantity you add should occupy a spot. Default is true. If no it will only be a row that includes price information.")
        public Boolean OccupiesSpot = null;
        
        public Integer getPriceId() { return PriceId; }
        public QuantityToBook setPriceId(Integer value) { this.PriceId = value; return this; }
        public Integer getQuantity() { return Quantity; }
        public QuantityToBook setQuantity(Integer value) { this.Quantity = value; return this; }
        public Boolean isOccupiesSpot() { return OccupiesSpot; }
        public QuantityToBook setOccupiesSpot(Boolean value) { this.OccupiesSpot = value; return this; }
    }

    public static class BookingUserQueueItemResponse
    {
        public Integer BookingUserQueueId = null;
        public UUID CompanyId = null;
        public UUID CustomerId = null;
        public Integer ServiceId = null;
        public Date From = null;
        public Date To = null;
        public Integer StatusCode = null;
        public String StatusName = null;
        public Date SendConfirmationTime = null;
        public ArrayList<BookingUserQueuePriceResponse> Quantities = null;
        public ServiceInfoResponse Service = null;
        public CompanyInfoResponse Company = null;
        
        public Integer getBookingUserQueueId() { return BookingUserQueueId; }
        public BookingUserQueueItemResponse setBookingUserQueueId(Integer value) { this.BookingUserQueueId = value; return this; }
        public UUID getCompanyId() { return CompanyId; }
        public BookingUserQueueItemResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public UUID getCustomerId() { return CustomerId; }
        public BookingUserQueueItemResponse setCustomerId(UUID value) { this.CustomerId = value; return this; }
        public Integer getServiceId() { return ServiceId; }
        public BookingUserQueueItemResponse setServiceId(Integer value) { this.ServiceId = value; return this; }
        public Date getFrom() { return From; }
        public BookingUserQueueItemResponse setFrom(Date value) { this.From = value; return this; }
        public Date getTo() { return To; }
        public BookingUserQueueItemResponse setTo(Date value) { this.To = value; return this; }
        public Integer getStatusCode() { return StatusCode; }
        public BookingUserQueueItemResponse setStatusCode(Integer value) { this.StatusCode = value; return this; }
        public String getStatusName() { return StatusName; }
        public BookingUserQueueItemResponse setStatusName(String value) { this.StatusName = value; return this; }
        public Date getSendConfirmationTime() { return SendConfirmationTime; }
        public BookingUserQueueItemResponse setSendConfirmationTime(Date value) { this.SendConfirmationTime = value; return this; }
        public ArrayList<BookingUserQueuePriceResponse> getQuantities() { return Quantities; }
        public BookingUserQueueItemResponse setQuantities(ArrayList<BookingUserQueuePriceResponse> value) { this.Quantities = value; return this; }
        public ServiceInfoResponse getService() { return Service; }
        public BookingUserQueueItemResponse setService(ServiceInfoResponse value) { this.Service = value; return this; }
        public CompanyInfoResponse getCompany() { return Company; }
        public BookingUserQueueItemResponse setCompany(CompanyInfoResponse value) { this.Company = value; return this; }
    }

    public static class BookingUserQueuePriceResponse
    {
        public UUID CompanyId = null;
        public Integer Id = null;
        public Integer BookingUserQueueId = null;
        public Integer ServicePriceId = null;
        public Integer Quantity = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public BookingUserQueuePriceResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getId() { return Id; }
        public BookingUserQueuePriceResponse setId(Integer value) { this.Id = value; return this; }
        public Integer getBookingUserQueueId() { return BookingUserQueueId; }
        public BookingUserQueuePriceResponse setBookingUserQueueId(Integer value) { this.BookingUserQueueId = value; return this; }
        public Integer getServicePriceId() { return ServicePriceId; }
        public BookingUserQueuePriceResponse setServicePriceId(Integer value) { this.ServicePriceId = value; return this; }
        public Integer getQuantity() { return Quantity; }
        public BookingUserQueuePriceResponse setQuantity(Integer value) { this.Quantity = value; return this; }
    }

    public static class ServiceInfoResponse
    {
        public Integer Id = null;
        public String Name = null;
        public String Description = null;
        public Uri ImageUrl = null;
        public Integer LengthInMinutes = null;
        public Integer MaxNumberOfSpotsPerBooking = null;
        public Integer MinNumberOfSpotsPerBooking = null;
        public GroupBookingSettings GroupBooking = null;
        public MultipleResourceSettings MultipleResource = null;
        public Boolean IsGroupBooking = null;
        public Boolean IsPaymentEnabled = null;
        
        public Integer getId() { return Id; }
        public ServiceInfoResponse setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public ServiceInfoResponse setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public ServiceInfoResponse setDescription(String value) { this.Description = value; return this; }
        public Uri getImageUrl() { return ImageUrl; }
        public ServiceInfoResponse setImageUrl(Uri value) { this.ImageUrl = value; return this; }
        public Integer getLengthInMinutes() { return LengthInMinutes; }
        public ServiceInfoResponse setLengthInMinutes(Integer value) { this.LengthInMinutes = value; return this; }
        public Integer getMaxNumberOfSpotsPerBooking() { return MaxNumberOfSpotsPerBooking; }
        public ServiceInfoResponse setMaxNumberOfSpotsPerBooking(Integer value) { this.MaxNumberOfSpotsPerBooking = value; return this; }
        public Integer getMinNumberOfSpotsPerBooking() { return MinNumberOfSpotsPerBooking; }
        public ServiceInfoResponse setMinNumberOfSpotsPerBooking(Integer value) { this.MinNumberOfSpotsPerBooking = value; return this; }
        public GroupBookingSettings getGroupBooking() { return GroupBooking; }
        public ServiceInfoResponse setGroupBooking(GroupBookingSettings value) { this.GroupBooking = value; return this; }
        public MultipleResourceSettings getMultipleResource() { return MultipleResource; }
        public ServiceInfoResponse setMultipleResource(MultipleResourceSettings value) { this.MultipleResource = value; return this; }
        public Boolean getIsGroupBooking() { return IsGroupBooking; }
        public ServiceInfoResponse setIsGroupBooking(Boolean value) { this.IsGroupBooking = value; return this; }
        public Boolean getIsPaymentEnabled() { return IsPaymentEnabled; }
        public ServiceInfoResponse setIsPaymentEnabled(Boolean value) { this.IsPaymentEnabled = value; return this; }
    }

    public static class GroupBookingSettings
    {
        public Boolean Active = null;
        public Integer Min = null;
        public Integer Max = null;
        
        public Boolean isActive() { return Active; }
        public GroupBookingSettings setActive(Boolean value) { this.Active = value; return this; }
        public Integer getMin() { return Min; }
        public GroupBookingSettings setMin(Integer value) { this.Min = value; return this; }
        public Integer getMax() { return Max; }
        public GroupBookingSettings setMax(Integer value) { this.Max = value; return this; }
    }

    public static class MultipleResourceSettings
    {
        public Boolean Active = null;
        public Integer Min = null;
        public Integer Max = null;
        
        public Boolean isActive() { return Active; }
        public MultipleResourceSettings setActive(Boolean value) { this.Active = value; return this; }
        public Integer getMin() { return Min; }
        public MultipleResourceSettings setMin(Integer value) { this.Min = value; return this; }
        public Integer getMax() { return Max; }
        public MultipleResourceSettings setMax(Integer value) { this.Max = value; return this; }
    }

    public static class CompanyInfoResponse
    {
        public UUID Id = null;
        public String Name = null;
        public Uri LogoType = null;
        public String Category = null;
        public String Street1 = null;
        public String Street2 = null;
        public String ZipCode = null;
        public String City = null;
        public String CountryId = null;
        public String Longitude = null;
        public String Latitude = null;
        public String Phone = null;
        public String Email = null;
        public String HomePage = null;
        public String SitePath = null;
        
        public UUID getId() { return Id; }
        public CompanyInfoResponse setId(UUID value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public CompanyInfoResponse setName(String value) { this.Name = value; return this; }
        public Uri getLogoType() { return LogoType; }
        public CompanyInfoResponse setLogoType(Uri value) { this.LogoType = value; return this; }
        public String getCategory() { return Category; }
        public CompanyInfoResponse setCategory(String value) { this.Category = value; return this; }
        public String getStreet1() { return Street1; }
        public CompanyInfoResponse setStreet1(String value) { this.Street1 = value; return this; }
        public String getStreet2() { return Street2; }
        public CompanyInfoResponse setStreet2(String value) { this.Street2 = value; return this; }
        public String getZipCode() { return ZipCode; }
        public CompanyInfoResponse setZipCode(String value) { this.ZipCode = value; return this; }
        public String getCity() { return City; }
        public CompanyInfoResponse setCity(String value) { this.City = value; return this; }
        public String getCountryId() { return CountryId; }
        public CompanyInfoResponse setCountryId(String value) { this.CountryId = value; return this; }
        public String getLongitude() { return Longitude; }
        public CompanyInfoResponse setLongitude(String value) { this.Longitude = value; return this; }
        public String getLatitude() { return Latitude; }
        public CompanyInfoResponse setLatitude(String value) { this.Latitude = value; return this; }
        public String getPhone() { return Phone; }
        public CompanyInfoResponse setPhone(String value) { this.Phone = value; return this; }
        public String getEmail() { return Email; }
        public CompanyInfoResponse setEmail(String value) { this.Email = value; return this; }
        public String getHomePage() { return HomePage; }
        public CompanyInfoResponse setHomePage(String value) { this.HomePage = value; return this; }
        public String getSitePath() { return SitePath; }
        public CompanyInfoResponse setSitePath(String value) { this.SitePath = value; return this; }
    }

}

Java CreateBookingUserQueue 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.

POST /bookinguserqueue HTTP/1.1 
Host: api.bokamera.se 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateBookingUserQueue xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <Customer>
    <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
    <Email>String</Email>
    <Firstname>String</Firstname>
    <Lastname>String</Lastname>
    <Phone>String</Phone>
    <SubscribedToNewsletter>false</SubscribedToNewsletter>
  </Customer>
  <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
  <From>0001-01-01T00:00:00</From>
  <Quantities>
    <QuantityToBook>
      <OccupiesSpot>false</OccupiesSpot>
      <PriceId>0</PriceId>
      <Quantity>0</Quantity>
    </QuantityToBook>
  </Quantities>
  <ServiceId>0</ServiceId>
  <To>0001-01-01T00:00:00</To>
</CreateBookingUserQueue>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<BookingUserQueueItemResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <BookingUserQueueId>0</BookingUserQueueId>
  <Company>
    <Category>String</Category>
    <City>String</City>
    <CountryId>String</CountryId>
    <Email>String</Email>
    <HomePage>String</HomePage>
    <Id>00000000-0000-0000-0000-000000000000</Id>
    <Latitude>String</Latitude>
    <LogoType i:nil="true" />
    <Longitude>String</Longitude>
    <Name>String</Name>
    <Phone>String</Phone>
    <SitePath>String</SitePath>
    <Street1>String</Street1>
    <Street2>String</Street2>
    <ZipCode>String</ZipCode>
  </Company>
  <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
  <CustomerId>00000000-0000-0000-0000-000000000000</CustomerId>
  <From>0001-01-01T00:00:00</From>
  <Quantities>
    <BookingUserQueuePriceResponse>
      <BookingUserQueueId>0</BookingUserQueueId>
      <CompanyId>00000000-0000-0000-0000-000000000000</CompanyId>
      <Id>0</Id>
      <Quantity>0</Quantity>
      <ServicePriceId>0</ServicePriceId>
    </BookingUserQueuePriceResponse>
  </Quantities>
  <SendConfirmationTime>0001-01-01T00:00:00</SendConfirmationTime>
  <Service>
    <Description>String</Description>
    <GroupBooking>
      <Active>false</Active>
      <Max>0</Max>
      <Min>0</Min>
    </GroupBooking>
    <Id>0</Id>
    <ImageUrl i:nil="true" />
    <IsGroupBooking>false</IsGroupBooking>
    <IsPaymentEnabled>false</IsPaymentEnabled>
    <LengthInMinutes>0</LengthInMinutes>
    <MaxNumberOfSpotsPerBooking>0</MaxNumberOfSpotsPerBooking>
    <MinNumberOfSpotsPerBooking>0</MinNumberOfSpotsPerBooking>
    <MultipleResource>
      <Active>false</Active>
      <Max>0</Max>
      <Min>0</Min>
    </MultipleResource>
    <Name>String</Name>
  </Service>
  <ServiceId>0</ServiceId>
  <StatusCode>0</StatusCode>
  <StatusName>String</StatusName>
  <To>0001-01-01T00:00:00</To>
</BookingUserQueueItemResponse>