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.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;

namespace BokaMera.API.ServiceModel.Dtos
{
    public partial class AvailableResourceResponse
    {
        ///<summary>
        ///The resource id
        ///</summary>
        [ApiMember(Description="The resource id")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The resource name
        ///</summary>
        [ApiMember(Description="The resource name")]
        public virtual string Name { get; set; }

        ///<summary>
        ///The resource description
        ///</summary>
        [ApiMember(Description="The resource description")]
        public virtual string Description { get; set; }

        ///<summary>
        ///The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue.
        ///</summary>
        [ApiMember(Description="The resource color in scheduler in hexadecimal color code. Example: #00b0f0 for blue.")]
        public virtual string Color { get; set; }

        ///<summary>
        ///The image url of the resource
        ///</summary>
        [ApiMember(Description="The image url of the resource")]
        public virtual Uri ImageUrl { get; set; }
    }

    [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("IsAuthenticated")]
    public partial class ResourceTypeAvailableResourcesQuery
        : ICompany
    {
        ///<summary>
        ///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 
        ///</summary>
        [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 virtual Guid? CompanyId { get; set; }

        ///<summary>
        ///Enter the id for the booking.
        ///</summary>
        [ApiMember(Description="Enter the id for the booking.", IsRequired=true, ParameterType="path")]
        public virtual int Id { get; set; }

        ///<summary>
        ///Enter the id for a resourcetype.
        ///</summary>
        [ApiMember(Description="Enter the id for a resourcetype.", IsRequired=true)]
        public virtual int ResourceTypeId { get; set; }
    }

    public partial class ResourceTypeAvailableResourcesQueryResponse
    {
        public ResourceTypeAvailableResourcesQueryResponse()
        {
            Resources = new List<AvailableResourceResponse>{};
        }

        ///<summary>
        ///The resourcetype id
        ///</summary>
        [ApiMember(Description="The resourcetype id")]
        public virtual int Id { get; set; }

        ///<summary>
        ///The available resources
        ///</summary>
        [ApiMember(Description="The available resources")]
        public virtual List<AvailableResourceResponse> Resources { get; set; }
    }

}

C# ResourceTypeAvailableResourcesQuery DTOs

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

HTTP + CSV

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: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

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