Actualizar Cliente
curl --request PUT \
--url https://api.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Sandbox-Mode: <x-sandbox-mode>' \
--data '
{
"doc_type": "RUC",
"doc_number": "214567890016",
"legal_name": "Cliente Ejemplo S.A.",
"fiscal_address": "Av. 8 de Octubre 1234",
"city": "Montevideo",
"department": "Montevideo",
"country": "Uruguay",
"country_code": "UY",
"notifications": [
{
"type": "EMAIL",
"destination": "cliente@example.com",
"enabled": true
}
]
}
'import requests
url = "https://api.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}"
payload = {
"doc_type": "RUC",
"doc_number": "214567890016",
"legal_name": "Cliente Ejemplo S.A.",
"fiscal_address": "Av. 8 de Octubre 1234",
"city": "Montevideo",
"department": "Montevideo",
"country": "Uruguay",
"country_code": "UY",
"notifications": [
{
"type": "EMAIL",
"destination": "cliente@example.com",
"enabled": True
}
]
}
headers = {
"X-Sandbox-Mode": "<x-sandbox-mode>",
"X-API-Key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Sandbox-Mode': '<x-sandbox-mode>',
'X-API-Key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
doc_type: 'RUC',
doc_number: '214567890016',
legal_name: 'Cliente Ejemplo S.A.',
fiscal_address: 'Av. 8 de Octubre 1234',
city: 'Montevideo',
department: 'Montevideo',
country: 'Uruguay',
country_code: 'UY',
notifications: [{type: 'EMAIL', destination: 'cliente@example.com', enabled: true}]
})
};
fetch('https://api.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}', 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.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}",
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([
'doc_type' => 'RUC',
'doc_number' => '214567890016',
'legal_name' => 'Cliente Ejemplo S.A.',
'fiscal_address' => 'Av. 8 de Octubre 1234',
'city' => 'Montevideo',
'department' => 'Montevideo',
'country' => 'Uruguay',
'country_code' => 'UY',
'notifications' => [
[
'type' => 'EMAIL',
'destination' => 'cliente@example.com',
'enabled' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Sandbox-Mode: <x-sandbox-mode>"
],
]);
$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.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}"
payload := strings.NewReader("{\n \"doc_type\": \"RUC\",\n \"doc_number\": \"214567890016\",\n \"legal_name\": \"Cliente Ejemplo S.A.\",\n \"fiscal_address\": \"Av. 8 de Octubre 1234\",\n \"city\": \"Montevideo\",\n \"department\": \"Montevideo\",\n \"country\": \"Uruguay\",\n \"country_code\": \"UY\",\n \"notifications\": [\n {\n \"type\": \"EMAIL\",\n \"destination\": \"cliente@example.com\",\n \"enabled\": true\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Sandbox-Mode", "<x-sandbox-mode>")
req.Header.Add("X-API-Key", "<api-key>")
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://api.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}")
.header("X-Sandbox-Mode", "<x-sandbox-mode>")
.header("X-API-Key", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"doc_type\": \"RUC\",\n \"doc_number\": \"214567890016\",\n \"legal_name\": \"Cliente Ejemplo S.A.\",\n \"fiscal_address\": \"Av. 8 de Octubre 1234\",\n \"city\": \"Montevideo\",\n \"department\": \"Montevideo\",\n \"country\": \"Uruguay\",\n \"country_code\": \"UY\",\n \"notifications\": [\n {\n \"type\": \"EMAIL\",\n \"destination\": \"cliente@example.com\",\n \"enabled\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Sandbox-Mode"] = '<x-sandbox-mode>'
request["X-API-Key"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"doc_type\": \"RUC\",\n \"doc_number\": \"214567890016\",\n \"legal_name\": \"Cliente Ejemplo S.A.\",\n \"fiscal_address\": \"Av. 8 de Octubre 1234\",\n \"city\": \"Montevideo\",\n \"department\": \"Montevideo\",\n \"country\": \"Uruguay\",\n \"country_code\": \"UY\",\n \"notifications\": [\n {\n \"type\": \"EMAIL\",\n \"destination\": \"cliente@example.com\",\n \"enabled\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"doc_type": "RUC",
"doc_number": "214567890016",
"legal_name": "Cliente Ejemplo S.A.",
"fiscal_address": "Av. 8 de Octubre 1234",
"city": "Montevideo",
"department": "Montevideo",
"country": "Uruguay",
"country_code": "UY",
"notifications": [
{
"type": "EMAIL",
"destination": "cliente@example.com",
"enabled": true
}
]
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Los datos proporcionados no son válidos"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "No se encontró el recurso solicitado"
}
}Clientes
Actualizar Cliente
Actualiza los datos de un cliente existente
PUT
/
enterprises
/
{rut}
/
customers
/
{doc_type}
/
{doc_number}
Actualizar Cliente
curl --request PUT \
--url https://api.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Sandbox-Mode: <x-sandbox-mode>' \
--data '
{
"doc_type": "RUC",
"doc_number": "214567890016",
"legal_name": "Cliente Ejemplo S.A.",
"fiscal_address": "Av. 8 de Octubre 1234",
"city": "Montevideo",
"department": "Montevideo",
"country": "Uruguay",
"country_code": "UY",
"notifications": [
{
"type": "EMAIL",
"destination": "cliente@example.com",
"enabled": true
}
]
}
'import requests
url = "https://api.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}"
payload = {
"doc_type": "RUC",
"doc_number": "214567890016",
"legal_name": "Cliente Ejemplo S.A.",
"fiscal_address": "Av. 8 de Octubre 1234",
"city": "Montevideo",
"department": "Montevideo",
"country": "Uruguay",
"country_code": "UY",
"notifications": [
{
"type": "EMAIL",
"destination": "cliente@example.com",
"enabled": True
}
]
}
headers = {
"X-Sandbox-Mode": "<x-sandbox-mode>",
"X-API-Key": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'X-Sandbox-Mode': '<x-sandbox-mode>',
'X-API-Key': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
doc_type: 'RUC',
doc_number: '214567890016',
legal_name: 'Cliente Ejemplo S.A.',
fiscal_address: 'Av. 8 de Octubre 1234',
city: 'Montevideo',
department: 'Montevideo',
country: 'Uruguay',
country_code: 'UY',
notifications: [{type: 'EMAIL', destination: 'cliente@example.com', enabled: true}]
})
};
fetch('https://api.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}', 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.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}",
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([
'doc_type' => 'RUC',
'doc_number' => '214567890016',
'legal_name' => 'Cliente Ejemplo S.A.',
'fiscal_address' => 'Av. 8 de Octubre 1234',
'city' => 'Montevideo',
'department' => 'Montevideo',
'country' => 'Uruguay',
'country_code' => 'UY',
'notifications' => [
[
'type' => 'EMAIL',
'destination' => 'cliente@example.com',
'enabled' => true
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Sandbox-Mode: <x-sandbox-mode>"
],
]);
$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.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}"
payload := strings.NewReader("{\n \"doc_type\": \"RUC\",\n \"doc_number\": \"214567890016\",\n \"legal_name\": \"Cliente Ejemplo S.A.\",\n \"fiscal_address\": \"Av. 8 de Octubre 1234\",\n \"city\": \"Montevideo\",\n \"department\": \"Montevideo\",\n \"country\": \"Uruguay\",\n \"country_code\": \"UY\",\n \"notifications\": [\n {\n \"type\": \"EMAIL\",\n \"destination\": \"cliente@example.com\",\n \"enabled\": true\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Sandbox-Mode", "<x-sandbox-mode>")
req.Header.Add("X-API-Key", "<api-key>")
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://api.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}")
.header("X-Sandbox-Mode", "<x-sandbox-mode>")
.header("X-API-Key", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"doc_type\": \"RUC\",\n \"doc_number\": \"214567890016\",\n \"legal_name\": \"Cliente Ejemplo S.A.\",\n \"fiscal_address\": \"Av. 8 de Octubre 1234\",\n \"city\": \"Montevideo\",\n \"department\": \"Montevideo\",\n \"country\": \"Uruguay\",\n \"country_code\": \"UY\",\n \"notifications\": [\n {\n \"type\": \"EMAIL\",\n \"destination\": \"cliente@example.com\",\n \"enabled\": true\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zynvo.uy/v1/enterprises/{rut}/customers/{doc_type}/{doc_number}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Sandbox-Mode"] = '<x-sandbox-mode>'
request["X-API-Key"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"doc_type\": \"RUC\",\n \"doc_number\": \"214567890016\",\n \"legal_name\": \"Cliente Ejemplo S.A.\",\n \"fiscal_address\": \"Av. 8 de Octubre 1234\",\n \"city\": \"Montevideo\",\n \"department\": \"Montevideo\",\n \"country\": \"Uruguay\",\n \"country_code\": \"UY\",\n \"notifications\": [\n {\n \"type\": \"EMAIL\",\n \"destination\": \"cliente@example.com\",\n \"enabled\": true\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"doc_type": "RUC",
"doc_number": "214567890016",
"legal_name": "Cliente Ejemplo S.A.",
"fiscal_address": "Av. 8 de Octubre 1234",
"city": "Montevideo",
"department": "Montevideo",
"country": "Uruguay",
"country_code": "UY",
"notifications": [
{
"type": "EMAIL",
"destination": "cliente@example.com",
"enabled": true
}
]
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Los datos proporcionados no son válidos"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "No se encontró el recurso solicitado"
}
}Authorizations
API Key de Zynvo obtenida desde el dashboard. Requerida en todos los endpoints.
Token JWT obtenido del endpoint /tokens. Se debe enviar en el header Authorization como "Bearer {token}"
Headers
Define el entorno de ejecución de la API.
Valores:
"true"- Modo sandbox: Usa datos de prueba aislados"false"- Modo producción: Usa datos reales
Available options:
true, false Path Parameters
RUT de la empresa
Tipo de documento del cliente
Available options:
RUC, NIFE Número de documento del cliente
Body
application/json
Tipo de documento del cliente
Available options:
RUC, NIFE Example:
"RUC"
Número de documento
Example:
"214567890016"
Razón social del cliente
Example:
"Cliente Ejemplo S.A."
Dirección fiscal
Example:
"Av. 8 de Octubre 1234"
Ciudad
Example:
"Montevideo"
Departamento
Example:
"Montevideo"
País
Example:
"Uruguay"
Código ISO del país
Example:
"UY"
Show child attributes
Show child attributes
Response
Cliente actualizado
Show child attributes
Show child attributes
⌘I