Hoppa till innehållet

Brands

Brands items carry. Addressed by code.

3 anrop GET POST Bas-URL https://api.fluit.cloud/preview

Autentisering, felkoder, rate limits, idempotens och paginering gäller alla anrop och står samlade under Kom igång.

GET /brands

List brands

Returns brands ordered by code. `search` matches code and name, case-insensitively and on any part of the value. The response is a paged envelope: `{ items, totalCount, page, pageSize, totalPages, hasPreviousPage, hasNextPage }`. `pageSize` defaults to 50 and is capped at 200.

brands:read

Frågeparametrar

Fält Typ Beskrivning
search string Case-insensitive partial match on code and name.
page integer
pageSize integer

Svar

200 PagedResult_PublicBrandResponse

Paginerat svar: raderna nedan ligger i items[], omgivna av totalCount, page, pageSize, totalPages, hasPreviousPage och hasNextPage. Paginerad

Fält Typ Beskrivning
code Krävs string · nullable Business key. Stable, and what item rows reference.
createdDate string(date-time)
description string · nullable
isActive boolean
links Links Hypermedia links for a public API resource. Exposed as a computed `links` property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
logoUrl string · nullable
name Krävs string · nullable
sortOrder integer
websiteUrl string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl "https://api.fluit.cloud/preview/brands"
Svar 200
{
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "code": "string",
      "createdDate": "2026-06-11T09:24:13.418",
      "description": "string",
      "isActive": true,
      "links": {
        "self": "string"
      },
      "logoUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
      "name": "Fluit",
      "sortOrder": 42,
      "websiteUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

Bas-URL https://api.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

POST /brands

Create a brand

Creates a brand that items can carry. `code` is the business key: it is what `brandCode` on an item row references, so it should be stable. Known error codes: `Brand.CodeNotUnique`.

Body krävs

Fält Typ Beskrivning
code Krävs string Business key. Item rows reference this, so pick something stable.
description string · nullable Longer description, e.g. for a brand page in the web shop.
logoUrl string(uri) · nullable Absolute URL to the brand logo.
name Krävs string Display name.
sortOrder integer Sort order in brand listings.
websiteUrl string(uri) · nullable Absolute URL to the brand's own site.

Svar

201 PublicBrandResponse
  • Location — URL of the newly created resource.
Fält Typ Beskrivning
code Krävs string · nullable Business key. Stable, and what item rows reference.
createdDate string(date-time)
description string · nullable
isActive boolean
links Links Hypermedia links for a public API resource. Exposed as a computed `links` property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
logoUrl string · nullable
name Krävs string · nullable
sortOrder integer
websiteUrl string · nullable
400 ProblemDetails The code is already taken.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl -X POST "https://api.fluit.cloud/preview/brands" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
With logo and site
{
  "code": "KORDZ",
  "description": "Australian maker of HDMI and installation cabling.",
  "logoUrl": "https://cdn.example.com/brands/kordz.png",
  "name": "Kordz",
  "sortOrder": 10,
  "websiteUrl": "https://kordz.com"
}
Code and name
{
  "code": "KORDZ",
  "name": "Kordz"
}
Svar 201
{
  "code": "string",
  "createdDate": "2026-06-11T09:24:13.418",
  "description": "string",
  "isActive": true,
  "links": {
    "self": "string"
  },
  "logoUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
  "name": "Fluit",
  "sortOrder": 42,
  "websiteUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
}

Bas-URL https://api.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

GET /brands/{code}

Get a brand

Returns one brand by its code, in the same shape as POST /preview/brands.

brands:read Stödjer ETag

Sökvägsparametrar

Fält Typ Beskrivning
code Krävs string Code of the brand.

Svar

200 PublicBrandResponse
  • ETag — Weak validator for this representation. Pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.
Fält Typ Beskrivning
code Krävs string · nullable Business key. Stable, and what item rows reference.
createdDate string(date-time)
description string · nullable
isActive boolean
links Links Hypermedia links for a public API resource. Exposed as a computed `links` property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
logoUrl string · nullable
name Krävs string · nullable
sortOrder integer
websiteUrl string · nullable
304 Tom body.
  • ETag — Weak validator for this representation. Pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.
404 ProblemDetails No brand with that code.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl "https://api.fluit.cloud/preview/brands/{code}"
Svar 200
{
  "code": "string",
  "createdDate": "2026-06-11T09:24:13.418",
  "description": "string",
  "isActive": true,
  "links": {
    "self": "string"
  },
  "logoUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg",
  "name": "Fluit",
  "sortOrder": 42,
  "websiteUrl": "https://cdn.fluit.cloud/assets/widget-a-front.jpg"
}

Bas-URL https://api.fluit.cloud/preview. Svarsexemplet är genererat ur schemat: formen stämmer, värdena är påhittade.

Scheman

Objekten som gruppens anrop refererar till. Fälttabellerna ovan går ett steg djupt och länkar hit i stället för att upprepa samma schema på varje endpoint.