Skip to main content
POST
/
v1
/
companies
/
{company-id}
/
equipment
/
geofence_triggers
Generate GeofenceTriggers for Equipment
curl --request POST \
  --url https://api.tread-horizon.com/v1/companies/{company-id}/equipment/geofence_triggers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "start_at": "2023-11-07T05:31:56Z",
  "end_at": "2023-11-07T05:31:56Z",
  "geofences": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "moving_geofence": false,
      "tag": "scaling",
      "geofence_type": "moving"
    }
  ]
}
'
{
  "data": [
    {
      "geofence_trigger_type": "enter",
      "triggered_location": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "lat": "<string>",
        "lon": "<string>",
        "occurred_at": "2023-11-07T05:31:56Z",
        "driver": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "first_name": "<string>",
          "last_name": "<string>"
        },
        "equipment": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "name": "<string>",
          "external_id": "<string>"
        },
        "order": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "order_id": "<string>"
        },
        "job": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "job_id": "<string>"
        }
      },
      "geofence": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "geofence": {
          "name": "<string>",
          "type": "<string>",
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "geojson": {
            "type": "<string>",
            "coordinates": [
              [
                [
                  "<unknown>"
                ]
              ]
            ]
          },
          "circle_center": {
            "lat": 123,
            "lon": 123
          },
          "circle_radius": 123,
          "tag": "pickup"
        },
        "moving_geofence": false,
        "tag": "scaling",
        "geofence_type": "moving"
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.tread.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Accept-Language
string
default:en

The Accept-Language request HTTP header indicates the natural language and locale that the client prefers.

Example:

"en"

Path Parameters

company-id
string<uuid>
required

Company ID

Body

application/json
start_at
string<date-time>
required
end_at
string<date-time>
required
geofences
Geofence-Data · object[]
required

Response

OK

data
GeofenceTrigger-Read · object[]
required