MENU navbar-image

Introduction

API Gateway / Integration Bridge para interconectar sistemas legacy. Valida, mapea y sincroniza datos entre bases de datos mediante servicios configurables.

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 {YOUR_BEARER_TOKEN}".

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

Genera un token usando POST /api/v1/admin/tokens/issue o ejecuta php artisan scribe:token en desarrollo. Usa el token en el header Authorization: Bearer {token}.

Integrations

Endpoints dinámicos para ejecutar integraciones configurables. Cada servicio valida datos, mapea campos y ejecuta operaciones (insert/update/upsert) en la base de datos destino.

Ejecutar integración

requires authentication

Procesa una solicitud de integración para un servicio específico. El servicio debe estar configurado en integration_services y habilitado.

Example request:
curl --request POST \
    "https://interteam-api.adtv.io/api/v1/integrations/revalidaciones?dry_run=" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "X-Correlation-Id: string opcional. ID de correlación para tracking (se genera automáticamente si no se proporciona). Example: uuid-12345-abcde" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"referencia_id\": 12345,
    \"fecha_evento\": \"2026-02-03\",
    \"contenedor\": \"ABCD1234567\",
    \"estatus\": \"validado\"
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/integrations/revalidaciones"
);

const params = {
    "dry_run": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "X-Correlation-Id": "string opcional. ID de correlación para tracking (se genera automáticamente si no se proporciona). Example: uuid-12345-abcde",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "referencia_id": 12345,
    "fecha_evento": "2026-02-03",
    "contenedor": "ABCD1234567",
    "estatus": "validado"
};

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

Example response (200, Update/Upsert exitoso):


{
    "success": true,
    "data": {
        "operation": "update",
        "existed": true
    },
    "correlation_id": "uuid-12345-abcde",
    "status_code": 200
}
 

Example response (201, Insert exitoso):


{
    "success": true,
    "data": {
        "id": 1,
        "operation": "insert"
    },
    "correlation_id": "uuid-12345-abcde",
    "status_code": 201
}
 

Example response (401, Token inválido):


{
    "message": "Unauthorized - Invalid, expired, or revoked token",
    "error_code": "AUTH_INVALID_TOKEN"
}
 

Example response (403, Servicio deshabilitado):


{
    "message": "Integration service is disabled",
    "error_code": "SERVICE_DISABLED"
}
 

Example response (404, Servicio no encontrado):


{
    "message": "Integration service not found",
    "error_code": "SERVICE_NOT_FOUND"
}
 

Example response (422, Error de validación):


{
    "success": false,
    "message": "Validation failed",
    "error_code": "VALIDATION_ERROR",
    "correlation_id": "uuid-12345-abcde",
    "details": {
        "errors": {
            "estatus": [
                "The estatus field must be one of: pendiente, validado, rechazado."
            ]
        }
    },
    "status_code": 422
}
 

Request      

POST api/v1/integrations/{slug}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

X-Correlation-Id        

Example: string opcional. ID de correlación para tracking (se genera automáticamente si no se proporciona). Example: uuid-12345-abcde

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

El slug del servicio de integración (ej: revalidaciones, detalle-contenedores). Example: revalidaciones

Query Parameters

dry_run   boolean  optional    

opcional. Si es 'true', valida y mapea datos sin persistir. Example: false

Body Parameters

referencia_id   integer     

Ejemplo para servicio 'revalidaciones': ID de referencia. Example: 12345

fecha_evento   date     

Ejemplo para 'revalidaciones': Fecha del evento. Example: 2026-02-03

contenedor   string     

Ejemplo para 'revalidaciones': Número de contenedor. Example: ABCD1234567

estatus   string     

Ejemplo para 'revalidaciones': Estado (pendiente, validado, rechazado). Example: validado

Ejecutar integración

requires authentication

Procesa una solicitud de integración para un servicio específico. El servicio debe estar configurado en integration_services y habilitado.

Example request:
curl --request PUT \
    "https://interteam-api.adtv.io/api/v1/integrations/revalidaciones?dry_run=" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "X-Correlation-Id: string opcional. ID de correlación para tracking (se genera automáticamente si no se proporciona). Example: uuid-12345-abcde" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"referencia_id\": 12345,
    \"fecha_evento\": \"2026-02-03\",
    \"contenedor\": \"ABCD1234567\",
    \"estatus\": \"validado\"
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/integrations/revalidaciones"
);

const params = {
    "dry_run": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "X-Correlation-Id": "string opcional. ID de correlación para tracking (se genera automáticamente si no se proporciona). Example: uuid-12345-abcde",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "referencia_id": 12345,
    "fecha_evento": "2026-02-03",
    "contenedor": "ABCD1234567",
    "estatus": "validado"
};

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

Example response (200, Update/Upsert exitoso):


{
    "success": true,
    "data": {
        "operation": "update",
        "existed": true
    },
    "correlation_id": "uuid-12345-abcde",
    "status_code": 200
}
 

Example response (201, Insert exitoso):


{
    "success": true,
    "data": {
        "id": 1,
        "operation": "insert"
    },
    "correlation_id": "uuid-12345-abcde",
    "status_code": 201
}
 

Example response (401, Token inválido):


{
    "message": "Unauthorized - Invalid, expired, or revoked token",
    "error_code": "AUTH_INVALID_TOKEN"
}
 

Example response (403, Servicio deshabilitado):


{
    "message": "Integration service is disabled",
    "error_code": "SERVICE_DISABLED"
}
 

Example response (404, Servicio no encontrado):


{
    "message": "Integration service not found",
    "error_code": "SERVICE_NOT_FOUND"
}
 

Example response (422, Error de validación):


{
    "success": false,
    "message": "Validation failed",
    "error_code": "VALIDATION_ERROR",
    "correlation_id": "uuid-12345-abcde",
    "details": {
        "errors": {
            "estatus": [
                "The estatus field must be one of: pendiente, validado, rechazado."
            ]
        }
    },
    "status_code": 422
}
 

Request      

PUT api/v1/integrations/{slug}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

X-Correlation-Id        

Example: string opcional. ID de correlación para tracking (se genera automáticamente si no se proporciona). Example: uuid-12345-abcde

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

El slug del servicio de integración (ej: revalidaciones, detalle-contenedores). Example: revalidaciones

Query Parameters

dry_run   boolean  optional    

opcional. Si es 'true', valida y mapea datos sin persistir. Example: false

Body Parameters

referencia_id   integer     

Ejemplo para servicio 'revalidaciones': ID de referencia. Example: 12345

fecha_evento   date     

Ejemplo para 'revalidaciones': Fecha del evento. Example: 2026-02-03

contenedor   string     

Ejemplo para 'revalidaciones': Número de contenedor. Example: ABCD1234567

estatus   string     

Ejemplo para 'revalidaciones': Estado (pendiente, validado, rechazado). Example: validado

Ejecutar integración

requires authentication

Procesa una solicitud de integración para un servicio específico. El servicio debe estar configurado en integration_services y habilitado.

Example request:
curl --request PATCH \
    "https://interteam-api.adtv.io/api/v1/integrations/revalidaciones?dry_run=" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "X-Correlation-Id: string opcional. ID de correlación para tracking (se genera automáticamente si no se proporciona). Example: uuid-12345-abcde" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"referencia_id\": 12345,
    \"fecha_evento\": \"2026-02-03\",
    \"contenedor\": \"ABCD1234567\",
    \"estatus\": \"validado\"
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/integrations/revalidaciones"
);

const params = {
    "dry_run": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_BEARER_TOKEN}",
    "X-Correlation-Id": "string opcional. ID de correlación para tracking (se genera automáticamente si no se proporciona). Example: uuid-12345-abcde",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "referencia_id": 12345,
    "fecha_evento": "2026-02-03",
    "contenedor": "ABCD1234567",
    "estatus": "validado"
};

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

Example response (200, Update/Upsert exitoso):


{
    "success": true,
    "data": {
        "operation": "update",
        "existed": true
    },
    "correlation_id": "uuid-12345-abcde",
    "status_code": 200
}
 

Example response (201, Insert exitoso):


{
    "success": true,
    "data": {
        "id": 1,
        "operation": "insert"
    },
    "correlation_id": "uuid-12345-abcde",
    "status_code": 201
}
 

Example response (401, Token inválido):


{
    "message": "Unauthorized - Invalid, expired, or revoked token",
    "error_code": "AUTH_INVALID_TOKEN"
}
 

Example response (403, Servicio deshabilitado):


{
    "message": "Integration service is disabled",
    "error_code": "SERVICE_DISABLED"
}
 

Example response (404, Servicio no encontrado):


{
    "message": "Integration service not found",
    "error_code": "SERVICE_NOT_FOUND"
}
 

Example response (422, Error de validación):


{
    "success": false,
    "message": "Validation failed",
    "error_code": "VALIDATION_ERROR",
    "correlation_id": "uuid-12345-abcde",
    "details": {
        "errors": {
            "estatus": [
                "The estatus field must be one of: pendiente, validado, rechazado."
            ]
        }
    },
    "status_code": 422
}
 

Request      

PATCH api/v1/integrations/{slug}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

X-Correlation-Id        

Example: string opcional. ID de correlación para tracking (se genera automáticamente si no se proporciona). Example: uuid-12345-abcde

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

slug   string     

El slug del servicio de integración (ej: revalidaciones, detalle-contenedores). Example: revalidaciones

Query Parameters

dry_run   boolean  optional    

opcional. Si es 'true', valida y mapea datos sin persistir. Example: false

Body Parameters

referencia_id   integer     

Ejemplo para servicio 'revalidaciones': ID de referencia. Example: 12345

fecha_evento   date     

Ejemplo para 'revalidaciones': Fecha del evento. Example: 2026-02-03

contenedor   string     

Ejemplo para 'revalidaciones': Número de contenedor. Example: ABCD1234567

estatus   string     

Ejemplo para 'revalidaciones': Estado (pendiente, validado, rechazado). Example: validado

Admin - Services

APIs for managing integration service configurations.

List all services

requires authentication

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/services" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/services"
);

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

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

Example response (200):


{
  "data": [
    {
      "id": 1,
      "name": "Revalidaciones",
      "slug": "revalidaciones",
      "is_enabled": true,
      "source_connection": "source_db",
      "target_connection": "target_db",
      "endpoint_path": "/v1/integrations/revalidaciones",
      "http_method": "POST",
      "validation_rules": {...},
      "mapping": {...},
      "operation": "upsert",
      "target_table": "revalidaciones",
      "created_at": "2026-02-01T10:00:00.000000Z",
      "updated_at": "2026-02-01T10:00:00.000000Z"
    }
  ]
}
 

Request      

GET api/v1/admin/services

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Create new service

requires authentication

Example request:
curl --request POST \
    "https://interteam-api.adtv.io/api/v1/admin/services" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Revalidaciones\",
    \"slug\": \"revalidaciones\",
    \"is_enabled\": true,
    \"source_connection\": \"source_db\",
    \"target_connection\": \"target_db\",
    \"endpoint_path\": \"\\/v1\\/integrations\\/revalidaciones\",
    \"http_method\": \"POST\",
    \"idempotency_key_strategy\": \"hash:referencia_id,fecha_evento\",
    \"validation_rules\": [],
    \"mapping\": [],
    \"operation\": \"upsert\",
    \"target_table\": \"revalidaciones\",
    \"target_model\": \"architecto\",
    \"match_keys\": [
        \"architecto\"
    ],
    \"preconditions\": [
        \"architecto\"
    ],
    \"post_actions\": [
        \"architecto\"
    ],
    \"rate_limit_per_min\": 16
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/services"
);

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

let body = {
    "name": "Revalidaciones",
    "slug": "revalidaciones",
    "is_enabled": true,
    "source_connection": "source_db",
    "target_connection": "target_db",
    "endpoint_path": "\/v1\/integrations\/revalidaciones",
    "http_method": "POST",
    "idempotency_key_strategy": "hash:referencia_id,fecha_evento",
    "validation_rules": [],
    "mapping": [],
    "operation": "upsert",
    "target_table": "revalidaciones",
    "target_model": "architecto",
    "match_keys": [
        "architecto"
    ],
    "preconditions": [
        "architecto"
    ],
    "post_actions": [
        "architecto"
    ],
    "rate_limit_per_min": 16
};

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

Example response (201):


{
  "data": {
    "id": 2,
    "name": "Revalidaciones",
    "slug": "revalidaciones",
    "is_enabled": true,
    "source_connection": "source_db",
    "target_connection": "target_db",
    "endpoint_path": "/v1/integrations/revalidaciones",
    "http_method": "POST",
    "validation_rules": {...},
    "mapping": {...},
    "operation": "upsert",
    "target_table": "revalidaciones",
    "created_at": "2026-02-03T12:00:00.000000Z",
    "updated_at": "2026-02-03T12:00:00.000000Z"
  }
}
 

Example response (422):


{
    "message": "The name field is required.",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}
 

Request      

POST api/v1/admin/services

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Service display name. Example: Revalidaciones

slug   string  optional    

Service identifier (auto-generated if not provided). Example: revalidaciones

is_enabled   boolean  optional    

Service status. Example: true

source_connection   string     

Database connection for source queries. Example: source_db

target_connection   string     

Database connection for target writes. Example: target_db

endpoint_path   string     

API endpoint path. Example: /v1/integrations/revalidaciones

http_method   string     

HTTP method. Example: POST

idempotency_key_strategy   string  optional    

Idempotency key strategy. Example: hash:referencia_id,fecha_evento

validation_rules   object     

Validation rules for request data.

mapping   object     

Field mappings from source to target.

operation   string     

Database operation (insert, update, upsert). Example: upsert

target_table   string     

Target database table. Example: revalidaciones

target_model   string  optional    

Target Eloquent model class. Example: architecto

match_keys   string[]  optional    

Keys for upsert matching.

preconditions   string[]  optional    

Conditions to check before operation.

post_actions   string[]  optional    

Actions to execute after operation.

rate_limit_per_min   integer  optional    

Rate limit per minute. Example: 16

Get service details

requires authentication

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/services/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/services/1"
);

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

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

Example response (200):


{
  "data": {
    "id": 1,
    "name": "Revalidaciones",
    "slug": "revalidaciones",
    "is_enabled": true,
    "source_connection": "source_db",
    "target_connection": "target_db",
    "endpoint_path": "/v1/integrations/revalidaciones",
    "http_method": "POST",
    "validation_rules": {...},
    "mapping": {...},
    "operation": "upsert",
    "target_table": "revalidaciones",
    "created_at": "2026-02-01T10:00:00.000000Z",
    "updated_at": "2026-02-01T10:00:00.000000Z"
  }
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\IntegrationService] 999"
}
 

Request      

GET api/v1/admin/services/{id}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Service ID. Example: 1

Update service

requires authentication

Example request:
curl --request PUT \
    "https://interteam-api.adtv.io/api/v1/admin/services/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Revalidaciones Updated\",
    \"slug\": \"revalidaciones-v2\",
    \"is_enabled\": false,
    \"source_connection\": \"architecto\",
    \"target_connection\": \"architecto\",
    \"endpoint_path\": \"architecto\",
    \"http_method\": \"architecto\",
    \"idempotency_key_strategy\": \"architecto\",
    \"validation_rules\": [],
    \"mapping\": [],
    \"operation\": \"architecto\",
    \"target_table\": \"architecto\",
    \"target_model\": \"architecto\",
    \"match_keys\": [
        \"architecto\"
    ],
    \"preconditions\": [
        \"architecto\"
    ],
    \"post_actions\": [
        \"architecto\"
    ],
    \"rate_limit_per_min\": 16
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/services/1"
);

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

let body = {
    "name": "Revalidaciones Updated",
    "slug": "revalidaciones-v2",
    "is_enabled": false,
    "source_connection": "architecto",
    "target_connection": "architecto",
    "endpoint_path": "architecto",
    "http_method": "architecto",
    "idempotency_key_strategy": "architecto",
    "validation_rules": [],
    "mapping": [],
    "operation": "architecto",
    "target_table": "architecto",
    "target_model": "architecto",
    "match_keys": [
        "architecto"
    ],
    "preconditions": [
        "architecto"
    ],
    "post_actions": [
        "architecto"
    ],
    "rate_limit_per_min": 16
};

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

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Revalidaciones Updated",
        "slug": "revalidaciones",
        "is_enabled": false,
        "updated_at": "2026-02-03T13:00:00.000000Z"
    }
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\IntegrationService] 999"
}
 

Example response (422):


{
    "message": "The slug has already been taken.",
    "errors": {
        "slug": [
            "The slug has already been taken."
        ]
    }
}
 

Request      

PUT api/v1/admin/services/{id}

PATCH api/v1/admin/services/{id}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Service ID. Example: 1

Body Parameters

name   string  optional    

Service display name. Example: Revalidaciones Updated

slug   string  optional    

Service identifier. Example: revalidaciones-v2

is_enabled   boolean  optional    

Service status. Example: false

source_connection   string  optional    

Database connection for source queries. Example: architecto

target_connection   string  optional    

Database connection for target writes. Example: architecto

endpoint_path   string  optional    

API endpoint path. Example: architecto

http_method   string  optional    

HTTP method. Example: architecto

idempotency_key_strategy   string  optional    

Idempotency key strategy. Example: architecto

validation_rules   object  optional    

Validation rules for request data.

mapping   object  optional    

Field mappings from source to target.

operation   string  optional    

Database operation (insert, update, upsert). Example: architecto

target_table   string  optional    

Target database table. Example: architecto

target_model   string  optional    

Target Eloquent model class. Example: architecto

match_keys   string[]  optional    

Keys for upsert matching.

preconditions   string[]  optional    

Conditions to check before operation.

post_actions   string[]  optional    

Actions to execute after operation.

rate_limit_per_min   integer  optional    

Rate limit per minute. Example: 16

Delete service

requires authentication

Example request:
curl --request DELETE \
    "https://interteam-api.adtv.io/api/v1/admin/services/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/services/1"
);

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

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

Example response (200):


{
    "message": "Service deleted successfully"
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\IntegrationService] 999"
}
 

Request      

DELETE api/v1/admin/services/{id}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Service ID. Example: 1

Admin - Events

APIs for querying integration event logs with filtering capabilities.

List integration events

requires authentication

Query integration event logs with optional filters. Results are paginated and ordered by creation date (newest first).

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/events?service_slug=revalidaciones&status=success&correlation_id=cid-123-abc&date_from=2026-02-01T00%3A00%3A00Z&date_to=2026-02-03T23%3A59%3A59Z&per_page=20" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/events"
);

const params = {
    "service_slug": "revalidaciones",
    "status": "success",
    "correlation_id": "cid-123-abc",
    "date_from": "2026-02-01T00:00:00Z",
    "date_to": "2026-02-03T23:59:59Z",
    "per_page": "20",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
  "current_page": 1,
  "data": [
    {
      "id": 123,
      "service_slug": "revalidaciones",
      "client_id": 1,
      "status": "success",
      "correlation_id": "cid-123-abc",
      "request_payload": {...},
      "response_payload": {...},
      "error_message": null,
      "processing_time_ms": 245,
      "dry_run": false,
      "created_at": "2026-02-03T12:34:56.000000Z",
      "client": {
        "id": 1,
        "name": "Sistema Legacy A"
      }
    }
  ],
  "per_page": 50,
  "total": 1500,
  "last_page": 30
}
 

Request      

GET api/v1/admin/events

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

service_slug   string  optional    

Filter by service slug. Example: revalidaciones

status   string  optional    

Filter by event status (success, failed, validation_error). Example: success

correlation_id   string  optional    

Filter by correlation ID for request tracing. Example: cid-123-abc

date_from   string  optional    

Filter events created on or after this date (ISO 8601). Example: 2026-02-01T00:00:00Z

date_to   string  optional    

Filter events created on or before this date (ISO 8601). Example: 2026-02-03T23:59:59Z

per_page   integer  optional    

Results per page (default: 50). Example: 20

Get event details

requires authentication

Retrieve detailed information about a specific integration event.

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/events/123" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/events/123"
);

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

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

Example response (200):


{
    "data": {
        "id": 123,
        "service_slug": "revalidaciones",
        "client_id": 1,
        "status": "success",
        "correlation_id": "cid-123-abc",
        "request_payload": {
            "referencia_id": "REF-2026-001",
            "fecha_evento": "2026-02-03",
            "contenedor": "CONT-123",
            "estatus": "aprobado"
        },
        "response_payload": {
            "status": "success",
            "operation": "update",
            "affected_rows": 1
        },
        "error_message": null,
        "processing_time_ms": 245,
        "dry_run": false,
        "created_at": "2026-02-03T12:34:56.000000Z",
        "updated_at": "2026-02-03T12:34:56.000000Z",
        "client": {
            "id": 1,
            "name": "Sistema Legacy A"
        }
    }
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\IntegrationEvent] 999"
}
 

Request      

GET api/v1/admin/events/{id}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Event ID. Example: 123

Admin - Metrics

APIs for retrieving aggregated metrics and error statistics.

List daily metrics

requires authentication

Retrieve daily aggregated metrics for integration services with optional filters.

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/metrics?service_slug=revalidaciones&date_from=2026-02-01&date_to=2026-02-03" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/metrics"
);

const params = {
    "service_slug": "revalidaciones",
    "date_from": "2026-02-01",
    "date_to": "2026-02-03",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "id": 5,
            "service_slug": "revalidaciones",
            "date": "2026-02-03",
            "total_requests": 1250,
            "success_count": 1200,
            "fail_count": 50,
            "avg_duration_ms": 245.5,
            "max_duration_ms": 1200,
            "min_duration_ms": 45,
            "created_at": "2026-02-04T00:05:00.000000Z",
            "updated_at": "2026-02-04T23:59:00.000000Z"
        }
    ]
}
 

Request      

GET api/v1/admin/metrics

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

service_slug   string  optional    

Filter by service slug. Example: revalidaciones

date_from   string  optional    

Filter metrics from this date (Y-m-d). Example: 2026-02-01

date_to   string  optional    

Filter metrics until this date (Y-m-d). Example: 2026-02-03

Get top errors

requires authentication

Retrieve the most frequent error codes grouped by service within a date range.

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/metrics/top-errors?date_from=2026-01-27&date_to=2026-02-03" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/metrics/top-errors"
);

const params = {
    "date_from": "2026-01-27",
    "date_to": "2026-02-03",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "service_slug": "revalidaciones",
            "error_code": "VALIDATION_ERROR",
            "count": 45,
            "last_error_message": "The estatus field is required.",
            "last_occurred_at": "2026-02-03T15:30:00.000000Z"
        },
        {
            "service_slug": "revalidaciones",
            "error_code": "DATABASE_ERROR",
            "count": 12,
            "last_error_message": "Connection timeout",
            "last_occurred_at": "2026-02-03T14:20:00.000000Z"
        }
    ]
}
 

Request      

GET api/v1/admin/metrics/top-errors

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

date_from   string  optional    

Start date for error analysis (Y-m-d, default: 7 days ago). Example: 2026-01-27

date_to   string  optional    

End date for error analysis (Y-m-d, default: today). Example: 2026-02-03

Get metrics summary

requires authentication

Retrieve aggregated summary statistics by service over a date range.

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/metrics/summary?service_slug=revalidaciones&date_from=2026-01-04&date_to=2026-02-03" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/metrics/summary"
);

const params = {
    "service_slug": "revalidaciones",
    "date_from": "2026-01-04",
    "date_to": "2026-02-03",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

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

Example response (200):


{
    "data": [
        {
            "service_slug": "revalidaciones",
            "total_requests": 37500,
            "total_success": 36000,
            "total_failures": 1500,
            "avg_duration_ms": 250.75
        }
    ]
}
 

Request      

GET api/v1/admin/metrics/summary

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

service_slug   string  optional    

Filter by service slug. Example: revalidaciones

date_from   string  optional    

Start date for summary (Y-m-d, default: 30 days ago). Example: 2026-01-04

date_to   string  optional    

End date for summary (Y-m-d, default: today). Example: 2026-02-03

Admin - Tokens

APIs for managing API tokens (issue, list, revoke).

List all tokens

requires authentication

Retrieve all API tokens with their associated clients, ordered by creation date (newest first).

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/tokens" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/tokens"
);

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

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

Example response (200):


{
    "data": [
        {
            "id": 5,
            "api_client_id": 1,
            "token": "gw_live_abc123...",
            "expires_at": "2027-02-03T12:00:00.000000Z",
            "last_used_at": "2026-02-03T11:30:00.000000Z",
            "revoked_at": null,
            "created_at": "2026-02-03T10:00:00.000000Z",
            "client": {
                "id": 1,
                "name": "Sistema Legacy A",
                "is_active": true
            }
        }
    ]
}
 

Request      

GET api/v1/admin/tokens

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Issue new token

requires authentication

Generate a new API token for a specific client. Token expiration defaults to 365 days if not specified.

Example request:
curl --request POST \
    "https://interteam-api.adtv.io/api/v1/admin/tokens/issue" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"api_client_id\": 1,
    \"expires_in_days\": 365
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/tokens/issue"
);

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

let body = {
    "api_client_id": 1,
    "expires_in_days": 365
};

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

Example response (201):


{
    "message": "Token issued successfully",
    "data": {
        "token": "gw_live_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz",
        "token_id": 5,
        "expires_at": "2027-02-03T12:00:00.000000Z"
    }
}
 

Example response (422):


{
    "message": "The api_client_id field is required.",
    "errors": {
        "api_client_id": [
            "The api_client_id field is required."
        ]
    }
}
 

Request      

POST api/v1/admin/tokens/issue

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

api_client_id   integer     

The ID of the API client. Example: 1

expires_in_days   integer  optional    

Token validity duration in days (1-3650, default: 365). Example: 365

Revoke token

requires authentication

Revoke an existing API token, preventing further use.

Example request:
curl --request POST \
    "https://interteam-api.adtv.io/api/v1/admin/tokens/5/revoke" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/tokens/5/revoke"
);

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

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

Example response (200):


{
    "message": "Token revoked successfully"
}
 

Example response (404):


{
    "message": "Token not found"
}
 

Request      

POST api/v1/admin/tokens/{id}/revoke

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Token ID. Example: 5

Admin - API Clients

APIs for managing API clients and their service permissions.

List all API clients

requires authentication

Retrieve all registered API clients with their token counts.

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/clients" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/clients"
);

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

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

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Sistema Legacy Revalidaciones",
            "is_active": true,
            "allowed_service_slugs": [
                "revalidaciones",
                "detalle-contenedores"
            ],
            "tokens_count": 3,
            "created_at": "2026-02-03T18:00:00.000000Z",
            "updated_at": "2026-02-03T18:00:00.000000Z"
        }
    ]
}
 

Request      

GET api/v1/admin/clients

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Create new API client

requires authentication

Create a new API client with optional service restrictions.

Example request:
curl --request POST \
    "https://interteam-api.adtv.io/api/v1/admin/clients" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Sistema Legacy Producción\",
    \"is_active\": true,
    \"allowed_service_slugs\": [
        \"revalidaciones\"
    ]
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/clients"
);

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

let body = {
    "name": "Sistema Legacy Producción",
    "is_active": true,
    "allowed_service_slugs": [
        "revalidaciones"
    ]
};

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

Example response (201):


{
    "data": {
        "id": 5,
        "name": "Sistema Legacy Producción",
        "is_active": true,
        "allowed_service_slugs": [
            "revalidaciones"
        ],
        "created_at": "2026-02-04T10:00:00.000000Z",
        "updated_at": "2026-02-04T10:00:00.000000Z"
    }
}
 

Example response (422):


{
    "message": "The name field is required.",
    "errors": {
        "name": [
            "The name field is required."
        ]
    }
}
 

Request      

POST api/v1/admin/clients

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

name   string     

Client name. Example: Sistema Legacy Producción

is_active   boolean  optional    

Client status (default: true). Example: true

allowed_service_slugs   string[]  optional    

List of allowed service slugs. Empty array means access to all services.

Get API client details

requires authentication

Retrieve detailed information about a specific API client including active tokens.

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/clients/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/clients/1"
);

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

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

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Sistema Legacy Revalidaciones",
        "is_active": true,
        "allowed_service_slugs": [
            "revalidaciones"
        ],
        "created_at": "2026-02-03T18:00:00.000000Z",
        "updated_at": "2026-02-03T18:00:00.000000Z",
        "tokens": [
            {
                "id": 1,
                "expires_at": "2027-02-03T18:00:00.000000Z",
                "last_used_at": "2026-02-04T09:30:00.000000Z",
                "revoked_at": null,
                "created_at": "2026-02-03T18:00:00.000000Z"
            }
        ]
    }
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\ApiClient] 999"
}
 

Request      

GET api/v1/admin/clients/{id}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Client ID. Example: 1

Update API client

requires authentication

Update API client information and service permissions.

Example request:
curl --request PUT \
    "https://interteam-api.adtv.io/api/v1/admin/clients/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Sistema Legacy Actualizado\",
    \"is_active\": false,
    \"allowed_service_slugs\": [
        \"revalidaciones\",
        \"detalle-contenedores\"
    ]
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/clients/1"
);

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

let body = {
    "name": "Sistema Legacy Actualizado",
    "is_active": false,
    "allowed_service_slugs": [
        "revalidaciones",
        "detalle-contenedores"
    ]
};

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

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Sistema Legacy Actualizado",
        "is_active": false,
        "allowed_service_slugs": [
            "revalidaciones",
            "detalle-contenedores"
        ],
        "updated_at": "2026-02-04T10:30:00.000000Z"
    }
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\ApiClient] 999"
}
 

Example response (422):


{
    "message": "The name field must be a string.",
    "errors": {
        "name": [
            "The name field must be a string."
        ]
    }
}
 

Request      

PUT api/v1/admin/clients/{id}

PATCH api/v1/admin/clients/{id}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Client ID. Example: 1

Body Parameters

name   string  optional    

Client name. Example: Sistema Legacy Actualizado

is_active   boolean  optional    

Client status. Example: false

allowed_service_slugs   string[]  optional    

List of allowed service slugs.

Delete API client

requires authentication

Delete an API client and revoke all associated tokens.

Example request:
curl --request DELETE \
    "https://interteam-api.adtv.io/api/v1/admin/clients/1" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/clients/1"
);

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

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

Example response (200):


{
    "message": "API Client deleted successfully. 3 tokens were revoked."
}
 

Example response (404):


{
    "message": "No query results for model [App\\Models\\ApiClient] 999"
}
 

Request      

DELETE api/v1/admin/clients/{id}

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

URL Parameters

id   integer     

Client ID. Example: 1

Admin - Database Schema

APIs for inspecting database schema to help create integration services.

List available tables

requires authentication

Get all tables available in the specified database connection.

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/database/tables?connection=target_db" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"connection\": \"architecto\"
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/database/tables"
);

const params = {
    "connection": "target_db",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

let body = {
    "connection": "architecto"
};

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

Example response (200):


{
    "data": [
        "revalidaciones",
        "contenedores",
        "movimientos"
    ]
}
 

Example response (422):


{
    "message": "The connection field is required.",
    "errors": {
        "connection": [
            "The connection field is required."
        ]
    }
}
 

Request      

GET api/v1/admin/database/tables

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

connection   string     

Database connection name (source_db or target_db). Example: target_db

Body Parameters

connection   string     

Example: architecto

Get table structure

requires authentication

Retrieve the column structure of a specific table to assist in creating validation rules and field mappings.

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/admin/database/structure?connection=target_db&table=revalidaciones" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"connection\": \"architecto\",
    \"table\": \"n\"
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/admin/database/structure"
);

const params = {
    "connection": "target_db",
    "table": "revalidaciones",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

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

let body = {
    "connection": "architecto",
    "table": "n"
};

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

Example response (200):


{
    "data": {
        "table": "revalidaciones",
        "connection": "target_db",
        "columns": [
            {
                "name": "id",
                "type": "bigint",
                "nullable": false,
                "key": "PRI",
                "default": null,
                "extra": "auto_increment"
            },
            {
                "name": "referencia_id",
                "type": "int",
                "nullable": false,
                "key": "MUL",
                "default": null,
                "extra": ""
            },
            {
                "name": "fecha_evento",
                "type": "date",
                "nullable": false,
                "key": "",
                "default": null,
                "extra": ""
            },
            {
                "name": "contenedor",
                "type": "varchar(50)",
                "nullable": false,
                "key": "",
                "default": null,
                "extra": ""
            },
            {
                "name": "estatus",
                "type": "enum('pendiente','validado','rechazado')",
                "nullable": false,
                "key": "",
                "default": null,
                "extra": ""
            },
            {
                "name": "created_at",
                "type": "timestamp",
                "nullable": true,
                "key": "",
                "default": null,
                "extra": ""
            }
        ],
        "suggested_validation": {
            "referencia_id": "required|integer",
            "fecha_evento": "required|date",
            "contenedor": "required|string|max:50",
            "estatus": "required|string|in:pendiente,validado,rechazado"
        },
        "suggested_mapping": {
            "referencia_id": "referencia_id",
            "fecha_evento": "fecha_evento",
            "contenedor": "contenedor",
            "estatus": "estatus"
        }
    }
}
 

Example response (404):


{
    "message": "Table not found"
}
 

Example response (422):


{
    "message": "Validation error",
    "errors": {
        "connection": [
            "The connection field is required."
        ],
        "table": [
            "The table field is required."
        ]
    }
}
 

Request      

GET api/v1/admin/database/structure

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Query Parameters

connection   string     

Database connection name (source_db or target_db). Example: target_db

table   string     

Table name to inspect. Example: revalidaciones

Body Parameters

connection   string     

Example: architecto

table   string     

Must not be greater than 255 characters. Example: n

Authentication

APIs for SPA user authentication using Sanctum cookies.

Login

Authenticate user with session cookie (SPA mode). Requires CSRF token from /sanctum/csrf-cookie first.

Example request:
curl --request POST \
    "https://interteam-api.adtv.io/api/v1/login" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"[email protected]\",
    \"password\": \"mufasa\",
    \"remember\": true
}"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/login"
);

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

let body = {
    "email": "[email protected]",
    "password": "mufasa",
    "remember": true
};

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

Example response (200):


{
    "user": {
        "id": 1,
        "name": "Admin",
        "email": "[email protected]",
        "email_verified_at": "2026-02-03T18:00:00.000000Z",
        "created_at": "2026-02-03T18:00:00.000000Z",
        "updated_at": "2026-02-03T18:00:00.000000Z"
    }
}
 

Example response (422):


{
    "message": "The provided credentials are incorrect.",
    "errors": {
        "email": [
            "The provided credentials are incorrect."
        ]
    }
}
 

Request      

POST api/v1/login

Headers

Content-Type        

Example: application/json

Accept        

Example: application/json

Body Parameters

email   string     

User email. Example: [email protected]

password   string     

User password. Example: mufasa

remember   boolean  optional    

Remember session. Example: true

Logout

requires authentication

Invalidate user session and cookie.

Example request:
curl --request POST \
    "https://interteam-api.adtv.io/api/v1/logout" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/logout"
);

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

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

Example response (200):


{
    "message": "Logged out successfully"
}
 

Request      

POST api/v1/logout

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json

Get current user

requires authentication

Return the authenticated user's information.

Example request:
curl --request GET \
    --get "https://interteam-api.adtv.io/api/v1/me" \
    --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://interteam-api.adtv.io/api/v1/me"
);

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

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

Example response (200):


{
    "id": 1,
    "name": "Admin",
    "email": "[email protected]",
    "email_verified_at": "2026-02-03T18:00:00.000000Z",
    "created_at": "2026-02-03T18:00:00.000000Z",
    "updated_at": "2026-02-03T18:00:00.000000Z"
}
 

Request      

GET api/v1/me

Headers

Authorization        

Example: Bearer {YOUR_BEARER_TOKEN}

Content-Type        

Example: application/json

Accept        

Example: application/json