---
title: "Get merchant availability time slots"
method: GET
path: "/v1/merchants/{merchantId}/availabilities/{date}/times"
tags: ["availabilities"]
---

# Get merchant availability time slots

`GET /v1/merchants/{merchantId}/availabilities/{date}/times`

## Request

- Base URL: `https://public-api.prod.quandoo.com`
- URL: `https://public-api.prod.quandoo.com/v1/merchants/{merchantId}/availabilities/{date}/times`
- Auth: API key in header `X-Quandoo-AuthToken`
- TypeScript: <https://skmtc.dev/quandoo/apis/quandooapidocumentation/docs/v1/merchants/:merchantId/availabilities/:date/times/get.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint returns availability time slots which can be reserved for a given capacity.

####Request parameters:
* **merchantId**: Id of the merchant. Path parameter.
* **date**: Specifies date of the desired reservation. Format: `yyyy-MM-dd`. Path parameter.
* **fromTime**: Beginning of the desired reservation time frame. Format: `HH:mm`. Optional.
* **toTime**: End of the desired reservation time frame. Format: `HH:mm`. Optional.
* **agentId**: Id of the agent making the request
* **capacity**: Specifies the number of people in reservation. Availabilities will be returned based on this capacity. If not provided, the default value is 2.
* **areaId**: Restricts availabilities to a certain area. Optional.
    
####Response:
The response returns availability time slots that could be reserved, along with the areas it is associated with and contains information on how much should be paid if the reservation is cancelled by a client. 

* **timeSlots**: List of available time slots.
  * **areaIds**: List of areas for which this time slot can be reserved.
  * **dateTime**: Date and time of the available slot. Format: `yyyy-MM-dd'T'HH:mm:ssZ`
  * **occupancy**: Occupancy of the available time slot. This is an integer between `0` and `100`.
  * **vaultSettingsId**: ID of the vault setting, if there is any. See: `vaultSettings`
* **vaultSettings**: Credit card vault settings representing the fees to be paid in case of cancellation.
  * **id**: ID of the setting as shown in `timeSlots`.
  * **fee**: Fee to be paid in case of cancellation. Currency is defined by merchant. See reservation-settings.
  * **feeType**: Type of fee to be paid. Can be `PER_PERSON` or `PER_RESERVATION`.
  * **feePercentageForTime**: Fee percentage depending of the time of cancellation. Format: `"{hoursStart}-{hoursEnd}": {percentage}` , where hours are the number of hours before the visit.
* **links**: Related links that can be followed based on this response.

####Example curl:
```
curl https://{host}/v{X}/merchants/15/availabilities/2017-11-09/times?capacity=2&areaId=24&agentId=3&fromTime=10:45&toTime=12:45
```


####Example response:
```
{ 
    "timeSlots": [ 
        { 
            "areaIds": [33532, 33533], 
            "dateTime": "2017-09-27T10:45:00+01:00", 
            "occupancy": 0, 
            "vaultSettingId": "284d701f-f79a-4efa-9859-fd09851dfdce"
        }, 
        ... 
    ], 
    "vaultSettings": [ 
         { 
            "id": "284d701f-f79a-4efa-9859-fd09851dfdce", 
             "fee": "10.00", 
             "feeType": "PER_PERSON", 
             "feePercentageForTime": 
                { 
                  "0-12":100, 
                  "12-24":50, 
                  "24-48":20 
                } 
         } 
     ], 
    "links": [
      {
        "href": "https://{host}/v{X}/merchants/15",
        "method": "GET",
        "rel": "parent"
      },
      {
        "href": "https://{host}/v{X}/merchants/15/reservation-settings",
        "method": "GET",
        "rel": "reservation-settings"
      },
      {
        "href": "https://{host}/v{X}/merchants/reservations",
        "method": "PUT",
        "rel": "create-reservation"
      }
    ]
} 
```

## Path parameters

- `merchantId` integer, required
- `date` string, date, required

## Query parameters

- `agentId` integer, required
- `capacity` integer, required
- `fromTime` string
- `toTime` string
- `areaId` integer

## Response `200`

Merchant availabilities response

- MerchantAvailabilityDtoList
  - `timeSlots` MerchantAvailabilityDto[]: The availability time slots to reserve.
    - `dateTime` string, date-time: The date the review created on. Format: yyyy-MM-ddTHH:mm:ssZ
    - `occupancy` integer, required: The occupancy of this availability option across the restaurant. This is an integer number between 0 and 100.
    - `areaIds` integer[]: The ids of the areas this availability option can be reserved for.
    - `vaultSettingsId` string, uuid: The id of the Vault Settings applicable on this availability option.
  - `vaultSettings` MerchantVaultSettingsDto[]: The credit card vault settings.
    - `id` string, uuid, required: The id of the vault settings.
    - `fee` number, required: The fee customer should pay in the case of cancellation.
    - `feeType` string, required: The type of the fee to pay.
    - `feePercentageForTime` object: Fee percentage depending of the time of cancellation.
  - `links` LinkRelationDto[], required: The links related to this entity.
    - `href` string, url
    - `method` string
    - `rel` 'DETAILS' | 'WIDGET' | 'WIDGET_DETAILS' | 'GET_MERCHANT' | 'PARENT' | 'SELF' | 'SETTINGS' | 'AVAILABILITY_DAYS' | 'AVAILABILITIES' | 'CREATE_RESERVATION' | 'GET_RESERVATION' | 'UPDATE_RESERVATION' | 'GET_CUSTOMER_RESERVATION' | 'GET_REVIEW' | 'PORTAL_PREORDER_FORM' | 'RESERVATION_CHECKOUT_PAGE' | 'CREDIT_CARD_DETAILS_PAGE' | 'CUSTOMER_EDIT_RESERVATION'

## Other responses

- `400`: Bad request
- `404`: Agent type not found error
- `500`: Internal server error

---

[API](https://skmtc.dev/quandoo/apis/quandooapidocumentation.md) - [All operations](https://skmtc.dev/quandoo/apis/quandooapidocumentation/llms.txt) - [OpenAPI document](https://skmtc.dev/quandoo/apis/quandooapidocumentation/revisions/b33054d03af3?raw)
