# Dates

## Get calendar

<mark style="color:green;">`POST`</mark> `https://api.zapiet.com/v1.0/delivery/locations/:locationId/calendar`

This endpoint allows you to get a list of available and unavailable dates for a location.

#### Path Parameters

| Name                                         | Type   | Description             |
| -------------------------------------------- | ------ | ----------------------- |
| locationId<mark style="color:red;">\*</mark> | string | The Zapiet location ID. |

#### Query Parameters

| Name                                   | Type   | Description                             |
| -------------------------------------- | ------ | --------------------------------------- |
| shop<mark style="color:red;">\*</mark> | string | The merchant's myshopify.com store url. |

#### Request Body

| Name         | Type  | Description                   |
| ------------ | ----- | ----------------------------- |
| shoppingCart | array | The customer's shopping cart. |

{% tabs %}
{% tab title="200 " %}

```javascript
{
	"minDateTime": "2021-05-13 10:00:00",
	"minDate": "2021-05-13",
	"maxDate": null,
	"minTime": ["10", "00"],
	"maxTime": ["13", "00"],
	"disabled": [
		[2020, 10, 21],
		[2020, 10, 28]
	],
	"minDateSlots": [{
		"id": 2408,
		"day_of_week": "thursday",
		"available_from": "10:00",
		"available_until": "12:00",
		"limited": true,
		"limit": 10
	}, {
		"id": 402223,
		"day_of_week": "thursday",
		"available_from": "12:00",
		"available_until": "14:00",
		"limited": true,
		"limit": 10
	}, {
		"id": 402224,
		"day_of_week": "thursday",
		"available_from": "13:00",
		"available_until": "14:00",
		"limited": true,
		"limit": 10
	}],
	"datePickerEnabled": true,
	"timePickerEnabled": true,
	"timezone": "America\/New_York"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Request" %}

```javascript
{
    "shoppingCart": [
        {
            "variant_id": 9226255761451,
            "product_id": 852798275627,
            "quantity": 5
        },
        {
            "variant_id": 9226255761452,
            "product_id": 852798275628,
            "quantity": 2
        }
    ]
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
	"minDateTime": "2021-05-13 10:00:00",
	"minDate": "2021-05-13",
	"maxDate": null,
	"minTime": ["10", "00"],
	"maxTime": ["13", "00"],
	"disabled": [
		[2020, 10, 21],
		[2020, 10, 28]
	],
	"minDateSlots": [{
		"id": 2408,
		"day_of_week": "thursday",
		"available_from": "10:00",
		"available_until": "12:00",
		"limited": true,
		"limit": 10
	}, {
		"id": 402223,
		"day_of_week": "thursday",
		"available_from": "12:00",
		"available_until": "14:00",
		"limited": true,
		"limit": 10
	}, {
		"id": 402224,
		"day_of_week": "thursday",
		"available_from": "13:00",
		"available_until": "14:00",
		"limited": true,
		"limit": 10
	}],
	"datePickerEnabled": true,
	"timePickerEnabled": true,
	"timezone": "America\/New_York"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zapiet.com/reference/local-delivery/calendar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
