Atualizar um contato salvo
curl --request PUT \
--url 'https://app.escrybe.com.br/api/v2/favorites?userSecurityToken=' \
--header 'Content-Type: application/x-www-form-urlencoded'import requests
url = "https://app.escrybe.com.br/api/v2/favorites?userSecurityToken="
payload = {}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({})
};
fetch('https://app.escrybe.com.br/api/v2/favorites?userSecurityToken=', 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://app.escrybe.com.br/api/v2/favorites?userSecurityToken=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.escrybe.com.br/api/v2/favorites?userSecurityToken="
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.escrybe.com.br/api/v2/favorites?userSecurityToken=")
.header("Content-Type", "application/x-www-form-urlencoded")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.escrybe.com.br/api/v2/favorites?userSecurityToken=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"favorite": {
"id": 123,
"id_user": 123,
"label": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"document": "<string>",
"addr1": "<string>",
"street_number": "<string>",
"addr2": "<string>",
"zip": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"list_letter": 123,
"list_email": 123,
"list_whatsapp": 123,
"dateCreated": "<string>"
}
}{
"success": true,
"message": "<string>"
}{
"success": false,
"message": "Não autorizado"
}{
"success": true,
"message": "<string>"
}Account & Favorites
Atualizar um contato salvo
Atualização parcial. Só as chaves presentes no corpo são alteradas; um campo omitido mantém o valor atual, e um campo enviado como null ou "" é limpo. id é obrigatório; name, se enviado, não pode ficar vazio.
PUT
/
api
/
v2
/
favorites
Atualizar um contato salvo
curl --request PUT \
--url 'https://app.escrybe.com.br/api/v2/favorites?userSecurityToken=' \
--header 'Content-Type: application/x-www-form-urlencoded'import requests
url = "https://app.escrybe.com.br/api/v2/favorites?userSecurityToken="
payload = {}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.put(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({})
};
fetch('https://app.escrybe.com.br/api/v2/favorites?userSecurityToken=', 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://app.escrybe.com.br/api/v2/favorites?userSecurityToken=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.escrybe.com.br/api/v2/favorites?userSecurityToken="
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.escrybe.com.br/api/v2/favorites?userSecurityToken=")
.header("Content-Type", "application/x-www-form-urlencoded")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.escrybe.com.br/api/v2/favorites?userSecurityToken=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"favorite": {
"id": 123,
"id_user": 123,
"label": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"document": "<string>",
"addr1": "<string>",
"street_number": "<string>",
"addr2": "<string>",
"zip": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"list_letter": 123,
"list_email": 123,
"list_whatsapp": 123,
"dateCreated": "<string>"
}
}{
"success": true,
"message": "<string>"
}{
"success": false,
"message": "Não autorizado"
}{
"success": true,
"message": "<string>"
}Autorizações
Seu token de segurança, enviado como parâmetro userSecurityToken (query ou form).
Corpo
application/x-www-form-urlencodedapplication/json
The body is of type object.