Events and webhooks
Events: catalog and polling
The event types you can subscribe to or poll, and how to read GET /.
Updated
Browse the developer docs
Steps
- Call
GET /with thev1/ events events:readscope. Each item hasid,type,schema_version,resource_type,resource_id,occurred_atanddata. The data field holds the event envelope (id, type, version, resource, data). - To walk history, page newest first with
cursor. - To poll for new events, pass
afterset to the lastnext_cursoryou saved. Results come oldest first and only include events after that point. Save the newnext_cursoreach time. When nothing new arrived,next_cursoris null, so keep your previous value. - Do not send
afterandcursortogether. That returns 400. - Filter with
type=<event type>. An unknown type returns 400 with a message that starts with"unknown event type". - Use each event’s id to remove duplicates on your side.
Notes
- Event types you can subscribe to or filter by:
campaign_form.submitted,lead.trial_outcome,enrollment.created,enrollment.withdrawn,student.created,payment.received,attendance.marked,invoice.overdue,invoice.paid,credit_note.issued,credit_note.applied,credit_note.refunded,lead.created,lead.stage_changed,lead.trial_booked,lead.updated,makeup.credit_expiring,makeup.credit_pre_expiring,risk.flagged,subscription.cancelled,tournament.published,session.started,session.cancelled,class.summary_published. student.createdis currently sent only for students created throughPOST /, not for students added in the app.v1/ students payment.receivedfires for a payment record.invoice.paidfires when an invoice reaches paid status.- Amounts are in minor units (
amountCents). Credit note events also include a three-letter currency. - Each type has a version. Additive changes keep the version. A breaking change gets a new version.
Related guides
Still need help?
Email hello@chesscore.io. Using ChessCore day to day? Visit the Help centre.