Skip to main content

List enquiries

GET/api/v1/enquiries

Managers only. Newest first, each with its photos. status is new until the enquiry has a customer.

  • Needs an API key, and runs with the access of the member who made the key.

Parameters

In the query string

  • pageinteger

    Default: 1. At least 1.

  • per_pageinteger

    Default: 50. At least 1. At most 100.

Responses

200Paginated enquiries.

  • dataarray of objectrequired

    Each item(18)
    • lock_versioninteger

      At least 0.

    • created_atstring (date-time)required

    • updated_atstring (date-time)required

    • idstring (uuid)required

    • account_idstring (uuid)required

    • namestringrequired

      Who sent it. Their email, their phone or "Website enquiry" when the form gave no name.

    • emailstring or null

      As typed; it is not checked.

    • phonestring or null

    • address_line_1string or null

    • citystring or null

    • postal_codestring or null

    • messagestring or null

      What they wrote, followed by any other fields the form had.

    • source_urlstring or null

      The page the form was on, when known.

    • kindstringrequired

      `request` when one of your customers asked for work from their customer portal. It has its `customer_id` from the start.

      One of: enquiry, request.

    • requested_datestring (date) or null

      The day a customer asked for the work. Only a `request` has one.

    • statusstringrequired

      `new` is somebody waiting to hear back: an enquirer who is not yet a customer, or a customer whose request nobody has picked up. `converted` is an enquiry with its customer, or a request that was picked up with createEnquiryCustomer.

      One of: new, converted.

    • customer_idstring (uuid) or null

      The customer made from this enquiry, the one it was filed under, or the one who sent the request.

    • photosarray of objectrequired

      Photos the enquirer attached, oldest first. `membership_id` is always null.

      Each item(7)
      • idstring (uuid)required

      • filenamestringrequired

      • content_typestringrequired

      • byte_sizeintegerrequired

        At least 1.

      • membership_idstring (uuid) or nullrequired

        Team member who added the photo. They and managers can remove it.

      • urlstring (uri)required

        Signed link that expires after 24 hours. Refetch the visit for a fresh one; cache images by photo id, not by URL.

      • created_atstring (date-time)required

  • metaobjectrequired

    Fields(4)
    • pageintegerrequired

      At least 1.

    • per_pageintegerrequired

      At least 1. At most 100.

    • totalintegerrequired

      At least 0.

    • total_pagesintegerrequired

      At least 0.

A refusal answers in the one error shape every operation shares.

Example

A request our own tests send. The ids are made up: put your own in their place.

curl "https://app.tradesender.co.uk/api/v1/enquiries" \
  -H "Authorization: Bearer $TRADESENDER_KEY"