> ## Documentation Index
> Fetch the complete documentation index at: https://docs.syntage.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ejemplos de eventos

> Payloads de eventos de ejemplo para eventos de recursos creados, actualizados y eliminados.

Cada evento tiene un `type`, el `source` que produjo el evento, el `resource` afectado y un campo `data`. La forma de `data.object` depende del tipo de evento. Para eventos de actualización, `data.changes` muestra los campos que cambiaron; los eventos de creación no incluyen `data.changes`. Los eventos de eliminación conservan el enlace `resource`, pero no incluyen el objeto del recurso, por lo que su `data` es un arreglo vacío.

Estos ejemplos están abreviados para enfocarse en la estructura del evento.

## Fechas y horas

Los campos `createdAt` y `updatedAt` del evento usan el formato `YYYY-MM-DD HH:MM:SS` en UTC, sin indicador de zona horaria, por ejemplo `2026-06-16 14:30:00`. El formato de las fechas dentro de `data.object` depende del recurso.

Cuando cambia un campo de fecha, `data.changes` reporta sus valores `old` y `new` en formato ISO 8601 en UTC, con microsegundos:

```json theme={null}
"changes": {
  "updatedAt": {
    "old": "2026-06-16T14:30:00.000000Z",
    "new": "2026-06-16T14:31:00.000000Z"
  }
}
```

## Evento de creación

```json theme={null}
{
  "@id": "/events/018f3f8f-4538-7bbb-b432-9e97e34a564a",
  "@type": "Event",
  "id": "018f3f8f-4538-7bbb-b432-9e97e34a564a",
  "taxpayer": {
    "@id": "/taxpayers/PEIC211118IS0",
    "@type": "Taxpayer",
    "id": "PEIC211118IS0",
    "name": "Pedro Infante Cruz"
  },
  "type": "invoice.created",
  "source": "/extractions/91106968-1abd-4d64-85c1-4e73d96fb997",
  "resource": "/invoices/7c45e9c6-8f7f-4d0e-b6e5-65fef6c8c2f9",
  "data": {
    "object": {
      "id": "7c45e9c6-8f7f-4d0e-b6e5-65fef6c8c2f9",
      "uuid": "6f3c5312-2849-4525-86f6-c48a54c64c60",
      "type": "I",
      "status": "VIGENTE",
      "total": 1250.0,
      "createdAt": "2026-06-16 14:30:00",
      "updatedAt": "2026-06-16 14:30:00"
    }
  },
  "createdAt": "2026-06-16 14:30:00",
  "updatedAt": "2026-06-16 14:30:00"
}
```

## Evento de actualización

```json theme={null}
{
  "@id": "/events/018f3f90-189a-7f31-b124-4ea7a938d682",
  "@type": "Event",
  "id": "018f3f90-189a-7f31-b124-4ea7a938d682",
  "taxpayer": {
    "@id": "/taxpayers/PEIC211118IS0",
    "@type": "Taxpayer",
    "id": "PEIC211118IS0",
    "name": "Pedro Infante Cruz"
  },
  "type": "credential.updated",
  "source": "/credentials/6a6a1f8d-41c2-4ab9-a2ce-836417ed27de",
  "resource": "/credentials/6a6a1f8d-41c2-4ab9-a2ce-836417ed27de",
  "data": {
    "object": {
      "id": "6a6a1f8d-41c2-4ab9-a2ce-836417ed27de",
      "rfc": "PEIC211118IS0",
      "type": "ciec",
      "status": "valid",
      "createdAt": "2026-06-10 09:05:12",
      "updatedAt": "2026-06-16 14:31:00"
    },
    "changes": {
      "status": {
        "old": "pending",
        "new": "valid"
      }
    }
  },
  "createdAt": "2026-06-16 14:31:00",
  "updatedAt": "2026-06-16 14:31:00"
}
```

## Evento de eliminación

```json theme={null}
{
  "@id": "/events/018f3f91-6ed2-70ba-97e8-b8dd0e61d415",
  "@type": "Event",
  "id": "018f3f91-6ed2-70ba-97e8-b8dd0e61d415",
  "taxpayer": {
    "@id": "/taxpayers/PEIC211118IS0",
    "@type": "Taxpayer",
    "id": "PEIC211118IS0",
    "name": "Pedro Infante Cruz"
  },
  "type": "link.deleted",
  "source": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997",
  "resource": "/entities/91106968-1abd-4d64-85c1-4e73d96fb997",
  "data": [],
  "createdAt": "2026-06-16 14:32:00",
  "updatedAt": "2026-06-16 14:32:00"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.