# List Brands

List every Brand that has at least one Product.

`GET https://api.drophawk.net/v1/brands`

A Brand with no Products is left out.

## Responses

### 200

Every Brand that has Products, ordered by name.

#### Headers

| Header | Type | Description |
| --- | --- | --- |
| `Cache-Control` | string | "public, max-age=300" on a successful GET; "no-store" on every other response. |
| `RateLimit-Limit` | integer | The burst a caller may make back-to-back (30). The sustained rate is 60 requests a minute. |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `brands` | array<Brand> | yes | The Brands, ordered by name. |
| `brands[]` | Brand | yes | Brand is a maker of Products, with how many Products it has. |
| `brands[].slug` | string, pattern `^[a-z0-9]+(-[a-z0-9]+)*$` | yes | Stable URL-safe identifier, for example "asus". |
| `brands[].name` | string | yes | The Brand's display name, for example "ASUS". |
| `brands[].product_count` | integer >= 0 | yes | Number of Products of this Brand in the catalog. |

### 429

Reason RATE_LIMITED. Wait Retry-After seconds before retrying.

#### Headers

| Header | Type | Description |
| --- | --- | --- |
| `Retry-After` | integer | Seconds to wait before retrying. |
| `Cache-Control` | string | "public, max-age=300" on a successful GET; "no-store" on every other response. |
| `RateLimit-Limit` | integer | The burst a caller may make back-to-back (30). The sustained rate is 60 requests a minute. |
| `RateLimit-Remaining` | integer | Requests left in the caller's burst. Left off cacheable responses. |
| `RateLimit-Reset` | integer | Seconds until the caller's burst is full again. Left off cacheable responses. |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | integer | yes | The google.rpc.Code of the error, for example 5 (NOT_FOUND) or 8 (RESOURCE_EXHAUSTED). The HTTP status carries the same information. |
| `message` | string | yes | The error code's name, such as "not_found", "resource_exhausted" or "internal". Not for display; branch on the ErrorInfo reason. |
| `details` | array<ErrorInfo or ErrorDetail> | yes | Typed error details, each identified by its "@type". An HTTP/JSON error always includes exactly one ErrorInfo naming why the request failed. Other detail types may be added within v1; skip any whose "@type" you do not recognise. |
| `details[]` | ErrorInfo | yes | Always includes one: ErrorInfo. |
| `details[].@type` | string, always `type.googleapis.com/google.rpc.ErrorInfo` | yes |  |
| `details[].reason` | string, one of `PRODUCT_NOT_FOUND`, `INVALID_IDENTIFIER`, `INVALID_QUERY`, `INVALID_PAGE_TOKEN`, `INVALID_PAGE_SIZE`, `EMPTY_BATCH`, `BATCH_TOO_LARGE`, `INVALID_REQUEST`, `NOT_FOUND`, `METHOD_NOT_ALLOWED`, `REQUEST_TOO_LARGE`, `RATE_LIMITED`, `INTERNAL`, `UNAVAILABLE` (others may appear) | yes | The reason, in UPPER_SNAKE_CASE. Treat an unrecognised reason by its HTTP status. |
| `details[].domain` | string, always `drophawk.net` | yes |  |
| `details[].metadata` | map | no | Context for the reason, as string values. |
| `details[].metadata.{key}` | string | no |  |

### Any other status

Any other error, such as 405, 500 or 503. See ErrorInfo for the reason.

#### Headers

| Header | Type | Description |
| --- | --- | --- |
| `Cache-Control` | string | "public, max-age=300" on a successful GET; "no-store" on every other response. |
| `RateLimit-Limit` | integer | The burst a caller may make back-to-back (30). The sustained rate is 60 requests a minute. |
| `RateLimit-Remaining` | integer | Requests left in the caller's burst. Left off cacheable responses. |
| `RateLimit-Reset` | integer | Seconds until the caller's burst is full again. Left off cacheable responses. |

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | integer | yes | The google.rpc.Code of the error, for example 5 (NOT_FOUND) or 8 (RESOURCE_EXHAUSTED). The HTTP status carries the same information. |
| `message` | string | yes | The error code's name, such as "not_found", "resource_exhausted" or "internal". Not for display; branch on the ErrorInfo reason. |
| `details` | array<ErrorInfo or ErrorDetail> | yes | Typed error details, each identified by its "@type". An HTTP/JSON error always includes exactly one ErrorInfo naming why the request failed. Other detail types may be added within v1; skip any whose "@type" you do not recognise. |
| `details[]` | ErrorInfo | yes | Always includes one: ErrorInfo. |
| `details[].@type` | string, always `type.googleapis.com/google.rpc.ErrorInfo` | yes |  |
| `details[].reason` | string, one of `PRODUCT_NOT_FOUND`, `INVALID_IDENTIFIER`, `INVALID_QUERY`, `INVALID_PAGE_TOKEN`, `INVALID_PAGE_SIZE`, `EMPTY_BATCH`, `BATCH_TOO_LARGE`, `INVALID_REQUEST`, `NOT_FOUND`, `METHOD_NOT_ALLOWED`, `REQUEST_TOO_LARGE`, `RATE_LIMITED`, `INTERNAL`, `UNAVAILABLE` (others may appear) | yes | The reason, in UPPER_SNAKE_CASE. Treat an unrecognised reason by its HTTP status. |
| `details[].domain` | string, always `drophawk.net` | yes |  |
| `details[].metadata` | map | no | Context for the reason, as string values. |
| `details[].metadata.{key}` | string | no |  |

## Example

```sh
curl https://api.drophawk.net/v1/brands
```
