MENU navbar-image

Introduzione

Questa documentazione è il punto di partenza per comprendere come interagire con il nostro servizio tramite le API fornite. Qui troverai informazioni dettagliate sui vari componenti API. Il nostro obiettivo è fornire un sistema flessibile e scalabile che consenta agli utenti di costruire soluzioni personalizzate, per una gestione semplificata.

Questa documentazione ha lo scopo di fornire tutte le informazioni necessarie per lavorare con la nostra API.

Architettura

Il nostro sistema è composto da tre componenti principali:

Campagne: Un'API che consente agli utenti autenticati di registrare, gestire e cancellare campagne nel nostro servizio, utilizzando un set completo di comandi RESTful.

Chatbot: Un'API che permette ai sistemi esterni di interagire direttamente con il servizio WhatsApp, rendendo possibile l'invio di messaggi, l'apertura e chiusura di chat, e la gestione di utenti amministratori (superuser).

Analytics: Una dashboard che fornisce reportistica e analisi dei dati in uscita dal bot, consentendo agli utenti di monitorare le performance delle campagne e l'efficacia delle interazioni tramite WhatsApp. Questi componenti lavorano insieme per fornire una piattaforma robusta e scalabile per la gestione delle risorse e delle interazioni tramite WhatsApp. Il sistema è progettato per offrire sia funzionalità base, che consentono una personalizzazione approfondita tramite le API, sia funzionalità avanzate per un utilizzo più semplice e immediato delle risorse disponibili.

Per mantenere alte le performance, il bot esegue solo un dump minimo di dati in tempo reale. L'analisi e la reportistica dettagliata sono gestite attraverso la Dashboard Statistiche, che agisce come API per l'analisi dei dati e consente di esaminare in profondità il traffico e l'interazione del bot con gli utenti.

Come Iniziare

Per iniziare a utilizzare le nostre API, assicurati di avere accesso ai token API necessari e alle credenziali appropriate. Consulta la sezione relativa a ogni componente per i dettagli su come configurare e utilizzare le API.

Autenticazione delle richieste

Per autenticare le richieste, includi un'intestazione Authorization con il valore "Bearer {YOUR_AUTH_KEY}".

Tutti gli endpoint autenticati sono contrassegnati con un badge Richiede autenticazione nella documentazione qui sotto.

Gestione Campagne

Lista delle campagne

Richiede autenticazione

Questo endpoint recupera un elenco di tutte le campagne. Se viene fornito un parametro 'id' nella query string, recupera una campagna specifica tramite il suo ID.

Esempio di richiesta:
$client = new \GuzzleHttp\Client();
$url = 'https://restapi.volantinopiu.it/api/v2/listCampaigns';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'id' => '',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://restapi.volantinopiu.it/api/v2/listCampaigns"
);

const params = {
    "id": "",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://restapi.volantinopiu.it/api/v2/listCampaigns'
params = {
  'id': '',
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()
curl --request GET \
    --get "https://restapi.volantinopiu.it/api/v2/listCampaigns?id=" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Richiesta   

GET api/v2/listCampaigns

Intestazioni

Authorization     [richiesto]  

Esempio: Bearer {YOUR_AUTH_KEY}

Content-Type     [richiesto]  

Esempio: application/json

Accept     [richiesto]  

Esempio: application/json

Parametri della Query

id   integer   [opzionale]  

L'ID della campagna da visualizzare. Deve essere un numero intero.

Registra una campagna

Richiede autenticazione

Questo endpoint registra una nuova campagna.

Esempio di richiesta:
$client = new \GuzzleHttp\Client();
$url = 'https://restapi.volantinopiu.it/api/v2/registerCampaign';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'pv_id' => null,
            'image' => null,
            'link' => null,
            'date_send' => null,
            'template_name' => null,
            'promo_name' => null,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://restapi.volantinopiu.it/api/v2/registerCampaign"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "pv_id": null,
    "image": null,
    "link": null,
    "date_send": null,
    "template_name": null,
    "promo_name": null
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://restapi.volantinopiu.it/api/v2/registerCampaign'
payload = {
    "pv_id": null,
    "image": null,
    "link": null,
    "date_send": null,
    "template_name": null,
    "promo_name": null
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl --request POST \
    "https://restapi.volantinopiu.it/api/v2/registerCampaign" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"pv_id\": null,
    \"image\": null,
    \"link\": null,
    \"date_send\": null,
    \"template_name\": null,
    \"promo_name\": null
}"

Richiesta   

POST api/v2/registerCampaign

Intestazioni

Authorization     [richiesto]  

Esempio: Bearer {YOUR_AUTH_KEY}

Content-Type     [richiesto]  

Esempio: application/json

Accept     [richiesto]  

Esempio: application/json

Parametri del Body

pv_id   array[int]   [opzionale]  

Lista di ID separati da virgola. Lascia vuoto per inviare la campagna a tutti i punti vendita.

image   array[string]|string   [opzionale]  

Lista di URL o ID delle immagini (nello stesso ordine di pv_id). In alternativa singolo URL o singolo ID dell'immagine da usare per tutti i punti vendita. Lascia vuoto per usare l'immagine di default.

link   array[string]|string   [opzionale]  

Lista di URL. In alternativa singolo URL da usare per tutti i punti vendita. Lascia vuoto per usare il link di default. Il link sarà presente nel template inviato e sarà cliccabile.

date_send   integer   [richiesto]  

Data di invio come timestamp Unix.

template_name   string   [richiesto]  

Nome del template da utilizzare per la campagna.

promo_name   string   [opzionale]  

Nome della promozione.

Registra una campagna volantino

Richiede autenticazione

Questo endpoint registra una nuova campagna di tipo volantino.

Esempio di richiesta:
$client = new \GuzzleHttp\Client();
$url = 'https://restapi.volantinopiu.it/api/v2/registerCampaignFlyer';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'pv_id' => null,
            'image' => null,
            'flyer_link' => null,
            'date_send' => null,
            'promo_name' => null,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://restapi.volantinopiu.it/api/v2/registerCampaignFlyer"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "pv_id": null,
    "image": null,
    "flyer_link": null,
    "date_send": null,
    "promo_name": null
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://restapi.volantinopiu.it/api/v2/registerCampaignFlyer'
payload = {
    "pv_id": null,
    "image": null,
    "flyer_link": null,
    "date_send": null,
    "promo_name": null
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl --request POST \
    "https://restapi.volantinopiu.it/api/v2/registerCampaignFlyer" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"pv_id\": null,
    \"image\": null,
    \"flyer_link\": null,
    \"date_send\": null,
    \"promo_name\": null
}"

Richiesta   

POST api/v2/registerCampaignFlyer

Intestazioni

Authorization     [richiesto]  

Esempio: Bearer {YOUR_AUTH_KEY}

Content-Type     [richiesto]  

Esempio: application/json

Accept     [richiesto]  

Esempio: application/json

Parametri del Body

pv_id   array[int]   [opzionale]  

Lista di ID separati da virgola. Lascia vuoto per inviare la campagna a tutti i punti vendita.

image   array[string]|string   [opzionale]  

Lista di URL o ID delle immagini (nello stesso ordine di pv_id). In alternativa singolo URL o singolo ID dell'immagine da usare per tutti i punti vendita. Lascia vuoto per usare l'immagine di default.

flyer_link   array[string]|string   [opzionale]  

Lista di URL dei volantini. In alternativa singolo URL del volantino da usare per tutti i punti vendita. Lascia vuoto per usare il link di default. Il link sarà presente nel template inviato e sarà un bottone cliccabile.

date_send   integer   [richiesto]  

Data di invio come timestamp Unix.

promo_name   string   [opzionale]  

Nome della promozione.

Elimina una campagna

Richiede autenticazione

Questo endpoint elimina la campagna specificata dall'ID fornito.

Esempio di richiesta:
$client = new \GuzzleHttp\Client();
$url = 'https://restapi.volantinopiu.it/api/v2/deleteCampaign';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => null,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://restapi.volantinopiu.it/api/v2/deleteCampaign"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": null
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://restapi.volantinopiu.it/api/v2/deleteCampaign'
payload = {
    "id": null
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()
curl --request DELETE \
    "https://restapi.volantinopiu.it/api/v2/deleteCampaign" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": null
}"

Richiesta   

DELETE api/v2/deleteCampaign

Intestazioni

Authorization     [richiesto]  

Esempio: Bearer {YOUR_AUTH_KEY}

Content-Type     [richiesto]  

Esempio: application/json

Accept     [richiesto]  

Esempio: application/json

Parametri del Body

id   integer   [richiesto]  

L'ID della campagna da eliminare. Deve essere un numero intero.

Gestione Media

Lista dei media

Richiede autenticazione

Questo endpoint elenca tutti i file media precedentemenete caricati.

Esempio di richiesta:
$client = new \GuzzleHttp\Client();
$url = 'https://restapi.volantinopiu.it/api/v2/listMedia';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://restapi.volantinopiu.it/api/v2/listMedia"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://restapi.volantinopiu.it/api/v2/listMedia'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
    --get "https://restapi.volantinopiu.it/api/v2/listMedia" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Richiesta   

GET api/v2/listMedia

Intestazioni

Authorization     [richiesto]  

Esempio: Bearer {YOUR_AUTH_KEY}

Content-Type     [richiesto]  

Esempio: application/json

Accept     [richiesto]  

Esempio: application/json

Caricamento dei media

Richiede autenticazione

Questo endpoint consente di caricare un file nello storage. Il file deve essere presente nella richiesta e deve rispettare i criteri specificati.

Esempio di richiesta:
$client = new \GuzzleHttp\Client();
$url = 'https://restapi.volantinopiu.it/api/v2/uploadMedia';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'multipart/form-data',
            'Accept' => 'application/json',
        ],
        'multipart' => [
            [
                'name' => 'file',
                'contents' => fopen('/tmp/phpLuzLX7', 'r')
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://restapi.volantinopiu.it/api/v2/uploadMedia"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('file', document.querySelector('input[name="file"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());
import requests
import json

url = 'https://restapi.volantinopiu.it/api/v2/uploadMedia'
files = {
  'file': open('/tmp/phpLuzLX7', 'rb')}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'multipart/form-data',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, files=files)
response.json()
curl --request POST \
    "https://restapi.volantinopiu.it/api/v2/uploadMedia" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "file=@/tmp/phpLuzLX7" 

Richiesta   

POST api/v2/uploadMedia

Intestazioni

Authorization     [richiesto]  

Esempio: Bearer {YOUR_AUTH_KEY}

Content-Type     [richiesto]  

Esempio: multipart/form-data

Accept     [richiesto]  

Esempio: application/json

Parametri del Body

file   file   [richiesto]  

Il file da caricare deve essere un file valido e non superare i 10 MB.

Gestione Negozi

Lista dei negozi

Richiede autenticazione

Questo endpoint recupera un elenco di tutti i negozi.

Esempio di richiesta:
$client = new \GuzzleHttp\Client();
$url = 'https://restapi.volantinopiu.it/api/v2/listShops';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://restapi.volantinopiu.it/api/v2/listShops"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
import requests
import json

url = 'https://restapi.volantinopiu.it/api/v2/listShops'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()
curl --request GET \
    --get "https://restapi.volantinopiu.it/api/v2/listShops" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"

Richiesta   

GET api/v2/listShops

Intestazioni

Authorization     [richiesto]  

Esempio: Bearer {YOUR_AUTH_KEY}

Content-Type     [richiesto]  

Esempio: application/json

Accept     [richiesto]  

Esempio: application/json

Aggiunge un negozio

Richiede autenticazione

Questo endpoint è progettato per aggiungere un nuovo negozio.

Esempio di richiesta:
$client = new \GuzzleHttp\Client();
$url = 'https://restapi.volantinopiu.it/api/v2/addShop';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'indirizzo' => null,
            'cap' => null,
            'citta' => null,
            'provincia' => null,
            'latitude' => null,
            'longitude' => null,
            'codice' => null,
            'mail' => null,
            'url' => null,
            'descrizione' => null,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://restapi.volantinopiu.it/api/v2/addShop"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "indirizzo": null,
    "cap": null,
    "citta": null,
    "provincia": null,
    "latitude": null,
    "longitude": null,
    "codice": null,
    "mail": null,
    "url": null,
    "descrizione": null
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://restapi.volantinopiu.it/api/v2/addShop'
payload = {
    "indirizzo": null,
    "cap": null,
    "citta": null,
    "provincia": null,
    "latitude": null,
    "longitude": null,
    "codice": null,
    "mail": null,
    "url": null,
    "descrizione": null
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl --request POST \
    "https://restapi.volantinopiu.it/api/v2/addShop" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"indirizzo\": null,
    \"cap\": null,
    \"citta\": null,
    \"provincia\": null,
    \"latitude\": null,
    \"longitude\": null,
    \"codice\": null,
    \"mail\": null,
    \"url\": null,
    \"descrizione\": null
}"

Richiesta   

POST api/v2/addShop

Intestazioni

Authorization     [richiesto]  

Esempio: Bearer {YOUR_AUTH_KEY}

Content-Type     [richiesto]  

Esempio: application/json

Accept     [richiesto]  

Esempio: application/json

Parametri del Body

indirizzo   string   [richiesto]  

Indirizzo del punto vendita.

cap   string   [richiesto]  

CAP del punto vendita.

citta   string   [richiesto]  

Città del punto vendita.

provincia   string   [richiesto]  

Sigla a 2 cifre della provincia del punto vendita.

latitude   number   [richiesto]  

Latitudine (coordinata) del punto vendita.

longitude   number   [richiesto]  

Longitudine (coordinata) del punto vendita.

codice   string   [richiesto]  

Codice interno del punto vendita.

mail   string   [opzionale]  

Email del punto vendita.

url   string   [opzionale]  

URL abbinata al punto vendita.

descrizione   string   [opzionale]  

Descrizione del punto vendita.

Aggiorna un negozio

Richiede autenticazione

Questo endpoint è progettato per aggiornare le informazioni di un negozio.

Esempio di richiesta:
$client = new \GuzzleHttp\Client();
$url = 'https://restapi.volantinopiu.it/api/v2/updateShop';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => null,
            'indirizzo' => null,
            'cap' => null,
            'citta' => null,
            'provincia' => null,
            'latitude' => null,
            'longitude' => null,
            'codice' => null,
            'mail' => null,
            'url' => null,
            'descrizione' => null,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://restapi.volantinopiu.it/api/v2/updateShop"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": null,
    "indirizzo": null,
    "cap": null,
    "citta": null,
    "provincia": null,
    "latitude": null,
    "longitude": null,
    "codice": null,
    "mail": null,
    "url": null,
    "descrizione": null
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://restapi.volantinopiu.it/api/v2/updateShop'
payload = {
    "id": null,
    "indirizzo": null,
    "cap": null,
    "citta": null,
    "provincia": null,
    "latitude": null,
    "longitude": null,
    "codice": null,
    "mail": null,
    "url": null,
    "descrizione": null
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()
curl --request POST \
    "https://restapi.volantinopiu.it/api/v2/updateShop" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": null,
    \"indirizzo\": null,
    \"cap\": null,
    \"citta\": null,
    \"provincia\": null,
    \"latitude\": null,
    \"longitude\": null,
    \"codice\": null,
    \"mail\": null,
    \"url\": null,
    \"descrizione\": null
}"

Richiesta   

POST api/v2/updateShop

Intestazioni

Authorization     [richiesto]  

Esempio: Bearer {YOUR_AUTH_KEY}

Content-Type     [richiesto]  

Esempio: application/json

Accept     [richiesto]  

Esempio: application/json

Parametri del Body

id   integer   [richiesto]  

ID del punto vendita. Deve essere un numero intero.

indirizzo   string   [opzionale]  

Indirizzo del punto vendita.

cap   string   [opzionale]  

CAP del punto vendita.

citta   string   [opzionale]  

Città del punto vendita.

provincia   string   [opzionale]  

Sigla a 2 cifre della provincia del punto vendita.

latitude   number   [opzionale]  

Latitudine (coordinata) del punto vendita.

longitude   number   [opzionale]  

Longitudine (coordinata) del punto vendita.

codice   string   [opzionale]  

Codice interno del punto vendita.

mail   string   [opzionale]  

Email del punto vendita.

url   string   [opzionale]  

URL abbinata al punto vendita.

descrizione   string   [opzionale]  

Descrizione del punto vendita.

Elimina un negozio

Richiede autenticazione

Questo endpoint è progettato per eliminare un negozio.

Esempio di richiesta:
$client = new \GuzzleHttp\Client();
$url = 'https://restapi.volantinopiu.it/api/v2/deleteShop';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'id' => null,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
const url = new URL(
    "https://restapi.volantinopiu.it/api/v2/deleteShop"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": null
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
import requests
import json

url = 'https://restapi.volantinopiu.it/api/v2/deleteShop'
payload = {
    "id": null
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()
curl --request DELETE \
    "https://restapi.volantinopiu.it/api/v2/deleteShop" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": null
}"

Richiesta   

DELETE api/v2/deleteShop

Intestazioni

Authorization     [richiesto]  

Esempio: Bearer {YOUR_AUTH_KEY}

Content-Type     [richiesto]  

Esempio: application/json

Accept     [richiesto]  

Esempio: application/json

Parametri del Body

id   integer   [richiesto]  

ID del punto vendita. Deve essere un numero intero.