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 Foundation
import ServiceStack

// @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 class ResourceTypeAvailableResourcesQuery : ICompany, Codable
{
    /**
    * 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 var companyId:String?

    /**
    * Enter the id for the booking.
    */
    // @ApiMember(Description="Enter the id for the booking.", IsRequired=true, ParameterType="path")
    public var id:Int

    /**
    * Enter the id for a resourcetype.
    */
    // @ApiMember(Description="Enter the id for a resourcetype.", IsRequired=true)
    public var resourceTypeId:Int

    required public init(){}
}

public class ResourceTypeAvailableResourcesQueryResponse : Codable
{
    /**
    * The resourcetype id
    */
    // @ApiMember(Description="The resourcetype id")
    public var id:Int

    /**
    * The available resources
    */
    // @ApiMember(Description="The available resources")
    public var resources:[AvailableResourceResponse] = []

    required public init(){}
}

public class AvailableResourceResponse : Codable
{
    /**
    * The resource id
    */
    // @ApiMember(Description="The resource id")
    public var id:Int

    /**
    * The resource name
    */
    // @ApiMember(Description="The resource name")
    public var name:String

    /**
    * The resource description
    */
    // @ApiMember(Description="The resource description")
    public var Description:String

    /**
    * 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 var color:String

    /**
    * The image url of the resource
    */
    // @ApiMember(Description="The image url of the resource")
    public var imageUrl:Uri

    required public init(){}
}


Swift ResourceTypeAvailableResourcesQuery 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.

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

<ResourceTypeAvailableResourcesQueryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
  <Id>0</Id>
  <Resources>
    <AvailableResourceResponse>
      <Color>String</Color>
      <Description>String</Description>
      <Id>0</Id>
      <ImageUrl i:nil="true" />
      <Name>String</Name>
    </AvailableResourceResponse>
  </Resources>
</ResourceTypeAvailableResourcesQueryResponse>