# Confirmar dispersión

Modifica o habilita una dispersión previamente creada. Únicamente aplica para dispersiones que se encuentre en un estado de programadas `scheduled`.&#x20;

## Ruta

<mark style="color:green;">`POST`</mark> `v1/merchant/payout/confirm`

## Encabezado

<table><thead><tr><th width="335.5999755859375">Name</th><th>Description</th></tr></thead><tbody><tr><td><code>x-auth-token</code><mark style="color:red;">*</mark></td><td><p>Es el código generado a partir del proceso de autenticación.</p><p><em><code>Ejemplo: 8dsa819dj736f1d87fdhd172f12ddw</code></em></p></td></tr><tr><td><code>Content-Type</code><mark style="color:red;">*</mark></td><td><p>Es el tipo de contenido que se está enviando en la solicitud.</p><p><em><code>Ejemplo: application/json</code></em></p></td></tr><tr><td><code>child-id</code></td><td>Es el código de la cuenta que se busca administrar. Es opcional. Más info en el <a href="/pages/cmdh7wawmADehdqeF0JP#user-content-guia-de-uso-paso-a-paso-operar-en-nombre-de-una-cuenta-administrada">link</a><br><em><code>Ejemplo: negociohijo</code></em></td></tr></tbody></table>

## **Cuerpo**&#x20;

<table><thead><tr><th>Name</th><th>Type<select><option value="OPaunUD7ryBE" label="string" color="blue"></option></select></th><th>Description</th></tr></thead><tbody><tr><td><code>code</code><mark style="color:red;">*</mark></td><td><span data-option="OPaunUD7ryBE">string</span></td><td><p>El  hash recibido para confirmar la dispersión.<br></p><p><em><mark style="color:blue;"><code>Ejemplo: eyJk...</code></mark></em></p></td></tr></tbody></table>

## **Respuesta**

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

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "message": "Succesfully Confirmed",
    "process_id": "4c2480f3-11e5-4ccb-9c73-5e2acdc84d7e",
    "created_at": "2024-08-27T11:56:04-05:00"
}
</code></pre>

{% endtab %}

{% tab title="400" %}

```json
{
    "code": "Q101",
    "error": "Uno o más campos no se encuentran diligenciados correctamente o están vacíos. Por favor revisa los campos [{campo}]"
}
```

{% endtab %}

{% tab title="401" %}

```bash
{
    "status": "unauthorized",
    "code": "Q103",
    "error": "El x-auth-token se encuentra vencido. Por favor genera un nuevo token y reintenta de nuevo el cobro."
}
```

{% endtab %}
{% endtabs %}

***

## Ejemplo

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

```bash
curl --location '{{base_url}}/v1/merchant/payout/confirm' \
--header 'x-auth-token: {{token}}' \
--data '{
  "token": {{token_dispersion}}
}'
```

{% endtab %}

{% tab title="NodeJS (Axios)" %}

```javascript
const axios = require('axios');

let data = JSON.stringify({
  "token": token_dispersion
});


let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: `${base_url}/v1/merchant/payout/confirm`,
  headers: { 
    'x-auth-token': token //Añadir token
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = f"{base_url}/v1/merchant/payout/confirm"

payload = json.dumps({
  "token": token_dispersion
})

headers = {
  'x-auth-token': token
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

{% 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.qentaz.com/documentation/dispersiones/confirmar-dispersion.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.
