BokaMera.API.Host

<back to all web services

ResourceTypeAvailableResourcesQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read
The following routes are available for this service:
GET/bookings/{Id}/resources/availableFind available resources.
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
    // @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)
    @ValidateRequest(Validator="IsAuthenticated")
    public static class ResourceTypeAvailableResourcesQuery implements ICompany
    {
        /**
        * Enter the company and id you want to see the information for a resourcetype, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown 
        */
        @ApiMember(Description="Enter the company and id you want to see the information for a resourcetype, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", ParameterType="query")
        public UUID CompanyId = null;

        /**
        * Enter the id for the booking.
        */
        @ApiMember(Description="Enter the id for the booking.", IsRequired=true, ParameterType="path")
        public Integer Id = null;

        /**
        * Enter the id for a resourcetype.
        */
        @ApiMember(Description="Enter the id for a resourcetype.", IsRequired=true)
        public Integer ResourceTypeId = null;
        
        public UUID getCompanyId() { return CompanyId; }
        public ResourceTypeAvailableResourcesQuery setCompanyId(UUID value) { this.CompanyId = value; return this; }
        public Integer getId() { return Id; }
        public ResourceTypeAvailableResourcesQuery setId(Integer value) { this.Id = value; return this; }
        public Integer getResourceTypeId() { return ResourceTypeId; }
        public ResourceTypeAvailableResourcesQuery setResourceTypeId(Integer value) { this.ResourceTypeId = value; return this; }
    }

    public static class ResourceTypeAvailableResourcesQueryResponse
    {
        /**
        * The resourcetype id
        */
        @ApiMember(Description="The resourcetype id")
        public Integer Id = null;

        /**
        * The available resources
        */
        @ApiMember(Description="The available resources")
        public ArrayList<AvailableResourceResponse> Resources = null;
        
        public Integer getId() { return Id; }
        public ResourceTypeAvailableResourcesQueryResponse setId(Integer value) { this.Id = value; return this; }
        public ArrayList<AvailableResourceResponse> getResources() { return Resources; }
        public ResourceTypeAvailableResourcesQueryResponse setResources(ArrayList<AvailableResourceResponse> value) { this.Resources = value; return this; }
    }

    public static class AvailableResourceResponse
    {
        /**
        * The resource id
        */
        @ApiMember(Description="The resource id")
        public Integer Id = null;

        /**
        * The resource name
        */
        @ApiMember(Description="The resource name")
        public String Name = null;

        /**
        * The resource description
        */
        @ApiMember(Description="The resource description")
        public String Description = null;

        /**
        * The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue.
        */
        @ApiMember(Description="The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue.")
        public String Color = null;

        /**
        * The image url of the resource
        */
        @ApiMember(Description="The image url of the resource")
        public Uri ImageUrl = null;
        
        public Integer getId() { return Id; }
        public AvailableResourceResponse setId(Integer value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public AvailableResourceResponse setName(String value) { this.Name = value; return this; }
        public String getDescription() { return Description; }
        public AvailableResourceResponse setDescription(String value) { this.Description = value; return this; }
        public String getColor() { return Color; }
        public AvailableResourceResponse setColor(String value) { this.Color = value; return this; }
        public Uri getImageUrl() { return ImageUrl; }
        public AvailableResourceResponse setImageUrl(Uri value) { this.ImageUrl = value; return this; }
    }

}

Java ResourceTypeAvailableResourcesQuery DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /bookings/{Id}/resources/available HTTP/1.1 
Host: api.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Id":0,"Resources":[{"Id":0,"Name":"String","Description":"String","Color":"String"}]}