Skip to main content
GET
/
hubs
Read hub
curl --request GET \
  --url https://apiweb.mile.app/api/v3/hubs \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "_id": "63c7705c8608d52094785374",
      "name": "Neo Soho",
      "address": "Jakarta Barat 11470, Indonesia",
      "lat": -6.17434,
      "lng": 106.79028,
      "organizationId": "63c76fdb88697c70e35866e2",
      "updatedTime": "2023-01-18T04:06:52.773000Z",
      "createdTime": "2023-01-18T04:06:52.773000Z",
      "deleteAccess": true
    },
    {
      "_id": "64181125ab38c90b2b753c92",
      "name": "Monas",
      "address": "Jalan Silang Merdeka, Jakarta Pusat 10110, Indonesia",
      "lat": -6.17537,
      "lng": 106.82854,
      "organizationId": "63c76fdb88697c70e35866e2",
      "updatedTime": "2023-03-20T07:54:13.899000Z",
      "createdTime": "2023-03-20T07:54:13.899000Z",
      "deleteAccess": true
    }
  ],
  "status": true
}

Authorizations

Authorization
string
header
required

Use a valid Bearer token to authenticate.

Query Parameters

page
integer
default:1

The page number of results to retrieve. Example: 2

limit
integer
default:20

Specifies the maximum number of items to retrieve in a single request. Example: 10

Required range: 1 <= x <= 1000
name
string

The unique name of organization's hub Example: Jakarta warehouse

q
string

Query param search. This field will search vehicles according to similar value of name Example: Jakarta

sortBy
string

sortBy is used to sort the result-set in ascending or descending order according to selected field. The value of this param is one of available fields on hub objects. Example: name, address, etc. Default: name

sortOrder
string

sortOrder is to decide ascending or descending order Example: asc or desc. Default: asc

fields
string

Fields is for selecting the specific fields that you can choose by multiples to show in the response using a string with a comma delimiter. Example: name,address,lat,lng

byUser
boolean

Flag to filter hub data based on user hub access. Example: true or false.

Response

Success

status
boolean

Status of response.

data
object

List object of hubs.