Cambiar la etapa
curl --request POST \
--url https://api.impulsodigital.app/v1/conversations/{id}/stage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stage": "PRECIO_ENVIADO"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({stage: 'PRECIO_ENVIADO'})
};
fetch('https://api.impulsodigital.app/v1/conversations/{id}/stage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.impulsodigital.app/v1/conversations/{id}/stage"
payload = { "stage": "PRECIO_ENVIADO" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.impulsodigital.app/v1/conversations/{id}/stage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'stage' => 'PRECIO_ENVIADO'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": "<string>",
"contact_id": "<string>",
"phone": "573001234567",
"name": "<string>",
"number_id": "<string>",
"status": "ai",
"stage": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"last_message_at": "2023-11-07T05:31:56Z",
"message_count": 123
}
}{
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "Esta llave no tiene el permiso «mensajes».",
"details": {}
}
}Conversaciones
Cambiar la etapa
Mueve la conversación a una etapa del embudo de la cuenta. Si la etapa no existe responde INVALID_STAGE con las válidas en details.valid_stages.
POST
/
conversations
/
{id}
/
stage
Cambiar la etapa
curl --request POST \
--url https://api.impulsodigital.app/v1/conversations/{id}/stage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"stage": "PRECIO_ENVIADO"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({stage: 'PRECIO_ENVIADO'})
};
fetch('https://api.impulsodigital.app/v1/conversations/{id}/stage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.impulsodigital.app/v1/conversations/{id}/stage"
payload = { "stage": "PRECIO_ENVIADO" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.impulsodigital.app/v1/conversations/{id}/stage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'stage' => 'PRECIO_ENVIADO'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": "<string>",
"contact_id": "<string>",
"phone": "573001234567",
"name": "<string>",
"number_id": "<string>",
"status": "ai",
"stage": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"last_message_at": "2023-11-07T05:31:56Z",
"message_count": 123
}
}{
"error": {
"code": "INSUFFICIENT_SCOPE",
"message": "Esta llave no tiene el permiso «mensajes».",
"details": {}
}
}
