cURL
curl --request PATCH \
--url https://api.salvy.com.br/api/v3/phone-account-groups/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Vendas SP",
"color": "cyan"
}
'import requests
url = "https://api.salvy.com.br/api/v3/phone-account-groups/{id}"
payload = {
"name": "Vendas SP",
"color": "cyan"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Vendas SP', color: 'cyan'})
};
fetch('https://api.salvy.com.br/api/v3/phone-account-groups/{id}', 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.salvy.com.br/api/v3/phone-account-groups/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Vendas SP',
'color' => 'cyan'
]),
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.salvy.com.br/api/v3/phone-account-groups/{id}"
payload := strings.NewReader("{\n \"name\": \"Vendas SP\",\n \"color\": \"cyan\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.salvy.com.br/api/v3/phone-account-groups/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Vendas SP\",\n \"color\": \"cyan\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salvy.com.br/api/v3/phone-account-groups/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Vendas SP\",\n \"color\": \"cyan\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0198c2f1-3815-45b7-9e60-8e137cad845c",
"name": "Vendas SP",
"color": "cyan"
}{
"code": "unauthorized",
"message": "<string>"
}{
"code": "forbidden",
"message": "<string>"
}{
"code": "resource-not-found",
"message": "<string>"
}{
"code": "phone-account-group-name-already-exists",
"message": "<string>"
}{
"code": "payload-too-large",
"message": "<string>"
}{
"code": "input-validation-error",
"message": "<string>",
"details": [
{
"key": "<string>",
"message": "<string>"
}
]
}{
"code": "unknown",
"message": "<string>"
}Grupos de linhas
Atualizar grupo de linhas
Atualiza um grupo de linhas por ID. Somente os campos enviados no corpo são alterados; campos omitidos permanecem inalterados.
PATCH
/
api
/
v3
/
phone-account-groups
/
{id}
cURL
curl --request PATCH \
--url https://api.salvy.com.br/api/v3/phone-account-groups/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Vendas SP",
"color": "cyan"
}
'import requests
url = "https://api.salvy.com.br/api/v3/phone-account-groups/{id}"
payload = {
"name": "Vendas SP",
"color": "cyan"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Vendas SP', color: 'cyan'})
};
fetch('https://api.salvy.com.br/api/v3/phone-account-groups/{id}', 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.salvy.com.br/api/v3/phone-account-groups/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Vendas SP',
'color' => 'cyan'
]),
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.salvy.com.br/api/v3/phone-account-groups/{id}"
payload := strings.NewReader("{\n \"name\": \"Vendas SP\",\n \"color\": \"cyan\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.salvy.com.br/api/v3/phone-account-groups/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Vendas SP\",\n \"color\": \"cyan\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salvy.com.br/api/v3/phone-account-groups/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Vendas SP\",\n \"color\": \"cyan\"\n}"
response = http.request(request)
puts response.read_body{
"id": "0198c2f1-3815-45b7-9e60-8e137cad845c",
"name": "Vendas SP",
"color": "cyan"
}{
"code": "unauthorized",
"message": "<string>"
}{
"code": "forbidden",
"message": "<string>"
}{
"code": "resource-not-found",
"message": "<string>"
}{
"code": "phone-account-group-name-already-exists",
"message": "<string>"
}{
"code": "payload-too-large",
"message": "<string>"
}{
"code": "input-validation-error",
"message": "<string>",
"details": [
{
"key": "<string>",
"message": "<string>"
}
]
}{
"code": "unknown",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Identificador único do grupo de linhas.
Examples:
"123e4567-e89b-12d3-a456-426614174000"
"123e4567-e89b-12d3-a456-426614174001"
Nome do grupo de linhas.
Example:
"Vendas SP"
Cor do grupo de linhas. Nulo quando o grupo usa uma cor fora da paleta disponível.
Available options:
cyan, red, purple, lime, yellow, pink Example:
"cyan"