Cancel a scheduled dispatch
curl --request DELETE \
--url https://needalert.app/api/v1/establishments/{establishment}/events/{event} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://needalert.app/api/v1/establishments/{establishment}/events/{event}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://needalert.app/api/v1/establishments/{establishment}/events/{event}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://needalert.app/api/v1/establishments/{establishment}/events/{event}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "<string>",
"code": "unauthenticated",
"errors": {}
}{
"message": "<string>",
"code": "establishment_unavailable",
"errors": {}
}{
"message": "<string>",
"code": "not_found",
"errors": {}
}{
"message": "<string>",
"code": "event_not_scheduled",
"errors": {}
}{
"message": "<string>",
"code": "too_many_requests",
"errors": {}
}Dispatches
Cancel a scheduled dispatch
Only while scheduled. The dispatch stays in the history as cancelled.
DELETE
/
establishments
/
{establishment}
/
events
/
{event}
Cancel a scheduled dispatch
curl --request DELETE \
--url https://needalert.app/api/v1/establishments/{establishment}/events/{event} \
--header 'Authorization: Bearer <token>'const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://needalert.app/api/v1/establishments/{establishment}/events/{event}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://needalert.app/api/v1/establishments/{establishment}/events/{event}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://needalert.app/api/v1/establishments/{establishment}/events/{event}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "<string>",
"code": "unauthenticated",
"errors": {}
}{
"message": "<string>",
"code": "establishment_unavailable",
"errors": {}
}{
"message": "<string>",
"code": "not_found",
"errors": {}
}{
"message": "<string>",
"code": "event_not_scheduled",
"errors": {}
}{
"message": "<string>",
"code": "too_many_requests",
"errors": {}
}Authorizations
An API key created by the chain owner in the panel (Integrações → Nova chave), sent as Authorization: Bearer <key>. The key (<id>|na_…) is shown once, at creation; rotate or revoke it on the same screen. It is a server secret: never ship it in browser or mobile code.
Headers
Language of message and of translated content such as item names (pt-BR or en). Without it, the chain's default language.
Available options:
pt-BR, en Your own correlation id (1–64 characters of A-Za-z0-9._-), echoed back; generated when absent. Quote it to support.
Required string length:
1 - 64Pattern:
^[A-Za-z0-9._-]{1,64}$Response
No content