curl --request POST \
--url https://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upsertObjects": [
{
"serviceType": "DELIVERY",
"serviceTime": 15,
"status": "AVAILABLE"
}
],
"merchantStatus": "AVAILABLE"
}
'import requests
url = "https://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert"
payload = {
"upsertObjects": [
{
"serviceType": "DELIVERY",
"serviceTime": 15,
"status": "AVAILABLE"
}
],
"merchantStatus": "AVAILABLE"
}
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({
upsertObjects: [{serviceType: 'DELIVERY', serviceTime: 15, status: 'AVAILABLE'}],
merchantStatus: 'AVAILABLE'
})
};
fetch('https://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert', 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://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert",
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([
'upsertObjects' => [
[
'serviceType' => 'DELIVERY',
'serviceTime' => 15,
'status' => 'AVAILABLE'
]
],
'merchantStatus' => 'AVAILABLE'
]),
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://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert"
payload := strings.NewReader("{\n \"upsertObjects\": [\n {\n \"serviceType\": \"DELIVERY\",\n \"serviceTime\": 15,\n \"status\": \"AVAILABLE\"\n }\n ],\n \"merchantStatus\": \"AVAILABLE\"\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://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"upsertObjects\": [\n {\n \"serviceType\": \"DELIVERY\",\n \"serviceTime\": 15,\n \"status\": \"AVAILABLE\"\n }\n ],\n \"merchantStatus\": \"AVAILABLE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert")
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 \"upsertObjects\": [\n {\n \"serviceType\": \"DELIVERY\",\n \"serviceTime\": 15,\n \"status\": \"AVAILABLE\"\n }\n ],\n \"merchantStatus\": \"AVAILABLE\"\n}"
response = http.request(request)
puts response.read_body{
"title": "Unauthorized",
"status": 401
}{
"status": "404",
"title": "Record not found"
}{
"status": "404",
"title": "Record not found"
}{
"status": "404",
"title": "Record not found"
}Criar ou atualizar entidades da loja
Cria ou atualiza (upsert) status e entidades da loja. O corpo pode ser enviado diretamente ou
envolvido em {"merchant": {...}}.
Este endpoint pode ser usado das seguintes formas:
1 - Enviado apenas com o campo merchantStatus:
abre ou fecha a loja.
2 - Enviado apenas com os campos entityType e upsertObjects:
cria ou atualiza somente os objetos enviados.
Quando o campo
entityTypeé preenchido, o campoupsertObjectsnão pode estar vazio.
3 - Enviado com os campos merchantStatus, entityType e upsertObjects:
os cenários 1 e 2 acontecem simultaneamente.
curl --request POST \
--url https://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upsertObjects": [
{
"serviceType": "DELIVERY",
"serviceTime": 15,
"status": "AVAILABLE"
}
],
"merchantStatus": "AVAILABLE"
}
'import requests
url = "https://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert"
payload = {
"upsertObjects": [
{
"serviceType": "DELIVERY",
"serviceTime": 15,
"status": "AVAILABLE"
}
],
"merchantStatus": "AVAILABLE"
}
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({
upsertObjects: [{serviceType: 'DELIVERY', serviceTime: 15, status: 'AVAILABLE'}],
merchantStatus: 'AVAILABLE'
})
};
fetch('https://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert', 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://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert",
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([
'upsertObjects' => [
[
'serviceType' => 'DELIVERY',
'serviceTime' => 15,
'status' => 'AVAILABLE'
]
],
'merchantStatus' => 'AVAILABLE'
]),
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://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert"
payload := strings.NewReader("{\n \"upsertObjects\": [\n {\n \"serviceType\": \"DELIVERY\",\n \"serviceTime\": 15,\n \"status\": \"AVAILABLE\"\n }\n ],\n \"merchantStatus\": \"AVAILABLE\"\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://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"upsertObjects\": [\n {\n \"serviceType\": \"DELIVERY\",\n \"serviceTime\": 15,\n \"status\": \"AVAILABLE\"\n }\n ],\n \"merchantStatus\": \"AVAILABLE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryvip.com.br/merchant/v3/{merchantId}/merchantUpsert")
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 \"upsertObjects\": [\n {\n \"serviceType\": \"DELIVERY\",\n \"serviceTime\": 15,\n \"status\": \"AVAILABLE\"\n }\n ],\n \"merchantStatus\": \"AVAILABLE\"\n}"
response = http.request(request)
puts response.read_body{
"title": "Unauthorized",
"status": 401
}{
"status": "404",
"title": "Record not found"
}{
"status": "404",
"title": "Record not found"
}{
"status": "404",
"title": "Record not found"
}Autorizações
Token de acesso opaco emitido pela API de autenticação (POST /authentication/v1/oauth/token).
Parâmetros de caminho
Id (UUID) da loja na plataforma. A loja precisa estar autorizada para o aplicativo.
Corpo
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Upsert de objetos Service.
Objetos Service a criar ou atualizar.
Show child attributes
Show child attributes
Abre (AVAILABLE) ou fecha (UNAVAILABLE) a loja.
AVAILABLE, UNAVAILABLE "AVAILABLE"
Tipo das entidades enviadas em upsertObjects.
SERVICE, OPTION, OPTION_GROUP, CATEGORY, ITEM, PAYMENT_METHOD Resposta
Dados recebidos e processados com sucesso. Sem conteúdo na resposta.