Hoppa till innehållet

Account

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 calls POST GET 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 /auth/login

Login

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

Body required

Field Type
email string · nullable
password string · nullable

Responses

200 EcomLoginResult
Field Type
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.

Standard errors: 400 401 Errors

Examples

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
Response 200
{
  "contactId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "customerId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "email": "order@acme.se",
  "name": "Acme AB"
}

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 /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 required

Field Type
code string · nullable
email string · nullable

Responses

200 EcomLoginResult
Field Type
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.

Standard errors: 400 401 Errors

Examples

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
Response 200
{
  "contactId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "customerId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "email": "order@acme.se",
  "name": "Acme AB"
}

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 /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 required

Field Type Description
email string · nullable
purpose enum PasswordReset OneTimeLogin

Responses

200 Empty 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.

Standard errors: 400 401 Errors

Examples

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

Base 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 required

Field Type
code string · nullable
email string · nullable
newPassword string · nullable

Responses

200 EcomLoginResult
Field Type
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.

Standard errors: 400 401 Errors

Examples

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
Response 200
{
  "contactId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "customerId": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "email": "order@acme.se",
  "name": "Acme AB"
}

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 /auth/verify-code

Verify auth code

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

Body required

Field Type Description
code string · nullable
email string · nullable
purpose enum PasswordReset OneTimeLogin

Responses

200 VerifyEcomAuthCodeResult
Field Type
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.

Standard errors: 400 401 Errors

Examples

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
Response 200
{
  "isValid": true,
  "remainingAttempts": 42
}

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.

GET /portal/context

Get portal context

Returns portal modules and permissions for the authenticated customer contact.

Responses

200 PortalContextResponse
Field Type
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.

Standard errors: 401 Errors

Examples

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"
Response 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"
}

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.

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.

PortalModules

PortalModulesResponse
Field Type
addresses boolean
catalog boolean
contacts boolean
createOrders boolean
dashboard boolean
invoices boolean
orderApproval boolean
orders boolean
quotes boolean
returns boolean
shipments boolean
tickets boolean