---
title: "Get merchant reservations"
method: GET
path: "/v1/merchants/{merchantId}/reservations"
tags: ["merchants"]
---

# Get merchant reservations

`GET /v1/merchants/{merchantId}/reservations`

This endpoint allows an agent to get reservations of a merchant. The results will be filtered by agent id. 
Reservation IDs in response are agent-specific. The agent needs to be authenticated.

The endpoint will return `HTTP 404 - Not Found` if the merchant with the specified id could not be found.
It will return `HTTP 403 - Forbidden` if the agent is not authenticated or the agent doesn't have permissions.

####Request:
* **merchantId**: ID of the merchant
* **offset**: sets the starting element to be returned. Defaults to 0 when unset or malformed.
* **limit**: maximum number of results to be returned. Value must be between 1 and 100. Defaults to 100 when unset, malformed or outside bounds.
* **earliest**: earliest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss
* **latest**: latest date time of time window in UTC. Format: yyyy-MM-dd HH:mm:ss


####Response:
The response will be a _list_ of reservations. Each reservation has the fields explained below:
* **id**: The public id of the reservation
* **number**: Quandoo internal identifier of the reservation.
* **quandooId**: The public id of this reservation on quandoo system.
* **status**: The status of the reservation eg. CREATED, CONFIRMED, CUSTOMER CANCELED etc.
* **startTime**: The start time of the reservation. Format: `yyyy-MM-ddTHH:mm:ssZ`
* **endTime**: The end time of the reservation. Format: `yyyy-MM-ddTHH:mm:ssZ`
* **capacity**: The capacity (people count) of the reservation
* **merchantId**: The ID of the merchant at which this reservation was made.
* **customerId**: The public ID of the customer to which this reservation belongs
* **promoCode**: The promotion code associated with this reservation. Optional.
* **extraInfo**: extra information that the customer provided for the reservation. Optional.
* **links**: Related links that can be followed based on this response.
* **createdAt**: The date the reservation was created. Format: `yyyy-MM-ddTHH:mm:ssZ`
* **updatedAt**: The date the reservation was last updated. Format: `yyyy-MM-ddTHH:mm:ssZ`

Example curl:
```
curl https://{host}/v{X}/merchants/32489/reservations
```

Example response: 
```
{
  "reservations": [
    {
      "id": "07f53b36-3f48-11e5-a151-feff819cdc9f",
      "number": 8734957,
      "quandooId": "07f53b36-3f48-11e5-a151-feff819cdc9f",
      "status": "CREATED",
      "startTime": "2015-06-22T12:00:00+00:00",
      "endTime": "2015-06-22T13:00:00+00:00",
      "capacity": 4,
      "merchantId": 1384,
      "customerId": "ce0706ff-a95d-4229-a220-d21dcd175342",
      "promocode": "SOME_CAMPAIGN_CODE",
      "extraInfo": "request for baby chair",
      "links": [
        {
          "href": "https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f",
          "method": "GET",
          "rel": "self"
        },
        {
          "href": "https://{host}/v{X}/reservations/07f53b36-3f48-11e5-a151-feff819cdc9f",
          "method": "PATCH",
          "rel": "update"
        }
      ],
      "createdAt": "2015-06-01T15:21:54Z",
      "updatedAt": "2015-06-01T18:45:30Z"
    },
    {
      "id": "d8f53b36-3f48-11e5-a151-feff819cdc7a",
      "number": 8734958,
      "quandooId": "d8f53b36-3f48-11e5-a151-feff819cdc7a",
      "status": "CONFIRMED",
      "startTime": "2015-06-22T12:00:00+00:00",
      "endTime": "2015-06-22T13:00:00+00:00",
      "capacity": 3,
      "merchantId": 1384,
      "customerId": "ce0706ff-a95d-4229-a220-d21dcd175342",
      "promocode": "SOME_CAMPAIGN_CODE",
      "links": [
        {
          "href": "https://{host}/v{X}/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a",
          "method": "GET",
          "rel": "self"
        },
        {
          "href": "https://{host}/v{X}/reservations/d8f53b36-3f48-11e5-a151-feff819cdc7a",
          "method": "PATCH",
          "rel": "update"
        }
      ],
      "createdAt": "2015-06-01T15:21:54Z",
      "updatedAt": "2015-06-01T18:45:30Z"
    }
  ],
  offset:0,
  limit:100
}
```

## Path parameters

- `merchantId` integer, required

## Query parameters

- `offset` integer
- `limit` integer
- `earliest` string, date-time
- `latest` string, date-time

## Response `200`

OK

## Other responses

- `400` — Bad request
- `403` — Access denied
- `404` — Merchant not found error
- `500` — Internal server error

---

[API](https://skmtc.net/quandoo/apis/quandooapidocumentation.md) · [All operations](https://skmtc.net/quandoo/apis/quandooapidocumentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quandoo/quandooapidocumentation/revisions/6863a5956792/schema)
