# Successful order creation

Once the order is received, if it was successfully stored in your system, a response is required through the following endpoint, to report this to the delivery platform.

## Order Accept

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

#### Headers

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

#### Request Body

| Name                | Type   | Description                         |
| ------------------- | ------ | ----------------------------------- |
| delivery\_id        | string | Id delivery in the platform         |
| store\_id           | string | Id store in the platform            |
| order\_external\_id | string | Order external\_id sent in the json |

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

```javascript
{
    "message": [
        "Operation completed successfully"
    ],
    "data": null
}
```

{% endtab %}

{% tab title="401 " %}

```
"Unauthorized."
```

{% endtab %}

{% tab title="409 " %}

```javascript
{
    "message": [
        "User not authenticated.",
        "User not found.",
        "You don't have this store available.",
        "Order not found.",
        "Microservice does not have this integration configured.",
        "Unable to get token.",
        "Error sending the acceptance to the delivery platform."
    ],
    "data": null
}
```

{% endtab %}

{% tab title="422 " %}

```javascript
{
    "delivery_id": [
        "The delivery id field is required."
    ],
    "store_id": [
        "The store id field is required.",
    ],
    "order_external_id": [
        "The order external id field is required."
    ]
}
```

{% 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://mipos.gitbook.io/public-api/delivery-orders/successful-order-creation.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.
