Skip to main content

GET /events

A GET to the /events endpoint allows your application to fetch an array of the events your user is authorizated to create and fetch moves for. Requests made to this endpoint require an authorization header using your authentication token:

curl --request GET \
--url https://api.hopdrive.com/v1/events \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <your token>'

Filters

You can filter the events based using the following optional query parameters.

limit - The number of results per page.

page - Which page to start with.

rooftop - A valid rooftop id that your token has access to.

from - An IS8601 timestamp to search from. This is handy when you need to find the events since a certain date. Maybe during an outage of the webhook receiver endpoint so that you can catch up.

Request

GET /v1/events?page=0&limit=2&rooftop=57&from=2022-08-22T00%3A18%3A00-04%3A00

Response

200 /v1/events?page=0&limit=2&rooftop=57&from=2022-08-22T00%3A18%3A00-04%3A00
{
"events": [
{
"id": "2c9a9eb3-24b3-11ed-9606-9128c200701f",
"type": "move_pickup_successful",
"url": "https://o958wik6y1.execute-api.us-east-1.amazonaws.com/dev/update/hopdrive?sender=hopdrive",
"status": "sent",
"webhook": {
"id": 24,
"description": "A webhook to receive all events.",
"rooftop": 57
},
"event_time": "2022-08-23T03:30:16.662557+00:00",
"payload": {
"id": "2c9a9eb3-24b3-11ed-9606-9128c200701f",
"data": {
"move": {
"id": 13107,
"status": "pickup successful",
"vehicle": {
"vin": "5GAKRBED5BJ262438",
"make": "Toyota",
"year": "2018",
"color": "Red",
"model": "4-Runner",
"stock": "BK0018"
},
"lane_uri": "https://api.hopdrive.com/v1/lanes/1469",
"move_uri": "https://api.hopdrive.com/v1/moves/13107",
"reference_id": null,
"cancel_status": "started",
"dealer_contact": null,
"pickup_arrived": null,
"pickup_started": null,
"delivery_arrived": null,
"delivery_started": null,
"move_details_url": "https://dealer.socialautotransport.com/moves/13107",
"pickup_successful": null,
"delivery_successful": null,
"special_instructions": null
},
"pickup_photos": [],
"delivery_photos": [],
"pickup_location": {
"lat": 37.6354489,
"lon": -77.6393945,
"name": "12335 Shore View Dr",
"location_id": 324,
"full_address": "12335 Shore View Dr, Richmond, VA 23233, USA",
"google_place_id": "ChIJ1wTt-DpqsYkRXju9vAEZdjg"
},
"delivery_location": {
"lat": 37.5320834,
"lon": -77.4287871,
"name": "1717 E Cary Ste",
"location_id": 271,
"full_address": "1717 E Cary St, Richmond, VA 23223, USA",
"google_place_id": "ChIJ-yXj-h4RsYkRC4uVBxndh1w"
},
"ready_by_time_utc": "2022-08-22T22:10:00+00:00"
},
"object": "event",
"version": "1.0.0"
},
"http_status": 202,
"response": "Accepted",
"retry_count": 0,
"next_retry": null
},
{
"id": "2c9a9eb2-24b3-11ed-9606-9128c200701f",
"type": "move_cancel_pending",
"url": "https://o958wik6y1.execute-api.us-east-1.amazonaws.com/dev/update/hopdrive?sender=hopdrive",
"status": "sent",
"webhook": {
"id": 24,
"description": "A webhook to receive all events.",
"rooftop": 57
},
"event_time": "2022-08-23T03:30:16.662557+00:00",
"payload": {
"id": "2c9a9eb2-24b3-11ed-9606-9128c200701f",
"data": {
"move": {
"id": 13107,
"status": "pickup successful",
"vehicle": {
"vin": "5GAKRBED5BJ262438",
"make": "Toyota",
"year": "2018",
"color": "Red",
"model": "4-Runner",
"stock": "BK0018"
},
"lane_uri": "https://api.hopdrive.com/v1/lanes/1469",
"move_uri": "https://api.hopdrive.com/v1/moves/13107",
"reference_id": null,
"cancel_status": "started",
"dealer_contact": null,
"pickup_arrived": null,
"pickup_started": null,
"delivery_arrived": null,
"delivery_started": null,
"move_details_url": "https://dealer.socialautotransport.com/moves/13107",
"pickup_successful": null,
"delivery_successful": null,
"special_instructions": null
},
"pickup_photos": [],
"delivery_photos": [],
"pickup_location": {
"lat": 37.6354489,
"lon": -77.6393945,
"name": "12335 Shore View Dr",
"location_id": 324,
"full_address": "12335 Shore View Dr, Richmond, VA 23233, USA",
"google_place_id": "ChIJ1wTt-DpqsYkRXju9vAEZdjg"
},
"delivery_location": {
"lat": 37.5320834,
"lon": -77.4287871,
"name": "1717 E Cary Ste",
"location_id": 271,
"full_address": "1717 E Cary St, Richmond, VA 23223, USA",
"google_place_id": "ChIJ-yXj-h4RsYkRC4uVBxndh1w"
},
"ready_by_time_utc": "2022-08-22T22:10:00+00:00"
},
"object": "event",
"version": "1.0.0"
},
"http_status": 202,
"response": "Accepted",
"retry_count": 0,
"next_retry": null
}
]
}