Skip to content
APILast updated

Events ​

The event endpoints return events in the same format that is sent to webhook endpoints. For fields, see Webhook Events and Fields.

Method and pathReturns
GET /eventsList of events
GET /events/{id}An event

Permissions ​

EventsRequired permission
appointment.created, appointment.confirmed, appointment.cancelled, appointment.completed, appointment.no_show, appointment.rescheduled, appointment.updatedappointments:read
customer.created, customer.updated, customer.deletedcustomers:read
service.created, service.updated, service.deleted, staff.created, staff.updated, staff.deletedcatalog:read
payment.created, refund.createdpayments:read
  • The list contains only the event types the key has permission to read.
  • If the key lacks permission for an event's type, retrieving that event returns 404 resource_missing.
  • ping test events are not in the list, and retrieving one returns 404 resource_missing.

Recording conditions and availability ​

  • An event is recorded only when one of these is true: an endpoint is subscribed to that event type (a disabled endpoint counts too); or an unexpired API key has the permission that event type requires.
  • Events from the last 30 days can be read.

List parameters ​

ParameterDescription
typeA single event type, such as appointment.created
created_at[gte]The time the event was recorded, inclusive. For the format, see Pagination and Filtering
limit, cursorSee Pagination and Filtering
  • If type is a type the key has no permission to read, the list is empty. If it is not an event type, the request returns 400 parameter_invalid with param set to type.
  • Any other parameter, including sort, returns 400 parameter_invalid. GET /events/{id} accepts no query parameters.

Sorting ​

  • The list is sorted by created_at in ascending order, then by id in ascending order.
  • A new event is placed after the merchant's existing events: its created_at is not earlier than theirs, and when it is the same, its id is greater.

Example ​

bash
curl -G https://api.dolyu.com/v1/events \
  -H "Authorization: Bearer dolyu_sk_..." \
  --data-urlencode "created_at[gte]=2026-11-20T00:00:00Z" \
  -d type=appointment.confirmed \
  -d limit=50
json
{
  "object": "list",
  "data": [
    {
      "id": "0198d2a0-0000-7000-8000-000000000001",
      "object": "event",
      "api_version": "v1",
      "type": "appointment.confirmed",
      "created_at": "2026-11-20T06:30:02Z",
      "data": {
        "appointment": { "…": "see Webhook Events and Fields" },
        "previous_status": "pending",
        "actor_type": "merchant_user"
      }
    }
  ],
  "has_more": false,
  "next_cursor": null
}