Cargando…
Consultando la base de datos usando api/list.php.
Detalle ISRC
Response · api/detail.php
Response · api/activity_over_time.php
Estándar de documentación aplicado
En todos los endpoints se documenta: 1) Cómo enviar correctamente (método, headers, params/body) 2) Respuesta exitosa real (status y estructura) 3) Errores posibles reales (status + código + mensaje) 4) cURL listo para copiar y pegar (Postman / terminal)
POST
api/submit.php
Registra un ISRC en cola. Si ya existe, no duplica registro.
Cómo enviar correctamente
Método: POST
Headers:
Accept: application/json
Content-Type: application/json
Body JSON:
{
"isrc": "US-CM5-16-00028",
"tracked": true
}
Notas:
- isrc es obligatorio (12 alfanuméricos, guiones opcionales)
- tracked es opcional (default true)
- También acepta formulario POST (isrc/tracked)
Respuesta exitosa
200 · OK
Ver respuesta exitosa
{
"success": true,
"message": "Registro aceptado. La ingesta se completará en segundo plano.",
"isrc": "US-CM5-16-00028",
"isrc_normalized": "USCM51600028",
"id": 42,
"duplicate": false,
"tracked": true,
"created_at": "2026-03-27 12:34:56.000000-04"
}
Errores posibles
Estandarizado
Ver errores posibles
405 · Method Not Allowed
{
"success": false,
"error": "Método no permitido"
}
422 · Unprocessable Entity
{
"success": false,
"error": "ISRC inválido. Debe tener 12 caracteres alfanuméricos (puedes incluir guiones)."
}
500 · Internal Server Error
{
"success": false,
"error": "Error al guardar. Verifica PostgreSQL y el esquema (sql/schema.sql)."
}
GET
api/list.php
Lista paginada de ISRC registrados.
Cómo enviar correctamente
Método: GET Headers: Accept: application/json Query params (opcionales): - status: pending | syncing | ready | error - limit: int (1..200, default 50) - page: int (>=1, default 1) Ejemplo: GET /api/list.php?status=ready&limit=25&page=1
Respuesta exitosa
200 · OK
Ver respuesta exitosa
{
"success": true,
"total": 142,
"page": 1,
"limit": 25,
"data": [
{
"id": 1,
"isrc": "US-CM5-16-00028",
"isrc_normalized": "USCM51600028",
"name": "One Dance",
"luminate_id": "SG67B20476A9EB4318BE350C4404209083",
"entity_type": "SONG",
"image_url": "http://...",
"score": "2.416687",
"status": "ready",
"error_message": null,
"tracked": true,
"created_at": "2026-03-25 17:25:19.541009-04",
"updated_at": "2026-03-25 17:49:35.76688-04"
}
]
}
Errores posibles
Estandarizado
Ver errores posibles
405 · Method Not Allowed
{
"success": false,
"error": "Método no permitido"
}
422 · Unprocessable Entity
{
"success": false,
"error": "status inválido. Valores aceptados: pending, syncing, ready, error"
}
500 · Internal Server Error
{
"success": false,
"error": "Error al consultar la base de datos."
}
GET
api/detail.php
Detalle completo del ISRC (meta, estado, KPI, location y recordings).
Cómo enviar correctamente
Método: GET Headers: Accept: application/json Query params: - isrc (obligatorio): 12 alfanuméricos, con o sin guiones Ejemplo: GET /api/detail.php?isrc=USCM51600028
Respuesta exitosa
200 · OK
Ver respuesta exitosa
{
"success": true,
"meta-info": {
"luminate_id": "SG67B20476A9EB4318BE350C4404209083",
"title": "One Dance",
"artist_display_name": "Drake, Kyla, Wizkid",
"image_url": "http://akamai-b.cdn.cddbp.net/cds/2.0/image/C0D1/6EB7/E5BD/464B_xlarge_front.jpg",
"release_date": "2016-04-01",
"main_genre": "R&B/Hip-Hop",
"imprint": "Cash Money / Republic Records",
"distributors_text": "Digital: Universal Music Distribution",
"owners_text": "Cash Money",
"included_in_text": "One Dance; Views",
"duration": "00:02:54.987",
"popularity": "19.9999"
},
"isrc-info": {
"id": 6,
"isrc_normalized": "USCM51600028",
"isrc_display": "US-CM5-16-00028",
"luminate_id": "SG67B20476A9EB4318BE350C4404209083"
},
"estado-info": {
"status": "ready",
"error_message": null,
"created_at": "2026-03-25 17:25:19.541009-04",
"updated_at": "2026-03-25 17:49:35.76688-04"
},
"kpi-info": {
"album_equivalent": { "current": 3357, "atd": 1635542, "growth_percentage": "4.95" },
"streams": {
"current": 3882029,
"atd": 2284976095,
"growth_percentage": "4.01",
"ad_supported_percentage": "19.54",
"premium_percentage": "80.46",
"ad_supported_streams": 758490,
"premium_streams": 3123539
},
"song_sales": { "current": 40, "atd": 2211588, "growth_percentage": "8.11" },
"airplay_audience": { "current": 1390100, "atd": 6269879700, "growth_percentage": "4.08" },
"airplay_spins": { "current": 496, "atd": 1215603, "growth_percentage": "-1.20" }
},
"location-info": [
{
"location_name": "NATIONAL",
"location_type": "COUNTRY",
"total_streams": 3882029,
"ad_supported_streams": 758490,
"premium_streams": 3123539,
"share_worldwide_percentage": 28.49
}
],
"recordings-info": [
{
"recording_luminate_id": "MR1D7D6FE55A1E4BDE8CBD98A55A3B5B2A",
"isrc": "USCM51600028",
"title": "One Dance",
"release_date": "2016-04-01",
"recording_type": "Audio",
"rank_order": 1,
"total_streams": 3882009,
"ad_supported_streams": 758490,
"premium_streams": 3123519,
"provider_code": "30920569",
"duration": 0
}
]
}
Errores posibles
Estandarizado
Ver errores posibles
405 · Method Not Allowed
{
"success": false,
"error": "Método no permitido"
}
422 · Unprocessable Entity
{
"success": false,
"error": "isrc inválido. Debe tener 12 caracteres alfanuméricos."
}
404 · Not Found
{
"success": false,
"error": "ISRC no encontrado"
}
500 · Internal Server Error
{
"success": false,
"error": "Error al consultar detalle."
}
GET
api/activity_over_time.php
Serie diaria de streams por ISRC, con rango opcional.
Cómo enviar correctamente
Método: GET Headers: Accept: application/json Query params: - isrc (obligatorio) - start_date (opcional, YYYY-MM-DD) - end_date (opcional, YYYY-MM-DD) Regla: - Si envías start_date debes enviar end_date (y viceversa). - start_date no puede ser mayor que end_date.
Respuesta exitosa
200 · OK
Ver respuesta exitosa
{
"success": true,
"isrc": "USCM51600028",
"start_date": "2026-03-13",
"end_date": "2026-03-20",
"count": 2,
"activity_over_time": [
{
"date": "2026-03-13",
"week": 11,
"year": 2026,
"total_streams": 830046,
"ad_supported_streams": 164072,
"premium_streams": 665974
}
]
}
Errores posibles
Estandarizado
Ver errores posibles
405 · Method Not Allowed
{
"success": false,
"error": "Método no permitido"
}
422 · Unprocessable Entity
{
"success": false,
"error": "isrc inválido. Debe tener 12 caracteres alfanuméricos."
}
422 · Unprocessable Entity
{
"success": false,
"error": "Debes enviar start_date y end_date juntos (YYYY-MM-DD)."
}
422 · Unprocessable Entity
{
"success": false,
"error": "start_date inválido. Formato YYYY-MM-DD."
}
422 · Unprocessable Entity
{
"success": false,
"error": "end_date inválido. Formato YYYY-MM-DD."
}
422 · Unprocessable Entity
{
"success": false,
"error": "start_date no puede ser mayor que end_date."
}
500 · Internal Server Error
{
"success": false,
"error": "Error al consultar activity_over_time."
}