> For the complete documentation index, see [llms.txt](https://mipos.gitbook.io/public-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mipos.gitbook.io/public-api/store-management/create-store.md).

# Create store

## Create store

<mark style="color:green;">`POST`</mark> `https://integrations.mipos.shop/api/v1/store`

Create a store within the platform

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Content-Type  | string | application/json       |
| Authorization | string | Bearer {access\_token} |

#### Request Body

| Name          | Type   | Description                             |
| ------------- | ------ | --------------------------------------- |
| direction     | string | Store location in the country           |
| latitude      | string | Latitude coordinate                     |
| longitude     | string | Longitude coordinate                    |
| name          | string | Name of the store                       |
| country\_code | string | Country code where the store is located |

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

```javascript
{
    "message": "Store created.",
    "data": {
        "id": 1,
        "name": "Test Store",
        "country": "México",
        "direction": "D.F.",
        "location_point": {
            "type": "Point",
            "coordinates": [
                -73.98615270853043,
                40.74894149554006
            ]
        }
    }
}
```

{% endtab %}

{% tab title="401 " %}

```
"Unauthorized."
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
    "message": [
        "This name is not available.",
        "User not found."
    ],
    "data": null
}
```

{% endtab %}

{% tab title="422 " %}

```javascript
{
    "name": [
        "The name field is required."
    ],
    "country_code": [
        "The country code field is required.",
        "The selected country code is invalid."
    ],
    "direction": [
        "The direction must be a string."
    ],
    "latitude": [
        "The latitude format is invalid."
    ],
    "longitude": [
        "The longitude format is invalid."
    ]
}
```

{% endtab %}
{% endtabs %}


---

# 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:

```
GET https://mipos.gitbook.io/public-api/store-management/create-store.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.
