Hoppa till innehållet

Adresser

The signed-in customer's delivery addresses, including which one is the default.

5 anrop GET POST PATCH DELETE 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.

GET /portal/addresses

List addresses

Returns delivery addresses for the authenticated customer.

Svar

200 PortalAddressListResponse
Fält Typ
items PortalAddressItem[] · 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 403 Felhantering

Exempel

curl
curl "https://api.erp.fluit.cloud/ecom/portal/addresses" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"
Svar 200
{
  "items": [
    {
      "city": "Stockholm",
      "contactPerson": "string",
      "country": "string",
      "email": "order@acme.se",
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "isDefault": true,
      "name": "Widget A",
      "notes": "string",
      "phone": "+46 8 123 45 67",
      "postalCode": "11122",
      "street1": "Storgatan 1",
      "street2": "string"
    }
  ]
}

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

POST /portal/addresses

Create address

Creates a new delivery address for the authenticated customer.

Body krävs

Fält Typ
city string · nullable
contactPerson string · nullable
country string · nullable
email string · nullable
isDefault boolean
name string · nullable
notes string · nullable
phone string · nullable
postalCode string · nullable
street1 string · nullable
street2 string · nullable

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 403 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/portal/addresses" \
  -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.

PATCH /portal/addresses/{id}

Update address

Updates an existing delivery address for the authenticated customer.

Sökvägsparametrar

Fält Typ
id Krävs string(uuid)

Body krävs

Fält Typ
city string · nullable
contactPerson string · nullable
country string · nullable
email string · nullable
name string · nullable
notes string · nullable
phone string · nullable
postalCode string · nullable
street1 string · nullable
street2 string · nullable

Svar

204 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 404 Felhantering

Exempel

curl
curl -X PATCH "https://api.erp.fluit.cloud/ecom/portal/addresses/{id}" \
  -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.

DELETE /portal/addresses/{id}

Delete address

Deletes a delivery address for the authenticated customer.

Sökvägsparametrar

Fält Typ
id Krävs string(uuid)

Svar

204 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: 401 404 Felhantering

Exempel

curl
curl -X DELETE "https://api.erp.fluit.cloud/ecom/portal/addresses/{id}" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"

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

POST /portal/addresses/{id}/set-default

Set default address

Sets a delivery address as the default for the authenticated customer.

Sökvägsparametrar

Fält Typ
id Krävs string(uuid)

Svar

204 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: 401 404 Felhantering

Exempel

curl
curl -X POST "https://api.erp.fluit.cloud/ecom/portal/addresses/{id}/set-default" \
  -H "Authorization: Bearer $SESSION_TOKEN" \
  -H "X-Tenant-Id: $FLUIT_TENANT_ID" \
  -H "X-Channel: web"

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

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.

PortalAddressItem

PortalAddressItem
Fält Typ
city string · nullable
contactPerson string · nullable
country string · nullable
email string · nullable
id string(uuid)
isDefault boolean
name string · nullable
notes string · nullable
phone string · nullable
postalCode string · nullable
street1 string · nullable
street2 string · nullable