Hubs

A hub is a depot for a team: the location from where all deliveries start for the team's workers, for the purposes of route optimization only; teams can have zero or one hubs, and each hub can contain many teams.

Create Hub

To create hubs, head over to the dashboard, or use the Create Hub endpoint.

This end point allows the user to quickly create hubs and assign them to the teams upon creation.

NameTypeDescription
addressobjectRequired. The hub’s street address information. The address data object fields are located under the Destination section.
teamarray of stringOptional. This is the team ID(s) that this Hub will be assigned to.
namestringRequired. A name to identify the Hub.
curl -X POST "https://store.bponi.com/api/v2/hubs" \
       -u "cd3b3de84cc1ee040bf06512d233719c:" \
       -d '{"name": "VIP customer","address": {"apartment": "","state": "California","postalCode": "92806","number": "2695","street": "East Katella Avenue","city": "Anaheim","country": "United States","name": "VIP customer"},"teams": ["kq5MFBzYNWhp1rumJEfGUTqS"]}'
1
2
3
{
    "id": "i4FoP*dTVrdnGqvIVvvA69aB",
    "name": "VIP customer",
    "location": [
        -117.8767457,
        33.8079071
    ],
    "address": {
        "number": "2695",
        "street": "East Katella Avenue",
        "city": "Anaheim",
        "county": "Orange County",
        "state": "California",
        "country": "United States",
        "postalCode": "92806",
        "apartment": "",
        "name": "VIP customer"
    },
    "teams": [
        "kq5MFBzYNWhp1rumJEfGUTqS"
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

Update Hub

This endpoint allows the users to update information related to an existing hub. The hub ID must be appended to the URL to indicate which Hub will be updated.

curl -X PUT "https://store.bponi.com/api/v2/hubs/i4FoP*dTVrdnGqvIVvvA69aB" \
       -u "cd3b3de84cc1ee040bf06512d233719c:" \
       -d '{"name": "VIP customer Hub","address": {"apartment": "","state": "California","postalCode": "90015","number": "1111","street": "South Figueroa Street","city": "Los Angeles","country": "United States","name": "VIP customer"},"teams": ["kq5MFBzYNWhp1rumJEfGUTqS"]}'
1
2
3
{
    "id": "i4FoP*dTVrdnGqvIVvvA69aB",
    "name": "VIP customer Hub",
    "location": [
        -118.2673597,
        34.0430058
    ],
    "address": {
        "number": "1111",
        "street": "South Figueroa Street",
        "city": "Los Angeles",
        "county": "Los Angeles County",
        "state": "California",
        "country": "United States",
        "postalCode": "90015",
        "name": "VIP customer",
        "apartment": ""
    },
    "teams": [
        "kq5MFBzYNWhp1rumJEfGUTqS"
    ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

List hubs

curl -X GET "https://store.bponi.com/api/v2/hubs" \
       -u "cd3b3de84cc1ee040bf06512d233719c:"
1
2
[
  {
    "id": "E4s6bwGpOZp6pSU3Hz*2ngFA",
    "name": "SF North",
    "location": [
      -122.44002499999999,
      37.801826
    ],
    "address": {
      "number": "3415",
      "street": "Pierce Street",
      "city": "San Francisco",
      "state": "California",
      "country": "United States",
      "postalCode": "94123",
      "apartment": ""
    },
    "teams": [
      "W*8bF5jY11Rk05E0bXBHiGg2"
    ]
  },
  {
    "id": "tKxSfU7psqDQEBVn5e2VQ~*O",
    "name": "SF South",
    "location": [
      -122.44337999999999,
      37.70883
    ],
    "address": {
      "number": "335",
      "street": "Hanover Street",
      "city": "San Francisco",
      "state": "California",
      "country": "United States",
      "postalCode": "94112",
      "apartment": ""
    },
    "teams": [
      "W*8bF5jY11Rk05E0bXBHiGg2"
    ]
  }
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Last Updated: 11/29/2021, 10:25:26 PM