FuelWatch API

Reference expansion

Keep references compact or expand selected fields into named objects.

By default, brand is one integer, siteFeatures is an array of integers, and restrictions is an array of integers or null. See the complete code tables.

Choose fields

RequestBrandFeaturesRestrictions
No expandCodeCodesCodes or null
expand=brandObjectCodesCodes or null
expand=siteFeatures,restrictionsCodeObjectsObjects or null
expand=allObjectObjectsObjects or null

Names and values are case-insensitive: ExPaNd=BRAND,siteFEATURES works. Whitespace is trimmed and repeated members deduplicated. all,brand is equivalent to all. An empty value, unknown field, empty member or repeated expand parameter returns 400. filter[expand] is unsupported.

GET

Expand a brand

/v1?expand=brand

A brand object contains a stable code, display name and root-relative logo URL. Resolve the logo against the API origin, not your own website.

Expand features and restrictions

Both collections use objects with code and name. Every nonempty collection uses one representation; expansion does not introduce a mix of integers and objects.

Both examples are complete responses captured for the same Costco Perth Airport selection. Compare them with the compact and fully expanded responses. Expansion changes only the selected reference representations; it does not remove the price, address, opening hours or enrichment information.

Missing and unknown information

Empty features stay [], and no known restrictions stays null even with expand=all. These values do not prove a facility or restriction is absent.

An unmapped source brand uses code 0 and preserves its name in sourceNotes.brand. When expanded, code 0 retains that source name and uses the generic logo. Independent remains code 15.

Unrecognized source feature/restriction text is retained in sourceNotes; it never receives a guessed code. Reference codes must not be recycled or renumbered.

Cache behavior

Expansion changes the response body, ETag and rendered cache entry. It preserves station IDs, selected products and original fetch time. Equivalent expansion sets share a cache entry. It does not perform extra RSS or Google lookups and does not create separate D1 price snapshots.

Expansion applies only to /v1. /legacy retains string fields and rejects expand. There is no expansion for price products, addresses or enrichment: those fields retain their documented shape.

On this page