Developers

Search the docs

Search guides and headings.

List events

GET/developer/v1/event/query/documents
No scope needed

Returns 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

  • typeenum

    Keep only events of this type.

    • connection.approved
    • connection.declined
    • connection.revoked
    • booking.created
    • booking.canceled
    • report.signed
    • order.created
    • order.paid
    • order.fulfilled
    • order.shipped
    • order.delivered
    • order.refunded
    • order.canceled
    • ping
  • 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.

  • pageinteger

    The page number, from 1.

    Minimum 1 · Default 1

  • sizeinteger

    The page size, at most 50.

    Minimum 1 · Maximum 50 · Default 10

Response 200

  • dataarray of Eventrequired

    The events of the page, newest first.

    Show child attributesHide child attributes
    • createdstring (date-time)required

      When it happened, in UTC.

    • dataEventDatarequired

      The kind and ids of the object it happened to. It never holds the object itself.

      Show child attributesHide child attributes
      • bookingstringnullable

        The booking the object belongs to. Present on report events.

      • connectionstringnullable

        The connection the object belongs to. Only present when it applies.

      • customerstringnullable

        The customer the object belongs to. Present on order events, and on the connection events of a meals connection.

      • idstringrequired

        The ID of that object. Fetch the object with your API key.

      • objectenumrequired

        The kind of object the event is about: connection, booking, report, order or ping.

        • connection
        • booking
        • report
        • order
        • ping
      • orderstringnullable

        The order the object belongs to. Only present when it applies.

      • patientstringnullable

        The patient the object belongs to. Present on booking and report events, and on the connection events of a care connection.

      • reportstringnullable

        The report the object belongs to. Only present when it applies.

    • idstringrequired

      The ID of the event.

    • modeenumrequired

      test for the sandbox, prod for production.

      • test
      • prod
    • typeenumrequired

      What happened, such as report.signed.

      • connection.approved
      • connection.declined
      • connection.revoked
      • booking.created
      • booking.canceled
      • report.signed
      • order.created
      • order.paid
      • order.fulfilled
      • order.shipped
      • order.delivered
      • order.refunded
      • order.canceled
      • ping
  • has_nextbooleanrequired

    Whether the data has a next page or not

  • has_previousbooleanrequired

    Whether the data has a previous page or not

  • pageintegerrequired

    The page number of the data

  • sizeintegerrequired

    The size of the data

  • totalintegerrequired

    The total number of data

  • total_pagesintegerrequired

    The 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.

jsonError response
{
  "error": {
    "code": "not_found",
    "message": "The object does not exist.",
    "request_id": "req_0123456789abcdef0123456789abcdef"
  }
}
StatusCodeMeaning
400bad_requestThe from time must not be after the to time.
401invalid_api_keyThe API key is missing or not valid.
403company_archivedThis company is archived.
403company_not_liveThe company must be live to use prod keys.
403company_suspendedThis company is suspended.
422validation_errorquery.size: Input should be less than or equal to 50
429rate_limitedToo many requests. Wait before calling again.
500internal_errorSomething went wrong on our side. Please try again later.
502upstream_errorA Nurish'd service could not complete the request.
503upstream_unavailableA Nurish'd service is unavailable. Please try again later.
504upstream_timeoutA Nurish'd service did not answer in time. Please try again.

All error codes and what to do about them