Suburbs

Get a list of supported suburbs for the FuelPrice API.

The suburb model

The suburb model contains all the information about a specific suburb. The following attributes are returned when retrieving a suburb.

Properties

  • Name
    id
    Type
    string
    Description

    Unique identifier for the suburb.

  • Name
    name
    Type
    string
    Description

    Formatted suburb name.

  • Name
    state
    Type
    string
    Description

    The city id where the suburb belongs.


GET/v1/suburbs

List all suburbs

This endpoint allows you to retrieve a paginated list of all your suburbs. By default, a maximum of ten suburbs are shown per page.

Optional attributes

Request

GET
/v1/suburbs
curl -G https://api.fuelprice.io/v1/suburbs \
  -H "Authorization: Bearer {token}" \
  -d state=qld

Response

{
  "data": [
    {
      "id": "southport",
      "name": "Southport",
      "state": "qld",
    },
    {
      "id": "surfers_paradise",
      "name": "Surfers Paradise",
      "state": "qld",
    },
    //....
  ]
}

GET/v1/suburbs/:id

Retrieve a suburb

This endpoint allows you to retrieve a suburb by providing the suburb id. Refer to the list at the top of this page to see which properties are included with suburb objects.

Request

GET
/v1/suburbs/surfers_paradise
curl https://api.fuelprice.io/v1/suburbs/surfers_paradise \
  -H "Authorization: Bearer {token}"

Response

{
 "id": "surfers_paradise",
  "name": "Surfers Paradise",
  "state": "qld",
}