API · Exportaciones

Archivos CSV de dispositivos, entregas y estadísticas, con enlace de descarga temporal.

Base: https://api.pushhub.daertec.com. Todas las respuestas usan { errCode, errMsg, data, meta }. Autenticación y llaves · Catálogo de errores

GET/v1/exports

Exportaciones de la empresa (las mas recientes primero)

Llave: sk_

Parámetros

NombreEnTipoDescripción
pagequeryinteger
perPagequeryinteger

Respuestas: 200

curl -X GET "https://api.pushhub.daertec.com/v1/exports" \
  -H "Authorization: Bearer sk_test_TU_LLAVE_SECRETA"

POST/v1/exports

Pedir una exportacion CSV (202, se genera en segundo plano)

Llave: sk_

type devices (requiere tambien devices:read; filtros platform, status), deliveries (notificationId, o appId + from + to hasta 31 dias) o stats (from + to hasta 366 dias, por hora). Fechas YYYY-MM-DD inclusive, en UTC. notifyEmail opcional: aviso con el enlace. Hasta 3 en curso por empresa (3003). El archivo vence a las 24 h.

Cuerpo

CampoTipoDescripción
type*"devices" | "deliveries" | "stats"
appIdstring
platform"android" | "ios"
status"active" | "invalid" | "pending_credential"
notificationIdstring
fromstring
tostring
notifyEmailstring
language"es" | "en"

Respuestas: 202422

curl -X POST "https://api.pushhub.daertec.com/v1/exports" \
  -H "Authorization: Bearer sk_test_TU_LLAVE_SECRETA" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "devices",
  "appId": "texto",
  "platform": "android",
  "status": "active",
  "notificationId": "texto",
  "from": "2026-11-15",
  "to": "2026-11-15",
  "notifyEmail": "texto",
  "language": "es"
}'

GET/v1/exports/{id}

Estado (queued, running, ready, failed, expired), filas y downloadUrl firmado cuando esta lista

Llave: sk_

Parámetros

NombreEnTipoDescripción
id*pathstring

Respuestas: 200

curl -X GET "https://api.pushhub.daertec.com/v1/exports/ID_ID" \
  -H "Authorization: Bearer sk_test_TU_LLAVE_SECRETA"

GET/v1/exports/{id}/download

Descargar el CSV (UTF-8 con BOM). Sin llave: el enlace va firmado; 1109 si vencio o fue alterado

Llave: sk_

Segun la instalacion responde el archivo (200) o redirige (302) a un enlace temporal del almacenamiento de archivos, valido unos minutos. Los clientes HTTP deben seguir la redireccion.

Parámetros

NombreEnTipoDescripción
id*pathstring
expires*queryinteger
signature*querystring

Respuestas: 200302401

curl -X GET "https://api.pushhub.daertec.com/v1/exports/ID_ID/download" \
  -H "Authorization: Bearer sk_test_TU_LLAVE_SECRETA"