This commit is contained in:
seb
2026-10-09 18:10:49 +02:00
parent 848ca0aff5
commit daf2d0525f
10 changed files with 112 additions and 66 deletions

View File

@@ -4,7 +4,14 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
List brands
Lists brands for the authenticated user's selected company, sorted by name.
Lists brands for the authenticated user's selected company, sorted by name. Paged; `total` is the unpaged count.
## Query parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `offset` | no | integer | Number of brands to skip |
| `limit` | no | integer | Number of brands to return |
## Response `200`
@@ -19,8 +26,6 @@ Brand list
"gsprpinfo": "…",
"pics": [
{
"id": 1,
"sort": 1,
"fullHash": "…",
"thumbW": 1,
"thumbH": 1,
@@ -28,7 +33,10 @@ Brand list
}
]
}
]
],
"total": 1,
"offset": 1,
"limit": 1
}
```
@@ -36,7 +44,7 @@ Brand list
| Status | Description |
|--------|-------------|
| 400 | No company selected — `{"error":"…"}` |
| 400 | Invalid offset, invalid limit, or no company selected — `{"error":"…"}` |
| 401 | Unauthorized — `{"error":"…"}` |
| 403 | Not authorized — `{"error":"…"}` |
| 404 | Company not found — `{"error":"…"}` |