Hoppa till innehållet

Shopping assistant

The shopping assistant: a server-sent event stream that answers product questions against the channel's own catalogue and content.

1 calls POST Base URL https://api.erp.fluit.cloud/ecom

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

POST /chat/stream

Ask the shopping assistant

Answers a shopper's question against the channel's own catalogue and content, and streams the reply as server-sent events rather than returning a body. Each event is a `data:` line carrying a JSON fragment; concatenate the text fragments as they arrive and stop at the terminating event.

Show the full description

Because the response is a stream, the 200 has no schema to document — read the event format from the frames themselves. Requires a session, and is enabled per channel through the enableChatAssistant feature flag.

Body required

Field Type
content string · nullable
currentCategory string · nullable
currentProductId string · nullable
currentProductName string · nullable
history ChatMessageDto[] · nullable

Responses

200 Empty body.

Standard errors: 400 429 Errors

Examples

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/chat/stream" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json

Base URL https://api.erp.fluit.cloud/ecom.

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.

ChatMessageDto

EcomChatMessageDto
Field Type
content string · nullable
role string · nullable