Skip to main content
POST
/
hub
Create hub
curl --request POST \
  --url https://apiweb.mile.app/api/v3/hub \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Dukuh Atas",
  "address": "12, Jalan Setia Budi VI, Jakarta Selatan 12910, Indonesia",
  "lat": "-6.205870636762187",
  "lng": "106.82562818235002"
}
'
{
  "status": true,
  "data": {
    "name": "Dukuh Atas",
    "address": "12, Jalan Setia Budi VI, Jakarta Selatan 12910, Indonesia",
    "lat": -6.205870636762187,
    "lng": 106.82562818235002,
    "organizationId": "63c76fdb88697c70e35866e2",
    "updatedTime": "2023-03-31T01:17:49.158000Z",
    "createdTime": "2023-03-31T01:17:49.158000Z",
    "_id": "642634bde1428d414838c882",
    "deleteAccess": true
  }
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Body

application/json
name
string
required

The name of hub. User can define hub name with hub's location, or something else. Example: Hub transit Jakarta

address
string
required

Location of the hub. Example: 'Neo Soho, Jakarta Barat'

lat
number<double>
required

Coordinate latitude of hub. Example: '-6.230815251666679'

lng
number<double>
required

Coordinate longitude of hub. Example: '106.75684387903198'

Response

Success

status
string

Status of response.

data
object

Detail object of created hub.