> For the complete documentation index, see [llms.txt](https://fez-delivery-co.gitbook.io/fezcorporate-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fez-delivery-co.gitbook.io/fezcorporate-api-docs/api-endpoints/orders/pickup-hubs.md).

# Pickup Hubs

Delivery Time Estimate

## Endpoint => /hubs/{stateId}

<mark style="color:$primary;">`GET`</mark> `/`hubs/{stateId}

#### Headers

| Name                                             | Type   | Description       |
| ------------------------------------------------ | ------ | ----------------- |
| Authorization <mark style="color:red;">\*</mark> | String | Your Bearer Token |
| secret-key<mark style="color:red;">\*</mark>     | String | Your Secret Key   |

{% tabs %}
{% tab title="201: Created Success" %}

```json
{
    "status": "Success",
    "description": "Hubs fetched successfully",
    "hubs": [
        {
            "id": 1,
            "name": "Lagoswa",
            "address": "Lagos Nigeria"
        },
        {
            "id": 15,
            "name": "C-98100-753",
            "address": "custom road"
        }
    ]
}
```

{% endtab %}

{% tab title="401 Unauthorized" %}

```json
{
    "status": "Error",
    "description": "No hubs found for the specified state."
}
```

{% endtab %}

{% tab title="422 Validation Error" %}

```json
{
    "status": "Error",
    "description": "TState ID is required."
}
```

{% endtab %}
{% endtabs %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://apisandbox.fezdelivery.co/v1/hubs/2
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'secret-key: {{Your Secret Key}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```
