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
pageintegerDefault: 1. At least 1.
per_pageintegerDefault: 50. At least 1. At most 100.
Responses
200Paginated enquiries.
dataarray of objectrequiredEach item(18)
lock_versionintegerAt least 0.
created_atstring (date-time)requiredupdated_atstring (date-time)requiredidstring (uuid)requiredaccount_idstring (uuid)requirednamestringrequiredWho sent it. Their email, their phone or "Website enquiry" when the form gave no name.
emailstring or nullAs typed; it is not checked.
phonestring or nulladdress_line_1string or nullcitystring or nullpostal_codestring or nullmessagestring or nullWhat they wrote, followed by any other fields the form had.
source_urlstring or nullThe 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 nullThe 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 nullThe customer made from this enquiry, the one it was filed under, or the one who sent the request.
photosarray of objectrequiredPhotos the enquirer attached, oldest first. `membership_id` is always null.
Each item(7)
idstring (uuid)requiredfilenamestringrequiredcontent_typestringrequiredbyte_sizeintegerrequiredAt least 1.
membership_idstring (uuid) or nullrequiredTeam member who added the photo. They and managers can remove it.
urlstring (uri)requiredSigned 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
metaobjectrequiredFields(4)
pageintegerrequiredAt least 1.
per_pageintegerrequiredAt least 1. At most 100.
totalintegerrequiredAt least 0.
total_pagesintegerrequiredAt 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"