MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {ACCESS_TOKEN}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Autenticación 2FA

Controlador para manejar la autenticación de dos factores (2FA). Permite configurar y verificar códigos usando Email, WhatsApp y TOTP.

Configuración Inicial

Configuración inicial de 2FA

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/2fa/configuracion-inicial" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"temp_token\": \"a1b2c3d4...\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/2fa/configuracion-inicial"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "temp_token": "a1b2c3d4..."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": {
        "usuario_nombre": "Juan Pérez",
        "metodos_disponibles": [
            {
                "tipo": "Email",
                "nombre": "Correo Electrónico",
                "descripcion": "Solicitaremos tu correo electrónico",
                "destino": "u***r@domain.com",
                "icono": "mail"
            }
        ],
        "mensaje": "Necesitamos aumentar la seguridad de tu cuenta..."
    }
}
 

Request      

POST api/v1/2fa/configuracion-inicial

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

temp_token   string   

Token temporal de configuración. Example: a1b2c3d4...

Configurar método inicial de 2FA

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/2fa/configurar-metodo-inicial" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"temp_token\": \"a1b2c3d4...\",
    \"metodo\": \"TOTP\",
    \"numero_whatsapp\": \"+521234567890\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/2fa/configurar-metodo-inicial"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "temp_token": "a1b2c3d4...",
    "metodo": "TOTP",
    "numero_whatsapp": "+521234567890"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Escanea el código QR con Microsoft Authenticator",
    "require_qr_setup": true,
    "qr_url": "https://chart.googleapis.com/chart?chs=200x200...",
    "manual_key": "JBSWY3DPEHPK3PXP",
    "temp_token": "a1b2c3d4..."
}
 

Request      

POST api/v1/2fa/configurar-metodo-inicial

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

temp_token   string   

Token temporal. Example: a1b2c3d4...

metodo   string   

Método a configurar. Example: TOTP

numero_whatsapp   string  optional  

Número de WhatsApp (requerido si método es WhatsApp). Example: +521234567890

Activar TOTP durante configuración inicial

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/2fa/activar-totp-inicial" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"temp_token\": \"a1b2c3d4...\",
    \"codigo\": \"123456\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/2fa/activar-totp-inicial"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "temp_token": "a1b2c3d4...",
    "codigo": "123456"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Microsoft Authenticator activado correctamente",
    "metodo_configurado": "TOTP",
    "temp_token": "new_temp_token",
    "redirect_to": "2fa-verification"
}
 

Request      

POST api/v1/2fa/activar-totp-inicial

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

temp_token   string   

Token temporal. Example: a1b2c3d4...

codigo   string   

Código TOTP de 6 dígitos. Example: 123456

Verificación de 2FA

Seleccionar método de 2FA después del login

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/2fa/seleccionar-metodo" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"usuario_id\": \"eyJpdiI6Ik...\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/2fa/seleccionar-metodo"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "usuario_id": "eyJpdiI6Ik..."
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "metodos": [
        {
            "tipo": "Email",
            "descripcion": "Código enviado a tu correo electrónico",
            "destino": "u***r@domain.com"
        }
    ],
    "metodo_preferido": "Email"
}
 

Example response (404):


{
    "code": 404,
    "message": "Usuario no encontrado"
}
 

Request      

POST api/v1/2fa/seleccionar-metodo

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

usuario_id   string   

ID del usuario codificado en base64. Example: eyJpdiI6Ik...

Enviar código de verificación

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/2fa/enviar-codigo" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"temp_token\": \"a1b2c3d4...\",
    \"metodo\": \"Email\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/2fa/enviar-codigo"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "temp_token": "a1b2c3d4...",
    "metodo": "Email"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Código enviado a tu correo electrónico",
    "destino": "u***r@domain.com",
    "expira_en": 600
}
 

Request      

POST api/v1/2fa/enviar-codigo

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

temp_token   string   

Token temporal de verificación (64 chars). Example: a1b2c3d4...

metodo   string   

Método de envío del código. Example: Email

Verificar código y completar login

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/2fa/verificar-codigo" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"temp_token\": \"a1b2c3d4...\",
    \"metodo\": \"Email\",
    \"codigo\": \"1A2B3C\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/2fa/verificar-codigo"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "temp_token": "a1b2c3d4...",
    "metodo": "Email",
    "codigo": "1A2B3C"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Verificación exitosa. Bienvenido.",
    "token": "auth_token_here",
    "usuario": {
        "id": 1,
        "nombre": "Juan Pérez",
        "perfil": 2
    }
}
 

Request      

POST api/v1/2fa/verificar-codigo

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

temp_token   string   

Token temporal de verificación. Example: a1b2c3d4...

metodo   string   

Método de 2FA utilizado. Example: Email

codigo   string   

Código de 6 caracteres. Example: 1A2B3C

Configuración de 2FA

Configurar 2FA para un usuario autenticado

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/2fa/configurar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"metodo\": \"TOTP\",
    \"numero_whatsapp\": \"+521234567890\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/2fa/configurar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "metodo": "TOTP",
    "numero_whatsapp": "+521234567890"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "code": 200,
    "message": "2FA habilitado con método: TOTP",
    "data": {
        "metodo_activo": "TOTP"
    }
}
 

Request      

POST api/v1/2fa/configurar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

metodo   string  optional  

Método de 2FA a configurar (null para deshabilitar). Example: TOTP

numero_whatsapp   string  optional  

Número de WhatsApp (si aplica). Example: +521234567890

Obtener estado actual de 2FA del usuario autenticado

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/2fa/estado" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/2fa/estado"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "data": {
        "habilitado": true,
        "metodo_activo": "Email",
        "tiene_secreto_totp": false,
        "metodos_disponibles": [
            "Email",
            "TOTP"
        ]
    }
}
 

Request      

GET api/v1/2fa/estado

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Configurar Microsoft Authenticator (generar QR)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/2fa/configurar-totp" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/2fa/configurar-totp"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Escanea el código QR con Microsoft Authenticator",
    "qr_url": "https://chart.googleapis.com/chart?chs=200x200...",
    "manual_key": "JBSWY3DPEHPK3PXP",
    "issuer": "Educa Deporte",
    "account": "user@example.com"
}
 

Request      

POST api/v1/2fa/configurar-totp

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Verificar y activar Microsoft Authenticator

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/2fa/activar-totp" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"codigo\": \"123456\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/2fa/activar-totp"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "codigo": "123456"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "code": 200,
    "message": "Microsoft Authenticator activado correctamente",
    "data": {
        "metodo_activo": "TOTP"
    }
}
 

Request      

POST api/v1/2fa/activar-totp

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

codigo   string   

Código TOTP de 6 dígitos. Example: 123456

Base

Ruta

Importar rutas

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/ruta/importar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/ruta/importar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/ruta/importar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Autocomplete de rutas

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/ruta/autocomplete-web-php" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/ruta/autocomplete-web-php"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/ruta/autocomplete-web-php

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Accion de ruta

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/ruta/accion-ruta" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"rutaURL\": \"http:\\/\\/kunze.biz\\/iste-laborum-eius-est-dolor.html\",
    \"rutaMetodo\": \"consequatur\",
    \"rutaClasificacion\": \"consequatur\",
    \"rutaModulo\": \"consequatur\",
    \"rutaDescripcion\": \"consequatur\",
    \"rutaControlador\": \"consequatur\",
    \"idRuta\": 17,
    \"rutaPermiso\": \"consequatur\",
    \"rutaParametros\": \"consequatur\",
    \"rutaAccion\": \"consequatur\",
    \"rutaMiddleware\": \"consequatur\",
    \"rutaPrefix\": \"consequatur\",
    \"rutaControladorDirectorio\": \"consequatur\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/ruta/accion-ruta"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "rutaURL": "http:\/\/kunze.biz\/iste-laborum-eius-est-dolor.html",
    "rutaMetodo": "consequatur",
    "rutaClasificacion": "consequatur",
    "rutaModulo": "consequatur",
    "rutaDescripcion": "consequatur",
    "rutaControlador": "consequatur",
    "idRuta": 17,
    "rutaPermiso": "consequatur",
    "rutaParametros": "consequatur",
    "rutaAccion": "consequatur",
    "rutaMiddleware": "consequatur",
    "rutaPrefix": "consequatur",
    "rutaControladorDirectorio": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/ruta/accion-ruta

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

rutaURL   string   

El url de la ruta Example: http://kunze.biz/iste-laborum-eius-est-dolor.html

rutaMetodo   string   

El metodo de la ruta(get, post, put, delete) Example: consequatur

rutaClasificacion   string   

El clasificacion de la ruta(auxiliar, principal, multiple) Example: consequatur

rutaModulo   string   

El modulo de la ruta Example: consequatur

rutaDescripcion   string  optional  

El descripcion de la ruta Example: consequatur

rutaControlador   string   

El controlador de la ruta Example: consequatur

idRuta   integer   

El id de la ruta Example: 17

rutaPermiso   string   

El permiso de la ruta Example: consequatur

rutaParametros   string  optional  

nullable El parametros de la ruta Example: consequatur

rutaAccion   string  optional  

nullable El accion de la ruta Example: consequatur

rutaMiddleware   string  optional  

El middleware de la ruta Example: consequatur

rutaPrefix   string  optional  

El prefix de la ruta Example: consequatur

rutaControladorDirectorio   string  optional  

El controlador directorio de la ruta Example: consequatur

Eliminar ruta

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/ruta/eliminar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/ruta/eliminar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/ruta/eliminar/{idRuta}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

idRuta   string   

Example: consequatur

POST api/v1/base/ruta/validar

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/ruta/validar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/ruta/validar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/ruta/validar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Activar ruta

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/ruta/activar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/ruta/activar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/ruta/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the activar. Example: consequatur

Lista de rutas editado

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/ruta/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/ruta/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/ruta/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Ver ruta

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/ruta/ver-ruta/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/ruta/ver-ruta/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/ruta/ver-ruta/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the ver rutum. Example: consequatur

Informacion de ruta

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/ruta/info-ruta/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/ruta/info-ruta/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/ruta/info-ruta/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the info rutum. Example: consequatur

Usuario

Lista de usuarios

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/usuario/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/usuario/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/usuario/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Accion de usuario

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/usuario/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"usuarioNombre\": \"vmqeopfuudtdsufvyvddq\",
    \"usuarioAlias\": \"Juan Pérez\",
    \"usuarioEmail\": \"juan@example.com\",
    \"idPerfil\": 1,
    \"usuarioPassword\": \"password123\",
    \"usuarioNotificacionWeb\": \"\\\"Si\\\"\",
    \"usuarioNotificacionWhatsApp\": \"\\\"No\\\"\",
    \"usuarioNotificacionMail\": \"\\\"Si\\\"\",
    \"usuarioWhatsAppNumero\": \"1562\",
    \"usuario2FAMetodo\": \"SMS\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/usuario/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "usuarioNombre": "vmqeopfuudtdsufvyvddq",
    "usuarioAlias": "Juan Pérez",
    "usuarioEmail": "juan@example.com",
    "idPerfil": 1,
    "usuarioPassword": "password123",
    "usuarioNotificacionWeb": "\"Si\"",
    "usuarioNotificacionWhatsApp": "\"No\"",
    "usuarioNotificacionMail": "\"Si\"",
    "usuarioWhatsAppNumero": "1562",
    "usuario2FAMetodo": "SMS"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/usuario/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

usuarioNombre   string   

Must not be greater than 100 characters. Example: vmqeopfuudtdsufvyvddq

usuarioAlias   string   

Nombre del usuario. Example: Juan Pérez

usuarioEmail   string   

Correo electrónico del usuario. Example: juan@example.com

idPerfil   integer   

ID del perfil asociado al usuario. Example: 1

usuarioPassword   string   

Contraseña del usuario. Example: password123

usuarioNotificacionWeb   string  optional  

Indica si el usuario recibe notificaciones web. Valores permitidos: "Si" o "No". Example: "Si"

usuarioNotificacionWhatsApp   string  optional  

Indica si el usuario recibe notificaciones por WhatsApp. Valores permitidos: "Si" o "No". Example: "No"

usuarioNotificacionMail   string  optional  

Indica si el usuario recibe notificaciones por email. Valores permitidos: "Si" o "No". Example: "Si"

usuarioWhatsAppNumero   string  optional  

Must be between 1 and 10 digits. Must match the regex /^[0-9]+$/. Example: 1562

usuario2FAMetodo   string  optional  

Example: SMS

Must be one of:
  • SMS
  • Email
  • Aplicación Google Authenticator

Editar usuario

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/usuario/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"usuarioNombre\": \"vmqeopfuudtdsufvyvddq\",
    \"usuarioAlias\": \"amniihfqcoynlazghdtqt\",
    \"usuarioEmail\": \"andreanne00@example.org\",
    \"idPerfil\": \"consequatur\",
    \"usuarioNotificacionWeb\": \"Si\",
    \"usuarioNotificacionWhatsApp\": \"Si\",
    \"usuarioNotificacionMail\": \"No\",
    \"usuarioWhatsAppNumero\": \"1562\",
    \"usuario2FAMetodo\": \"Email\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/usuario/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "usuarioNombre": "vmqeopfuudtdsufvyvddq",
    "usuarioAlias": "amniihfqcoynlazghdtqt",
    "usuarioEmail": "andreanne00@example.org",
    "idPerfil": "consequatur",
    "usuarioNotificacionWeb": "Si",
    "usuarioNotificacionWhatsApp": "Si",
    "usuarioNotificacionMail": "No",
    "usuarioWhatsAppNumero": "1562",
    "usuario2FAMetodo": "Email"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/usuario/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

usuarioNombre   string   

Must not be greater than 100 characters. Example: vmqeopfuudtdsufvyvddq

usuarioAlias   string   

Must not be greater than 75 characters. Example: amniihfqcoynlazghdtqt

usuarioEmail   string   

Must be a valid email address. Must not be greater than 100 characters. Example: andreanne00@example.org

idPerfil   string   

The idPerfil of an existing record in the base_perfil table. Example: consequatur

usuarioNotificacionWeb   string  optional  

Example: Si

Must be one of:
  • Si
  • No
usuarioNotificacionWhatsApp   string  optional  

Example: Si

Must be one of:
  • Si
  • No
usuarioNotificacionMail   string  optional  

Example: No

Must be one of:
  • Si
  • No
usuarioWhatsAppNumero   string  optional  

Must be between 1 and 10 digits. Must match the regex /^[0-9]+$/. Example: 1562

usuario2FAMetodo   string  optional  

Example: Email

Must be one of:
  • SMS
  • Email
  • Aplicación Google Authenticator

Eliminar usuario

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/usuario/eliminar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/usuario/eliminar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/base/usuario/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the eliminar. Example: consequatur

Informacion de usuario

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/usuario/info-usuario/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/usuario/info-usuario/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/usuario/info-usuario/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the info usuario. Example: consequatur

Activar usuario

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/usuario/activar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/usuario/activar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/usuario/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the activar. Example: consequatur

Detalle de usuario

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/usuario/detalle/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/usuario/detalle/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/usuario/detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the detalle. Example: consequatur

Datos para formulario

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/usuario/datosParaFormulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/usuario/datosParaFormulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/usuario/datosParaFormulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Guardar perfiles de usuario

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/usuario/guardarPerfilesUsuario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/usuario/guardarPerfilesUsuario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/usuario/guardarPerfilesUsuario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Desbloquear usuario

requires authentication

Desbloquea un usuario bloqueado, cambiando su estado a "Activo" y reseteando el contador de intentos fallidos a 0.

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/usuario/desbloquear/1" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/usuario/desbloquear/1"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Usuario desbloqueado correctamente. El usuario ahora puede iniciar sesión."
}
 

Example response (404):


{
    "success": false,
    "message": "Usuario no encontrado."
}
 

Example response (500):


{
    "success": false,
    "message": "Error al desbloquear el usuario."
}
 

Request      

POST api/v1/base/usuario/desbloquear/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

ID del usuario a desbloquear. Example: 1

Menu

Lista de menus

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/menu/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/menu/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/menu/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Accion de menu

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/menu/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"menuOrden\": 1,
    \"menuTitulo\": \"Nuevo menú\",
    \"menuURL\": \"\\/nuevo-menu\",
    \"menuIcono\": \"icono-nuevo\",
    \"idMenuSuperior\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/menu/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "menuOrden": 1,
    "menuTitulo": "Nuevo menú",
    "menuURL": "\/nuevo-menu",
    "menuIcono": "icono-nuevo",
    "idMenuSuperior": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/menu/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

menuOrden   integer  optional  

nullable Orden. Example: 1

menuTitulo   string  optional  

nullable Título. No debe de aceptar numeros. Example: Nuevo menú

menuURL   string  optional  

nullable URL. Example: /nuevo-menu

menuIcono   string  optional  

nullable Icono. Example: icono-nuevo

idMenuSuperior   integer  optional  

nullable ID del menú padre. Example: 2

Editar menú

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/menu/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"menuOrden\": 1,
    \"menuTitulo\": \"es una edición\",
    \"menuURL\": \"\\/edicion-menu\",
    \"menuIcono\": \"icono-edicion\\n...\",
    \"idMenu\": 2,
    \"idMenuSuperior\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/menu/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "menuOrden": 1,
    "menuTitulo": "es una edición",
    "menuURL": "\/edicion-menu",
    "menuIcono": "icono-edicion\n...",
    "idMenu": 2,
    "idMenuSuperior": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/menu/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

menuOrden   integer   

Orden. Example: 1

menuTitulo   string   

Título. No debe de aceptar numeros. Example: es una edición

menuURL   string   

URL. Example: /edicion-menu

menuIcono   string  optional  

nullable Icono. Example: icono-edicion ...

idMenu   integer   

ID del menú a editar. Example: 2

idMenuSuperior   integer  optional  

nullable ID del menú padre. Example: 2

Eliminar menú

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/menu/eliminar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idMenu\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/menu/eliminar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idMenu": 2
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

DELETE api/v1/base/menu/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the eliminar. Example: consequatur

Body Parameters

idMenu   integer   

ID del menú a eliminar. Example: 2

Informacion de menu

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/menu/info-menu/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idMenu\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/menu/info-menu/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idMenu": 2
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/menu/info-menu/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the info menu. Example: consequatur

Body Parameters

idMenu   integer   

ID del menú a eliminar. Example: 2

Activar menu

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/menu/activar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idMenu\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/menu/activar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idMenu": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/menu/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the activar. Example: consequatur

Body Parameters

idMenu   integer   

ID del menú a eliminar. Example: 2

Datos para formulario

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/menu/datosParaFormulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/menu/datosParaFormulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/menu/datosParaFormulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Perfil

Lista de perfiles

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/perfil/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/perfil/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Accion de perfil

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/perfil/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"perfilNombre\": \"vmqeopfuudtdsufvyvddq\",
    \"perfilURLInicial\": \"\\/admin\",
    \"perfilAlias\": \"Administrador\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "perfilNombre": "vmqeopfuudtdsufvyvddq",
    "perfilURLInicial": "\/admin",
    "perfilAlias": "Administrador"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/perfil/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

perfilNombre   string   

Must match the regex /^[A-Za-zÁÉÍÓÚáéíóúÑñ0-9\s-]+$/. Must be at least 1 character. Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

perfilURLInicial   string  optional  

url del perfil. Example: /admin

perfilAlias   string   

Nombre del perfil. Example: Administrador

Editar perfil

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/perfil/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"perfilNombre\": \"vmqeopfuudtdsufvyvddq\",
    \"perfilURLInicial\": \"\\/admin\",
    \"idPerfil\": 2,
    \"perfilAlias\": \"Administrador\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "perfilNombre": "vmqeopfuudtdsufvyvddq",
    "perfilURLInicial": "\/admin",
    "idPerfil": 2,
    "perfilAlias": "Administrador"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/perfil/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

perfilNombre   string   

Must match the regex /^[A-Za-zÁÉÍÓÚáéíóúÑñ0-9\s-]+$/. Must be at least 1 character. Must not be greater than 50 characters. Example: vmqeopfuudtdsufvyvddq

perfilURLInicial   string  optional  

url del perfil. Example: /admin

idPerfil   integer   

ID del perfil a editar. Example: 2

perfilAlias   string   

Nombre del perfil. Example: Administrador

Eliminar perfil

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/perfil/eliminar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idPerfil\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/eliminar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idPerfil": 2
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

DELETE api/v1/base/perfil/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the eliminar. Example: consequatur

Body Parameters

idPerfil   integer   

ID del perfil a eliminar. Example: 2

Informacion de perfil

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/perfil/info-perfil/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idPerfil\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/info-perfil/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idPerfil": 2
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/perfil/info-perfil/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the info perfil. Example: consequatur

Body Parameters

idPerfil   integer   

ID del perfil a obtener. Example: 2

Activar perfil

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/perfil/activar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idPerfil\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/activar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idPerfil": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/perfil/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the activar. Example: consequatur

Body Parameters

idPerfil   integer   

ID del perfil a activar. Example: 2

Lista de perfiles menus

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/perfil/lista-perfil-menu" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/lista-perfil-menu"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/perfil/lista-perfil-menu

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Accion de perfil menu

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/perfil/accion-perfil-menu" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/accion-perfil-menu"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/perfil/accion-perfil-menu

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Eliminar perfil menu

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/perfil/eliminar-perfil-menu/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/eliminar-perfil-menu/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/base/perfil/eliminar-perfil-menu/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the eliminar perfil menu. Example: consequatur

Lista de perfiles rutas

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/perfil/lista-perfil-ruta" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/lista-perfil-ruta"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/perfil/lista-perfil-ruta

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Accion de perfil ruta

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/perfil/accion-perfil-ruta" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/accion-perfil-ruta"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/perfil/accion-perfil-ruta

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Eliminar perfil ruta

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/perfil/eliminar-perfil-ruta/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/eliminar-perfil-ruta/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/base/perfil/eliminar-perfil-ruta/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the eliminar perfil rutum. Example: consequatur

Lista de menus

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/perfil/lista-menus/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/lista-menus/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/perfil/lista-menus/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the lista menu. Example: consequatur

Lista de rutas

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/perfil/lista-rutas/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/perfil/lista-rutas/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/perfil/lista-rutas/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the lista ruta. Example: consequatur

País

Lista de países

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/pais/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/pais/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/pais/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Agregar país

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/pais/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"paisAlias\": \"Perú\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/pais/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "paisAlias": "Perú"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/pais/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

paisAlias   string   

Nombre del país. Example: Perú

Editar país

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/pais/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"paisAlias\": \"Perú2\",
    \"idPais\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/pais/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "paisAlias": "Perú2",
    "idPais": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/pais/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

paisAlias   string   

Nombre del país. Example: Perú2

idPais   integer   

ID del país a editar. Example: 2

Eliminar país

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/pais/eliminar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idPais\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/pais/eliminar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idPais": 2
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

DELETE api/v1/base/pais/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the eliminar. Example: consequatur

Body Parameters

idPais   integer   

ID del país a eliminar. Example: 2

Información de país

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/pais/info-pais/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idPais\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/pais/info-pais/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idPais": 2
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/pais/info-pais/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the info pai. Example: consequatur

Body Parameters

idPais   integer   

ID del país a obtener. Example: 2

Activar país

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/pais/activar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idPais\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/pais/activar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idPais": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/pais/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the activar. Example: consequatur

Body Parameters

idPais   integer   

ID del país a activar. Example: 2

Datos para formulario de país

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/pais/datosParaFormulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/pais/datosParaFormulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/pais/datosParaFormulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Estado

Lista de estados

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/estado/lista/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idPais\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/estado/lista/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idPais": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/estado/lista/{idPais}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

idPais   string   

Example: consequatur

Body Parameters

idPais   integer   

ID del país. Example: 1

Agregar estado

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/estado/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"estadoAlias\": \"Lima\",
    \"idPais\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/estado/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "estadoAlias": "Lima",
    "idPais": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/estado/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

estadoAlias   string   

Nombre del estado. Example: Lima

idPais   integer   

ID del país. Example: 1

Editar estado

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/estado/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"estadoAlias\": \"Limas\",
    \"idPais\": \"consequatur\",
    \"idEstado\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/estado/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "estadoAlias": "Limas",
    "idPais": "consequatur",
    "idEstado": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/estado/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

estadoAlias   string   

Nombre del estado. Example: Limas

idPais   string   

The idPais of an existing record in the base_pais table. Example: consequatur

idEstado   integer   

ID del estado a editar. Example: 2

Eliminar estado

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/estado/eliminar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idEstado\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/estado/eliminar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idEstado": 2
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

DELETE api/v1/base/estado/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the eliminar. Example: consequatur

Body Parameters

idEstado   integer   

ID del estado a eliminar. Example: 2

Información de estado

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/estado/info-estado/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idEstado\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/estado/info-estado/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idEstado": 2
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/estado/info-estado/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the info estado. Example: consequatur

Body Parameters

idEstado   integer   

ID del estado a obtener. Example: 2

Activar estado

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/estado/activar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idEstado\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/estado/activar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idEstado": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/estado/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the activar. Example: consequatur

Body Parameters

idEstado   integer   

ID del estado a activar. Example: 2

Datos para formulario de estado

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/estado/datosParaFormulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/estado/datosParaFormulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/estado/datosParaFormulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Delegación

Lista de delegaciones

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/delegacion/lista/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idEstado\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/delegacion/lista/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idEstado": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/delegacion/lista/{idEstado}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

idEstado   string   

Example: consequatur

Body Parameters

idEstado   integer   

ID del estado. Example: 1

Agregar delegación

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/delegacion/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"delegacionAlias\": \"Delegación Lima\",
    \"delegacionLada\": \"amnii\",
    \"idEstado\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/delegacion/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "delegacionAlias": "Delegación Lima",
    "delegacionLada": "amnii",
    "idEstado": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/delegacion/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

delegacionAlias   string   

Nombre de la delegación. Example: Delegación Lima

delegacionLada   string  optional  

Must be at least 1 character. Must not be greater than 5 characters. Example: amnii

idEstado   integer   

ID del estado. Example: 1

Editar delegación

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/delegacion/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"delegacionAlias\": \"Delegación Lima\",
    \"delegacionLada\": \"amnii\",
    \"idEstado\": \"consequatur\",
    \"idDelegacion\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/delegacion/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "delegacionAlias": "Delegación Lima",
    "delegacionLada": "amnii",
    "idEstado": "consequatur",
    "idDelegacion": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/delegacion/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

delegacionAlias   string   

Nombre de la delegación. Example: Delegación Lima

delegacionLada   string  optional  

Must be at least 1 character. Must not be greater than 5 characters. Example: amnii

idEstado   string   

The idEstado of an existing record in the base_estado table. Example: consequatur

idDelegacion   integer   

ID de la delegación a editar. Example: 2

Eliminar delegación

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/delegacion/eliminar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idDelegacion\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/delegacion/eliminar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idDelegacion": 2
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

DELETE api/v1/base/delegacion/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the eliminar. Example: consequatur

Body Parameters

idDelegacion   integer   

ID de la delegación a eliminar. Example: 2

Información de delegación

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/delegacion/info-delegacion/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idDelegacion\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/delegacion/info-delegacion/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idDelegacion": 2
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/delegacion/info-delegacion/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the info delegacion. Example: consequatur

Body Parameters

idDelegacion   integer   

ID de la delegación a obtener. Example: 2

Activar delegación

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/delegacion/activar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/delegacion/activar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/delegacion/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the activar. Example: consequatur

Datos para formulario de delegación

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/delegacion/datosParaFormulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/delegacion/datosParaFormulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/delegacion/datosParaFormulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Colonia

Lista de colonias

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/colonia/lista/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idDelegacion\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/colonia/lista/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idDelegacion": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/colonia/lista/{idDelegacion}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

idDelegacion   string   

Example: consequatur

Body Parameters

idDelegacion   integer   

ID de la delegación. Example: 1

Agregar colonia

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/colonia/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"coloniaAlias\": \"Colonia Lima\",
    \"coloniaCodigoPostal\": \"12345\",
    \"idDelegacion\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/colonia/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "coloniaAlias": "Colonia Lima",
    "coloniaCodigoPostal": "12345",
    "idDelegacion": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/colonia/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

coloniaAlias   string   

Nombre de la colonia. Example: Colonia Lima

coloniaCodigoPostal   string   

Código postal de la colonia. Example: 12345

idDelegacion   integer   

ID de la delegación. Example: 1

Editar colonia

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/colonia/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"coloniaAlias\": \"Colonia Lima\",
    \"coloniaCodigoPostal\": \"12345\",
    \"idDelegacion\": 1,
    \"idColonia\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/colonia/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "coloniaAlias": "Colonia Lima",
    "coloniaCodigoPostal": "12345",
    "idDelegacion": 1,
    "idColonia": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/colonia/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

coloniaAlias   string   

Nombre de la colonia. Example: Colonia Lima

coloniaCodigoPostal   string   

Código postal de la colonia. Example: 12345

idDelegacion   integer   

ID de la delegación. Example: 1

idColonia   integer   

ID de la colonia a editar. Example: 1

Eliminar colonia

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/colonia/eliminar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/colonia/eliminar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/base/colonia/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the eliminar. Example: consequatur

Información de colonia

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/colonia/info-colonia/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/colonia/info-colonia/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/colonia/info-colonia/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the info colonium. Example: consequatur

Activar colonia

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/colonia/activar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/colonia/activar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/colonia/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the activar. Example: consequatur

Datos para formulario de colonia

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/colonia/datosParaFormulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/colonia/datosParaFormulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/colonia/datosParaFormulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Código Postal

Buscar información geográfica completa por código postal

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/codigo-postal/buscar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"codigo_postal\": \"12345\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/codigo-postal/buscar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "codigo_postal": "12345"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/codigo-postal/buscar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

codigo_postal   string   

Código postal a buscar. Example: 12345

Obtener colonias para componente select

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/codigo-postal/colonias-select" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"codigo_postal\": \"12345\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/codigo-postal/colonias-select"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "codigo_postal": "12345"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/codigo-postal/colonias-select

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

codigo_postal   string   

Código postal a buscar. Example: 12345

Validar código postal

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/codigo-postal/validar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"codigo_postal\": \"12345\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/codigo-postal/validar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "codigo_postal": "12345"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/codigo-postal/validar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

codigo_postal   string   

Código postal a validar. Example: 12345

Response

Response Fields

valido   boolean   

Indica si el código postal es válido. Example: true

Datos para autocompletado de formularios

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/codigo-postal/datos-formulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"codigo_postal\": \"12345\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/codigo-postal/datos-formulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "codigo_postal": "12345"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/codigo-postal/datos-formulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

codigo_postal   string   

Código postal a buscar. Example: 12345

Búsqueda rápida de código postal

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/codigo-postal/busqueda-rapida" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"codigo_postal\": \"12345\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/codigo-postal/busqueda-rapida"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "codigo_postal": "12345"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/codigo-postal/busqueda-rapida

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

codigo_postal   string   

Código postal a buscar. Example: 12345

Banco

Lista de bancos

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/banco/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/banco/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/banco/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Agregar banco

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/banco/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bancoAlias\": \"Banco de Prueba\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/banco/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "bancoAlias": "Banco de Prueba"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/banco/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

bancoAlias   string   

Nombre del banco. Example: Banco de Prueba

Editar banco

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/banco/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"bancoAlias\": \"Banco de Prueba\",
    \"idBanco\": 0
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/banco/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "bancoAlias": "Banco de Prueba",
    "idBanco": 0
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/banco/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

bancoAlias   string   

Nombre del banco. Example: Banco de Prueba

idBanco   integer   

ID del banco a editar base64. Example: 0

Eliminar banco

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/banco/eliminar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idBanco\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/banco/eliminar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idBanco": 1
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

DELETE api/v1/base/banco/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the eliminar. Example: consequatur

Body Parameters

idBanco   integer   

ID del banco a eliminar. Example: 1

Informacion de banco

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/banco/info-banco/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idBanco\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/banco/info-banco/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idBanco": 1
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/banco/info-banco/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the info banco. Example: consequatur

Body Parameters

idBanco   integer   

ID del banco a eliminar. Example: 1

Activar banco

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/banco/activar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idBanco\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/banco/activar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idBanco": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/banco/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the activar. Example: consequatur

Body Parameters

idBanco   integer   

ID del banco a activar. Example: 1

Datos para formulario

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/banco/datosParaFormulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/banco/datosParaFormulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/banco/datosParaFormulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Empresa

Lista de empresas

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/empresa/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"empresaNombre\": \"Tequila y Mezcales\",
    \"empresaRFC\": \"TMX010203ABC\",
    \"empresaEmail\": \"contacto@tms.com\",
    \"empresaTipo\": \"Interna\",
    \"empresaTipoContribuyente\": \"Moral\",
    \"empresaEstado\": \"Activo\",
    \"searchQuery\": \"tequila\",
    \"sort_field\": \"idEmpresa\",
    \"sort_direction\": \"asc\",
    \"perPage\": 10
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/empresa/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "empresaNombre": "Tequila y Mezcales",
    "empresaRFC": "TMX010203ABC",
    "empresaEmail": "contacto@tms.com",
    "empresaTipo": "Interna",
    "empresaTipoContribuyente": "Moral",
    "empresaEstado": "Activo",
    "searchQuery": "tequila",
    "sort_field": "idEmpresa",
    "sort_direction": "asc",
    "perPage": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/empresa/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

empresaNombre   string  optional  

optional Example: Tequila y Mezcales

empresaRFC   string  optional  

optional Example: TMX010203ABC

empresaEmail   string  optional  

optional Example: contacto@tms.com

empresaTipo   string  optional  

optional ('Interna'|'Externa') Example: Interna

empresaTipoContribuyente   string  optional  

optional ('Fisica'|'Moral') Example: Moral

empresaEstado   string  optional  

optional ('Activo'|'Inactivo') Example: Activo

searchQuery   string  optional  

optional Búsqueda general. Example: tequila

sort_field   string  optional  

optional Example: idEmpresa

sort_direction   string  optional  

optional ('asc'|'desc') Example: asc

perPage   integer  optional  

optional Example: 10

Crear empresa

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/empresa/crear" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"empresaNombre\": \"Tequila y Mezcales\",
    \"empresaDireccion\": \"vmqeopfuudtdsufvyvddq\",
    \"empresaRazonSocial\": \"amniihfqcoynlazghdtqt\",
    \"empresaRFC\": \"TMX010203ABC\",
    \"empresaTelefono\": \"+52 33 1234 5678\",
    \"empresaEmail\": \"contacto@tms.com\",
    \"empresaCoordenadas\": \"yvojcybzvrbyickznkygl\",
    \"empresaTipoContribuyente\": \"Moral\",
    \"empresaTipo\": \"Interna\",
    \"empresaFechaAlta\": \"2025-01-15\",
    \"empresaEstado\": \"consequatur\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/empresa/crear"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "empresaNombre": "Tequila y Mezcales",
    "empresaDireccion": "vmqeopfuudtdsufvyvddq",
    "empresaRazonSocial": "amniihfqcoynlazghdtqt",
    "empresaRFC": "TMX010203ABC",
    "empresaTelefono": "+52 33 1234 5678",
    "empresaEmail": "contacto@tms.com",
    "empresaCoordenadas": "yvojcybzvrbyickznkygl",
    "empresaTipoContribuyente": "Moral",
    "empresaTipo": "Interna",
    "empresaFechaAlta": "2025-01-15",
    "empresaEstado": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/empresa/crear

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idEmpresa   string  optional  
empresaNombre   string   

Example: Tequila y Mezcales

empresaDireccion   string  optional  

Must not be greater than 100 characters. Example: vmqeopfuudtdsufvyvddq

empresaRazonSocial   string  optional  

Must not be greater than 100 characters. Example: amniihfqcoynlazghdtqt

empresaRFC   string  optional  

optional Example: TMX010203ABC

empresaTelefono   string  optional  

optional Example: +52 33 1234 5678

empresaEmail   string  optional  

optional Example: contacto@tms.com

empresaCoordenadas   string  optional  

Must not be greater than 50 characters. Example: yvojcybzvrbyickznkygl

empresaTipoContribuyente   string  optional  

optional ('Fisica'|'Moral') Example: Moral

empresaTipo   string  optional  

optional ('Interna'|'Externa') Example: Interna

empresaFechaAlta   date  optional  

optional (YYYY-MM-DD) Example: 2025-01-15

empresaEstado   string  optional  

optional ('Activo'|'Inactivo') Default: Activo Example: consequatur

Editar empresa

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/empresa/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idEmpresa\": \"MQ==\",
    \"empresaNombre\": \"consequatur\",
    \"empresaDireccion\": \"vmqeopfuudtdsufvyvddq\",
    \"empresaRazonSocial\": \"amniihfqcoynlazghdtqt\",
    \"empresaRFC\": \"consequatur\",
    \"empresaTelefono\": \"consequatur\",
    \"empresaEmail\": \"qkunze@example.com\",
    \"empresaCoordenadas\": \"yvojcybzvrbyickznkygl\",
    \"empresaTipoContribuyente\": \"consequatur\",
    \"empresaTipo\": \"consequatur\",
    \"empresaFechaAlta\": \"consequatur\",
    \"empresaEstado\": \"consequatur\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/empresa/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idEmpresa": "MQ==",
    "empresaNombre": "consequatur",
    "empresaDireccion": "vmqeopfuudtdsufvyvddq",
    "empresaRazonSocial": "amniihfqcoynlazghdtqt",
    "empresaRFC": "consequatur",
    "empresaTelefono": "consequatur",
    "empresaEmail": "qkunze@example.com",
    "empresaCoordenadas": "yvojcybzvrbyickznkygl",
    "empresaTipoContribuyente": "consequatur",
    "empresaTipo": "consequatur",
    "empresaFechaAlta": "consequatur",
    "empresaEstado": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/empresa/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idEmpresa   string   

ID en base64. Example: MQ==

empresaNombre   string  optional  

optional Example: consequatur

empresaDireccion   string  optional  

Must not be greater than 100 characters. Example: vmqeopfuudtdsufvyvddq

empresaRazonSocial   string  optional  

Must not be greater than 100 characters. Example: amniihfqcoynlazghdtqt

empresaRFC   string  optional  

optional Example: consequatur

empresaTelefono   string  optional  

optional Example: consequatur

empresaEmail   string  optional  

optional Example: qkunze@example.com

empresaCoordenadas   string  optional  

Must not be greater than 50 characters. Example: yvojcybzvrbyickznkygl

empresaTipoContribuyente   string  optional  

optional ('Fisica'|'Moral') Example: consequatur

empresaTipo   string  optional  

optional ('Interna'|'Externa') Example: consequatur

empresaFechaAlta   date  optional  

optional (YYYY-MM-DD) Example: consequatur

empresaEstado   string  optional  

optional ('Activo'|'Inactivo') Example: consequatur

Inactivar empresa

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/empresa/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/empresa/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/base/empresa/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Activar empresa

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/empresa/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/empresa/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/empresa/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Datos para formulario de empresa

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/empresa/form-data" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/empresa/form-data"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/empresa/form-data

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Información de empresa

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/empresa/info/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/empresa/info/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/empresa/info/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Datos para detalle de empresa

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/empresa/detalle/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/empresa/detalle/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/empresa/detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Sucursal

Lista de sucursales

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/sucursal/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idSucursal\": \"MQ==\",
    \"idEmpresa\": \"MQ==\",
    \"idSucursalSuperior\": \"Mg==\",
    \"sucursalNombre\": \"Sucursal Centro\",
    \"sucursalTipo\": \"Sucursal\",
    \"sucursalVentaNocturna\": \"No\",
    \"sucursalEstado\": \"Activo\",
    \"searchQuery\": \"Centro\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idSucursal": "MQ==",
    "idEmpresa": "MQ==",
    "idSucursalSuperior": "Mg==",
    "sucursalNombre": "Sucursal Centro",
    "sucursalTipo": "Sucursal",
    "sucursalVentaNocturna": "No",
    "sucursalEstado": "Activo",
    "searchQuery": "Centro"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/sucursal/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idSucursal   string  optional  

optional ID de la sucursal (base64). Example: MQ==

idEmpresa   string  optional  

optional ID de la empresa (base64). Example: MQ==

idSucursalSuperior   string  optional  

optional ID de la sucursal superior (base64). Example: Mg==

sucursalNombre   string  optional  

optional Nombre. Example: Sucursal Centro

sucursalTipo   string  optional  

optional Tipo ('Almacén'|'Sucursal'). Example: Sucursal

sucursalVentaNocturna   string  optional  

optional 'Si'|'No'. Example: No

sucursalEstado   string  optional  

optional 'Activo'|'Inactivo'. Example: Activo

searchQuery   string  optional  

Búsqueda general. Example: Centro

Datos para formulario de sucursal

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/sucursal/form-data" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal/form-data"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/sucursal/form-data

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Información de sucursal

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/sucursal/info/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal/info/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/sucursal/info/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Agregar sucursal

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/sucursal/crear" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idEmpresa\": \"MQ==\",
    \"idSucursalSuperior\": \"Mg==\",
    \"sucursalNombre\": \"Sucursal Centro\",
    \"sucursalDireccion\": \"Av. Reforma 123\",
    \"sucursalTelefono\": \"555-1234\",
    \"sucursalEmail\": \"centro@empresa.com\",
    \"sucursalTipo\": \"Sucursal\",
    \"sucursalVentaNocturna\": \"No\",
    \"sucursalVentaNocturnaHoraInicio\": \"20:00\",
    \"sucursalVentaNocturnaHoraFin\": \"23:00\",
    \"sucursalVentaNocturnaPorcentaje\": 10.5
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal/crear"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idEmpresa": "MQ==",
    "idSucursalSuperior": "Mg==",
    "sucursalNombre": "Sucursal Centro",
    "sucursalDireccion": "Av. Reforma 123",
    "sucursalTelefono": "555-1234",
    "sucursalEmail": "centro@empresa.com",
    "sucursalTipo": "Sucursal",
    "sucursalVentaNocturna": "No",
    "sucursalVentaNocturnaHoraInicio": "20:00",
    "sucursalVentaNocturnaHoraFin": "23:00",
    "sucursalVentaNocturnaPorcentaje": 10.5
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/sucursal/crear

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idSucursal   string  optional  
idEmpresa   string   

ID de la empresa (base64). Example: MQ==

idSucursalSuperior   string  optional  

optional ID de la sucursal superior (base64). Example: Mg==

sucursalNombre   string   

Nombre. Example: Sucursal Centro

sucursalDireccion   string  optional  

optional Dirección. Example: Av. Reforma 123

sucursalTelefono   string  optional  

optional Teléfono. Example: 555-1234

sucursalEmail   string  optional  

optional Email. Example: centro@empresa.com

sucursalTipo   string  optional  

optional 'Almacén'|'Sucursal'. Example: Sucursal

sucursalVentaNocturna   string   

'Si'|'No'. Example: No

sucursalVentaNocturnaHoraInicio   string  optional  

optional HH:mm (si Si). Example: 20:00

sucursalVentaNocturnaHoraFin   string  optional  

optional HH:mm (si Si). Example: 23:00

sucursalVentaNocturnaPorcentaje   number  optional  

optional 0–100 (si Si). Example: 10.5

sucursalEstado   string  optional  

Editar sucursal

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/sucursal/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idSucursal\": \"MQ==\",
    \"idEmpresa\": \"MQ==\",
    \"idSucursalSuperior\": \"Mg==\",
    \"sucursalNombre\": \"Sucursal Centro\",
    \"sucursalDireccion\": \"Av. Reforma 123\",
    \"sucursalTelefono\": \"555-1234\",
    \"sucursalEmail\": \"centro@empresa.com\",
    \"sucursalTipo\": \"Sucursal\",
    \"sucursalVentaNocturna\": \"No\",
    \"sucursalVentaNocturnaHoraInicio\": \"20:00\",
    \"sucursalVentaNocturnaHoraFin\": \"23:00\",
    \"sucursalVentaNocturnaPorcentaje\": 10.5,
    \"sucursalEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idSucursal": "MQ==",
    "idEmpresa": "MQ==",
    "idSucursalSuperior": "Mg==",
    "sucursalNombre": "Sucursal Centro",
    "sucursalDireccion": "Av. Reforma 123",
    "sucursalTelefono": "555-1234",
    "sucursalEmail": "centro@empresa.com",
    "sucursalTipo": "Sucursal",
    "sucursalVentaNocturna": "No",
    "sucursalVentaNocturnaHoraInicio": "20:00",
    "sucursalVentaNocturnaHoraFin": "23:00",
    "sucursalVentaNocturnaPorcentaje": 10.5,
    "sucursalEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/sucursal/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idSucursal   string   

ID de la sucursal (base64). Example: MQ==

idEmpresa   string   

ID de la empresa (base64). Example: MQ==

idSucursalSuperior   string  optional  

optional ID sucursal superior (base64). Example: Mg==

sucursalNombre   string   

Nombre. Example: Sucursal Centro

sucursalDireccion   string  optional  

optional Dirección. Example: Av. Reforma 123

sucursalTelefono   string  optional  

optional Teléfono. Example: 555-1234

sucursalEmail   string  optional  

optional Email. Example: centro@empresa.com

sucursalTipo   string  optional  

optional 'Almacén'|'Sucursal'. Example: Sucursal

sucursalVentaNocturna   string   

'Si'|'No'. Example: No

sucursalVentaNocturnaHoraInicio   string  optional  

optional HH:mm (si Si). Example: 20:00

sucursalVentaNocturnaHoraFin   string  optional  

optional HH:mm (si Si). Example: 23:00

sucursalVentaNocturnaPorcentaje   number  optional  

optional 0–100 (si Si). Example: 10.5

sucursalEstado   string  optional  

optional 'Activo'|'Inactivo'. Example: Activo

Inactivar sucursal (eliminar lógico)

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/base/sucursal/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/base/sucursal/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Activar sucursal

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/sucursal/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/sucursal/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Datos para detalle de sucursal

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/sucursal/detalle/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal/detalle/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/sucursal/detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Sucursal-Usuario

Lista de asignaciones usuario-sucursal

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idSucursalUsuario\": \"MQ==\",
    \"idUsuario\": \"MQ==\",
    \"idSucursal\": \"MQ==\",
    \"sucursalUsuarioEstado\": \"Activo\",
    \"perPage\": 10,
    \"sort_field\": \"idSucursalUsuario\",
    \"sort_direction\": \"asc\",
    \"typeData\": \"all\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idSucursalUsuario": "MQ==",
    "idUsuario": "MQ==",
    "idSucursal": "MQ==",
    "sucursalUsuarioEstado": "Activo",
    "perPage": 10,
    "sort_field": "idSucursalUsuario",
    "sort_direction": "asc",
    "typeData": "all"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/sucursal-usuario/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idSucursalUsuario   string  optional  

optional ID de la asignación (base64). Example: MQ==

idUsuario   string  optional  

optional ID del usuario (base64). Example: MQ==

idSucursal   string  optional  

optional ID de la sucursal (base64). Example: MQ==

sucursalUsuarioEstado   string  optional  

optional 'Activo'|'Inactivo'. Example: Activo

perPage   integer  optional  

optional Registros por página. Example: 10

sort_field   string  optional  

optional Campo de ordenamiento. Example: idSucursalUsuario

sort_direction   string  optional  

optional Dirección de ordenamiento ('asc'|'desc'). Example: asc

typeData   string  optional  

optional Si se envía, devuelve colección completa sin paginar. Example: all

Datos para formulario de asignación Devuelve usuarios, todas las sucursales activas y, si se envía idUsuario, separa las sucursales en disponibles y asignadas.

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/form-data" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idUsuario\": \"MQ==\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/form-data"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idUsuario": "MQ=="
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/sucursal-usuario/form-data

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idUsuario   string  optional  

optional ID del usuario (base64) para precargar asignaciones. Example: MQ==

Información de una asignación

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/info/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/info/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/base/sucursal-usuario/info/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID de la asignación en base64. Example: MQ==

Crear/actualizar asignaciones usuario-sucursal (múltiple)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/crear" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idUsuario\": \"MQ==\",
    \"idSucursal\": 17,
    \"idSucursales\": [
        1,
        2,
        3
    ],
    \"sucursalesEliminadas\": [
        4,
        5,
        6
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/crear"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idUsuario": "MQ==",
    "idSucursal": 17,
    "idSucursales": [
        1,
        2,
        3
    ],
    "sucursalesEliminadas": [
        4,
        5,
        6
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/sucursal-usuario/crear

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idUsuario   string   

ID del usuario (base64). Example: MQ==

idSucursal   integer   

The idSucursal of an existing record in the base_sucursal table. Example: 17

sucursalUsuarioEstado   string  optional  
idSucursales   string[]  optional  

optional Arreglo de IDs de sucursales a asignar (numéricos, NO codificados). Si existe una relación inactiva, la reactiva.

sucursalesEliminadas   string[]  optional  

optional Arreglo de IDs de SucursalUsuario a inactivar (numéricos, NO codificados).

Inactivar asignaciones (eliminación lógica múltiple)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/eliminar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"ids\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/eliminar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "ids": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/base/sucursal-usuario/eliminar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

ids   string[]   

Arreglo de IDs de asignaciones a inactivar (numéricos, NO codificados).

Activar asignación

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/base/sucursal-usuario/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/base/sucursal-usuario/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID de la asignación en base64. Example: MQ==

Compras

Categoria Proveedor

Lista de categorías de proveedores

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCategoriaProveedorSuperior\": \"MQ==\",
    \"categoriaProveedorAlias\": \"VIP\",
    \"categoriaProveedorEstado\": \"Activo\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCategoriaProveedorSuperior": "MQ==",
    "categoriaProveedorAlias": "VIP",
    "categoriaProveedorEstado": "Activo",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/categoria-proveedor/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCategoriaProveedorSuperior   string  optional  

optional ID de la categoría del proveedor. Example: MQ==

categoriaProveedorAlias   string  optional  

optional Alias de la categoría del proveedor. Example: VIP

categoriaProveedorEstado   string  optional  

optional Estado de la categoría del proveedor. Example: Activo

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Información de categoría proveedor

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/info-categoria-proveedor/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/info-categoria-proveedor/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/compras/categoria-proveedor/info-categoria-proveedor/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Agregar categoría proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCategoriaProveedorSuperior\": \"MQ==\",
    \"categoriaProveedorAlias\": \"VIP\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCategoriaProveedorSuperior": "MQ==",
    "categoriaProveedorAlias": "VIP"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/categoria-proveedor/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCategoriaProveedorSuperior   string  optional  

optional ID de la categoría del proveedor superior (codificado en base64, debe existir en com_categoriaproveedor). Example: MQ==

categoriaProveedorAlias   string   

Alias de la categoría del proveedor. Máximo 75 caracteres, debe ser único. Example: VIP

Editar categoría proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCategoriaProveedor\": \"MQ==\",
    \"idCategoriaProveedorSuperior\": \"MQ==\",
    \"categoriaProveedorAlias\": \"VIP\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCategoriaProveedor": "MQ==",
    "idCategoriaProveedorSuperior": "MQ==",
    "categoriaProveedorAlias": "VIP"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/categoria-proveedor/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCategoriaProveedor   string   

ID de la categoría del proveedor (codificado en base64, debe existir en com_categoriaproveedor). Example: MQ==

idCategoriaProveedorSuperior   string  optional  

optional ID de la categoría del proveedor superior (codificado en base64, debe existir en com_categoriaproveedor). Example: MQ==

categoriaProveedorAlias   string   

Alias de la categoría del proveedor. Máximo 70 caracteres, debe ser único (excepto el registro actual). Example: VIP

Eliminar categoría proveedor

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/compras/categoria-proveedor/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Activar categoría proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/categoria-proveedor/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/compras/categoria-proveedor/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Proveedor

Lista de proveedores

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idProveedor\": \"MQ==\",
    \"idBanco\": \"MQ==\",
    \"proveedorNombre\": \"VIP\",
    \"proveedorRazonSocial\": \"VIP S.A.\",
    \"proveedorDireccion\": \"Calle 123\",
    \"proveedorCuenta\": \"1234567890\",
    \"proveedorTelefono\": 555,
    \"proveedorEmail\": \"vip@example.com\",
    \"proveedorRFC\": \"VIP123456789\",
    \"proveedorContacto\": \"Juan Perez\",
    \"proveedorEstado\": \"Activo\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idProveedor": "MQ==",
    "idBanco": "MQ==",
    "proveedorNombre": "VIP",
    "proveedorRazonSocial": "VIP S.A.",
    "proveedorDireccion": "Calle 123",
    "proveedorCuenta": "1234567890",
    "proveedorTelefono": 555,
    "proveedorEmail": "vip@example.com",
    "proveedorRFC": "VIP123456789",
    "proveedorContacto": "Juan Perez",
    "proveedorEstado": "Activo",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idProveedor   string  optional  

optional ID del proveedor. Example: MQ==

idBanco   string  optional  

optional ID del banco. Example: MQ==

proveedorNombre   string  optional  

optional Nombre del proveedor. Example: VIP

proveedorRazonSocial   string  optional  

optional Razon social del proveedor. Example: VIP S.A.

proveedorDireccion   string  optional  

optional Dirección del proveedor. Example: Calle 123

proveedorCuenta   string  optional  

optional Cuenta del proveedor. Example: 1234567890

proveedorTelefono   integer  optional  

optional Teléfono del proveedor. Example: 555

proveedorEmail   string  optional  

optional Email del proveedor. Example: vip@example.com

proveedorRFC   string  optional  

optional RFC del proveedor. Example: VIP123456789

proveedorContacto   string  optional  

optional Contacto del proveedor. Example: Juan Perez

proveedorEstado   string  optional  

optional Estado del proveedor. Example: Activo

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Datos para formulario de proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/datos-para-formulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/datos-para-formulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/datos-para-formulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Informacion de proveedor

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/compras/proveedor/info-proveedor/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/info-proveedor/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/compras/proveedor/info-proveedor/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Agregar proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idBanco\": \"MQ==\",
    \"idCategoriaProveedor\": \"Mg==\",
    \"proveedorNombre\": \"VIP\",
    \"proveedorRazonSocial\": \"VIP S.A.\",
    \"proveedorDireccion\": \"Calle 123\",
    \"proveedorCuenta\": \"1234567890\",
    \"proveedorTelefono\": \"555-1234\",
    \"proveedorEmail\": \"vip@example.com\",
    \"proveedorRFC\": \"consequatur\",
    \"proveedorContacto\": \"Juan Perez\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idBanco": "MQ==",
    "idCategoriaProveedor": "Mg==",
    "proveedorNombre": "VIP",
    "proveedorRazonSocial": "VIP S.A.",
    "proveedorDireccion": "Calle 123",
    "proveedorCuenta": "1234567890",
    "proveedorTelefono": "555-1234",
    "proveedorEmail": "vip@example.com",
    "proveedorRFC": "consequatur",
    "proveedorContacto": "Juan Perez"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idBanco   string   

ID del banco (debe existir en base_banco). Example: MQ==

idCategoriaProveedor   string   

ID de la categoría del proveedor (codificado en base64, debe existir en com_categoriaproveedor). Example: Mg==

proveedorNombre   string   

Nombre del proveedor. Máximo 75 caracteres, debe ser único. Example: VIP

proveedorRazonSocial   string  optional  

optional Razón social del proveedor. Máximo 100 caracteres, debe ser única. Example: VIP S.A.

proveedorDireccion   string  optional  

optional Dirección del proveedor. Máximo 100 caracteres. Example: Calle 123

proveedorCuenta   numeric  optional  

optional Cuenta bancaria del proveedor. Máximo 25 caracteres, solo números. Example: 1234567890

proveedorTelefono   string   

Teléfono del proveedor. Máximo 25 caracteres. Example: 555-1234

proveedorEmail   string  optional  

optional Email del proveedor. Debe ser un email válido con DNS válido, máximo 100 caracteres. Example: vip@example.com

proveedorRFC   string  optional  

optional RFC del proveedor. Exactamente 13 caracteres: 4 letras + 6 dígitos (fecha YYMMDD) + 3 caracteres alfanuméricos (homoclave). Ejemplo: ABC123456XYZ Example: consequatur

proveedorContacto   string  optional  

optional Nombre del contacto del proveedor. Máximo 75 caracteres. Example: Juan Perez

Editar proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idBanco\": \"MQ==\",
    \"idCategoriaProveedor\": \"Mg==\",
    \"idProveedor\": \"MQ==\",
    \"proveedorNombre\": \"VIP\",
    \"proveedorRazonSocial\": \"VIP S.A.\",
    \"proveedorDireccion\": \"Calle 123\",
    \"proveedorCuenta\": \"1234567890\",
    \"proveedorTelefono\": \"555-1234\",
    \"proveedorEmail\": \"vip@example.com\",
    \"proveedorRFC\": \"consequatur\",
    \"proveedorContacto\": \"Juan Perez\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idBanco": "MQ==",
    "idCategoriaProveedor": "Mg==",
    "idProveedor": "MQ==",
    "proveedorNombre": "VIP",
    "proveedorRazonSocial": "VIP S.A.",
    "proveedorDireccion": "Calle 123",
    "proveedorCuenta": "1234567890",
    "proveedorTelefono": "555-1234",
    "proveedorEmail": "vip@example.com",
    "proveedorRFC": "consequatur",
    "proveedorContacto": "Juan Perez"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idBanco   string   

ID del banco (debe existir en base_banco). Example: MQ==

idCategoriaProveedor   string   

ID de la categoría del proveedor (codificado en base64, debe existir en com_categoriaproveedor). Example: Mg==

idProveedor   string   

ID del proveedor (codificado en base64, debe existir en com_proveedor). Example: MQ==

proveedorNombre   string   

Nombre del proveedor. Máximo 75 caracteres, debe ser único (excepto el registro actual). Example: VIP

proveedorRazonSocial   string  optional  

optional Razón social del proveedor. Máximo 100 caracteres, debe ser única (excepto el registro actual). Example: VIP S.A.

proveedorDireccion   string  optional  

optional Dirección del proveedor. Máximo 100 caracteres. Example: Calle 123

proveedorCuenta   numeric  optional  

optional Cuenta bancaria del proveedor. Máximo 25 caracteres, solo números. Example: 1234567890

proveedorTelefono   string   

Teléfono del proveedor. Máximo 25 caracteres. Example: 555-1234

proveedorEmail   string  optional  

optional Email del proveedor. Debe ser un email válido con DNS válido, máximo 100 caracteres. Example: vip@example.com

proveedorRFC   string  optional  

optional RFC del proveedor. Exactamente 13 caracteres: 4 letras + 6 dígitos (fecha YYMMDD) + 3 caracteres alfanuméricos (homoclave). Ejemplo: ABC123456XYZ Example: consequatur

proveedorContacto   string  optional  

optional Nombre del contacto del proveedor. Máximo 75 caracteres. Example: Juan Perez

Eliminar proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Activar proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Exportar PDF proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/exportar-pdf" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchQuery\": \"juan\",
    \"idProveedor\": \"MQ==\",
    \"idBanco\": \"MQ==\",
    \"proveedorNombre\": \"VIP\",
    \"proveedorRazonSocial\": \"VIP S.A.\",
    \"proveedorDireccion\": \"Calle 123\",
    \"proveedorCuenta\": \"1234567890\",
    \"proveedorTelefono\": 555,
    \"proveedorEmail\": \"vip@example.com\",
    \"proveedorRFC\": \"VIP123456789\",
    \"proveedorContacto\": \"Juan Perez\",
    \"proveedorEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/exportar-pdf"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchQuery": "juan",
    "idProveedor": "MQ==",
    "idBanco": "MQ==",
    "proveedorNombre": "VIP",
    "proveedorRazonSocial": "VIP S.A.",
    "proveedorDireccion": "Calle 123",
    "proveedorCuenta": "1234567890",
    "proveedorTelefono": 555,
    "proveedorEmail": "vip@example.com",
    "proveedorRFC": "VIP123456789",
    "proveedorContacto": "Juan Perez",
    "proveedorEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/exportar-pdf

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

searchQuery   string  optional  

nullable El término de búsqueda. Example: juan

idProveedor   string  optional  

optional ID del proveedor. Example: MQ==

idBanco   string  optional  

optional ID del banco. Example: MQ==

proveedorNombre   string  optional  

optional Nombre del proveedor. Example: VIP

proveedorRazonSocial   string  optional  

optional Razon social del proveedor. Example: VIP S.A.

proveedorDireccion   string  optional  

optional Dirección del proveedor. Example: Calle 123

proveedorCuenta   string  optional  

optional Cuenta del proveedor. Example: 1234567890

proveedorTelefono   integer  optional  

optional Teléfono del proveedor. Example: 555

proveedorEmail   string  optional  

optional Email del proveedor. Example: vip@example.com

proveedorRFC   string  optional  

optional RFC del proveedor. Example: VIP123456789

proveedorContacto   string  optional  

optional Contacto del proveedor. Example: Juan Perez

proveedorEstado   string  optional  

optional El estado del proveedor. Example: Activo

Exportar EXCEL proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/exportar-excel" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchQuery\": \"juan\",
    \"idProveedor\": \"MQ==\",
    \"idBanco\": \"MQ==\",
    \"proveedorNombre\": \"VIP\",
    \"proveedorRazonSocial\": \"VIP S.A.\",
    \"proveedorDireccion\": \"Calle 123\",
    \"proveedorCuenta\": \"1234567890\",
    \"proveedorTelefono\": 555,
    \"proveedorEmail\": \"vip@example.com\",
    \"proveedorRFC\": \"VIP123456789\",
    \"proveedorContacto\": \"Juan Perez\",
    \"proveedorEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/exportar-excel"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchQuery": "juan",
    "idProveedor": "MQ==",
    "idBanco": "MQ==",
    "proveedorNombre": "VIP",
    "proveedorRazonSocial": "VIP S.A.",
    "proveedorDireccion": "Calle 123",
    "proveedorCuenta": "1234567890",
    "proveedorTelefono": 555,
    "proveedorEmail": "vip@example.com",
    "proveedorRFC": "VIP123456789",
    "proveedorContacto": "Juan Perez",
    "proveedorEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/exportar-excel

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

searchQuery   string  optional  

nullable El término de búsqueda. Example: juan

idProveedor   string  optional  

optional ID del proveedor. Example: MQ==

idBanco   string  optional  

optional ID del banco. Example: MQ==

proveedorNombre   string  optional  

optional Nombre del proveedor. Example: VIP

proveedorRazonSocial   string  optional  

optional Razon social del proveedor. Example: VIP S.A.

proveedorDireccion   string  optional  

optional Dirección del proveedor. Example: Calle 123

proveedorCuenta   string  optional  

optional Cuenta del proveedor. Example: 1234567890

proveedorTelefono   integer  optional  

optional Teléfono del proveedor. Example: 555

proveedorEmail   string  optional  

optional Email del proveedor. Example: vip@example.com

proveedorRFC   string  optional  

optional RFC del proveedor. Example: VIP123456789

proveedorContacto   string  optional  

optional Contacto del proveedor. Example: Juan Perez

proveedorEstado   string  optional  

optional El estado del proveedor. Example: Activo

Subir EXCEL proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/subir-excel" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "archivoExcel=@C:\Users\gdomi\AppData\Local\Temp\php46CA.tmp" 
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/subir-excel"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('archivoExcel', document.querySelector('input[name="archivoExcel"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/subir-excel

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

archivoExcel   file   

Archivo Excel con los proveedores a importar. Example: C:\Users\gdomi\AppData\Local\Temp\php46CA.tmp

Validar duplicados proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/validar-duplicados" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"proveedoresSeleccionados\": [
        {
            \"proveedorNombre\": \"Proveedor 1\",
            \"proveedorRFC\": \"ABC123456XYZ\",
            \"proveedorRazonSocial\": \"Proveedor 1 S.A.\"
        },
        {
            \"proveedorNombre\": \"Proveedor 2\",
            \"proveedorRFC\": \"DEF654321ABC\",
            \"proveedorRazonSocial\": \"Proveedor 2 S.A.\"
        }
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/validar-duplicados"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "proveedoresSeleccionados": [
        {
            "proveedorNombre": "Proveedor 1",
            "proveedorRFC": "ABC123456XYZ",
            "proveedorRazonSocial": "Proveedor 1 S.A."
        },
        {
            "proveedorNombre": "Proveedor 2",
            "proveedorRFC": "DEF654321ABC",
            "proveedorRazonSocial": "Proveedor 2 S.A."
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/validar-duplicados

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

proveedoresSeleccionados   string[]   

Array de proveedores seleccionados para validar duplicados por nombre, RFC y razón social.

Resumen final antes de importar

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/resumen-proveedores" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"proveedoresValidos\": [
        {
            \"proveedorNombre\": \"Pedro López\",
            \"idCategoriaProveedor\": 1,
            \"idListaPrecio\": 1,
            \"proveedorFolio\": \"FOLIO-456\",
            \"proveedorDireccion\": \"Calle Verdadera 456\",
            \"proveedorRFC\": \"RFC987654321\",
            \"proveedorEmail\": \"pedro@example.com\",
            \"proveedorTelefono\": \"7461200656\"
        }
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/resumen-proveedores"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "proveedoresValidos": [
        {
            "proveedorNombre": "Pedro López",
            "idCategoriaProveedor": 1,
            "idListaPrecio": 1,
            "proveedorFolio": "FOLIO-456",
            "proveedorDireccion": "Calle Verdadera 456",
            "proveedorRFC": "RFC987654321",
            "proveedorEmail": "pedro@example.com",
            "proveedorTelefono": "7461200656"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/resumen-proveedores

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

proveedoresValidos   string[]   

Array de proveedores válidos.

Importar proveedores confirmados

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/importar-confirmados" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"proveedoresConfirmados\": [
        {
            \"proveedorNombre\": \"Pedro López\",
            \"proveedorFolio\": \"FOLIO-456\",
            \"proveedorDireccion\": \"Calle Verdadera 456\",
            \"proveedorRFC\": \"RFC987654321\",
            \"proveedorEmail\": \"pedro@example.com\"
        }
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/importar-confirmados"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "proveedoresConfirmados": [
        {
            "proveedorNombre": "Pedro López",
            "proveedorFolio": "FOLIO-456",
            "proveedorDireccion": "Calle Verdadera 456",
            "proveedorRFC": "RFC987654321",
            "proveedorEmail": "pedro@example.com"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/importar-confirmados

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

proveedoresConfirmados   string[]   

Array de proveedores confirmados para importar.

Datos para detalle de proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/datos-para-detalle/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/datos-para-detalle/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/compras/proveedor/datos-para-detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Descargar plantilla de Excel para proveedores

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/compras/proveedor/descargar-plantilla" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/proveedor/descargar-plantilla"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/compras/proveedor/descargar-plantilla

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Requisicion

Lista de requisicion

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"requisicionNo\": \"2025-0001\",
    \"requisicionFecha\": \"2025-01-01\",
    \"usuarioAlias\": \"Juan\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "requisicionNo": "2025-0001",
    "requisicionFecha": "2025-01-01",
    "usuarioAlias": "Juan",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/requisicion-externa/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

requisicionNo   string  optional  

Número de la requisición. Example: 2025-0001

requisicionFecha   string  optional  

Fecha de la requisición. Example: 2025-01-01

usuarioAlias   string  optional  

Alias del usuario. Example: Juan

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Lista de historial requisicion

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/lista-historial" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"requisicionNo\": \"2025-0001\",
    \"requisicionFecha\": \"2025-01-01\",
    \"usuarioAlias\": \"Juan\",
    \"pedidoFecha\": \"2025-01-01\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/lista-historial"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "requisicionNo": "2025-0001",
    "requisicionFecha": "2025-01-01",
    "usuarioAlias": "Juan",
    "pedidoFecha": "2025-01-01",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/requisicion-externa/lista-historial

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

requisicionNo   string  optional  

Número de la requisición. Example: 2025-0001

requisicionFecha   string  optional  

Fecha de la requisición. Example: 2025-01-01

usuarioAlias   string  optional  

Alias del usuario. Example: Juan

pedidoFecha   string  optional  

fecha del pedido. Example: 2025-01-01

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Datos para formulario de requisicion

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/datos-para-formulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/datos-para-formulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/compras/requisicion-externa/datos-para-formulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Productos adicionales

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/producto-adicional" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idProducto\": \"MQ==\",
    \"cantidad\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/producto-adicional"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idProducto": "MQ==",
    "cantidad": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/requisicion-externa/producto-adicional

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idProducto   string  optional  

Id del producto en base64. Example: MQ==

cantidad   integer  optional  

Cantidad del producto. Example: 2

informacion de requisicion

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/info-requisicion/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/info-requisicion/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/compras/requisicion-externa/info-requisicion/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

informacion requisicion detalle

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/info-requisicion-detalle/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/info-requisicion-detalle/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/compras/requisicion-externa/info-requisicion-detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

informacion requisicion historial

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/info-requisicion-historial/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/info-requisicion-historial/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/compras/requisicion-externa/info-requisicion-historial/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Crear o editar requisición

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idRequisicion\": \"MQ==\",
    \"idSucursal\": \"MQ==\",
    \"idUsuario\": \"MQ==\",
    \"requisicionDescripcion\": \"Requisición de oficina\",
    \"requisicionObservaciones\": \"Urgente\",
    \"requisicionTipo\": \"Externa\",
    \"productos\": [
        \"consequatur\"
    ],
    \"productosAdicionales\": [
        \"consequatur\"
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idRequisicion": "MQ==",
    "idSucursal": "MQ==",
    "idUsuario": "MQ==",
    "requisicionDescripcion": "Requisición de oficina",
    "requisicionObservaciones": "Urgente",
    "requisicionTipo": "Externa",
    "productos": [
        "consequatur"
    ],
    "productosAdicionales": [
        "consequatur"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/requisicion-externa/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idRequisicion   string  optional  

optional ID de la requisición en base64 (para editar). Example: MQ==

idSucursal   string  optional  

optional ID de la sucursal en base64. Example: MQ==

idUsuario   string   

ID del usuario en base64. Example: MQ==

requisicionDescripcion   string  optional  

optional Descripción de la requisición. Máximo 250 caracteres. Example: Requisición de oficina

requisicionObservaciones   string  optional  

optional Observaciones de la requisición. Máximo 250 caracteres. Example: Urgente

requisicionTipo   string   

Tipo de la requisición. Valores válidos: Interna, Externa. Example: Externa

productos   string[]   

Array de productos. Mínimo 1 producto. Cada producto debe contener: idProducto (string, base64, único), cantidad (integer, mínimo 1).

idProducto   string   

The idProducto of an existing record in the inv_producto table. Example: consequatur

cantidad   integer   

Must be at least 1. Example: 45

*   object  optional  
idProducto   string   

ID del producto en base64. Example: consequatur

cantidad   integer   

Cantidad del producto. Mínimo 1. Example: 17

productosAdicionales   string[]  optional  

optional Array de productos adicionales. Mismo formato que productos.

Eliminar requisicion

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/compras/requisicion-externa/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Activar requisicion

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/compras/requisicion-externa/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Solicitar cotización

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/solicitar-cotizacion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idRequisicion\": \"MQ==\",
    \"idProveedores\": [
        1,
        2,
        3
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/solicitar-cotizacion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idRequisicion": "MQ==",
    "idProveedores": [
        1,
        2,
        3
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Todos los productos están relacionados"
}
 

Example response (200):


{
    "success": false,
    "incluirNoRelacionados": true,
    "idRequisicion": 1,
    "idProveedores": [
        1,
        2,
        3
    ],
    "message": "Existen productos que no están relacionados con los proveedores seleccionados..."
}
 

Request      

POST api/v1/compras/requisicion-externa/solicitar-cotizacion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idRequisicion   string   

ID de la requisición en base64. Example: MQ==

idProveedores   string[]   

Array de IDs de proveedores (integer).

Generar cotizaciones

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/generar-cotizaciones" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idRequisicion\": \"MQ==\",
    \"idProveedores\": [
        1,
        2,
        3
    ],
    \"incluirNoRelacionados\": true
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/requisicion-externa/generar-cotizaciones"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idRequisicion": "MQ==",
    "idProveedores": [
        1,
        2,
        3
    ],
    "incluirNoRelacionados": true
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "success": true,
    "message": "Cotizaciones generadas exitosamente."
}
 

Request      

POST api/v1/compras/requisicion-externa/generar-cotizaciones

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idRequisicion   string   

ID de la requisición en base64. Example: MQ==

idProveedores   string[]   

Array de IDs de proveedores (integer). Se puede enviar como array de integers, array con un string separado por comas, o un string directo separado por comas.

incluirNoRelacionados   boolean   

Indica si se deben incluir productos sin relación con los proveedores. Example: true

Pedidos proveedor

Lista de pedidos Proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/compras/pedidos-al-proveedor/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"pedidoNo\": \"2025-000\",
    \"pedidoFecha\": \"2025-01-01\",
    \"idProveedor\": \"MQ==\",
    \"pedidoFechaRecepcion\": \"2025-01-01\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/pedidos-al-proveedor/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "pedidoNo": "2025-000",
    "pedidoFecha": "2025-01-01",
    "idProveedor": "MQ==",
    "pedidoFechaRecepcion": "2025-01-01"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/compras/pedidos-al-proveedor/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

pedidoNo   string  optional  

Número de la requisición. Example: 2025-000

pedidoFecha   string  optional  

optional Razon social del proveedor. Example: 2025-01-01

idProveedor   string  optional  

optional ID del proveedor. Example: MQ==

pedidoFechaRecepcion   string  optional  

optional Razon social del proveedor. Example: 2025-01-01

Datos para formulario de Lista

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/compras/pedidos-al-proveedor/datos-para-formulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/compras/pedidos-al-proveedor/datos-para-formulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/compras/pedidos-al-proveedor/datos-para-formulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Dashboard

Métricas

Obtener todas las métricas del dashboard

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/dashboard/obtener-metricas" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idSucursal\": 1,
    \"fecha_desde\": \"2025-01-01\",
    \"fecha_hasta\": \"2025-12-31\",
    \"periodo\": \"Mensual\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/dashboard/obtener-metricas"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idSucursal": 1,
    "fecha_desde": "2025-01-01",
    "fecha_hasta": "2025-12-31",
    "periodo": "Mensual"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/dashboard/obtener-metricas

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idSucursal   integer  optional  

optional ID de sucursal (null = todas). Example: 1

fecha_desde   date  optional  

optional Fecha inicial (Y-m-d). Example: 2025-01-01

fecha_hasta   date  optional  

optional Fecha final (Y-m-d). Example: 2025-12-31

periodo   string  optional  

optional Diario|Semanal|Mensual|Anual. Example: Mensual

Calcular total en ventas (público y reutilizable)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/dashboard/total-ventas" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"fecha_desde\": \"2025-01-01\",
    \"fecha_hasta\": \"2025-12-31\",
    \"idSucursal\": 1
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/dashboard/total-ventas"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "fecha_desde": "2025-01-01",
    "fecha_hasta": "2025-12-31",
    "idSucursal": 1
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/dashboard/total-ventas

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

fecha_desde   date   

Fecha inicial. Example: 2025-01-01

fecha_hasta   date   

Fecha final. Example: 2025-12-31

idSucursal   integer  optional  

optional ID sucursal. Example: 1

Calcular ganancias (público y reutilizable) Ganancia = (Precio Venta - Precio Compra) * Cantidad Vendida

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/dashboard/ganancias" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/dashboard/ganancias"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/dashboard/ganancias

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Calcular pérdidas (público y reutilizable) Pérdidas = Costo * Cantidad perdida en Ajustes (Egreso)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/dashboard/perdidas" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/dashboard/perdidas"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/dashboard/perdidas

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Calcular ingresos y egresos por periodo (público y reutilizable)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/dashboard/ingresos-egresos" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/dashboard/ingresos-egresos"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/dashboard/ingresos-egresos

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Ventas

Obtener últimas ventas

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/dashboard/ultimas-ventas" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idSucursal\": 1,
    \"limite\": 5
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/dashboard/ultimas-ventas"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idSucursal": 1,
    "limite": 5
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/dashboard/ultimas-ventas

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idSucursal   integer  optional  

optional ID sucursal. Example: 1

limite   integer  optional  

optional Número de registros. Example: 5

Cotizaciones

Obtener últimas cotizaciones

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/dashboard/ultimas-cotizaciones" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idSucursal\": 1,
    \"limite\": 5
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/dashboard/ultimas-cotizaciones"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idSucursal": 1,
    "limite": 5
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/dashboard/ultimas-cotizaciones

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idSucursal   integer  optional  

optional ID sucursal. Example: 1

limite   integer  optional  

optional Número de registros. Example: 5

Productos

Obtener top 5 de productos

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/dashboard/top5-productos" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"tipo\": \"mas_vendidos\",
    \"idSucursal\": 1,
    \"fecha_desde\": \"2025-01-01\",
    \"fecha_hasta\": \"2025-12-31\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/dashboard/top5-productos"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "tipo": "mas_vendidos",
    "idSucursal": 1,
    "fecha_desde": "2025-01-01",
    "fecha_hasta": "2025-12-31"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/dashboard/top5-productos

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

tipo   string  optional  

optional mas_vendidos|menos_vendidos. Example: mas_vendidos

idSucursal   integer  optional  

optional ID sucursal. Example: 1

fecha_desde   date  optional  

optional Fecha inicial. Example: 2025-01-01

fecha_hasta   date  optional  

optional Fecha final. Example: 2025-12-31

Inventario

Categoría Producto

Lista de categorías de productos

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCategoriaProductoSuperior\": \"MQ==\",
    \"categoriaProductoAlias\": \"Abarrotes\",
    \"categoriaProductoEstado\": \"Activo\",
    \"searchQuery\": \"Abar\",
    \"sort_field\": \"idCategoriaProducto\",
    \"sort_direction\": \"asc\",
    \"perPage\": 10
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCategoriaProductoSuperior": "MQ==",
    "categoriaProductoAlias": "Abarrotes",
    "categoriaProductoEstado": "Activo",
    "searchQuery": "Abar",
    "sort_field": "idCategoriaProducto",
    "sort_direction": "asc",
    "perPage": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/categoria-producto/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCategoriaProductoSuperior   string  optional  

optional ID en base64 de la categoría padre. Example: MQ==

categoriaProductoAlias   string  optional  

optional Alias de la categoría. Example: Abarrotes

categoriaProductoEstado   string  optional  

optional Estado ('Activo'|'Inactivo'). Example: Activo

searchQuery   string  optional  

Búsqueda general. Example: Abar

sort_field   string  optional  

Campo de orden. Example: idCategoriaProducto

sort_direction   string  optional  

Dirección de orden ('asc'|'desc'). Example: asc

perPage   integer  optional  

Elementos por página. Example: 10

Agregar categoría de producto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCategoriaProductoSuperior\": \"MQ==\",
    \"categoriaProductoAlias\": \"Lácteos\",
    \"categoriaProductoIcono\": \"\\/images\\/categorias\\/lacteos.png\",
    \"categoriaProductoEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCategoriaProductoSuperior": "MQ==",
    "categoriaProductoAlias": "Lácteos",
    "categoriaProductoIcono": "\/images\/categorias\/lacteos.png",
    "categoriaProductoEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/categoria-producto/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCategoriaProducto   string  optional  
idCategoriaProductoSuperior   string  optional  

optional ID en base64 de la categoría padre. Example: MQ==

categoriaProductoAlias   string   

Alias de la categoría. Example: Lácteos

categoriaProductoIcono   file|url  optional  

optional Ruta o URL de icono. Example: /images/categorias/lacteos.png

categoriaProductoEstado   string  optional  

Example: Activo

Must be one of:
  • Activo
  • Inactivo

Editar categoría de producto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCategoriaProducto\": \"MQ==\",
    \"idCategoriaProductoSuperior\": \"MQ==\",
    \"categoriaProductoAlias\": \"Lácteos frescos\",
    \"categoriaProductoIcono\": \"\\/images\\/categorias\\/lacteos.png\",
    \"categoriaProductoEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCategoriaProducto": "MQ==",
    "idCategoriaProductoSuperior": "MQ==",
    "categoriaProductoAlias": "Lácteos frescos",
    "categoriaProductoIcono": "\/images\/categorias\/lacteos.png",
    "categoriaProductoEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/categoria-producto/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCategoriaProducto   string   

ID en base64. Example: MQ==

idCategoriaProductoSuperior   string  optional  

optional ID en base64 de la categoría padre. Example: MQ==

categoriaProductoAlias   string   

Alias. Example: Lácteos frescos

categoriaProductoIcono   string  optional  

optional Icono. Example: /images/categorias/lacteos.png

categoriaProductoEstado   string  optional  

optional Estado ('Activo'|'Inactivo'). Example: Activo

Eliminar (inactivar) categoría de producto

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/inventario/categoria-producto/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Activar categoría de producto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/inventario/categoria-producto/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Datos para formulario de categoría (catálogos)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/form-data" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/form-data"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/categoria-producto/form-data

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Información puntual de categoría (por ID)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/info/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/categoria-producto/info/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/categoria-producto/info/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Producto

Lista de productos

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idUnidad\": 3,
    \"idCategoriaProducto\": 1,
    \"idProductoCompuesto\": \"MQ==\",
    \"productoAlias\": \"Paracetamol\",
    \"productoMarca\": \"ACME\",
    \"productoCodigoBarras\": \"7501234567890\",
    \"productoSKU\": \"SKU-001\",
    \"productoTipo\": \"P\",
    \"productoSaldo\": \"S\",
    \"productoControlCaducidad\": \"Sí\",
    \"productoTasaIVA\": \"A\",
    \"productoEstado\": \"Activo\",
    \"searchQuery\": \"ACME\",
    \"sort_field\": \"idProducto\",
    \"sort_direction\": \"asc\",
    \"perPage\": 10
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idUnidad": 3,
    "idCategoriaProducto": 1,
    "idProductoCompuesto": "MQ==",
    "productoAlias": "Paracetamol",
    "productoMarca": "ACME",
    "productoCodigoBarras": "7501234567890",
    "productoSKU": "SKU-001",
    "productoTipo": "P",
    "productoSaldo": "S",
    "productoControlCaducidad": "Sí",
    "productoTasaIVA": "A",
    "productoEstado": "Activo",
    "searchQuery": "ACME",
    "sort_field": "idProducto",
    "sort_direction": "asc",
    "perPage": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idUnidad   integer  optional  

optional ID de unidad. Example: 3

idCategoriaProducto   integer  optional  

optional ID de categoria. Example: 1

idProductoCompuesto   string  optional  

optional ID del producto padre (base64 o id). Example: MQ==

productoAlias   string  optional  

optional Búsqueda por alias. Example: Paracetamol

productoMarca   string  optional  

optional Marca. Example: ACME

productoCodigoBarras   string  optional  

optional Código de barras. Example: 7501234567890

productoSKU   string  optional  

optional SKU. Example: SKU-001

productoTipo   string  optional  

optional Tipo (char[1]). Example: P

productoSaldo   string  optional  

optional Saldo (char[1]). Example: S

productoControlCaducidad   string  optional  

optional Control de caducidad (Sí|No). Example:

productoTasaIVA   string  optional  

optional Tasa IVA (char[1]). Example: A

productoEstado   string  optional  

optional Estado (Activo|Inactivo|Descontinuado). Example: Activo

searchQuery   string  optional  

optional Búsqueda general. Example: ACME

sort_field   string  optional  

optional Campo de orden. Example: idProducto

sort_direction   string  optional  

optional Dirección de orden (asc|desc). Example: asc

perPage   integer  optional  

optional Elementos por página. Example: 10

Crear producto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "idProductoCompuesto=consequatur"\
    --form "idCategoriaProducto=1"\
    --form "idUnidad=1"\
    --form "productoAlias=Paracetamol 500mg"\
    --form "productoMarca=ACME"\
    --form "productoFabricante=Laboratorios Salud"\
    --form "productoModelo=X100"\
    --form "productoSKU=PARA-500"\
    --form "productoCodigoBarras=ABC-75"\
    --form "productoSerie=S-0001"\
    --form "productoPresentacion=Caja con 20 tabletas"\
    --form "productoTipoCompuesto=Caja"\
    --form "productoComposicionCantidad=500"\
    --form "productoSabor=Fresa"\
    --form "productoTipo=Simple"\
    --form "productoSaldo=Sí"\
    --form "productoTasaIVA=16%"\
    --form "productoIEPS=8"\
    --form "productoEstado=Activo"\
    --form "productoControlCaducidad=Sí"\
    --form "Imagen=@C:\Users\gdomi\AppData\Local\Temp\php475A.tmp" 
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('idProductoCompuesto', 'consequatur');
body.append('idCategoriaProducto', '1');
body.append('idUnidad', '1');
body.append('productoAlias', 'Paracetamol 500mg');
body.append('productoMarca', 'ACME');
body.append('productoFabricante', 'Laboratorios Salud');
body.append('productoModelo', 'X100');
body.append('productoSKU', 'PARA-500');
body.append('productoCodigoBarras', 'ABC-75');
body.append('productoSerie', 'S-0001');
body.append('productoPresentacion', 'Caja con 20 tabletas');
body.append('productoTipoCompuesto', 'Caja');
body.append('productoComposicionCantidad', '500');
body.append('productoSabor', 'Fresa');
body.append('productoTipo', 'Simple');
body.append('productoSaldo', 'Sí');
body.append('productoTasaIVA', '16%');
body.append('productoIEPS', '8');
body.append('productoEstado', 'Activo');
body.append('productoControlCaducidad', 'Sí');
body.append('Imagen', document.querySelector('input[name="Imagen"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Example response (200):


{
    "code": 200,
    "message": "Producto agregado correctamente",
    "data": {
        "idProducto": 9
    }
}
 

Request      

POST api/v1/inventario/producto/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

idProducto   string  optional  
idProductoCompuesto   string  optional  

optional ID del producto padre (base64 o id). Example: Example: consequatur

idCategoriaProducto   integer  optional  

optional Example: 1

idUnidad   integer   

Example: 1

productoAlias   string   

Example: Paracetamol 500mg

Imagen   file   

Imagen (jpg,jpeg,png,webp; máx 4MB) Example: C:\Users\gdomi\AppData\Local\Temp\php475A.tmp

productoMarca   string  optional  

optional Example: ACME

productoFabricante   string  optional  

optional Example: Laboratorios Salud

productoModelo   string  optional  

optional Example: X100

productoSKU   string  optional  

optional Example: PARA-500

productoCodigoBarras   string   

Example: ABC-75

productoSerie   string  optional  

optional Example: S-0001

productoPresentacion   string  optional  

optional Example: Caja con 20 tabletas

productoTipoCompuesto   string  optional  

optional Example: Caja

productoComposicionCantidad   number  optional  

optional Example: 500

productoSabor   string  optional  

optional Example: Fresa

productoTipo   string   

Example: Simple

productoSaldo   string   

Example:

productoTasaIVA   string   

Example: 16%

productoIEPS   number  optional  

optional Example: 8

productoEstado   string  optional  

optional Example: Activo

productoControlCaducidad   string   

Example:

Response

Response Fields

data   object   
idProducto   integer   

ID del producto recién creado.

Editar producto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "idProducto=MQ=="\
    --form "idProductoCompuesto=MQ=="\
    --form "idCategoriaProducto=1"\
    --form "idUnidad=5"\
    --form "productoAlias=Paracetamol 500mg tabs"\
    --form "productoMarca=ACME"\
    --form "productoFabricante=Laboratorios Salud"\
    --form "productoModelo=X101"\
    --form "productoSKU=PARA-500"\
    --form "productoCodigoBarras=ABC-75"\
    --form "productoSerie=S-0002"\
    --form "productoPresentacion=Caja con 20 tabletas"\
    --form "productoTipoCompuesto=Charola"\
    --form "productoComposicionCantidad=500"\
    --form "productoSabor=Fresa"\
    --form "productoTipo=Simple"\
    --form "productoSaldo=Sí"\
    --form "productoTasaIVA=16%"\
    --form "productoIEPS=8"\
    --form "productoEstado=Activo"\
    --form "productoControlCaducidad=Sí"\
    --form "precio_publico=40"\
    --form "precio_medio=30"\
    --form "precio_mayoreo=25"\
    --form "Imagen=@C:\Users\gdomi\AppData\Local\Temp\php475D.tmp" 
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('idProducto', 'MQ==');
body.append('idProductoCompuesto', 'MQ==');
body.append('idCategoriaProducto', '1');
body.append('idUnidad', '5');
body.append('productoAlias', 'Paracetamol 500mg tabs');
body.append('productoMarca', 'ACME');
body.append('productoFabricante', 'Laboratorios Salud');
body.append('productoModelo', 'X101');
body.append('productoSKU', 'PARA-500');
body.append('productoCodigoBarras', 'ABC-75');
body.append('productoSerie', 'S-0002');
body.append('productoPresentacion', 'Caja con 20 tabletas');
body.append('productoTipoCompuesto', 'Charola');
body.append('productoComposicionCantidad', '500');
body.append('productoSabor', 'Fresa');
body.append('productoTipo', 'Simple');
body.append('productoSaldo', 'Sí');
body.append('productoTasaIVA', '16%');
body.append('productoIEPS', '8');
body.append('productoEstado', 'Activo');
body.append('productoControlCaducidad', 'Sí');
body.append('precio_publico', '40');
body.append('precio_medio', '30');
body.append('precio_mayoreo', '25');
body.append('Imagen', document.querySelector('input[name="Imagen"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

idProducto   string   

Example: MQ==

idProductoCompuesto   string  optional  

optional Example: MQ==

idCategoriaProducto   integer  optional  

optional Example: 1

idUnidad   integer   

Example: 5

productoAlias   string   

Example: Paracetamol 500mg tabs

Imagen   file  optional  

optional Nueva imagen (jpg,jpeg,png,webp; máx 4MB) Example: C:\Users\gdomi\AppData\Local\Temp\php475D.tmp

productoMarca   string  optional  

optional Example: ACME

productoFabricante   string  optional  

optional Example: Laboratorios Salud

productoModelo   string  optional  

optional Example: X101

productoSKU   string  optional  

optional Example: PARA-500

productoCodigoBarras   string   

Example: ABC-75

productoSerie   string  optional  

optional Example: S-0002

productoPresentacion   string  optional  

optional Example: Caja con 20 tabletas

productoTipoCompuesto   string  optional  

optional Example: Charola

productoComposicionCantidad   number  optional  

optional Example: 500

productoSabor   string  optional  

optional Example: Fresa

productoTipo   string   

Example: Simple

productoSaldo   string   

Example:

productoTasaIVA   string   

Example: 16%

productoIEPS   number  optional  

optional Example: 8

productoEstado   string  optional  

optional Example: Activo

productoControlCaducidad   string   

Example:

precio_publico   number  optional  

optional Si se envía, actualiza lista 1. Example: 40

precio_medio   number  optional  

optional Si se envía, actualiza lista 2. Example: 30

precio_mayoreo   number  optional  

optional Si se envía, actualiza lista 3. Example: 25

listas_precios   object  optional  

optional Alternativa a los 3 campos planos.

  • form-data: listas_precios[1]=40&listas_precios[2]=30&listas_precios[3]=25
  • JSON string: {"1":40,"2":30,"3":25}

Inactivar producto

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/inventario/producto/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Activar producto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Descontinuar producto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/descontinuar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/descontinuar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/descontinuar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Exportar PDF producto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/exportar/pdf" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchQuery\": \"gansi\",
    \"idProducto\": \"MQ==\",
    \"idUnidad\": \"MQ==\",
    \"idCategoriaProducto\": \"MQ==\",
    \"idProductoCompuesto\": \"MQ==\",
    \"productoAlias\": \"Gansito 50g\",
    \"productoMarca\": \"Marinela\",
    \"productoFabricante\": \"Bimbo\",
    \"productoModelo\": \"2024\",
    \"productoSKU\": \"GAN-50\",
    \"productoCodigoBarras\": \"75010001111\",
    \"productoSerie\": \"S-001\",
    \"productoPresentacion\": \"50g\",
    \"productoTipoCompuesto\": \"Caja\",
    \"productoSabor\": \"Chocolate\",
    \"productoTipo\": \"Simple\",
    \"productoSaldo\": \"Sí\",
    \"productoControlCaducidad\": \"Sí\",
    \"productoTasaIVA\": \"16%\",
    \"productoEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/exportar/pdf"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchQuery": "gansi",
    "idProducto": "MQ==",
    "idUnidad": "MQ==",
    "idCategoriaProducto": "MQ==",
    "idProductoCompuesto": "MQ==",
    "productoAlias": "Gansito 50g",
    "productoMarca": "Marinela",
    "productoFabricante": "Bimbo",
    "productoModelo": "2024",
    "productoSKU": "GAN-50",
    "productoCodigoBarras": "75010001111",
    "productoSerie": "S-001",
    "productoPresentacion": "50g",
    "productoTipoCompuesto": "Caja",
    "productoSabor": "Chocolate",
    "productoTipo": "Simple",
    "productoSaldo": "Sí",
    "productoControlCaducidad": "Sí",
    "productoTasaIVA": "16%",
    "productoEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/exportar/pdf

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

searchQuery   string  optional  

nullable Término de búsqueda. Example: gansi

idProducto   string  optional  

optional ID del producto (base64). Example: MQ==

idUnidad   string  optional  

optional ID de la unidad (base64). Example: MQ==

idCategoriaProducto   string  optional  

optional ID de la categoría (base64). Example: MQ==

idProductoCompuesto   string  optional  

optional ID del producto padre (base64). Example: MQ==

productoAlias   string  optional  

optional Alias. Example: Gansito 50g

productoMarca   string  optional  

optional Marca. Example: Marinela

productoFabricante   string  optional  

optional Fabricante. Example: Bimbo

productoModelo   string  optional  

optional Modelo. Example: 2024

productoSKU   string  optional  

optional SKU. Example: GAN-50

productoCodigoBarras   string  optional  

optional Código de barras. Example: 75010001111

productoSerie   string  optional  

optional Serie. Example: S-001

productoPresentacion   string  optional  

optional Presentación. Example: 50g

productoTipoCompuesto   string  optional  

optional Caja|Charola|Bolsa. Example: Caja

productoSabor   string  optional  

optional Sabor. Example: Chocolate

productoTipo   string  optional  

optional Simple|Compuesto. Example: Simple

productoSaldo   string  optional  

optional Sí|No. Example:

productoControlCaducidad   string  optional  

optional Control de caducidad (Sí|No). Example:

productoTasaIVA   string  optional  

optional 0%|16%. Example: 16%

productoEstado   string  optional  

optional Activo|Inactivo|Descontinuado. Example: Activo

Exportar EXCEL producto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/exportar/excel" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchQuery\": \"gansi\",
    \"idProducto\": \"MQ==\",
    \"idUnidad\": \"MQ==\",
    \"idCategoriaProducto\": \"MQ==\",
    \"idProductoCompuesto\": \"MQ==\",
    \"productoAlias\": \"Gansito 50g\",
    \"productoMarca\": \"Marinela\",
    \"productoFabricante\": \"Bimbo\",
    \"productoModelo\": \"2024\",
    \"productoSKU\": \"GAN-50\",
    \"productoCodigoBarras\": \"75010001111\",
    \"productoSerie\": \"S-001\",
    \"productoPresentacion\": \"50g\",
    \"productoTipoCompuesto\": \"Caja\",
    \"productoSabor\": \"Chocolate\",
    \"productoTipo\": \"Simple\",
    \"productoSaldo\": \"Sí\",
    \"productoControlCaducidad\": \"Sí\",
    \"productoTasaIVA\": \"16%\",
    \"productoEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/exportar/excel"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchQuery": "gansi",
    "idProducto": "MQ==",
    "idUnidad": "MQ==",
    "idCategoriaProducto": "MQ==",
    "idProductoCompuesto": "MQ==",
    "productoAlias": "Gansito 50g",
    "productoMarca": "Marinela",
    "productoFabricante": "Bimbo",
    "productoModelo": "2024",
    "productoSKU": "GAN-50",
    "productoCodigoBarras": "75010001111",
    "productoSerie": "S-001",
    "productoPresentacion": "50g",
    "productoTipoCompuesto": "Caja",
    "productoSabor": "Chocolate",
    "productoTipo": "Simple",
    "productoSaldo": "Sí",
    "productoControlCaducidad": "Sí",
    "productoTasaIVA": "16%",
    "productoEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/exportar/excel

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

searchQuery   string  optional  

nullable Término de búsqueda. Example: gansi

idProducto   string  optional  

optional ID del producto (base64). Example: MQ==

idUnidad   string  optional  

optional ID de la unidad (base64). Example: MQ==

idCategoriaProducto   string  optional  

optional ID de la categoría (base64). Example: MQ==

idProductoCompuesto   string  optional  

optional ID del producto padre (base64). Example: MQ==

productoAlias   string  optional  

optional Alias. Example: Gansito 50g

productoMarca   string  optional  

optional Marca. Example: Marinela

productoFabricante   string  optional  

optional Fabricante. Example: Bimbo

productoModelo   string  optional  

optional Modelo. Example: 2024

productoSKU   string  optional  

optional SKU. Example: GAN-50

productoCodigoBarras   string  optional  

optional Código de barras. Example: 75010001111

productoSerie   string  optional  

optional Serie. Example: S-001

productoPresentacion   string  optional  

optional Presentación. Example: 50g

productoTipoCompuesto   string  optional  

optional Caja|Charola|Bolsa. Example: Caja

productoSabor   string  optional  

optional Sabor. Example: Chocolate

productoTipo   string  optional  

optional Simple|Compuesto. Example: Simple

productoSaldo   string  optional  

optional Sí|No. Example:

productoControlCaducidad   string  optional  

optional Control de caducidad (Sí|No). Example:

productoTasaIVA   string  optional  

optional 0%|16%. Example: 16%

productoEstado   string  optional  

optional Activo|Inactivo|Descontinuado. Example: Activo

Subir EXCEL productos (solo preview)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/subir-excel" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "archivoExcel=@C:\Users\gdomi\AppData\Local\Temp\php477D.tmp" 
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/subir-excel"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('archivoExcel', document.querySelector('input[name="archivoExcel"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/subir-excel

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

archivoExcel   file   

Archivo Excel con los productos a importar. Example: C:\Users\gdomi\AppData\Local\Temp\php477D.tmp

Validar duplicados internos por Código de Barras dentro de la selección del usuario

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/validar-duplicados" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"productosSeleccionados\": [
        {
            \"productoAlias\": \"Gansito\",
            \"productoCodigoBarras\": \"75010001111\",
            \"idUnidad\": \"MQ==\"
        }
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/validar-duplicados"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "productosSeleccionados": [
        {
            "productoAlias": "Gansito",
            "productoCodigoBarras": "75010001111",
            "idUnidad": "MQ=="
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/validar-duplicados

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

productosSeleccionados   string[]   

Resumen final antes de importar (valida contra reglas)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/resumen" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"productosSeleccionados\": [
        \"consequatur\"
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/resumen"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "productosSeleccionados": [
        "consequatur"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/resumen

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

productosSeleccionados   string[]   
idUnidad   string   

Example: consequatur

productoAlias   string   

Must not be greater than 50 characters. Example: mqeopfuudtdsufvyvddqa

productoCodigoBarras   string   

Must not be greater than 75 characters. Example: mniihfqcoynlazghdtqtq

productoTipo   string   

Example: Compuesto

Must be one of:
  • Simple
  • Compuesto
productoSaldo   string  optional  

Example:

Must be one of:
  • No
productoTasaIVA   string  optional  

Example: 0%

Must be one of:
  • 0%
  • 16%
productoIEPS   integer  optional  

Must be between 0 and 99999. Example: 1

productoTipoCompuesto   string  optional  

Example: Bolsa

Must be one of:
  • Caja
  • Charola
  • Bolsa
productoComposicionCantidad   number  optional  

Must be between 0 and 9999999999.99. Example: 0

Importar productos confirmados

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/confirmar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"productosConfirmados\": [
        \"consequatur\"
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/confirmar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "productosConfirmados": [
        "consequatur"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/confirmar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

productosConfirmados   string[]   

Datos para formulario de producto (catálogos y combos)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/producto/form-data" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/form-data"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/producto/form-data

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Información puntual de producto (por ID)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/producto/info/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/info/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/producto/info/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Datos para detalle de producto (prefill de formulario)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/producto/detalle/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/detalle/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/producto/detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Información de ajuste de precio de producto

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/producto/info-ajuste-precio/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/info-ajuste-precio/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/producto/info-ajuste-precio/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Ajustar precio de producto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/accion-ajuste-precio" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idListaPrecioDetalle\": \"MQ==\",
    \"precioVenta\": 45.5
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/accion-ajuste-precio"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idListaPrecioDetalle": "MQ==",
    "precioVenta": 45.5
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/accion-ajuste-precio

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idListaPrecioDetalle   string   

ID del detalle de lista de precios (base64). Example: MQ==

precioVenta   number   

Nuevo precio del producto (>=0). Example: 45.5

Descargar plantilla de Excel Con Precios

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/producto/plantilla/con-precios" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/plantilla/con-precios"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/producto/plantilla/con-precios

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Descargar plantilla de Excel Sin Precios

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/producto/plantilla/sin-precios" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/plantilla/sin-precios"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/producto/plantilla/sin-precios

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Crear producto compuesto

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/compuesto/crear" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idProductoBase\": \"MQ==\",
    \"productoTipoCompuesto\": \"Caja\",
    \"productoComposicionCantidad\": 12
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/compuesto/crear"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idProductoBase": "MQ==",
    "productoTipoCompuesto": "Caja",
    "productoComposicionCantidad": 12
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/compuesto/crear

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idProductoBase   string   

ID del producto base (id o base64). Example: MQ==

productoTipoCompuesto   string   

Caja|Charola|Bolsa. Example: Caja

productoComposicionCantidad   number   

Cantidad de la composición (>0). Example: 12

Guardar precios del producto en las listas 1,2,3

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/producto/consequatur/precios" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"id\": \"MQ==\",
    \"precio_publico\": 40,
    \"precio_medio\": 30,
    \"precio_mayoreo\": 25,
    \"listas_precios\": []
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/producto/consequatur/precios"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "id": "MQ==",
    "precio_publico": 40,
    "precio_medio": 30,
    "precio_mayoreo": 25,
    "listas_precios": []
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/producto/{id}/precios

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the producto. Example: consequatur

Body Parameters

id   (URL)  optional  

path required ID del producto (id o base64). Example: MQ==

precio_publico   number  optional  

optional Precio para Público en general (lista 1). Example: 40

precio_medio   number  optional  

optional Precio para Medio mayoreo (lista 2). Example: 30

precio_mayoreo   number  optional  

optional Precio para Mayoreo (lista 3). Example: 25

listas_precios   object  optional  

optional Alternativa a los 3 campos planos.

  • form-data: listas_precios[1]=40&listas_precios[2]=30&listas_precios[3]=25
  • JSON string: {"1":40,"2":30,"3":25}

Proveedor Producto

Lista de proveedores

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idProveedor\": \"MQ==\",
    \"idProducto\": \"MQ==\",
    \"productoAlias\": \"VIP\",
    \"productoMarca\": \"VIP\",
    \"productoPresentacion\": \"Caja\",
    \"unidadTipo\": \"Piezas\",
    \"proveedorProductoEstado\": \"Activo\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idProveedor": "MQ==",
    "idProducto": "MQ==",
    "productoAlias": "VIP",
    "productoMarca": "VIP",
    "productoPresentacion": "Caja",
    "unidadTipo": "Piezas",
    "proveedorProductoEstado": "Activo",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/proveedor-producto/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idProveedor   string  optional  

optional ID del proveedor. Example: MQ==

idProducto   string  optional  

optional ID del producto. Example: MQ==

productoAlias   string  optional  

optional Nombre del producto. Example: VIP

productoMarca   string  optional  

optional Marca del producto. Example: VIP

productoPresentacion   string  optional  

optional Presentación del producto. Example: Caja

unidadTipo   string  optional  

optional Tipo de unidad del producto. Example: Piezas

proveedorProductoEstado   string  optional  

optional Estado del producto en el proveedor. Example: Activo

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Agregar/reactivar producto al proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idProveedor\": \"Mg==\",
    \"idProducto\": \"MQ== o [\\\"MQ==\\\",\\\"Mg==\\\"]\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idProveedor": "Mg==",
    "idProducto": "MQ== o [\"MQ==\",\"Mg==\"]"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/proveedor-producto/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idProveedor   string   

ID del proveedor (base64). Example: Mg==

idProducto   string|array   

Uno o varios IDs de producto (base64). Si existe una relación inactiva, la reactiva. Example: MQ== o ["MQ==","Mg=="]

Eliminar producto del proveedor

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/inventario/proveedor-producto/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Activar producto del proveedor

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/inventario/proveedor-producto/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Datos para formulario (catálogos y combos)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/form-data?idProveedor=MQ%3D%3D" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/form-data"
);

const params = {
    "idProveedor": "MQ==",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/proveedor-producto/form-data

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

idProveedor   string  optional  

optional ID del proveedor en base64 para prefiltrar productos no relacionados. Example: MQ==

Información puntual de la relación proveedor-producto

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/info/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/info/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/proveedor-producto/info/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID de la relación en base64 (idProveedorProducto). Example: MQ==

Datos para detalle (prefill de edición) de la relación proveedor-producto

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/detalle/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/proveedor-producto/detalle/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/proveedor-producto/detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID de la relación en base64 (idProveedorProducto). Example: MQ==

Unidad

Lista de unidades

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"unidadTipo\": \"Pieza\",
    \"unidadEstado\": \"Activo\",
    \"searchQuery\": \"Piez\",
    \"sort_field\": \"idUnidad\",
    \"sort_direction\": \"asc\",
    \"perPage\": 10
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "unidadTipo": "Pieza",
    "unidadEstado": "Activo",
    "searchQuery": "Piez",
    "sort_field": "idUnidad",
    "sort_direction": "asc",
    "perPage": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/unidad/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

unidadTipo   string  optional  

optional Alias/tipo de la unidad. Example: Pieza

unidadEstado   string  optional  

optional Estado ('Activo'|'Inactivo'). Example: Activo

searchQuery   string  optional  

optional Búsqueda general. Example: Piez

sort_field   string  optional  

optional Campo de orden. Example: idUnidad

sort_direction   string  optional  

optional Dirección ('asc'|'desc'). Example: asc

perPage   integer  optional  

optional Elementos por página. Example: 10

Agregar unidad

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"unidadTipo\": \"Pieza\",
    \"unidadEstado\": \"Inactivo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "unidadTipo": "Pieza",
    "unidadEstado": "Inactivo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/unidad/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idUnidad   string  optional  
unidadTipo   string   

Tipo de unidad. Máx 25. Example: Pieza

unidadEstado   string  optional  

Example: Inactivo

Must be one of:
  • Activo
  • Inactivo

Editar unidad

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idUnidad\": \"MQ==\",
    \"unidadTipo\": \"Pza\",
    \"unidadEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idUnidad": "MQ==",
    "unidadTipo": "Pza",
    "unidadEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/inventario/unidad/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idUnidad   string   

ID en base64. Example: MQ==

unidadTipo   string   

Tipo de unidad. Example: Pza

unidadEstado   string  optional  

optional Estado ('Activo'|'Inactivo'). Example: Activo

Eliminar (inactivar) unidad

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/inventario/unidad/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Activar unidad

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/inventario/unidad/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Datos para formulario de unidad (catálogos)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/unidad/form-data" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/form-data"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/unidad/form-data

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Información puntual de unidad (por ID)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/unidad/info/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/info/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/unidad/info/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Datos para detalle de unidad (prefill de edición)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/inventario/unidad/detalle/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/unidad/detalle/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/inventario/unidad/detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Inventario

Obtener kardex de productos con paginación y renderizado responsivo

requires authentication

Retorna un kardex procesado (historial de movimientos) con datos paginados que se renderizan en vistas parciales responsivas según el tipo de dispositivo. Solo responde a solicitudes AJAX.

OPTIMIZACIONES IMPLEMENTADAS:

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/Inventario/obtener-productos-kardex?page=1&dispositivo=Tablet&idProducto=1&idSucursal=1&desde=2025-10-01&hasta=2025-10-31&fecha=2025-10-31" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/Inventario/obtener-productos-kardex"
);

const params = {
    "page": "1",
    "dispositivo": "Tablet",
    "idProducto": "1",
    "idSucursal": "1",
    "desde": "2025-10-01",
    "hasta": "2025-10-31",
    "fecha": "2025-10-31",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Example response (200):


{
    "html": "<table>...</table>",
    "hasMore": true
}
 

Example response (200):


{
    "html": "",
    "hasMore": false
}
 

Request      

POST api/v1/inventario/Inventario/obtener-productos-kardex

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

page   integer  optional  

optional Número de página para paginación. Example: 1

dispositivo   string  optional  

optional Tipo de dispositivo (Tablet|Desktop). Example: Tablet

idProducto   integer  optional  

optional ID del producto para filtrar kardex. Example: 1

idSucursal   integer  optional  

optional ID de sucursal para filtrar. Example: 1

desde   string  optional  

date optional Fecha inicial en formato YYYY-MM-DD. Example: 2025-10-01

hasta   string  optional  

date optional Fecha final en formato YYYY-MM-DD. Example: 2025-10-31

fecha   string  optional  

date optional Fecha de referencia para el kardex. Example: 2025-10-31

Response

Response Fields

html   string   

HTML renderizado de la vista parcial (Tablet o Desktop)

hasMore   boolean   

Indica si hay más páginas disponibles

Exportar kardex de productos a Excel

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/Inventario/exportar-kardex-excel" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/Inventario/exportar-kardex-excel"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/inventario/Inventario/exportar-kardex-excel

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Exportar kardex de productos a PDF

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/inventario/Inventario/exportar-kardex-pdf" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/inventario/Inventario/exportar-kardex-pdf"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/inventario/Inventario/exportar-kardex-pdf

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Login

Acceso

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/acceso" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"usuarioAlias\": \"vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsju\",
    \"usuarioPassword\": \"ryvojcybzvrbyickznkygloigmkwxphlvazjrcnfbaqywuxhgjjmzuxjubqouzswiwxtrkimf\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/acceso"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "usuarioAlias": "vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsju",
    "usuarioPassword": "ryvojcybzvrbyickznkygloigmkwxphlvazjrcnfbaqywuxhgjjmzuxjubqouzswiwxtrkimf"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/acceso

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

usuarioAlias   string   

Must be at least 1 character. Example: vmqeopfuudtdsufvyvddqamniihfqcoynlazghdtqtqxbajwbpilpmufinllwloauydlsmsju

usuarioPassword   string   

Must be at least 1 character. Example: ryvojcybzvrbyickznkygloigmkwxphlvazjrcnfbaqywuxhgjjmzuxjubqouzswiwxtrkimf

Validar usuario

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/validar-usuario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"usuarioEmail\": \"1jXk@U.P{2,}\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/validar-usuario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "usuarioEmail": "1jXk@U.P{2,}"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/validar-usuario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

usuarioEmail   string   

Must be a valid email address. Must match the regex /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}$/. Example: 1jXk@U.P{2,}

Validar codigo

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/validar-codigo" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/validar-codigo"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/validar-codigo

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Solicitar nuevo codigo

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/solicitar-nuevo-codigo" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/solicitar-nuevo-codigo"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/solicitar-nuevo-codigo

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Actualizar contraseña

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/actualizar-contrasena" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"usuarioPassword\": \"consequatur\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/actualizar-contrasena"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "usuarioPassword": "consequatur"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/actualizar-contrasena

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

usuarioPassword   string   

Example: consequatur

Cerrar sesión

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/cerrar-sesion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/cerrar-sesion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/cerrar-sesion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Promociones

Combos

Lista de combos

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCombo\": 1,
    \"idComboProducto\": 2,
    \"idListaPrecioDetalle\": 3,
    \"comboAlias\": \"Combo 1\",
    \"listaPrecioDetalleImporte\": 100,
    \"comboFechaInicio\": \"2023-01-01\",
    \"comboFechaFin\": \"2023-12-31\",
    \"comboEstado\": \"Activo\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCombo": 1,
    "idComboProducto": 2,
    "idListaPrecioDetalle": 3,
    "comboAlias": "Combo 1",
    "listaPrecioDetalleImporte": 100,
    "comboFechaInicio": "2023-01-01",
    "comboFechaFin": "2023-12-31",
    "comboEstado": "Activo",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/promociones/combo/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCombo   integer  optional  

optional ID del combo. Example: 1

idComboProducto   integer  optional  

optional ID del producto del combo. Example: 2

idListaPrecioDetalle   integer  optional  

optional ID de la lista de precios del combo. Example: 3

comboAlias   string  optional  

optional Alias del combo. Example: Combo 1

listaPrecioDetalleImporte   integer  optional  

optional Importe de la lista de precios del combo. Example: 100

comboFechaInicio   string  optional  

optional Fecha de inicio del combo. Example: 2023-01-01

comboFechaFin   string  optional  

optional Fecha de fin del combo. Example: 2023-12-31

comboEstado   string  optional  

optional Estado del combo. Example: Activo

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Datos para formulario de creación/edición de combo

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo/datos-para-formulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo/datos-para-formulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/promociones/combo/datos-para-formulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Información de un combo

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/promociones/combo/info-combo/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo/info-combo/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/promociones/combo/info-combo/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64 o id. Example: MQ==

Crear o editar combo Paso 1

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo/crear-paso-1" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCombo\": \"MQ==\",
    \"comboAlias\": \"Combo 1\",
    \"comboFechaInicio\": \"2023-01-01\",
    \"comboFechaFin\": \"2023-12-31\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo/crear-paso-1"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCombo": "MQ==",
    "comboAlias": "Combo 1",
    "comboFechaInicio": "2023-01-01",
    "comboFechaFin": "2023-12-31"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/promociones/combo/crear-paso-1

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCombo   string  optional  

optional ID del combo en base64 (si se manda se edita; si no se crea). Example: MQ==

comboAlias   string   

Alias del combo. Máximo 75 caracteres. Debe ser único. Example: Combo 1

comboFechaInicio   string  optional  

optional Fecha de inicio del combo (formato date). Example: 2023-01-01

comboFechaFin   string  optional  

optional Fecha de fin del combo (formato date). Debe ser posterior a comboFechaInicio. Example: 2023-12-31

Crear combo Paso 2

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo/crear-paso-2" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCombo\": \"MQ==\",
    \"productos\": [
        \"consequatur\"
    ],
    \"listaPrecioDetalleImporte\": \"100\",
    \"idListaPrecioDetalle\": \"MQ==\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo/crear-paso-2"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCombo": "MQ==",
    "productos": [
        "consequatur"
    ],
    "listaPrecioDetalleImporte": "100",
    "idListaPrecioDetalle": "MQ=="
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/promociones/combo/crear-paso-2

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCombo   string   

ID del combo en base64. Example: MQ==

productos   string[]   

Lista de productos del combo. Mínimo 1 producto. Cada producto debe contener: idProducto (string,), idComboProducto (string, ) cantidad (integer, mínimo 1).

idProducto   string   

Example: consequatur

idComboProducto   string   

Example: consequatur

cantidad   integer   

Must be at least 1. Example: 45

*   object  optional  
idProducto   string   

ID del producto. Example: consequatur

idComboProducto   string   

ID del combo-producto. Example: consequatur

cantidad   integer   

Cantidad del producto. Mínimo 1. Example: 17

listaPrecioDetalleImporte   numeric   

Importe de la lista de precios del combo. Mínimo 0. Example: 100

idListaPrecioDetalle   string  optional  

optional ID del detalle de la lista de precios en base64. Example: MQ==

Crear combo Paso 3 (Revisión final)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo/crear-paso-3" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCombo\": \"MQ==\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo/crear-paso-3"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCombo": "MQ=="
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "code": 200,
    "data": {
        "combo": {},
        "productos": [],
        "listaPrecioDetalle": {}
    }
}
 

Request      

POST api/v1/promociones/combo/crear-paso-3

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCombo   string   

ID del combo en base64. Example: MQ==

Guardar combo definitivo

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo/guardar-combo-final" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCombo\": \"MQ==\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo/guardar-combo-final"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCombo": "MQ=="
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Example response (200):


{
    "code": 200,
    "message": "Combo guardado y activado correctamente",
    "data": {
        "combo": {}
    }
}
 

Request      

POST api/v1/promociones/combo/guardar-combo-final

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCombo   string   

ID del combo en base64. Example: MQ==

Cancelar combo

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo/cancelar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo/cancelar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/promociones/combo/cancelar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Eliminar combo

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/promociones/combo/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Activar combo

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/promociones/combo/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Información detallada de un combo

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/promociones/promocion/info-promocion/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/info-promocion/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/promociones/promocion/info-promocion/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64 o id. Example: MQ==

Combo Producto

Lista de productos

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo-producto/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCombo\": \"MQ==\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo-producto/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCombo": "MQ=="
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/promociones/combo-producto/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCombo   string  optional  

optional ID del combo base 64. Example: MQ==

Agregar producto al combo

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/combo-producto/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idProducto\": \"MQ==\",
    \"idCombo\": \"MQ==\",
    \"cantidad\": 2
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo-producto/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idProducto": "MQ==",
    "idCombo": "MQ==",
    "cantidad": 2
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/promociones/combo-producto/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idProducto   string   

ID del producto (base64). Example: MQ==

idCombo   string   

ID del combo (base64). Example: MQ==

cantidad   integer   

Cantidad del producto en el combo. Example: 2

Eliminar producto del combo

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/promociones/combo-producto/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/combo-producto/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/promociones/combo-producto/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Promocion

Lista de promocion mixta

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/lista-mixto" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idProducto\": \"Producto MQ==\",
    \"idProductoGratis\": \"Producto MQ==\",
    \"promocionFechaInicio\": \"2023-01-01\",
    \"promocionFechaFin\": \"2023-01-31\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/lista-mixto"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idProducto": "Producto MQ==",
    "idProductoGratis": "Producto MQ==",
    "promocionFechaInicio": "2023-01-01",
    "promocionFechaFin": "2023-01-31",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/promociones/promocion/lista-mixto

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idProducto   string  optional  

optional ID del producto. Example: Producto MQ==

idProductoGratis   string  optional  

optional ID del producto. Example: Producto MQ==

promocionFechaInicio   string  optional  

optional Fecha de inicio de la promoción. Example: 2023-01-01

promocionFechaFin   string  optional  

optional Fecha de fin de la promoción. Example: 2023-01-31

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Lista de promocion gratis

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/lista-gratis" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idProducto\": \"Producto MQ==\",
    \"promocionFechaInicio\": \"2023-01-01\",
    \"promocionFechaFin\": \"2023-01-31\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/lista-gratis"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idProducto": "Producto MQ==",
    "promocionFechaInicio": "2023-01-01",
    "promocionFechaFin": "2023-01-31",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/promociones/promocion/lista-gratis

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idProducto   string  optional  

optional ID del producto. Example: Producto MQ==

promocionFechaInicio   string  optional  

optional Fecha de inicio de la promoción. Example: 2023-01-01

promocionFechaFin   string  optional  

optional Fecha de fin de la promoción. Example: 2023-01-31

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Lista de promocion metodo de pago

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/lista-metodo-pago" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idProducto\": \"Producto MQ==\",
    \"detallePromocionPorcentaje\": \"10.5\",
    \"promocionFechaInicio\": \"2023-01-01\",
    \"promocionFechaFin\": \"2023-01-31\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/lista-metodo-pago"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idProducto": "Producto MQ==",
    "detallePromocionPorcentaje": "10.5",
    "promocionFechaInicio": "2023-01-01",
    "promocionFechaFin": "2023-01-31",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/promociones/promocion/lista-metodo-pago

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idProducto   string  optional  

optional ID del producto. Example: Producto MQ==

detallePromocionPorcentaje   decimal  optional  

optional Porcentaje del detalle de la promoción. Example: 10.5

promocionFechaInicio   string  optional  

optional Fecha de inicio de la promoción. Example: 2023-01-01

promocionFechaFin   string  optional  

optional Fecha de fin de la promoción. Example: 2023-01-31

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Crear o editar promoción

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idPromocion\": \"MQ==\",
    \"idProducto\": \"MQ==\",
    \"idProductoGratis\": \"MQ==\",
    \"idPromocionProducto\": \"MQ==\",
    \"idDetallePromocion\": \"MQ==\",
    \"promocionAlias\": \"Promo Enero\",
    \"promocionFechaInicio\": \"2023-01-01\",
    \"promocionFechaFin\": \"2023-01-31\",
    \"promocionTipo\": \"Método de Pago\",
    \"promocionDescripcion\": \"Descuento especial por año nuevo\",
    \"detallePromocionMetodoPago\": \"Tarjeta de Crédito\",
    \"detallePromocionCantidadBonificada\": 2,
    \"detallePromocionMonto\": \"50.75\",
    \"detallePromocionPorcentaje\": \"10.5\",
    \"detallePromocionCantidadRequerida\": 5
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idPromocion": "MQ==",
    "idProducto": "MQ==",
    "idProductoGratis": "MQ==",
    "idPromocionProducto": "MQ==",
    "idDetallePromocion": "MQ==",
    "promocionAlias": "Promo Enero",
    "promocionFechaInicio": "2023-01-01",
    "promocionFechaFin": "2023-01-31",
    "promocionTipo": "Método de Pago",
    "promocionDescripcion": "Descuento especial por año nuevo",
    "detallePromocionMetodoPago": "Tarjeta de Crédito",
    "detallePromocionCantidadBonificada": 2,
    "detallePromocionMonto": "50.75",
    "detallePromocionPorcentaje": "10.5",
    "detallePromocionCantidadRequerida": 5
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/promociones/promocion/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idPromocion   string  optional  

optional ID de la promoción en base64 (para editar). Debe existir en la tabla pro_promocion. Example: MQ==

idProducto   string  optional  

optional ID del producto en base64. Debe existir en la tabla inv_producto. Example: MQ==

idProductoGratis   string  optional  

optional ID del producto gratis en base64. Debe existir en la tabla inv_producto. Example: MQ==

idPromocionProducto   string  optional  

optional ID del producto de la promoción para editar en base64. Debe existir en la tabla pro_promocionproducto. Example: MQ==

idDetallePromocion   string  optional  

optional ID del detalle de la promoción para editar en base64. Debe existir en la tabla pro_detallepromocion. Example: MQ==

promocionAlias   string   

Alias de la promoción. Requerido. Máximo 75 caracteres. Debe ser único. Example: Promo Enero

promocionFechaInicio   date  optional  

optional Fecha de inicio de la promoción. Formato YYYY-MM-DD. Example: 2023-01-01

promocionFechaFin   date  optional  

optional Fecha de fin de la promoción. Formato YYYY-MM-DD. Debe ser posterior a promocionFechaInicio. Example: 2023-01-31

promocionTipo   string   

Tipo de promoción. Requerido. Valores permitidos: "Condición de Pago", "Método de Pago", "Mixto". Example: Método de Pago

promocionDescripcion   string  optional  

optional Descripción de la promoción. Máximo 250 caracteres. Example: Descuento especial por año nuevo

detallePromocionMetodoPago   string  optional  

optional Método de pago. Valores permitidos: "Transferencia", "Efectivo", "Tarjeta de Crédito", "Tarjeta de Débito". Example: Tarjeta de Crédito

detallePromocionCantidadBonificada   integer  optional  

optional Cantidad bonificada. Debe ser un número entero. Mínimo 1. Example: 2

detallePromocionMonto   decimal  optional  

optional Monto del descuento. Debe ser un número decimal con 2 decimales. Mínimo 0. Example: 50.75

detallePromocionPorcentaje   decimal  optional  

optional Porcentaje del descuento. Debe ser un número decimal con 2 decimales. Mínimo 0, máximo 100. Example: 10.5

detallePromocionCantidadRequerida   integer  optional  

optional Cantidad requerida para aplicar la promoción. Debe ser un número entero. Mínimo 1. Example: 5

Eliminar promocion

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/promociones/promocion/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Activar promocion

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/promociones/promocion/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/promociones/promocion/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Punto de Venta

Categoria Cliente

Lista de categorías de clientes

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCategoriaCliente\": 2,
    \"categoriaClienteAlias\": \"VIP\",
    \"categoriaClienteObservaciones\": \"Cliente importante\",
    \"categoriaClienteEstado\": \"Activo\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCategoriaCliente": 2,
    "categoriaClienteAlias": "VIP",
    "categoriaClienteObservaciones": "Cliente importante",
    "categoriaClienteEstado": "Activo",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/categoria-cliente/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCategoriaCliente   integer  optional  

optional ID de la categoría del cliente. Example: 2

categoriaClienteAlias   string  optional  

optional Alias de la categoría del cliente. Example: VIP

categoriaClienteObservaciones   string  optional  

optional Observaciones de la categoría del cliente. Example: Cliente importante

categoriaClienteEstado   string  optional  

optional Estado de la categoría del cliente. Example: Activo

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Información de categoría cliente

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/info-categoria-cliente/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/info-categoria-cliente/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/categoria-cliente/info-categoria-cliente/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Agregar categoría cliente

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"categoriaClienteAlias\": \"VIP\",
    \"categoriaClienteObservaciones\": \"Cliente importante\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "categoriaClienteAlias": "VIP",
    "categoriaClienteObservaciones": "Cliente importante"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/categoria-cliente/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

categoriaClienteAlias   string   

Alias de la categoría del cliente. Máximo 70 caracteres, debe ser único. Example: VIP

categoriaClienteObservaciones   string  optional  

optional Observaciones de la categoría del cliente. Máximo 200 caracteres. Example: Cliente importante

Editar categoría cliente

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCategoriaCliente\": \"MQ==\",
    \"categoriaClienteAlias\": \"VIP\",
    \"categoriaClienteObservaciones\": \"Cliente importante\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCategoriaCliente": "MQ==",
    "categoriaClienteAlias": "VIP",
    "categoriaClienteObservaciones": "Cliente importante"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/categoria-cliente/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCategoriaCliente   string   

ID de la categoría del cliente (codificado en base64, debe existir en ptv_categoriacliente). Example: MQ==

categoriaClienteAlias   string   

Alias de la categoría del cliente. Máximo 70 caracteres, debe ser único (excepto el registro actual). Example: VIP

categoriaClienteObservaciones   string  optional  

optional Observaciones de la categoría del cliente. Máximo 200 caracteres. Example: Cliente importante

Eliminar categoría cliente

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/punto-venta/categoria-cliente/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Activar categoría cliente

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/categoria-cliente/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/categoria-cliente/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Clientes

Lista de clientes

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCliente\": 1,
    \"idCategoriaCliente\": 2,
    \"idListaPrecio\": 3,
    \"clienteNombre\": \"Juan Pérez\",
    \"clienteFolio\": \"C-1001\",
    \"clienteEmail\": \"juan@example.com\",
    \"clienteTelefono\": \"555-1234\",
    \"clienteEstado\": \"Activo\",
    \"searchQuery\": \"Juan\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCliente": 1,
    "idCategoriaCliente": 2,
    "idListaPrecio": 3,
    "clienteNombre": "Juan Pérez",
    "clienteFolio": "C-1001",
    "clienteEmail": "juan@example.com",
    "clienteTelefono": "555-1234",
    "clienteEstado": "Activo",
    "searchQuery": "Juan"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCliente   integer  optional  

optional ID del cliente. Example: 1

idCategoriaCliente   integer  optional  

optional ID de la categoría del cliente. Example: 2

idListaPrecio   integer  optional  

optional ID de la lista de precios del cliente. Example: 3

clienteNombre   string  optional  

optional Nombre del cliente. Example: Juan Pérez

clienteFolio   string  optional  

optional Folio del cliente. Example: C-1001

clienteEmail   string  optional  

optional Email del cliente. Example: juan@example.com

clienteTelefono   string  optional  

optional Teléfono del cliente. Example: 555-1234

clienteEstado   string  optional  

optional Estado del cliente. Example: Activo

searchQuery   string  optional  

Búsqueda general en varios campos. Example: Juan

Datos para formulario de cliente

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/datos-para-formulario" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/datos-para-formulario"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/datos-para-formulario

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Informacion de cliente

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/info-cliente/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/info-cliente/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/cliente/info-cliente/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Agregar cliente

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCategoriaCliente\": \"MQ==\",
    \"idListaPrecio\": \"MQ==\",
    \"clienteNombre\": \"Juan Pérez\",
    \"clienteEmail\": \"juan@example.com\",
    \"clienteTelefono\": \"555-1234\",
    \"clienteEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCategoriaCliente": "MQ==",
    "idListaPrecio": "MQ==",
    "clienteNombre": "Juan Pérez",
    "clienteEmail": "juan@example.com",
    "clienteTelefono": "555-1234",
    "clienteEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCategoriaCliente   string   

ID de la categoría del cliente (debe existir en ptv_categoriacliente). Example: MQ==

idListaPrecio   string  optional  

optional ID de la lista de precios del cliente (debe existir en ptv_listaprecio). Example: MQ==

clienteNombre   string   

Nombre del cliente. Máximo 75 caracteres, debe ser único y no debe de permitir numeros. Example: Juan Pérez

clienteFolio   string  optional  
clienteEmail   string  optional  

optional Email del cliente. Debe ser un email válido, máximo 100 caracteres. Example: juan@example.com

clienteTelefono   string   

Teléfono del cliente. Máximo 25 caracteres y no debe de permitir letras. Example: 555-1234

clienteEstado   string  optional  

optional Estado del cliente. Debe ser "Activo" o "Inactivo". Example: Activo

Editar cliente

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCliente\": \"MQ==\",
    \"idCategoriaCliente\": \"MQ==\",
    \"clienteNombre\": \"Juan Pérez\",
    \"clienteEmail\": \"juan@example.com\",
    \"clienteTelefono\": \"555-1234\",
    \"idListaPrecio\": \"MQ==\",
    \"clienteEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCliente": "MQ==",
    "idCategoriaCliente": "MQ==",
    "clienteNombre": "Juan Pérez",
    "clienteEmail": "juan@example.com",
    "clienteTelefono": "555-1234",
    "idListaPrecio": "MQ==",
    "clienteEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCliente   string   

ID del cliente (codificado en base64, debe existir en ptv_cliente). Example: MQ==

idCategoriaCliente   string   

ID de la categoría del cliente (debe existir en ptv_categoriacliente). Example: MQ==

clienteNombre   string   

Nombre del cliente. Máximo 75 caracteres, debe ser único (excepto el registro actual). Example: Juan Pérez

clienteEmail   string  optional  

optional Email del cliente. Debe ser un email válido, máximo 100 caracteres. Example: juan@example.com

clienteTelefono   string   

Teléfono del cliente. Máximo 25 caracteres. Example: 555-1234

idListaPrecio   string  optional  

optional ID de la lista de precios del cliente (debe existir en ptv_listaprecio). Example: MQ==

clienteEstado   string  optional  

optional Estado del cliente. Debe ser "Activo" o "Inactivo". Example: Activo

Eliminar cliente

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Activar cliente

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string  optional  

en base64. Example: MQ==

Exportar PDF clientes

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/exportar-pdf" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchQuery\": \"juan\",
    \"clienteAlias\": \"Cliente 1\",
    \"clienteTelefono\": \"555-1234\",
    \"clienteEmail\": \"juan@example.com\",
    \"clienteEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/exportar-pdf"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchQuery": "juan",
    "clienteAlias": "Cliente 1",
    "clienteTelefono": "555-1234",
    "clienteEmail": "juan@example.com",
    "clienteEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/exportar-pdf

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

searchQuery   string  optional  

nullable El término de búsqueda. Example: juan

clienteAlias   string  optional  

nullable El alias del cliente. Example: Cliente 1

clienteTelefono   string   

Teléfono del cliente. Example: 555-1234

clienteEmail   string   

Email del cliente. Example: juan@example.com

clienteEstado   string  optional  

nullable El estado del cliente. Example: Activo

Consultar estado de exportación PDF

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/consultar-estado-exporta-pdf" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/consultar-estado-exporta-pdf"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/cliente/consultar-estado-exporta-pdf

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Exportar EXCEL clientes

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/exportar-excel" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchQuery\": \"juan\",
    \"clienteAlias\": \"Cliente 1\",
    \"clienteTelefono\": \"555-1234\",
    \"clienteEmail\": \"juan@example.com\",
    \"clienteEstado\": \"Activo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/exportar-excel"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchQuery": "juan",
    "clienteAlias": "Cliente 1",
    "clienteTelefono": "555-1234",
    "clienteEmail": "juan@example.com",
    "clienteEstado": "Activo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/exportar-excel

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

searchQuery   string  optional  

nullable El término de búsqueda. Example: juan

clienteAlias   string  optional  

nullable El alias del cliente. Example: Cliente 1

clienteTelefono   string   

Teléfono del cliente. Example: 555-1234

clienteEmail   string   

Email del cliente. Example: juan@example.com

clienteEstado   string  optional  

nullable El estado del cliente. Example: Activo

Subir EXCEL clientes

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/subir-excel" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: multipart/form-data" \
    --header "Accept: application/json" \
    --form "archivoExcel=@C:\Users\gdomi\AppData\Local\Temp\php45EC.tmp" 
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/subir-excel"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "multipart/form-data",
    "Accept": "application/json",
};

const body = new FormData();
body.append('archivoExcel', document.querySelector('input[name="archivoExcel"]').files[0]);

fetch(url, {
    method: "POST",
    headers,
    body,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/subir-excel

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: multipart/form-data

Accept      

Example: application/json

Body Parameters

archivoExcel   file   

Archivo Excel con los clientes a importar. Example: C:\Users\gdomi\AppData\Local\Temp\php45EC.tmp

Validar duplicados clientes

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/validar-duplicados" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"clientesSeleccionados\": null
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/validar-duplicados"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "clientesSeleccionados": null
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/validar-duplicados

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

clientesSeleccionados   string[]   

Array de clientes seleccionados.

Resumen final antes de importar

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/resumen-clientes" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"clientesValidos\": [
        {
            \"clienteNombre\": \"Pedro López\",
            \"idCategoriaCliente\": 1,
            \"idListaPrecio\": 1,
            \"clienteEmail\": \"pedro@example.com\",
            \"clienteTelefono\": \"7461200656\"
        }
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/resumen-clientes"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "clientesValidos": [
        {
            "clienteNombre": "Pedro López",
            "idCategoriaCliente": 1,
            "idListaPrecio": 1,
            "clienteEmail": "pedro@example.com",
            "clienteTelefono": "7461200656"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/resumen-clientes

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

clientesValidos   string[]   

Array de clientes válidos.

Importar clientes confirmados

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/importar-confirmados" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"clientesConfirmados\": [
        {
            \"clienteNombre\": \"Pedro López\",
            \"clienteEmail\": \"pedro@example.com\"
        }
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/importar-confirmados"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "clientesConfirmados": [
        {
            "clienteNombre": "Pedro López",
            "clienteEmail": "pedro@example.com"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/importar-confirmados

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

clientesConfirmados   string[]   

Array de clientes confirmados para importar.

Asociar lista de precios a cliente

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/asociar-lista-precio" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idListaPrecio\": \"MQ==\",
    \"idCliente\": \"MQ==\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/asociar-lista-precio"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idListaPrecio": "MQ==",
    "idCliente": "MQ=="
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cliente/asociar-lista-precio

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idListaPrecio   string   

idListaPrecio (base64). Example: MQ==

idCliente   string   

idCliente (base64). Example: MQ==

Descargar plantilla de Excel para importar clientes

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/descargar-plantilla" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cliente/descargar-plantilla"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/cliente/descargar-plantilla

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Lista de Precio

Consulta Lista de precios (para selects, sin paginar)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/consultar-listas-precio" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"listaPrecioAlias\": \"Lista 1\",
    \"listaPrecioDescripcion\": \"Descripción de la lista 1\",
    \"listaPrecioEstado\": \"Activo\",
    \"listaPrecioSwitch\": \"Prendida\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/consultar-listas-precio"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "listaPrecioAlias": "Lista 1",
    "listaPrecioDescripcion": "Descripción de la lista 1",
    "listaPrecioEstado": "Activo",
    "listaPrecioSwitch": "Prendida"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio/consultar-listas-precio

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

listaPrecioAlias   string  optional  

optional Alias. Example: Lista 1

listaPrecioDescripcion   string  optional  

optional Descripción. Example: Descripción de la lista 1

listaPrecioEstado   string  optional  

optional Estado ('Activo'|'Inactivo'). Example: Activo

listaPrecioSwitch   string  optional  

optional Switch ('Prendida'|'Apagado'). Example: Prendida

Lista precio

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"searchQuery\": \"consequatur\",
    \"sort_field\": \"idListaPrecio\",
    \"sort_direction\": \"asc\",
    \"perPage\": 10
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "searchQuery": "consequatur",
    "sort_field": "idListaPrecio",
    "sort_direction": "asc",
    "perPage": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

searchQuery   string  optional  

optional Búsqueda general. Example: consequatur

sort_field   string  optional  

optional Campo de orden. Example: idListaPrecio

sort_direction   string  optional  

optional Dirección ('asc'|'desc'). Example: asc

perPage   integer  optional  

optional Elementos por página. Example: 10

Crear lista de precio

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/crear" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"listaPrecioAlias\": \"Lista 1\",
    \"listaPrecioDescripcion\": \"Descripción navideña\",
    \"listaPrecioEstado\": \"Inactivo\",
    \"listaPrecioSwitch\": \"Apagado\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/crear"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "listaPrecioAlias": "Lista 1",
    "listaPrecioDescripcion": "Descripción navideña",
    "listaPrecioEstado": "Inactivo",
    "listaPrecioSwitch": "Apagado"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio/crear

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idListaPrecio   string  optional  
listaPrecioAlias   string   

Alias. Example: Lista 1

listaPrecioDescripcion   string  optional  

optional Descripción. Example: Descripción navideña

listaPrecioEstado   string  optional  

Example: Inactivo

Must be one of:
  • Activo
  • Inactivo
listaPrecioSwitch   string  optional  

Example: Apagado

Must be one of:
  • Prendida
  • Apagado

Editar lista de precio

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idListaPrecio\": \"MQ==\",
    \"listaPrecioAlias\": \"Lista Black Friday\",
    \"listaPrecioDescripcion\": \"Actualizada\",
    \"listaPrecioEstado\": \"Activo\",
    \"listaPrecioSwitch\": \"Apagado\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idListaPrecio": "MQ==",
    "listaPrecioAlias": "Lista Black Friday",
    "listaPrecioDescripcion": "Actualizada",
    "listaPrecioEstado": "Activo",
    "listaPrecioSwitch": "Apagado"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idListaPrecio   string   

ID en base64. Example: MQ==

listaPrecioAlias   string  optional  

optional Example: Lista Black Friday

listaPrecioDescripcion   string  optional  

optional Example: Actualizada

listaPrecioEstado   string  optional  

optional ('Activo'|'Inactivo') Example: Activo

listaPrecioSwitch   string  optional  

optional ('Prendida'|'Apagado') Example: Apagado

Inactivar (eliminar lógico) lista de precio

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/punto-venta/lista-precio/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Activar lista de precio

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Alternar switch (Prendida/Apagado)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/alternar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/alternar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio/alternar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Duplicar lista de precio

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/duplicar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/duplicar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio/duplicar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Datos para formulario de Lista de precio (catálogos)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/form-data" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/form-data"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/lista-precio/form-data

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Información puntual de una lista de precio

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/info/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/info/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/lista-precio/info/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Datos para detalle (prefill de edición) de una lista de precio

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/detalle/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio/detalle/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/lista-precio/detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Cotización

Lista de cotizaciones

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCliente\": 12,
    \"idUsuario\": 7,
    \"idSucursal\": 3,
    \"cotizacionEstado\": \"Vigente\",
    \"fecha_desde\": \"2025-01-01\",
    \"fecha_hasta\": \"2025-12-31\",
    \"searchQuery\": \"COT-2025-001\",
    \"sort_field\": \"cotizacionFecha\",
    \"sort_direction\": \"desc\",
    \"perPage\": 10
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCliente": 12,
    "idUsuario": 7,
    "idSucursal": 3,
    "cotizacionEstado": "Vigente",
    "fecha_desde": "2025-01-01",
    "fecha_hasta": "2025-12-31",
    "searchQuery": "COT-2025-001",
    "sort_field": "cotizacionFecha",
    "sort_direction": "desc",
    "perPage": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cotizacion/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCliente   integer  optional  

optional ID del cliente. Example: 12

idUsuario   integer  optional  

optional ID del usuario. Example: 7

idSucursal   integer  optional  

optional ID de la sucursal. Example: 3

cotizacionEstado   string  optional  

optional Vigente|Vencida|Venta. Example: Vigente

fecha_desde   date  optional  

optional Fecha inicial (Y-m-d). Example: 2025-01-01

fecha_hasta   date  optional  

optional Fecha final (Y-m-d). Example: 2025-12-31

searchQuery   string  optional  

optional Búsqueda (No/Observaciones). Example: COT-2025-001

sort_field   string  optional  

optional Campo de orden. Example: cotizacionFecha

sort_direction   string  optional  

optional asc|desc. Example: desc

perPage   integer  optional  

optional Elementos por página. Example: 10

Crear cotización

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/crear" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCliente\": 12,
    \"idUsuario\": 7,
    \"idSucursal\": 3,
    \"cotizacionFecha\": \"2025-09-22 13:45:00\",
    \"cotizacionFechaVencimiento\": \"2025-10-01\",
    \"cotizacionObservaciones\": \"consequatur\",
    \"cotizacionSubtotal\": 1000,
    \"cotizacionTotal\": 1160,
    \"cotizacionEstado\": \"Vigente\",
    \"cotizacionNo\": \"COT-0001\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/crear"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCliente": 12,
    "idUsuario": 7,
    "idSucursal": 3,
    "cotizacionFecha": "2025-09-22 13:45:00",
    "cotizacionFechaVencimiento": "2025-10-01",
    "cotizacionObservaciones": "consequatur",
    "cotizacionSubtotal": 1000,
    "cotizacionTotal": 1160,
    "cotizacionEstado": "Vigente",
    "cotizacionNo": "COT-0001"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cotizacion/crear

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCotizacion   string  optional  
idCliente   integer  optional  

nullable ID del cliente. Example: 12

idUsuario   integer   

ID usuario vendedor. Example: 7

idSucursal   integer   

ID sucursal. Example: 3

cotizacionFecha   datetime   

Fecha hora (Y-m-d H:i:s). Example: 2025-09-22 13:45:00

cotizacionFechaVencimiento   date  optional  

nullable Vencimiento (Y-m-d). Example: 2025-10-01

cotizacionObservaciones   string  optional  

nullable Observaciones. Example: consequatur

cotizacionSubtotal   number  optional  

nullable Subtotal (10,2). Example: 1000

cotizacionTotal   number  optional  

nullable Total (10,2). Example: 1160

cotizacionEstado   string   

Vigente|Vencida|Venta. Example: Vigente

cotizacionNo   string   

No. único. Example: COT-0001

Editar cotización

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCotizacion\": \"MQ==\",
    \"idCliente\": 12,
    \"idUsuario\": 7,
    \"idSucursal\": 3,
    \"cotizacionFecha\": \"2025-09-22 13:45:00\",
    \"cotizacionFechaVencimiento\": \"2025-10-01\",
    \"cotizacionObservaciones\": \"consequatur\",
    \"cotizacionSubtotal\": 1000,
    \"cotizacionTotal\": 1160,
    \"cotizacionEstado\": \"Vigente\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCotizacion": "MQ==",
    "idCliente": 12,
    "idUsuario": 7,
    "idSucursal": 3,
    "cotizacionFecha": "2025-09-22 13:45:00",
    "cotizacionFechaVencimiento": "2025-10-01",
    "cotizacionObservaciones": "consequatur",
    "cotizacionSubtotal": 1000,
    "cotizacionTotal": 1160,
    "cotizacionEstado": "Vigente"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cotizacion/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idCotizacion   string   

ID (base64 o id). Example: MQ==

idCliente   integer  optional  

nullable ID del cliente. Example: 12

idUsuario   integer   

ID usuario vendedor. Example: 7

idSucursal   integer   

ID sucursal. Example: 3

cotizacionFecha   datetime   

Fecha hora (Y-m-d H:i:s). Example: 2025-09-22 13:45:00

cotizacionFechaVencimiento   date  optional  

nullable Vencimiento (Y-m-d). Example: 2025-10-01

cotizacionObservaciones   string  optional  

nullable Observaciones. Example: consequatur

cotizacionSubtotal   number  optional  

nullable Subtotal (10,2). Example: 1000

cotizacionTotal   number  optional  

nullable Total (10,2). Example: 1160

cotizacionEstado   string   

Vigente|Vencida|Venta. Example: Vigente

Reactivar cotización

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/reactivar/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idCotizacion\": \"MQ==\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/reactivar/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idCotizacion": "MQ=="
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cotizacion/reactivar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the reactivar. Example: consequatur

Body Parameters

idCotizacion   string   

ID (base64 o id). Example: MQ==

Eliminar cotización

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/punto-venta/cotizacion/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID en base64. Example: MQ==

Exportar PDF

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/exportar-pdf" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/exportar-pdf"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cotizacion/exportar-pdf

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Exportar EXCEL

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/exportar-excel" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/exportar-excel"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/cotizacion/exportar-excel

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

GET api/v1/punto-venta/cotizacion/imprimir/{id}

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/imprimir/consequatur" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/imprimir/consequatur"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/cotizacion/imprimir/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

The ID of the imprimir. Example: consequatur

Datos para formulario (catálogos)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/form-data" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/form-data"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/cotizacion/form-data

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Información puntual de una cotización

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/info/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/info/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/cotizacion/info/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID (base64 o id). Example: MQ==

Datos para detalle (prefill de edición)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/detalle/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/cotizacion/detalle/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/cotizacion/detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID (base64 o id). Example: MQ==

Lista de precios - Detalle

Lista de productos asociados a una lista de precios

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/lista" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idListaPrecio\": \"MQ==\",
    \"idProducto\": \"MQ==\",
    \"searchQuery\": \"johnnie\",
    \"listaPrecioDetalleEstado\": \"A\",
    \"sort_field\": \"idListaPrecioDetalle\",
    \"sort_direction\": \"asc\",
    \"perPage\": 10
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/lista"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idListaPrecio": "MQ==",
    "idProducto": "MQ==",
    "searchQuery": "johnnie",
    "listaPrecioDetalleEstado": "A",
    "sort_field": "idListaPrecioDetalle",
    "sort_direction": "asc",
    "perPage": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio-detalle/lista

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idListaPrecio   string   

ID de la lista (base64). Example: MQ==

idProducto   string  optional  

optional ID del producto (base64). Example: MQ==

searchQuery   string  optional  

optional Búsqueda por alias/código del producto. Example: johnnie

listaPrecioDetalleEstado   string  optional  

optional 'A'|'I'. Example: A

sort_field   string  optional  

optional Campo de orden. Example: idListaPrecioDetalle

sort_direction   string  optional  

optional 'asc'|'desc'. Example: asc

perPage   integer  optional  

optional Elementos por página. Example: 10

Agregar un producto a la lista de precios (una fila)

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/accion" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idListaPrecio\": \"MQ==\",
    \"idProducto\": \"MQ==\",
    \"idPromocion\": 17,
    \"idCombo\": 17,
    \"listaPrecioDetalleImporte\": 40,
    \"listaPrecioDetalleFecha\": \"2025-12-12\",
    \"listaPrecioDetallePorcentaje\": 0,
    \"listaPrecioDetalleEstado\": \"Inactivo\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/accion"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idListaPrecio": "MQ==",
    "idProducto": "MQ==",
    "idPromocion": 17,
    "idCombo": 17,
    "listaPrecioDetalleImporte": 40,
    "listaPrecioDetalleFecha": "2025-12-12",
    "listaPrecioDetallePorcentaje": 0,
    "listaPrecioDetalleEstado": "Inactivo"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio-detalle/accion

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idListaPrecioDetalle   string  optional  
idListaPrecio   string   

ID lista (base64). Example: MQ==

idProducto   string   

ID producto (base64). Example: MQ==

idPromocion   integer  optional  

The idPromocion of an existing record in the pro_promocion table. Example: 17

idCombo   integer  optional  

The idCombo of an existing record in the pro_combo table. Example: 17

listaPrecioDetalleImporte   number  optional  

optional Precio detalle. Example: 40

listaPrecioDetalleFecha   date  optional  

optional Fecha de vigencia (YYYY-MM-DD). Example: 2025-12-12

listaPrecioDetallePorcentaje   number  optional  

optional Descuento % (0-100). Example: 0

listaPrecioDetalleEstado   string  optional  

Example: Inactivo

Must be one of:
  • Activo
  • Inactivo

Editar una fila de la lista de precios

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/editar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idListaPrecioDetalle\": \"MQ==\",
    \"idListaPrecio\": 17,
    \"idProducto\": 17,
    \"idPromocion\": 17,
    \"idCombo\": 17,
    \"listaPrecioDetalleImporte\": 41,
    \"listaPrecioDetalleFecha\": \"2025-12-12\",
    \"listaPrecioDetallePorcentaje\": 5,
    \"listaPrecioDetalleEstado\": \"A\"
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/editar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idListaPrecioDetalle": "MQ==",
    "idListaPrecio": 17,
    "idProducto": 17,
    "idPromocion": 17,
    "idCombo": 17,
    "listaPrecioDetalleImporte": 41,
    "listaPrecioDetalleFecha": "2025-12-12",
    "listaPrecioDetallePorcentaje": 5,
    "listaPrecioDetalleEstado": "A"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio-detalle/editar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idListaPrecioDetalle   string   

ID detalle (base64). Example: MQ==

idListaPrecio   integer   

The idListaPrecio of an existing record in the ptv_listaprecio table. Example: 17

idProducto   integer   

The idProducto of an existing record in the inv_producto table. Example: 17

idPromocion   integer  optional  

The idPromocion of an existing record in the pro_promocion table. Example: 17

idCombo   integer  optional  

The idCombo of an existing record in the pro_combo table. Example: 17

listaPrecioDetalleImporte   number  optional  

optional Precio detalle. Example: 41

listaPrecioDetalleFecha   date  optional  

optional Fecha. Example: 2025-12-12

listaPrecioDetallePorcentaje   number  optional  

optional % descuento. Example: 5

listaPrecioDetalleEstado   string  optional  

optional 'A'|'I'. Example: A

Asociar productos MASIVO (upsert por idListaPrecio + idProducto) Recibe varios items con idProducto y precios.

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/asociar" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idListaPrecio\": \"MQ==\",
    \"items\": [
        \"consequatur\"
    ]
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/asociar"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idListaPrecio": "MQ==",
    "items": [
        "consequatur"
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio-detalle/asociar

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idListaPrecio   string   

ID lista (base64). Example: MQ==

items   string[]   

Arreglo de productos a asociar.

idProducto   string   

ID producto (base64). Example: MQ==

listaPrecioDetalleImporte   number  optional  

optional Precio detalle. Example: 40

listaPrecioDetallePorcentaje   number  optional  

optional % descuento. Example: 0

listaPrecioDetalleFecha   date  optional  

optional Fecha. Example: 2025-12-12

listaPrecioMedioMayoreo   number  optional  

optional Precio medio mayoreo. Example: 39

Inactivar fila

requires authentication

Example request:
curl --request DELETE \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/eliminar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/eliminar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());

Request      

DELETE api/v1/punto-venta/lista-precio-detalle/eliminar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID detalle (base64). Example: MQ==

Activar fila

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/activar/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/activar/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio-detalle/activar/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID detalle (base64). Example: MQ==

Aplicar descuento global a una lista

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/descuento-global" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idListaPrecio\": \"MQ==\",
    \"porcentaje\": 10
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/descuento-global"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idListaPrecio": "MQ==",
    "porcentaje": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio-detalle/descuento-global

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idListaPrecio   string   

ID lista (base64). Example: MQ==

porcentaje   number   

Porcentaje 0–100. Example: 10

Datos para formulario (catálogos, combos y sugerencias)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/form-data?idListaPrecio=MQ%3D%3D" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/form-data"
);

const params = {
    "idListaPrecio": "MQ==",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/lista-precio-detalle/form-data

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

idListaPrecio   string  optional  

optional ID lista (base64). Si viene, se excluyen productos ya asociados. Example: MQ==

Información puntual de un detalle de lista (por ID)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/info/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/info/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/lista-precio-detalle/info/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID detalle (base64). Example: MQ==

Datos para detalle (prefill de edición)

requires authentication

Example request:
curl --request GET \
    --get "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/detalle/MQ==" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/detalle/MQ=="
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

Example response (401):

Show headers
cache-control: no-cache, private
content-type: application/json
vary: Origin
 

{
    "success": false,
    "message": "Token inválido o no autenticado.",
    "errors": {
        "token": [
            "No tienes acceso a este recurso."
        ]
    }
}
 

Request      

GET api/v1/punto-venta/lista-precio-detalle/detalle/{id}

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   string   

ID detalle (base64). Example: MQ==

Lista de precios diferenciados

requires authentication

Example request:
curl --request POST \
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/lista-diferenciada" \
    --header "Authorization: Bearer {ACCESS_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"idListaPrecio\": [
        \"MQ==\",
        \"Mg==\",
        \"Mw==\"
    ],
    \"idProducto\": \"MQ==\",
    \"idAlmacen\": 5,
    \"con_stock\": true,
    \"solo_activo_inventario\": false,
    \"searchQuery\": \"johnnie\",
    \"listaPrecioDetalleEstado\": \"A\",
    \"sort_field\": \"idListaPrecioDetalle\",
    \"sort_direction\": \"asc\",
    \"perPage\": 10
}"
const url = new URL(
    "https://tequilas-mezcales.test/api/v1/punto-venta/lista-precio-detalle/lista-diferenciada"
);

const headers = {
    "Authorization": "Bearer {ACCESS_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "idListaPrecio": [
        "MQ==",
        "Mg==",
        "Mw=="
    ],
    "idProducto": "MQ==",
    "idAlmacen": 5,
    "con_stock": true,
    "solo_activo_inventario": false,
    "searchQuery": "johnnie",
    "listaPrecioDetalleEstado": "A",
    "sort_field": "idListaPrecioDetalle",
    "sort_direction": "asc",
    "perPage": 10
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());

Request      

POST api/v1/punto-venta/lista-precio-detalle/lista-diferenciada

Headers

Authorization      

Example: Bearer {ACCESS_TOKEN}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

idListaPrecio   string[]  optional  

optional IDs de las listas (base64).

idProducto   string  optional  

optional ID del producto (base64). Example: MQ==

idAlmacen   integer  optional  

optional Filtra inventario por almacén. Example: 5

con_stock   boolean  optional  

optional Solo productos con stock > 0. Example: true

solo_activo_inventario   boolean  optional  

optional Solo inventario "Activo". Default: true Example: false

searchQuery   string  optional  

optional Búsqueda por alias/código del producto. Example: johnnie

listaPrecioDetalleEstado   string  optional  

optional 'A'|'I'. Example: A

sort_field   string  optional  

optional Campo de orden. Example: idListaPrecioDetalle

sort_direction   string  optional  

optional 'asc'|'desc'. Example: asc

perPage   integer  optional  

optional Elementos por página. Example: 10