{"openapi":"3.1.0","info":{"title":"Seidr Beacon API","version":"2.1.0","description":"Opt-in device location for authorised assistants. Agent tokens read only the devices they are bound to, inside one company. Every read is audited."},"servers":[{"url":"https://seidrlabs.online/beacon/api"}],"paths":{"/health":{"get":{"operationId":"health","summary":"Service health","responses":{"200":{"description":"Healthy"}}}},"/v1/devices":{"get":{"operationId":"listDevices","summary":"List the devices this agent may read","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}}}},"/v1/devices/{id}/status":{"get":{"operationId":"getDeviceStatus","summary":"Current movement state (moving, stationary since, offline)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/devices/{id}/latest":{"get":{"operationId":"getLatestLocation","summary":"Latest position","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/devices/{id}/history":{"get":{"operationId":"getLocationHistory","summary":"Recent history","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"limit","in":"query","schema":{"type":"integer","maximum":1000}}]}},"/v1/trips":{"get":{"operationId":"listTrips","summary":"Trips for the devices this key may read, with distance left and arrival estimate","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}},"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["active","arrived","cancelled"]}}]},"post":{"operationId":"startTrip","summary":"Start a trip: this device is going to a destination (needs the trips scope)","security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Trip started"}},"x-openai-isConsequential":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["device_id","destination_label","latitude","longitude"],"properties":{"device_id":{"type":"string"},"destination_label":{"type":"string","maxLength":120},"latitude":{"type":"number","minimum":-90,"maximum":90},"longitude":{"type":"number","minimum":-180,"maximum":180},"arrive_radius_m":{"type":"number","minimum":50,"maximum":5000,"default":300},"update_every_min":{"type":"integer","minimum":5,"maximum":1440,"description":"Send progress to webhook_url this often"},"webhook_url":{"type":"string","format":"uri","description":"https endpoint for signed progress and arrival updates"}}}}}}}},"/v1/trips/{id}":{"get":{"operationId":"getTrip","summary":"One trip with distance left, average speed and arrival estimate","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}},"/v1/trips/{id}/cancel":{"post":{"operationId":"cancelTrip","summary":"Cancel an active trip (needs the trips scope)","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"x-openai-isConsequential":true}},"/v1/companies/{slug}/notice":{"get":{"operationId":"getPrivacyNotice","summary":"Public privacy notice for a company","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Notice"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}}}