List events
/developer/v1/event/query/documentsReturns what happened to your company's connections, bookings, reports and orders, newest first. An event is thin: it holds a type and ids, never the object itself, so fetch the object with your API key. Only events of the last 30 days are listed, only those made with the mode of your key, and only the types your key's scopes allow. The same events are what a webhook endpoint receives.
Query parameters
typeenumKeep only events of this type.
connection.approvedconnection.declinedconnection.revokedbooking.createdbooking.canceledreport.signedorder.createdorder.paidorder.fulfilledorder.shippedorder.deliveredorder.refundedorder.canceledping
fromstring (date-time)Keep only events created at or after this time. It must carry a time zone.
tostring (date-time)Keep only events created at or before this time. It must carry a time zone.
pageintegerThe page number, from 1.
Minimum 1 · Default 1
sizeintegerThe page size, at most 50.
Minimum 1 · Maximum 50 · Default 10
Response 200
dataarray of EventrequiredThe events of the page, newest first.
Show child attributesHide child attributes
createdstring (date-time)requiredWhen it happened, in UTC.
dataEventDatarequiredThe kind and ids of the object it happened to. It never holds the object itself.
Show child attributesHide child attributes
bookingstringnullableThe booking the object belongs to. Present on report events.
connectionstringnullableThe connection the object belongs to. Only present when it applies.
customerstringnullableThe customer the object belongs to. Present on order events, and on the connection events of a meals connection.
idstringrequiredThe ID of that object. Fetch the object with your API key.
objectenumrequiredThe kind of object the event is about:
connection,booking,report,orderorping.connectionbookingreportorderping
orderstringnullableThe order the object belongs to. Only present when it applies.
patientstringnullableThe patient the object belongs to. Present on booking and report events, and on the connection events of a care connection.
reportstringnullableThe report the object belongs to. Only present when it applies.
idstringrequiredThe ID of the event.
modeenumrequiredtestfor the sandbox,prodfor production.testprod
typeenumrequiredWhat happened, such as
report.signed.connection.approvedconnection.declinedconnection.revokedbooking.createdbooking.canceledreport.signedorder.createdorder.paidorder.fulfilledorder.shippedorder.deliveredorder.refundedorder.canceledping
has_nextbooleanrequiredWhether the data has a next page or not
has_previousbooleanrequiredWhether the data has a previous page or not
pageintegerrequiredThe page number of the data
sizeintegerrequiredThe size of the data
totalintegerrequiredThe total number of data
total_pagesintegerrequiredThe total number of pages
Errors
Every error has this shape. Branch on code, not on message. request_id equals the X-Request-Id response header.
{
"error": {
"code": "not_found",
"message": "The object does not exist.",
"request_id": "req_0123456789abcdef0123456789abcdef"
}
}| Status | Code | Meaning |
|---|---|---|
400 | bad_request | The from time must not be after the to time. |
401 | invalid_api_key | The API key is missing or not valid. |
403 | company_archived | This company is archived. |
403 | company_not_live | The company must be live to use prod keys. |
403 | company_suspended | This company is suspended. |
422 | validation_error | query.size: Input should be less than or equal to 50 |
429 | rate_limited | Too many requests. Wait before calling again. |
500 | internal_error | Something went wrong on our side. Please try again later. |
502 | upstream_error | A Nurish'd service could not complete the request. |
503 | upstream_unavailable | A Nurish'd service is unavailable. Please try again later. |
504 | upstream_timeout | A Nurish'd service did not answer in time. Please try again. |