curl --request PUT \
--url https://docs.pymo.uy/v1/companies/{companyRut}/password \
--header 'Content-Type: application/json' \
--cookie connect.sid= \
--data '
{
"password1": "<string>",
"password2": "<string>",
"email": "<string>"
}
'import requests
url = "https://docs.pymo.uy/v1/companies/{companyRut}/password"
payload = {
"password1": "<string>",
"password2": "<string>",
"email": "<string>"
}
headers = {
"cookie": "connect.sid=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'connect.sid=', 'Content-Type': 'application/json'},
body: JSON.stringify({password1: '<string>', password2: '<string>', email: '<string>'})
};
fetch('https://docs.pymo.uy/v1/companies/{companyRut}/password', 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://docs.pymo.uy/v1/companies/{companyRut}/password",
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([
'password1' => '<string>',
'password2' => '<string>',
'email' => '<string>'
]),
CURLOPT_COOKIE => "connect.sid=",
CURLOPT_HTTPHEADER => [
"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://docs.pymo.uy/v1/companies/{companyRut}/password"
payload := strings.NewReader("{\n \"password1\": \"<string>\",\n \"password2\": \"<string>\",\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("cookie", "connect.sid=")
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://docs.pymo.uy/v1/companies/{companyRut}/password")
.header("cookie", "connect.sid=")
.header("Content-Type", "application/json")
.body("{\n \"password1\": \"<string>\",\n \"password2\": \"<string>\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://docs.pymo.uy/v1/companies/{companyRut}/password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = 'connect.sid='
request["Content-Type"] = 'application/json'
request.body = "{\n \"password1\": \"<string>\",\n \"password2\": \"<string>\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"payload": {
"email": "cfes-219999990008@pymo.uy",
"branchOffices": [
"1"
],
"previousEmails": [
"admin@mefactura.uy"
],
"staleSessions": []
},
"message": {
"code": "PASSWORD_UPDATED",
"value": "Contraseña actualizada correctamente"
},
"status": "SUCCESS"
}{
"payload": {},
"message": {
"code": "UNAUTHORIZED",
"value": "Debe iniciar sesión."
},
"status": "FAIL"
}{
"payload": {},
"message": {
"code": "FORBIDDEN",
"value": "No tiene permisos para realizar esta acción."
},
"status": "FAIL"
}Cambiar la contraseña de la empresa
Cambia la contraseña de la cuenta.
Acceso: restringida. Requiere sesión, y sólo opera sobre el RUT de tu propia empresa: pedir otro RUT responde 403 FORBIDDEN.
curl --request PUT \
--url https://docs.pymo.uy/v1/companies/{companyRut}/password \
--header 'Content-Type: application/json' \
--cookie connect.sid= \
--data '
{
"password1": "<string>",
"password2": "<string>",
"email": "<string>"
}
'import requests
url = "https://docs.pymo.uy/v1/companies/{companyRut}/password"
payload = {
"password1": "<string>",
"password2": "<string>",
"email": "<string>"
}
headers = {
"cookie": "connect.sid=",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {cookie: 'connect.sid=', 'Content-Type': 'application/json'},
body: JSON.stringify({password1: '<string>', password2: '<string>', email: '<string>'})
};
fetch('https://docs.pymo.uy/v1/companies/{companyRut}/password', 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://docs.pymo.uy/v1/companies/{companyRut}/password",
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([
'password1' => '<string>',
'password2' => '<string>',
'email' => '<string>'
]),
CURLOPT_COOKIE => "connect.sid=",
CURLOPT_HTTPHEADER => [
"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://docs.pymo.uy/v1/companies/{companyRut}/password"
payload := strings.NewReader("{\n \"password1\": \"<string>\",\n \"password2\": \"<string>\",\n \"email\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("cookie", "connect.sid=")
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://docs.pymo.uy/v1/companies/{companyRut}/password")
.header("cookie", "connect.sid=")
.header("Content-Type", "application/json")
.body("{\n \"password1\": \"<string>\",\n \"password2\": \"<string>\",\n \"email\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://docs.pymo.uy/v1/companies/{companyRut}/password")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = 'connect.sid='
request["Content-Type"] = 'application/json'
request.body = "{\n \"password1\": \"<string>\",\n \"password2\": \"<string>\",\n \"email\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"payload": {
"email": "cfes-219999990008@pymo.uy",
"branchOffices": [
"1"
],
"previousEmails": [
"admin@mefactura.uy"
],
"staleSessions": []
},
"message": {
"code": "PASSWORD_UPDATED",
"value": "Contraseña actualizada correctamente"
},
"status": "SUCCESS"
}{
"payload": {},
"message": {
"code": "UNAUTHORIZED",
"value": "Debe iniciar sesión."
},
"status": "FAIL"
}{
"payload": {},
"message": {
"code": "FORBIDDEN",
"value": "No tiene permisos para realizar esta acción."
},
"status": "FAIL"
}Autorizaciones
Sesión por cookie de POST /v1/login, válida 1 hora. Ver Autenticación.
Parámetros de ruta
"219999990008"
Cuerpo
Respuesta
Éxito
Envoltorio común a todas las respuestas. status no se deduce del código HTTP: hay al menos nueve lugares en el gateway que responden HTTP 200 con status: "FAIL" (por ejemplo CFE_NOT_FOUND y DGI_COMPANY_NOT_READY_YET). Un cliente tiene que leer status, no el código.
Los datos de la respuesta. {} cuando el endpoint no devuelve nada.
De las 82 claves de mensaje del gateway, 29 son SUCCESS y 53 FAIL. Es lo que hay que mirar para saber si la llamada funcionó.
SUCCESS, FAIL Presente cuando la operación tiene algo que decir. Las lecturas simples responden sólo payload y status.
Show child attributes
Show child attributes