Saltar a contenido

Changes (deltas tecnicos)

GET /v1/farmacias/changes

Devuelve una cola de eventos tecnicos (upsert/delete) desde un instante.

Query params

  • since (required): datetime ISO UTC
  • territories (optional): CSV ES-XX,ES-YY
  • limit (default 500, max 2000)
  • cursor (optional): id numerico para paginacion

Ejemplo

curl -sS "$FARMAAPI_BASE_URL/v1/farmacias/changes?since=2026-01-01T00:00:00Z&limit=100" \
  -H "X-API-Key: $FARMAAPI_API_KEY"

Response shape

{
  "items": [
    {
      "id": 123,
      "run_id": "run-20260215T030000-abcdef12",
      "territory_code": "ES-MD",
      "operation": "upsert",
      "external_id": "28000001",
      "payload": { "external_id": "28000001", "name": "..." },
      "changed_at": "2026-02-15T03:10:00Z"
    }
  ],
  "next_cursor": 456
}