Confirmar recebimento de eventos
curl --request POST \
--url https://od.deliveryvip.com.br/v1/events/acknowledgment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50"
}
]
'import requests
url = "https://od.deliveryvip.com.br/v1/events/acknowledgment"
payload = [{ "id": "8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50" }]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{id: '8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50'}])
};
fetch('https://od.deliveryvip.com.br/v1/events/acknowledgment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://od.deliveryvip.com.br/v1/events/acknowledgment",
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([
[
'id' => '8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50'
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://od.deliveryvip.com.br/v1/events/acknowledgment"
payload := strings.NewReader("[\n {\n \"id\": \"8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://od.deliveryvip.com.br/v1/events/acknowledgment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://od.deliveryvip.com.br/v1/events/acknowledgment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50\"\n }\n]"
response = http.request(request)
puts response.read_body{
"total": 1
}{
"title": "Unauthorized",
"status": 401
}{
"title": "Record not found",
"status": "404"
}{
"title": "Record not found",
"status": "404"
}Eventos
Confirmar recebimento de eventos
Confirma o recebimento de eventos. Eventos confirmados deixam de ser retornados no polling. Identificadores desconhecidos ou de lojas não vinculadas ao token são ignorados e não entram no total.
POST
/
v1
/
events
/
acknowledgment
Confirmar recebimento de eventos
curl --request POST \
--url https://od.deliveryvip.com.br/v1/events/acknowledgment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"id": "8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50"
}
]
'import requests
url = "https://od.deliveryvip.com.br/v1/events/acknowledgment"
payload = [{ "id": "8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50" }]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([{id: '8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50'}])
};
fetch('https://od.deliveryvip.com.br/v1/events/acknowledgment', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://od.deliveryvip.com.br/v1/events/acknowledgment",
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([
[
'id' => '8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50'
]
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://od.deliveryvip.com.br/v1/events/acknowledgment"
payload := strings.NewReader("[\n {\n \"id\": \"8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50\"\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://od.deliveryvip.com.br/v1/events/acknowledgment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"id\": \"8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://od.deliveryvip.com.br/v1/events/acknowledgment")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"id\": \"8a6f6c1e-0d3b-4c1a-9a57-0b1c2d3e4f50\"\n }\n]"
response = http.request(request)
puts response.read_body{
"total": 1
}{
"title": "Unauthorized",
"status": 401
}{
"title": "Record not found",
"status": "404"
}{
"title": "Record not found",
"status": "404"
}Autorizações
Access token opaco obtido em POST /oauth/token (host od.deliveryvip.com.br) com grant_type=client_credentials e escopo od.all.
Corpo
application/json
Minimum array length:
1eventId do evento recebido no polling.
Resposta
Confirmação aceita.
Quantidade de eventos efetivamente confirmados.
Exemplo:
1