> For the complete documentation index, see [llms.txt](https://docs.zapiet.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zapiet.com/reference/store-pickup/pickup-locations.md).

# Locations

## Get pickup locations

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

This endpoint will return an array of eligible pickup locations.

#### Query Parameters

| Name                                   | Type   | Description                                                             |
| -------------------------------------- | ------ | ----------------------------------------------------------------------- |
| page                                   | number | Used for pagination.                                                    |
| limit                                  | number | Number of locations to return in the response. Default 10. Maximum 200. |
| shop<mark style="color:red;">\*</mark> | string | The merchant's myshopify.com store url.                                 |

#### Request Body

| Name           | Type   | Description                                                                                                                                     |
| -------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| geoSearchQuery | string | Returns locations in distance order from the customer. If no value is provided, we will return locations in the order specified within the app. |
| shoppingCart   | string | The contents of the customer's shopping cart. If no value is provided, we will not check inventory levels or product availability.              |

{% tabs %}
{% tab title="200 Locations successfully retrieved." %}

```json
{
	"locations": [{
		"id": 1,
		"external_id": "72950677728",
		"distance": null,
		"company_name": "Zapiet UK",
		"address_line_1": "Buckingham Palace",
		"address_line_2": null,
		"city": "Westminster",
		"postal_code": "SW1A 1AA",
		"region": "London",
		"country": "United Kingdom",
		"latitude": 51.501009,
		"longitude": -0.141588,
		"timezone": "Europe\/London",
		"custom_attribute_1": null,
		"custom_attribute_2": null,
		"custom_attribute_3": null,
		"date_picker_enabled": true,
		"time_picker_enabled": true,
		"opening_hours": {
			"monday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"tuesday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"wednesday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"thursday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"friday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"saturday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"sunday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			}
		},
		"more_information": null,
		"limits_enabled": null
	}],
	"pagination": {
		"total": 1,
		"per_page": 10,
		"current_page": 1,
		"total_pages": 0,
		"last_page": 1,
		"next_page_url": null,
		"prev_page_url": null,
		"from": 1,
		"to": 1
	}
}
```

{% endtab %}
{% endtabs %}

### Pickup available

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

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

{% endtab %}

{% tab title="Response" %}

```javascript
{
	"locations": [{
		"id": 1,
		"distance": null,
		"company_name": "Zapiet UK",
		"address_line_1": "Buckingham Palace",
		"address_line_2": null,
		"city": "Westminster",
		"postal_code": "SW1A 1AA",
		"region": "London",
		"country": "United Kingdom",
		"latitude": 51.501009,
		"longitude": -0.141588,
		"timezone": "Europe\/London",
		"custom_attribute_1": null,
		"custom_attribute_2": null,
		"custom_attribute_3": null,
		"date_picker_enabled": true,
		"time_picker_enabled": true,
		"opening_hours": {
			"monday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"tuesday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"wednesday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"thursday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"friday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"saturday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			},
			"sunday": {
				"opens": "09:00",
				"closes": "18:00",
				"closed": false
			}
		},
		"more_information": null,
		"limits_enabled": null
	}],
	"pagination": {
		"total": 1,
		"per_page": 10,
		"current_page": 1,
		"total_pages": 0,
		"last_page": 1,
		"next_page_url": null,
		"prev_page_url": null,
		"from": 1,
		"to": 1
	}
}
```

{% endtab %}
{% endtabs %}

### Pickup not available

If no pickup locations are found, we will return an empty array.

```javascript
{
	"locations": []
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.zapiet.com/reference/store-pickup/pickup-locations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
