Hoppa till innehållet

Konto

Signing in: password, one-time code by email, and password reset. All of them upgrade the existing session rather than replacing it, so the cart carries over.

6 anrop POST GET Bas-URL https://api.erp.fluit.cloud/ecom

Autentisering, felkoder, rate limits, idempotens och paginering gäller alla anrop och står samlade under Kom igång.

POST /auth/login

Login

Authenticates a customer contact using email and password. Associates the session with the customer.

Body krävs

Fält Typ
email string · nullable
password string · nullable

Svar

200 EcomLoginResult
Fält Typ
contactId string(uuid)
customerId string(uuid)
email string · nullable
name string · nullable
429 Rate limit exceeded. Wait the number of seconds given in Retry-After. The body is problem-shaped application/json, not application/problem+json. This API sends no X-RateLimit-* headers — the quota is discovered here.
  • Retry-After — Seconds to wait before retrying.

Standardfel: 400 401 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/auth/login" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "contactId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "customerId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "email": "order@acme.se",
  "name": "Acme AB"
}

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

POST /auth/one-time-login

One-time code login

Authenticates a customer contact using a one-time email code. Associates the session with the customer.

Body krävs

Fält Typ
code string · nullable
email string · nullable

Svar

200 EcomLoginResult
Fält Typ
contactId string(uuid)
customerId string(uuid)
email string · nullable
name string · nullable
429 Rate limit exceeded. Wait the number of seconds given in Retry-After. The body is problem-shaped application/json, not application/problem+json. This API sends no X-RateLimit-* headers — the quota is discovered here.
  • Retry-After — Seconds to wait before retrying.

Standardfel: 400 401 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/auth/one-time-login" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "contactId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "customerId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "email": "order@acme.se",
  "name": "Acme AB"
}

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

POST /auth/request-code

Request auth code

Sends a 6-digit verification code to the specified email address. Used for password reset and one-time login.

Body krävs

Fält Typ Beskrivning
email string · nullable
purpose enum PasswordReset OneTimeLogin

Svar

200 Tom body.
429 Rate limit exceeded. Wait the number of seconds given in Retry-After. The body is problem-shaped application/json, not application/problem+json. This API sends no X-RateLimit-* headers — the quota is discovered here.
  • Retry-After — Seconds to wait before retrying.

Standardfel: 400 401 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/auth/request-code" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json

Bas-URL https://api.erp.fluit.cloud/ecom.

POST /auth/reset-password

Reset password

Resets the customer password using a verified 6-digit code. Auto-logs in the customer on success.

Body krävs

Fält Typ
code string · nullable
email string · nullable
newPassword string · nullable

Svar

200 EcomLoginResult
Fält Typ
contactId string(uuid)
customerId string(uuid)
email string · nullable
name string · nullable
429 Rate limit exceeded. Wait the number of seconds given in Retry-After. The body is problem-shaped application/json, not application/problem+json. This API sends no X-RateLimit-* headers — the quota is discovered here.
  • Retry-After — Seconds to wait before retrying.

Standardfel: 400 401 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/auth/reset-password" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "contactId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "customerId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "email": "order@acme.se",
  "name": "Acme AB"
}

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

POST /auth/verify-code

Verify auth code

Validates a 6-digit code without consuming it. Returns validity status and remaining attempts.

Body krävs

Fält Typ Beskrivning
code string · nullable
email string · nullable
purpose enum PasswordReset OneTimeLogin

Svar

200 VerifyEcomAuthCodeResult
Fält Typ
isValid boolean
remainingAttempts integer
429 Rate limit exceeded. Wait the number of seconds given in Retry-After. The body is problem-shaped application/json, not application/problem+json. This API sends no X-RateLimit-* headers — the quota is discovered here.
  • Retry-After — Seconds to wait before retrying.

Standardfel: 400 401 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/auth/verify-code" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web" \
  -H "Content-Type: application/json" \
  -d @body.json
Svar 200
{
  "isValid": true,
  "remainingAttempts": 42
}

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

GET /portal/context

Get portal context

Returns portal modules and permissions for the authenticated customer contact.

Svar

200 PortalContextResponse
Fält Typ
contactId string(uuid)
contactName string · nullable
modules PortalModules
permissions string[] · nullable
role string · nullable
429 Rate limit exceeded. Wait the number of seconds given in Retry-After. The body is problem-shaped application/json, not application/problem+json. This API sends no X-RateLimit-* headers — the quota is discovered here.
  • Retry-After — Seconds to wait before retrying.

Standardfel: 401 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/ecom/portal/context" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Svar 200
{
  "contactId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "contactName": "Anna Svensson",
  "modules": {
    "addresses": true,
    "catalog": true,
    "contacts": true,
    "createOrders": true,
    "dashboard": true,
    "invoices": true,
    "orderApproval": true,
    "orders": true,
    "quotes": true,
    "returns": true,
    "shipments": true,
    "tickets": true
  },
  "permissions": [
    "string"
  ],
  "role": "string"
}

Bas-URL https://api.erp.fluit.cloud/ecom. 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.

PortalModules

PortalModulesResponse
Fält Typ
addresses boolean
catalog boolean
contacts boolean
createOrders boolean
dashboard boolean
invoices boolean
orderApproval boolean
orders boolean
quotes boolean
returns boolean
shipments boolean
tickets boolean