Modelos
ShortLink
Section titled “ShortLink”Representa un link acortado.
{ "id": "64a1b2c3d4e5f6...", "code": "a1B2", "domain": "64a1b2c3d4e5f6...", "owner": "64a1b2c3d4e5f6...", "target_url": "https://ejemplo.com/pagina-larga", "title": "Mi link", "redirect_type": 302, "is_active": true, "click_count": 142, "tags": ["marketing"], "created_by_api_key": "64a1b2c3d4e5f6...", "created_at": "2025-01-15T10:30:00Z", "updated_at": "2025-01-15T10:30:00Z", "last_accessed_at": "2025-01-20T14:22:00Z", "expires_at": null, "deleted_at": null}| Campo | Tipo | Descripción |
|---|---|---|
id | string | ID único del link (ObjectID) |
code | string | Código corto del link |
domain | string | ID del dominio asociado |
owner | string | ID del usuario propietario |
target_url | string | URL de destino |
title | string | Título descriptivo |
redirect_type | integer | Tipo de redirección HTTP (301, 302, 307) |
is_active | boolean | Si el link está activo |
click_count | integer | Número total de clics |
tags | string[] | Etiquetas para organización |
created_by_api_key | string | ID de la API key que lo creó (si aplica) |
created_at | datetime | Fecha de creación |
updated_at | datetime | Fecha de última modificación |
last_accessed_at | datetime | Fecha del último clic |
expires_at | datetime | Fecha de expiración (null = sin expiración) |
deleted_at | datetime | Fecha de soft delete (null = activo) |
BatchResult
Section titled “BatchResult”Resultado de una operación batch.
{ "target_url": "https://ejemplo.com/pagina-1", "code": "a1B2", "short_url": "https://go.linkea.us/a1B2", "error": ""}| Campo | Tipo | Descripción |
|---|---|---|
target_url | string | URL original enviada |
code | string | Código generado (vacío si hubo error) |
short_url | string | URL corta completa |
error | string | Mensaje de error (vacío si fue exitoso) |