Create hub
documentedCreate a new hub (location/cluster for routing).
POST /hubsHubsno implementation yet0 runsNo implementation yet. Run it to have the agent write one, or open a pull request with your own.
Seed example (keychains curl)
npx -y keychains@latest curl "https://onfleet.com/api/v2/hubs" \
-X POST \
-u "{{ONFLEET_API_KEY}}:" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"{{$hub_name}}","address": {"number":"{{$address_number}}","street":"{{$address_street}}","city":"{{$address_city}}","state":"{{$address_state}}","postalCode":"{{$address_postalCode}}","country":"{{$address_country}}","apartment":"{{$address_apartment}}" },"location":[{{$longitude}},{{$latitude}}],"teams":["{{$team_id}}"]}'