Hoppa till innehållet

Newsletter

Newsletter sign-up with double opt-in, and one-click unsubscribe per RFC 8058. The unsubscribe endpoint is quota'd per token rather than per IP, because mail providers share addresses across many recipients.

3 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 /newsletter/confirm

Confirm newsletter subscription

Confirms a pending newsletter subscription using the token from the confirmation email. The token is consumed and cannot be reused.

Body required

Field Type
token string · nullable

Responses

200 ConfirmNewsletterSubscriptionResponse
Field Type
email string · nullable

Standard errors: 400 404 409 429 Errors

Examples

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/newsletter/confirm" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Response 200
{
  "email": "order@acme.se"
}

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

POST /newsletter/subscribe

Subscribe to newsletter

Signs an email address up for the channel newsletter. Always double opt-in: a confirmation email is sent and the subscription is not mailable until the link is followed.

Body required

Field Type Description
captchaToken string · nullable
consentText string · nullable Den exakta text som visades bredvid fältet. Butiken skickar med den så att samtycket går att belägga i efterhand — texten sparas ordagrant.
email string · nullable
formLoadedAtUnixMs integer · nullable
honeypot string · nullable
language string · nullable
name string · nullable

Responses

200 SubscribeToNewsletterResponse
Field Type
confirmationSent boolean

Standard errors: 400 404 429 Errors

Examples

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/newsletter/subscribe" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Response 200
{
  "confirmationSent": true
}

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

POST /newsletter/unsubscribe

Unsubscribe from newsletter

Withdraws newsletter consent using the token from an email, passed as a query parameter. Requires no login — one-click unsubscribe per RFC 8058. Idempotent; any request body is ignored.

Query parameters

Field Type
token string

Responses

200 UnsubscribeFromNewsletterResponse
Field Type
unsubscribed boolean

Standard errors: 400 404 429 Errors

Examples

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/newsletter/unsubscribe" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Response 200
{
  "unsubscribed": true
}

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