latestSwagger 2.02026-08-172560124.6 KB

6863a5956792

availabilities

Get merchant availability days

This endpoint returns days which a customer can select for his reservation. The response is based on when the merchant is known to be open. It is not guaranteed that they have available times for reservation. The days are returned starting from the first available day up to the merchant-defined limit, but never more than 365 days.

####Request parameters:

  • merchantId: Id of the merchant. Path parameter.
  • agentId: Id of the agent making the request
  • capacity: Specifies the number of people in reservation. Availability days will be returned based on this capacity.

####Response: The response returns availability days that could be selected for reservation.

  • days: List of availability days that could be reserved. Format: yyyy-MM-dd
  • links: Related links that can be followed based on this response.

####Example curl:

curl https://{host}/v{X}/merchants/15/availabilities?agentId=3&capacity=4

####Example response:

{
  "days": [
    "2017-01-01",
    "2017-01-02",
    "2017-01-03",
     ...
  ],
  "links": [
    {
      "href": "https://{host}/v{X}/merchants/15",
      "method": "GET",
      "rel": "parent"
    },
    {
      "href": "https://{host}/v{X}/merchants/15/reservation-settings",
      "method": "GET",
      "rel": "settings"
    },
    {
      "href": "https://{host}/v{X}/merchants/15/availabilities/2017-01-01/times",
      "method": "GET",
      "rel": "availabilities"
    }
  ]
}
get/v1/merchants/{merchantId}/availabilities

Path parameters

merchantIdinteger required

Id of the merchant

Query parameters

agentIdinteger required

Id of the agent

capacityinteger

Number of people

Response

Merchant availabilities response