Hoppa till innehållet

Categories

Item categories — the catalogue tree items are filed under. Addressed by code; parentCode nests a category under another, so a tree is loaded parents-first.

3 calls GET POST Base URL https://api.fluit.cloud/preview

Authentication, error codes, rate limits, idempotency and pagination apply to every call and are documented once under Getting started.

GET /categories

List item categories

Returns categories ordered by code. `search` matches code and name, case-insensitively and on any part of the value.

Show the full description

The response is a paged envelope: `{ items, totalCount, page, pageSize, totalPages, hasPreviousPage, hasNextPage }`. `pageSize` defaults to 50 and is capped at 200. `parentCode` on each row is how the tree is read back — a root category has null.

categories:read

Query parameters

Field Type Description
search string Case-insensitive partial match on code and name.
page integer
pageSize integer

Responses

200 PagedResult_PublicCategoryResponse

Paginated response: the fields below sit in items[], wrapped in totalCount, page, pageSize, totalPages, hasPreviousPage and hasNextPage. Paginated

Field Type Description
code Required 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.
name Required string · nullable
parentCode string · nullable Code of the parent category, or null for a root category.
slug string · nullable URL segment used by the web shop.
sortOrder integer · nullable

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/categories"
Response 200
{
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "code": "string",
      "createdDate": "2026-06-11T09:24:13.418",
      "description": "string",
      "isActive": true,
      "links": {
        "self": "string"
      },
      "name": "Hand tools",
      "parentCode": "STD",
      "slug": "string",
      "sortOrder": 42
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

POST /categories

Create an item category

Creates a category that items can be filed under. `code` is the business key: it is what `categoryCode` on an item row references, so it should be stable. `parentCode` nests the category under an existing one.

Show the full description

Load a tree parents-first — a parent that does not exist yet is rejected with 400 naming the field, not created implicitly. Known error codes: `ItemCategory.CodeNotUnique`, `categoryCode` (unknown parent).

Body required

Field Type Description
code Required string Business key. Item rows reference this, so pick something stable.
description string · nullable Longer description, e.g. for a web shop category page.
name Required string Display name.
parentCode string · nullable Code of an existing category to nest this one under. Omit for a root category. Load a tree parents-first — a code that does not exist yet is rejected with 400.
slug string · nullable URL segment for the web shop. Defaults to the code.
sortOrder integer · nullable Sort order among its siblings.

Responses

201 PublicCategoryResponse
  • Location — URL of the newly created resource.
Field Type Description
code Required 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.
name Required string · nullable
parentCode string · nullable Code of the parent category, or null for a root category.
slug string · nullable URL segment used by the web shop.
sortOrder integer · nullable
400 ProblemDetails The code is already taken, or parentCode does not exist.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/categories" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Nested category
{
  "code": "FLOORSTANDING",
  "description": "Full-range speakers that stand on the floor.",
  "name": "Floorstanding speakers",
  "parentCode": "SPEAKERS",
  "slug": "floorstanding-speakers",
  "sortOrder": 10
}
Root category
{
  "code": "SPEAKERS",
  "name": "Speakers"
}
Response 201
{
  "code": "string",
  "createdDate": "2026-06-11T09:24:13.418",
  "description": "string",
  "isActive": true,
  "links": {
    "self": "string"
  },
  "name": "Hand tools",
  "parentCode": "STD",
  "slug": "string",
  "sortOrder": 42
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

GET /categories/{code}

Get an item category

Returns one category by its code, in the same shape as POST /preview/categories.

categories:read Supports ETag

Path parameters

Field Type Description
code Required string Code of the category.

Responses

200 PublicCategoryResponse
  • ETag — Weak validator for this representation. Pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.
Field Type Description
code Required 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.
name Required string · nullable
parentCode string · nullable Code of the parent category, or null for a root category.
slug string · nullable URL segment used by the web shop.
sortOrder integer · nullable
304 Empty 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 category with that code.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/categories/{code}"
Response 200
{
  "code": "string",
  "createdDate": "2026-06-11T09:24:13.418",
  "description": "string",
  "isActive": true,
  "links": {
    "self": "string"
  },
  "name": "Hand tools",
  "parentCode": "STD",
  "slug": "string",
  "sortOrder": 42
}

Base URL https://api.fluit.cloud/preview. The response example is generated from the schema: the shape is right, the values are made up.

Schemas

The objects this group's calls refer to. The field tables above go one level deep and link here rather than repeating the same schema on every endpoint.