Aller au contenu

Brands

Ce contenu n’est pas encore disponible dans votre langue.

The Brands resource provides fake brand data with names, slugs, descriptions, and logos.

MethodEndpointDescription
GET/v1/brandsList all brands
GET/v1/brands/:idGet a specific brand
GET/v1/brands/:id/productsGet brand's products
{
"id": 1,
"name": "Acme Corp",
"slug": "acme-corp",
"description": "Innovation meets quality",
"logo": "https://example.com/images/acme-logo.png"
}
Field Type Description
id number Unique identifier
name string Brand name
slug string URL-friendly unique slug
description string Brand description
logo string Brand logo URL
Terminal window
curl https://api.phantomjson.app/v1/brands
Parameter Type Default Description
page number 1 Page number
limit number 20 Items per page (max: 100)
sort string Sort field and direction
q string Search query
fields string Fields to return
name string Filter by name
{
"data": [
{
"id": 1,
"name": "Acme Corp",
"slug": "acme-corp",
"description": "Innovation meets quality"
}
],
"meta": {
"total": 30,
"page": 1,
"limit": 20,
"totalPages": 2
}
}
Terminal window
curl https://api.phantomjson.app/v1/brands/1
{
"data": {
"id": 1,
"name": "Acme Corp",
"slug": "acme-corp",
"description": "Innovation meets quality",
"logo": "https://example.com/images/acme-logo.png"
}
}
Terminal window
curl https://api.phantomjson.app/v1/brands/1/products
{
"data": [
{
"id": 1,
"name": "Ergonomic Rubber Keyboard",
"slug": "ergonomic-rubber-keyboard",
"price": 299.99,
"brandId": 1
}
],
"meta": {
"total": 40,
"page": 1,
"limit": 20,
"totalPages": 2
}
}
Terminal window
curl "https://api.phantomjson.app/v1/brands?q=acme"
Terminal window
curl "https://api.phantomjson.app/v1/brands?sort=name:asc"
Terminal window
curl "https://api.phantomjson.app/v1/brands?fields=id,name,slug"
  • Products — Each brand has many products (access via /v1/brands/:id/products)