curl --request GET \
--url https://needalert.app/api/v1/establishments/{establishment}/items/{item}/qr-code \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://needalert.app/api/v1/establishments/{establishment}/items/{item}/qr-code', 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}/items/{item}/qr-code"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://needalert.app/api/v1/establishments/{establishment}/items/{item}/qr-code",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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;
}<string>{
"message": "<string>",
"code": "unauthenticated",
"errors": {}
}{
"message": "<string>",
"code": "establishment_unavailable",
"errors": {}
}{
"message": "<string>",
"code": "not_found",
"errors": {}
}{
"message": "<string>",
"code": "validation_failed",
"errors": {}
}{
"message": "<string>",
"code": "too_many_requests",
"errors": {}
}Get the item's QR code
The image of the QR code that opens the item’s public page (public_url). format is svg (default) or png; size, in pixels, applies to PNG only; download=1 makes the browser save the file.
curl --request GET \
--url https://needalert.app/api/v1/establishments/{establishment}/items/{item}/qr-code \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://needalert.app/api/v1/establishments/{establishment}/items/{item}/qr-code', 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}/items/{item}/qr-code"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://needalert.app/api/v1/establishments/{establishment}/items/{item}/qr-code",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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;
}<string>{
"message": "<string>",
"code": "unauthenticated",
"errors": {}
}{
"message": "<string>",
"code": "establishment_unavailable",
"errors": {}
}{
"message": "<string>",
"code": "not_found",
"errors": {}
}{
"message": "<string>",
"code": "validation_failed",
"errors": {}
}{
"message": "<string>",
"code": "too_many_requests",
"errors": {}
}Autorizações
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.
Cabeçalhos
Language of message and of translated content such as item names (pt-BR or en). Without it, the chain's default language.
pt-BR, en Your own correlation id (1–64 characters of A-Za-z0-9._-), echoed back; generated when absent. Quote it to support.
1 - 64^[A-Za-z0-9._-]{1,64}$Parâmetros de caminho
The establishment ID
The item ID
Parâmetros de consulta
svg, png 128 <= x <= 2048Resposta
The QR code image: SVG with format=svg (the default), PNG of size pixels with format=png. The image never changes for the life of the item, so it is served with a one-year private cache.
The response is of type file.