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.

4 calls GET POST PATCH 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.
metaDescription string · nullable Description of the category page in search results. Null = the web shop uses the description.
metaTitle string · nullable Title of the category page in search results. Null = the web shop builds it from the name.
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"
      },
      "metaDescription": "string",
      "metaTitle": "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.
metaDescription string · nullable Description of the category page in search results. Null = the web shop uses the description.
metaTitle string · nullable Title of the category page in search results. Null = the web shop builds it from the name.
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"
  },
  "metaDescription": "string",
  "metaTitle": "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.
metaDescription string · nullable Description of the category page in search results. Null = the web shop uses the description.
metaTitle string · nullable Title of the category page in search results. Null = the web shop builds it from the name.
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"
  },
  "metaDescription": "string",
  "metaTitle": "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.

PATCH /categories/{code}

Update an item category

Partially updates a category's name, description, slug, sort order and search-result texts. Only provided fields are updated (JSON Merge Patch semantics). Omitted fields are left unchanged.

Show the full description

Pass null to clear a nullable field. Unknown fields are rejected with 400, naming the field and listing the ones this endpoint accepts. code cannot be changed, because it is the resource's address and what item rows reference. name cannot be set to null. slug is normalized the same way as in the admin (lowercase, diacritics folded, spaces to hyphens). Changing it moves the category page to a new URL and automatically creates a 301 from the old address on every active channel, so incoming links and their ranking survive. Passing null makes the category fall back to its code as URL segment, with the same 301. metaTitle and metaDescription are what the category page shows in search results, translated per language like the name. Search engines cut titles around 60 characters and descriptions around 155; longer text is accepted (up to 200 and 500) but may be cut. Pass null to fall back to the name and description. Read the result back with GET /preview/categories/{code}.

categories:write

Path parameters

Field Type Description
code Required string Code of the category to update.

Body required

Field Type Description
description string · nullable Longer description, e.g. for a web shop category page. Pass `null` to clear.
metaDescription string · nullable Description of the category page in search results. Aim for 155 characters or fewer. Pass `null` to fall back to the description.
metaTitle string · nullable Title of the category page in search results. Aim for 60 characters or fewer. Pass `null` to fall back to the name.
name string · nullable Display name. Cannot be null.
slug string · nullable URL segment for the web shop. Changing it records a 301 from the old address on every active channel. Pass `null` to fall back to the code.
sortOrder integer · nullable Sort order among its siblings. Pass `null` to clear.

Responses

204 Empty body.
400 ProblemDetails The body is not a JSON object, contains a field this endpoint does not have, a field present in it failed validation, name was sent as null, or slug contains no letter or digit.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No category with that code.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails ItemCategories.SlugNotUnique — another category already uses that slug.
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 PATCH "https://api.fluit.cloud/preview/categories/{code}" \
  -H "Content-Type: application/json" \
  -d @body.json
Response 400
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

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.