Fazer onboarding da loja
curl --request PUT \
--url https://od.deliveryvip.com.br/v1/merchantOnboarding \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"getMerchantURL": {
"baseURL": "https://pdv.exemplo.com.br/",
"apiKey": "chave-secreta"
},
"ordersWebhookURL": "https://pdv.exemplo.com.br/newEvent"
}
'import requests
url = "https://od.deliveryvip.com.br/v1/merchantOnboarding"
payload = {
"getMerchantURL": {
"baseURL": "https://pdv.exemplo.com.br/",
"apiKey": "chave-secreta"
},
"ordersWebhookURL": "https://pdv.exemplo.com.br/newEvent"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
getMerchantURL: {baseURL: 'https://pdv.exemplo.com.br/', apiKey: 'chave-secreta'},
ordersWebhookURL: 'https://pdv.exemplo.com.br/newEvent'
})
};
fetch('https://od.deliveryvip.com.br/v1/merchantOnboarding', 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/merchantOnboarding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'getMerchantURL' => [
'baseURL' => 'https://pdv.exemplo.com.br/',
'apiKey' => 'chave-secreta'
],
'ordersWebhookURL' => 'https://pdv.exemplo.com.br/newEvent'
]),
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/merchantOnboarding"
payload := strings.NewReader("{\n \"getMerchantURL\": {\n \"baseURL\": \"https://pdv.exemplo.com.br/\",\n \"apiKey\": \"chave-secreta\"\n },\n \"ordersWebhookURL\": \"https://pdv.exemplo.com.br/newEvent\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://od.deliveryvip.com.br/v1/merchantOnboarding")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"getMerchantURL\": {\n \"baseURL\": \"https://pdv.exemplo.com.br/\",\n \"apiKey\": \"chave-secreta\"\n },\n \"ordersWebhookURL\": \"https://pdv.exemplo.com.br/newEvent\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://od.deliveryvip.com.br/v1/merchantOnboarding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"getMerchantURL\": {\n \"baseURL\": \"https://pdv.exemplo.com.br/\",\n \"apiKey\": \"chave-secreta\"\n },\n \"ordersWebhookURL\": \"https://pdv.exemplo.com.br/newEvent\"\n}"
response = http.request(request)
puts response.read_body{
"status": "400",
"title": "merchantId is required"
}{
"title": "Unauthorized",
"status": 401
}{
"title": "Record not found",
"status": "404"
}{
"title": "Record not found",
"status": "404"
}Merchant
Fazer onboarding da loja
Registra (ou atualiza) os dados do Software Service para a loja do token: o seu identificador da loja (merchantId), a URL e a chave para consulta do merchant (getMerchant) e a URL do webhook de pedidos. Responde 201 no primeiro registro e 204 nas atualizações.
PUT
/
v1
/
merchantOnboarding
Fazer onboarding da loja
curl --request PUT \
--url https://od.deliveryvip.com.br/v1/merchantOnboarding \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"getMerchantURL": {
"baseURL": "https://pdv.exemplo.com.br/",
"apiKey": "chave-secreta"
},
"ordersWebhookURL": "https://pdv.exemplo.com.br/newEvent"
}
'import requests
url = "https://od.deliveryvip.com.br/v1/merchantOnboarding"
payload = {
"getMerchantURL": {
"baseURL": "https://pdv.exemplo.com.br/",
"apiKey": "chave-secreta"
},
"ordersWebhookURL": "https://pdv.exemplo.com.br/newEvent"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
getMerchantURL: {baseURL: 'https://pdv.exemplo.com.br/', apiKey: 'chave-secreta'},
ordersWebhookURL: 'https://pdv.exemplo.com.br/newEvent'
})
};
fetch('https://od.deliveryvip.com.br/v1/merchantOnboarding', 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/merchantOnboarding",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'getMerchantURL' => [
'baseURL' => 'https://pdv.exemplo.com.br/',
'apiKey' => 'chave-secreta'
],
'ordersWebhookURL' => 'https://pdv.exemplo.com.br/newEvent'
]),
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/merchantOnboarding"
payload := strings.NewReader("{\n \"getMerchantURL\": {\n \"baseURL\": \"https://pdv.exemplo.com.br/\",\n \"apiKey\": \"chave-secreta\"\n },\n \"ordersWebhookURL\": \"https://pdv.exemplo.com.br/newEvent\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://od.deliveryvip.com.br/v1/merchantOnboarding")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"getMerchantURL\": {\n \"baseURL\": \"https://pdv.exemplo.com.br/\",\n \"apiKey\": \"chave-secreta\"\n },\n \"ordersWebhookURL\": \"https://pdv.exemplo.com.br/newEvent\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://od.deliveryvip.com.br/v1/merchantOnboarding")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"getMerchantURL\": {\n \"baseURL\": \"https://pdv.exemplo.com.br/\",\n \"apiKey\": \"chave-secreta\"\n },\n \"ordersWebhookURL\": \"https://pdv.exemplo.com.br/newEvent\"\n}"
response = http.request(request)
puts response.read_body{
"status": "400",
"title": "merchantId is required"
}{
"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.
Parâmetros de consulta
Identificador da loja no Software Service.
Corpo
application/json
Resposta
Onboarding registrado.