Hoppa till innehållet

API och integrationer Referens Vidarekopplingar

English

Vidarekopplingar

URL redirects in a channel's web shop: the old addresses that send visitors on to a new one, applied before the storefront matches a route. Covers the redirects created by hand or over this API and the 301s Fluit records itself when a product, category or page changes slug. Addressed by the pair (channelCode, id): the source path contains slashes and does not fit in a path segment.

5 anrop GET POST PATCH DELETE 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 /channels/{channelCode}/redirects

List a channel's URL redirects

Returns the redirects the channel's web shop applies before it matches a route: the ones created by hand or over this API, and the 301s Fluit records itself when a product, category or page changes slug. hitCount and lastHitAt show whether a redirect is still in use.

Visa hela beskrivningen

Sorted by fromPath. There is no delta sync for redirects: read the full list to reconcile.

redirects:read Paginerad

Sökvägsparametrar

Fält Typ Beskrivning
channelCode Krävs string Code of the channel whose redirects to list.

Frågeparametrar

Fält Typ Beskrivning
search string Matches fromPath and toPath, case-insensitively and on partial words.
isActive boolean Filters on whether the redirect is active.
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Svar

200 PagedResult_PublicRedirectResponse

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

Fält Typ Beskrivning
channelCode Krävs string · nullable Code of the channel the redirect belongs to.
createdDate string(date-time)
fromPath Krävs string · nullable The old path that is redirected, normalized to lowercase with a leading slash and no trailing slash, e.g. `/old-product`. Unique within the channel.
hitCount integer Number of times a visitor has followed the redirect.
id string(uuid) Stable id of the redirect. Use it to update or delete it.
isActive boolean Whether the storefront applies the redirect.
lastHitAt string(date-time) · nullable When a visitor last followed the redirect, or null if never.
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.
modifiedDate string(date-time) · nullable
statusCode integer HTTP status code of the redirect: 301 (permanent) or 302 (temporary).
toPath Krävs string · nullable Where the visitor is sent: a path starting with `/` or an absolute http(s) URL.
404 ProblemDetails No channel 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/channels/{channelCode}/redirects"
Svar 200
{
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "channelCode": "STD",
      "createdDate": "2026-06-11T09:24:13.418",
      "fromPath": "string",
      "hitCount": 42,
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "isActive": true,
      "lastHitAt": "2026-06-11T09:24:13.418",
      "links": {
        "self": "string"
      },
      "modifiedDate": "2026-06-11T09:24:13.418",
      "statusCode": 42,
      "toPath": "string"
    }
  ],
  "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 /channels/{channelCode}/redirects

Create a URL redirect

Makes the channel's web shop send visitors from fromPath to toPath. Use it when an address stops working: after a move from another platform, or when a product is discontinued. fromPath is normalized (lowercase, leading slash, no trailing slash) and the response carries the stored form.

Visa hela beskrivningen

A path can only be redirected once per channel: to change where it leads, update the existing redirect with PATCH instead of creating a second one. Known error codes: UrlRedirect.FromPathAlreadyExists, UrlRedirect.InvalidPath, UrlRedirect.InvalidToPath, UrlRedirect.SelfReference, UrlRedirect.InvalidStatusCode, UrlRedirect.FromPathTooLong, UrlRedirect.ToPathTooLong.

Sökvägsparametrar

Fält Typ Beskrivning
channelCode Krävs string Code of the channel whose web shop should apply the redirect.

Body krävs

Fält Typ Beskrivning
fromPath Krävs string The old path to redirect, e.g. `/old-product`. Normalized to lowercase with a leading slash and no trailing slash. Must be unique within the channel.
statusCode integer · nullable 301 (permanent, the default) or 302 (temporary).
toPath Krävs string Where to send the visitor: a path starting with `/` or an absolute http(s) URL.

Svar

201 PublicRedirectResponse
  • Location — URL of the newly created resource.
Fält Typ Beskrivning
channelCode Krävs string · nullable Code of the channel the redirect belongs to.
createdDate string(date-time)
fromPath Krävs string · nullable The old path that is redirected, normalized to lowercase with a leading slash and no trailing slash, e.g. `/old-product`. Unique within the channel.
hitCount integer Number of times a visitor has followed the redirect.
id string(uuid) Stable id of the redirect. Use it to update or delete it.
isActive boolean Whether the storefront applies the redirect.
lastHitAt string(date-time) · nullable When a visitor last followed the redirect, or null if never.
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.
modifiedDate string(date-time) · nullable
statusCode integer HTTP status code of the redirect: 301 (permanent) or 302 (temporary).
toPath Krävs string · nullable Where the visitor is sent: a path starting with `/` or an absolute http(s) URL.
400 ProblemDetails fromPath or toPath is missing or too long, toPath is neither a path starting with / nor an absolute http(s) URL, the redirect points to itself, or statusCode is not 301 or 302.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No channel with that code.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails UrlRedirect.FromPathAlreadyExists — the channel already redirects that path.
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/channels/{channelCode}/redirects" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Temporary redirect to another site
{
  "fromPath": "/campaign",
  "statusCode": 302,
  "toPath": "https://www.example.com/summer-campaign"
}
Permanent redirect
{
  "fromPath": "/old-product",
  "toPath": "/products/new-product"
}
Svar 201
{
  "channelCode": "STD",
  "createdDate": "2026-06-11T09:24:13.418",
  "fromPath": "string",
  "hitCount": 42,
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "isActive": true,
  "lastHitAt": "2026-06-11T09:24:13.418",
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "statusCode": 42,
  "toPath": "string"
}

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

GET /channels/{channelCode}/redirects/{id}

Get a URL redirect

Returns one redirect, in the same shape as the list and as POST /preview/channels/{channelCode}/redirects.

redirects:read Stödjer ETag

Sökvägsparametrar

Fält Typ Beskrivning
channelCode Krävs string Code of the channel the redirect belongs to.
id Krävs string(uuid) Id of the redirect.

Svar

200 PublicRedirectResponse
  • 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
channelCode Krävs string · nullable Code of the channel the redirect belongs to.
createdDate string(date-time)
fromPath Krävs string · nullable The old path that is redirected, normalized to lowercase with a leading slash and no trailing slash, e.g. `/old-product`. Unique within the channel.
hitCount integer Number of times a visitor has followed the redirect.
id string(uuid) Stable id of the redirect. Use it to update or delete it.
isActive boolean Whether the storefront applies the redirect.
lastHitAt string(date-time) · nullable When a visitor last followed the redirect, or null if never.
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.
modifiedDate string(date-time) · nullable
statusCode integer HTTP status code of the redirect: 301 (permanent) or 302 (temporary).
toPath Krävs string · nullable Where the visitor is sent: a path starting with `/` or an absolute http(s) URL.
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 channel with that code, or no redirect with that id in it.
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/channels/{channelCode}/redirects/{id}"
Svar 200
{
  "channelCode": "STD",
  "createdDate": "2026-06-11T09:24:13.418",
  "fromPath": "string",
  "hitCount": 42,
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "isActive": true,
  "lastHitAt": "2026-06-11T09:24:13.418",
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "statusCode": 42,
  "toPath": "string"
}

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

PATCH /channels/{channelCode}/redirects/{id}

Update a URL redirect

Partially updates where a redirect leads, its status code and whether it is active. Only provided fields are updated (JSON Merge Patch semantics). Omitted fields are left unchanged.

Visa hela beskrivningen

None of the fields can be set to null. Unknown fields are rejected with 400, naming the field and listing the ones this endpoint accepts. fromPath cannot be changed: to redirect a different address, create a new redirect and delete this one. Known error codes: UrlRedirect.InvalidPath, UrlRedirect.InvalidToPath, UrlRedirect.SelfReference, UrlRedirect.InvalidStatusCode.

redirects:write

Sökvägsparametrar

Fält Typ Beskrivning
channelCode Krävs string Code of the channel the redirect belongs to.
id Krävs string(uuid) Id of the redirect.

Body krävs

Fält Typ Beskrivning
isActive boolean · nullable Whether the web shop applies the redirect.
statusCode integer · nullable 301 (permanent) or 302 (temporary).
toPath string · nullable Where to send the visitor: a path starting with `/` or an absolute http(s) URL.

Svar

204 Tom body.
400 ProblemDetails The body is not a JSON object, contains a field this endpoint does not have, a field was sent as null, toPath is neither a path starting with / nor an absolute http(s) URL, the redirect would point to itself, or statusCode is not 301 or 302.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No channel with that code, or no redirect with that id in it.
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 PATCH "https://api.fluit.cloud/preview/channels/{channelCode}/redirects/{id}" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 400
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

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

DELETE /channels/{channelCode}/redirects/{id}

Delete a URL redirect

Removes the redirect, so fromPath answers with whatever the web shop has at that address, often a 404. To stop a redirect while keeping it for later, PATCH it with isActive: false instead.

redirects:write

Sökvägsparametrar

Fält Typ Beskrivning
channelCode Krävs string Code of the channel the redirect belongs to.
id Krävs string(uuid) Id of the redirect.

Svar

204 Tom body.
404 ProblemDetails No channel with that code, or no redirect with that id in it.
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 DELETE "https://api.fluit.cloud/preview/channels/{channelCode}/redirects/{id}"
Svar 404
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

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.