Actualizar Cliente
Endpoint
- Método: PUT
- Ruta:
/api/ubl2.1/register-update-customer - URL ejemplo:
{{BASE_URL}}/api/ubl2.1/register-update-customer
REGISTRAR/MODIFICAR DATOS DE UN CLIENTE
Este endpoint permite registrar un nuevo cliente o actualizar la información de un cliente existente, como el correo electrónico o el teléfono, en la base de datos de la API.
URL de uso:
Si tienes un dominio instalado, utiliza la siguiente ruta:
http://midominio.com/api/ubl2.1/register-update-customer
Autenticación:
Requiere un token de autorización, el cual se obtiene al realizar el Paso 1 - Config Company.
Si extraviaste el token, puedes consultarlo en la base de datos, tabla users, campo API_TOKEN.
Parámetros:
Este endpoint no requiere parámetros en la URL.
Toda la información del cliente se envía en el cuerpo (body) de la solicitud.
Autenticación
- Tipo: Bearer Token
- Header:
Authorization: Bearer {{API_TOKEN}}
Headers
| Key | Value |
|---|---|
Content-Type | application/json |
cache-control | no-cache |
Connection | keep-alive |
Accept-Encoding | gzip, deflate |
accept | application/json |
X-CSRF-TOKEN | `` |
Body
{
"identification_number": 89008003,
"dv": null,
"name": "ALEXANDER OBANDO LONDOÑO.",
"phone": 3103891693,
"address": "LIMONAR MZ 6 CS 3 ET 1 PISO 2",
"email": "alexander_obando@hotmail.com",
"sendnotification": true
}
cURL
curl -X PUT "{{BASE_URL}}/api/ubl2.1/register-update-customer" \
-H "Authorization: Bearer {{API_TOKEN}}" \
-H "Content-Type: application/json" \
-H "cache-control: no-cache" \
-H "Connection: keep-alive" \
-H "Accept-Encoding: gzip, deflate" \
-H "accept: application/json" \
-H "X-CSRF-TOKEN: " \
-d '{
"identification_number": 89008003,
"dv": null,
"name": "ALEXANDER OBANDO LONDOÑO.",
"phone": 3103891693,
"address": "LIMONAR MZ 6 CS 3 ET 1 PISO 2",
"email": "alexander_obando@hotmail.com",
"sendnotification": true
}'