Hoppa till innehållet

Customers

Customers with their contact persons and delivery addresses. Addressed by customerNumber.

9 calls POST GET PATCH Base URL https://api.fluit.cloud/preview

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

POST /customer-items/batch

Create or update many customer item numbers in one call

Creates and updates up to 500 customer items per call, across customers — the customer's own number and description for one of our items (a cross reference). Each row is identified by customerNumber and itemNumber : a customer has one active customer item per item.

Show the full description

One that exists gets the fields the row carries; a field that is omitted or null is left as it is — this endpoint never clears a field. One that does not exist is created, and then customerItemNo is required. Rows go through the same rules as the MCP tool action_UpsertCustomerItems and the app. The HTTP status describes the request, not the rows: a well-formed batch always answers 200, and every row carries its own outcome ( created , updated or failed ) plus an error when it failed. A bad row never blocks the rest — re-send only the failed rows. Row error codes include BulkUpsert.ParentNotFound (no customer or item with that number), BulkUpsert.RequiredForNew (a new row without customerItemNo), BulkUpsert.DuplicateInBatch (the same customer and item twice) and, with mode set, BulkUpsert.AlreadyExists or BulkUpsert.NotFound. mode is upsert (default), create or update . An Idempotency-Key is required like on every POST under /preview.

Body required

Field Type Description
items Required BatchUpsertCustomerItemsRow[] The rows to create or update. At most 500 per call, across customers.
mode enum upsert (default) creates missing customer items and updates existing ones, create fails a row whose customer item already exists, update fails a row whose customer item does not. Upsert Create Update

Responses

200 BatchUpsertCustomerItemsResponse
Field Type
createdCount integer
failedCount integer
results BatchUpsertCustomerItemsRowResult[] · nullable
updatedCount integer
400 ProblemDetails The batch is empty (BulkUpsert.Empty) or has more than 500 rows (BulkUpsert.TooManyRows), a row lacks customerNumber or itemNumber, or mode is unknown.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/customer-items/batch" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Rows for two customers
{
  "items": [
    {
      "customerDescription": "HDMI 2 m",
      "customerItemNo": "K-4711",
      "customerNumber": "10001",
      "itemNumber": "670-00001"
    },
    {
      "customerItemNo": "99-120",
      "customerNumber": "10002",
      "itemNumber": "670-00001"
    }
  ]
}
Response 200
{
  "createdCount": 42,
  "failedCount": 42,
  "results": [
    {
      "customerNumber": "CUST-001",
      "error": {
        "code": "string",
        "detail": "string"
      },
      "index": 42,
      "itemNumber": "WIDGET-A",
      "outcome": "string"
    }
  ],
  "updatedCount": 42
}

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

GET /customers

List customers

Returns a paginated list of customers for the authenticated tenant. Sorted by customer number. ?modifiedSince= (ISO 8601 UTC datetime) returns records created or changed at or after that instant, and is the intended way to run an incremental sync.

Show the full description

A change anywhere inside the record counts: editing a line moves the parent's modifiedDate too, so no change can hide below the resource level. Deletions are not visible here: a deleted record is really gone, so it simply stops appearing, which is indistinguishable from "unchanged". Poll GET /preview/deletions?deletedSince= alongside this endpoint to learn what was removed.

Query parameters

Field Type Description
search string Matches customer number, name, organisation number and email, case-insensitively and on partial words.
isActive boolean Filters on whether the customer is active. Inactive customers cannot be placed on new orders.
modifiedSince string(date-time) Returns only records created or changed at or after this instant (ISO 8601 UTC datetime). A change anywhere inside the record counts, including on its lines.
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Responses

200 PagedResult_PublicCustomerResponse

Paginated response: the fields below sit in items[], wrapped in totalCount, page, pageSize, totalPages, hasPreviousPage and hasNextPage. Paginated

Field Type Description
city string · nullable City name. Null if not set.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE , DE , NO . Null if not set.
createdDate string(date-time) UTC timestamp when the customer record was created.
customerGroupCode string · nullable Code of the customer group this customer belongs to. Null if not set.
customerGroupName string · nullable Name of the customer group this customer belongs to. Null if not set.
customerNumber string · nullable Unique customer number — business key used in all URL references.
defaultCurrencyCode string · nullable ISO 4217 currency code of the customer's default currency, e.g. SEK , EUR . Null if not set.
deliveryTermCode string · nullable Code of the customer's default delivery term — usable as deliveryTermCode in order creation. Null if not set.
deliveryTermName string · nullable Name of the customer's default delivery term. Null if not set.
id string(uuid) Internal unique identifier (UUID v7).
invoiceEmail string · nullable Primary email address for invoices and order confirmations. Null if not set.
isActive boolean Whether the customer is active. Inactive customers cannot be used on new orders.
links Links Hypermedia links for a public API resource. Exposed as a computed links property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
modifiedDate string(date-time) · nullable UTC timestamp of the last modification. Null if never modified after creation.
name string · nullable Full company or person name.
notes string · nullable Free-text internal notes (not visible to the customer). Null if not set.
organizationNumber string · nullable Company registration number / org.nr, e.g. 5560001234 . Null if not set.
paymentTermCode string · nullable Code of the customer's default payment term — usable as paymentTermCode in order creation. Null if not set.
paymentTermName string · nullable Name of the customer's default payment term. Null if not set.
phone string · nullable Primary phone number. Null if not set.
postalCode string · nullable Postal / ZIP code. Null if not set.
street1 string · nullable Street address line 1. Null if not set.
street2 string · nullable Street address line 2 (suite, c/o, etc.). Null if not set.
vatNumber string · nullable VAT registration number, e.g. SE556000123401 . Null if not set.

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/customers" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "aggregates": [
    {
      "currencyCode": "SEK",
      "key": "string",
      "mixedCurrencies": true,
      "value": "299.00"
    }
  ],
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "city": "Stockholm",
      "countryCode": "SE",
      "createdDate": "2026-06-11T09:24:13.418",
      "customerGroupCode": "STD",
      "customerGroupName": "Retail",
      "customerNumber": "CUST-001",
      "defaultCurrencyCode": "SEK",
      "deliveryTermCode": "STD",
      "deliveryTermName": "DAP Stockholm",
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "invoiceEmail": "order@acme.se",
      "isActive": true,
      "links": {
        "self": "string"
      },
      "modifiedDate": "2026-06-11T09:24:13.418",
      "name": "Acme AB",
      "notes": "string",
      "organizationNumber": "ABC-001",
      "paymentTermCode": "STD",
      "paymentTermName": "30 days net",
      "phone": "+46 8 123 45 67",
      "postalCode": "11122",
      "street1": "Storgatan 1",
      "street2": "string",
      "vatNumber": "ABC-001"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

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

POST /customers

Create a customer

Creates a new customer for the authenticated tenant. Customer number is auto-generated if not provided. defaultBackorderBehavior controls what happens to unfulfillable quantities on this customer's orders; omit it to use CreateBackorder.

Show the full description

Allowed values: CreateBackorder, CancelRemaining, HoldOrder. The response body is the same representation as GET /preview/customers/{customerNumber}; the canonical URL is returned in the Location header and in links.self.

Body required

Field Type Description
city string · nullable City name.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE , DE , NO .
customerNumber string · nullable Unique customer number. Auto-generated from the tenant number sequence if omitted.
defaultBackorderBehavior enum CreateBackorder CancelRemaining HoldOrder
defaultCurrencyCode string · nullable ISO 4217 currency code, e.g. SEK , EUR . If omitted, the tenant default is used.
invoiceEmail string(email) · nullable Email address for invoices and order confirmations.
name Required string Full company or person name.
notes string · nullable Free-text internal notes (not visible to the customer).
organizationNumber string · nullable Company registration number / org.nr, e.g. 5560001234 .
phone string · nullable Primary phone number.
postalCode string · nullable Postal / ZIP code.
street1 string · nullable Street address line 1.
street2 string · nullable Street address line 2 — suite, c/o, etc.
vatNumber string · nullable VAT registration number, e.g. SE556000123401 .

Responses

201 PublicCustomerResponse
  • Location — URL of the newly created resource.
Field Type Description
city string · nullable City name. Null if not set.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE , DE , NO . Null if not set.
createdDate string(date-time) UTC timestamp when the customer record was created.
customerGroupCode string · nullable Code of the customer group this customer belongs to. Null if not set.
customerGroupName string · nullable Name of the customer group this customer belongs to. Null if not set.
customerNumber string · nullable Unique customer number — business key used in all URL references.
defaultCurrencyCode string · nullable ISO 4217 currency code of the customer's default currency, e.g. SEK , EUR . Null if not set.
deliveryTermCode string · nullable Code of the customer's default delivery term — usable as deliveryTermCode in order creation. Null if not set.
deliveryTermName string · nullable Name of the customer's default delivery term. Null if not set.
id string(uuid) Internal unique identifier (UUID v7).
invoiceEmail string · nullable Primary email address for invoices and order confirmations. Null if not set.
isActive boolean Whether the customer is active. Inactive customers cannot be used on new orders.
links Links Hypermedia links for a public API resource. Exposed as a computed links property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
modifiedDate string(date-time) · nullable UTC timestamp of the last modification. Null if never modified after creation.
name string · nullable Full company or person name.
notes string · nullable Free-text internal notes (not visible to the customer). Null if not set.
organizationNumber string · nullable Company registration number / org.nr, e.g. 5560001234 . Null if not set.
paymentTermCode string · nullable Code of the customer's default payment term — usable as paymentTermCode in order creation. Null if not set.
paymentTermName string · nullable Name of the customer's default payment term. Null if not set.
phone string · nullable Primary phone number. Null if not set.
postalCode string · nullable Postal / ZIP code. Null if not set.
street1 string · nullable Street address line 1. Null if not set.
street2 string · nullable Street address line 2 (suite, c/o, etc.). Null if not set.
vatNumber string · nullable VAT registration number, e.g. SE556000123401 . Null if not set.
400 ProblemDetails A field failed validation, for example an invalid email address or a field over its maximum length.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/customers" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Create customer
{
  "city": "Stockholm",
  "countryCode": "SE",
  "customerNumber": "CUST-001",
  "invoiceEmail": "invoice@acme.se",
  "name": "Acme AB",
  "organizationNumber": "5560001234",
  "phone": "+46701234567",
  "postalCode": "11122",
  "street1": "Storgatan 1"
}
Response 201
{
  "city": "Stockholm",
  "countryCode": "SE",
  "createdDate": "2026-06-11T09:24:13.418",
  "customerGroupCode": "STD",
  "customerGroupName": "Retail",
  "customerNumber": "CUST-001",
  "defaultCurrencyCode": "SEK",
  "deliveryTermCode": "STD",
  "deliveryTermName": "DAP Stockholm",
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "invoiceEmail": "order@acme.se",
  "isActive": true,
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "name": "Acme AB",
  "notes": "string",
  "organizationNumber": "ABC-001",
  "paymentTermCode": "STD",
  "paymentTermName": "30 days net",
  "phone": "+46 8 123 45 67",
  "postalCode": "11122",
  "street1": "Storgatan 1",
  "street2": "string",
  "vatNumber": "ABC-001"
}

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

GET /customers/{customerNumber}

Get a customer by customer number

Returns the details of a customer belonging to the authenticated tenant. Responses carry a weak ETag; pass it back in If-None-Match to get 304 Not Modified while the record is unchanged. The validator follows the whole record, so a change to a nested part invalidates it too.

customers:read Supports ETag

Path parameters

Field Type Description
customerNumber Required string Customer number of the customer to read.

Responses

200 PublicCustomerResponse
  • ETag — Weak validator for this representation. Pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.
Field Type Description
city string · nullable City name. Null if not set.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE , DE , NO . Null if not set.
createdDate string(date-time) UTC timestamp when the customer record was created.
customerGroupCode string · nullable Code of the customer group this customer belongs to. Null if not set.
customerGroupName string · nullable Name of the customer group this customer belongs to. Null if not set.
customerNumber string · nullable Unique customer number — business key used in all URL references.
defaultCurrencyCode string · nullable ISO 4217 currency code of the customer's default currency, e.g. SEK , EUR . Null if not set.
deliveryTermCode string · nullable Code of the customer's default delivery term — usable as deliveryTermCode in order creation. Null if not set.
deliveryTermName string · nullable Name of the customer's default delivery term. Null if not set.
id string(uuid) Internal unique identifier (UUID v7).
invoiceEmail string · nullable Primary email address for invoices and order confirmations. Null if not set.
isActive boolean Whether the customer is active. Inactive customers cannot be used on new orders.
links Links Hypermedia links for a public API resource. Exposed as a computed links property on the public response DTOs so that create and read responses carry the same self-reference — the canonical URL is derived from the business key already present on the DTO and can never drift from the route it points at.
modifiedDate string(date-time) · nullable UTC timestamp of the last modification. Null if never modified after creation.
name string · nullable Full company or person name.
notes string · nullable Free-text internal notes (not visible to the customer). Null if not set.
organizationNumber string · nullable Company registration number / org.nr, e.g. 5560001234 . Null if not set.
paymentTermCode string · nullable Code of the customer's default payment term — usable as paymentTermCode in order creation. Null if not set.
paymentTermName string · nullable Name of the customer's default payment term. Null if not set.
phone string · nullable Primary phone number. Null if not set.
postalCode string · nullable Postal / ZIP code. Null if not set.
street1 string · nullable Street address line 1. Null if not set.
street2 string · nullable Street address line 2 (suite, c/o, etc.). Null if not set.
vatNumber string · nullable VAT registration number, e.g. SE556000123401 . Null if not set.
304 Empty body.
  • ETag — Weak validator for this representation. Pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.
404 ProblemDetails No customer with that customer number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/customers/{customerNumber}" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "city": "Stockholm",
  "countryCode": "SE",
  "createdDate": "2026-06-11T09:24:13.418",
  "customerGroupCode": "STD",
  "customerGroupName": "Retail",
  "customerNumber": "CUST-001",
  "defaultCurrencyCode": "SEK",
  "deliveryTermCode": "STD",
  "deliveryTermName": "DAP Stockholm",
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "invoiceEmail": "order@acme.se",
  "isActive": true,
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "name": "Acme AB",
  "notes": "string",
  "organizationNumber": "ABC-001",
  "paymentTermCode": "STD",
  "paymentTermName": "30 days net",
  "phone": "+46 8 123 45 67",
  "postalCode": "11122",
  "street1": "Storgatan 1",
  "street2": "string",
  "vatNumber": "ABC-001"
}

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

PATCH /customers/{customerNumber}

Update a customer

Partially updates a customer. Only provided fields are updated (JSON Merge Patch semantics). Omitted fields are left unchanged. Pass null to clear a nullable field.

Show the full description

Unknown fields are rejected with 400, naming the field and listing the ones this endpoint accepts. paymentTermCode and deliveryTermCode are looked up and must already exist — they are never created. Decimals are sent as strings ("50000"); numbers are accepted too.

customers:write

Path parameters

Field Type Description
customerNumber Required string Customer number of the customer to update.

Body required

Field Type Description
city string · nullable City name. Pass null to clear.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE , DE . Pass null to clear.
creditLimit decimal · nullable Credit limit in the tenant's base currency, 0 or more. Pass null for no limit.
defaultCurrencyCode string · nullable ISO 4217 currency code, e.g. SEK , EUR . Pass null to clear.
deliveryTermCode string · nullable Code of the customer's default delivery term. The term must exist; it is never created. Pass null to clear.
invoiceEmail string(email) · nullable Email address for invoices and order confirmations. Pass null to clear.
isActive boolean · nullable Whether the customer is active. Inactive customers cannot be placed on new orders.
languageCode string · nullable ISO 639-1 language code for the customer's documents, e.g. sv or en . Pass null to clear.
name string · nullable Full company or person name.
notes string · nullable Free-text internal notes. Pass null to clear.
organizationNumber string · nullable Company registration number / org.nr. Pass null to clear.
paymentTermCode string · nullable Code of the customer's default payment term. The term must exist (GET /preview/reference/payment-terms); it is never created. Pass null to clear.
phone string · nullable Primary phone number. Pass null to clear.
postalCode string · nullable Postal / ZIP code. Pass null to clear.
street1 string · nullable Street address line 1. Pass null to clear.
street2 string · nullable Street address line 2 — suite, c/o, etc. Pass null to clear.
vatNumber string · nullable VAT registration number. Pass null to clear.

Responses

204 Empty body.
400 ProblemDetails The body is not a JSON object, contains a field this endpoint does not have, a field present in it failed validation, or paymentTermCode or deliveryTermCode names a term that does not exist.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No customer with that customer number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X PATCH "https://api.fluit.cloud/preview/customers/{customerNumber}" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Content-Type: application/json" \
  -d @body.json
Response 400
{
  "detail": "string",
  "instance": "string",
  "status": 42,
  "title": "string",
  "type": "string"
}

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

GET /customers/{customerNumber}/addresses

List customer delivery addresses

Returns a paginated list of the delivery addresses registered on the customer, default address first. Use the fields to populate deliveryAddress when creating orders.

customers:read Paginated

Path parameters

Field Type Description
customerNumber Required string Customer number of the customer whose addresses to list.

Query parameters

Field Type Description
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Responses

200 PagedResult_PublicCustomerAddressResponse

Paginated response: the fields below sit in items[], wrapped in totalCount, page, pageSize, totalPages, hasPreviousPage and hasNextPage. Paginated

Field Type Description
city string · nullable City name.
contactPerson string · nullable Contact person at the delivery address. Null if not set.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE .
email string · nullable Email address at the delivery address. Null if not set.
id string(uuid) Internal unique identifier of the address.
isDefault boolean Whether this is the customer's default delivery address.
name string · nullable Recipient company or person name.
phone string · nullable Phone number at the delivery address. Null if not set.
postalCode string · nullable Postal / ZIP code.
street1 string · nullable Street address line 1.
street2 string · nullable Street address line 2 (c/o, suite, etc.). Null if not set.
404 ProblemDetails No customer with that customer number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/customers/{customerNumber}/addresses" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "aggregates": [
    {
      "currencyCode": "SEK",
      "key": "string",
      "mixedCurrencies": true,
      "value": "299.00"
    }
  ],
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "city": "Stockholm",
      "contactPerson": "string",
      "countryCode": "SE",
      "email": "order@acme.se",
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "isDefault": true,
      "name": "Acme AB",
      "phone": "+46 8 123 45 67",
      "postalCode": "11122",
      "street1": "Storgatan 1",
      "street2": "string"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

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

POST /customers/{customerNumber}/addresses/batch

Add or update many of a customer's delivery addresses in one call

Adds and updates up to 500 delivery addresses of one customer per call — the list GET /preview/customers/{customerNumber}/addresses returns. An address has no code in Fluit, so each row is matched within the customer on name , street1 and postalCode together (case, surrounding spaces and spaces inside the postal code ignored).

Show the full description

An existing address with that key gets the fields the row carries; otherwise a new address is added, which needs city and countryCode too. A re-sent batch therefore updates instead of adding duplicates. A field that is omitted or null is left as it is — this endpoint never clears a field. isDefault: true makes the address the customer's default delivery address. The HTTP status describes the request, not the rows: a well-formed batch always answers 200, and every row carries its own outcome ( created , updated or failed ) plus an error when it failed. Row error codes include BulkUpsert.RequiredForNew (a new address without city or countryCode), BulkUpsert.Ambiguous (the customer already has two addresses with that key), BulkUpsert.DuplicateInBatch and the address's own validation errors. mode is upsert (default), create or update . An Idempotency-Key is required like on every POST under /preview.

Path parameters

Field Type Description
customerNumber Required string Customer number of the customer whose addresses to load.

Body required

Field Type Description
addresses Required BatchUpsertCustomerAddressesRow[] The addresses to add or update. At most 500 per call.
mode enum upsert (default) adds missing addresses and updates existing ones, create fails a row whose address already exists, update fails a row whose address does not. Upsert Create Update

Responses

200 BatchUpsertCustomerAddressesResponse
Field Type
createdCount integer
failedCount integer
results BatchUpsertCustomerAddressesRowResult[] · nullable
updatedCount integer
400 ProblemDetails The batch is empty (BulkUpsert.Empty) or has more than 500 rows (BulkUpsert.TooManyRows), a row lacks name, street1 or postalCode, or mode is unknown.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No customer with that customer number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/customers/{customerNumber}/addresses/batch" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
A default address and a site
{
  "addresses": [
    {
      "city": "Solna",
      "countryCode": "SE",
      "isDefault": true,
      "name": "Kund AB",
      "postalCode": "123 45",
      "street1": "Industrivägen 4"
    },
    {
      "city": "Göteborg",
      "contactPerson": "Lars Ek",
      "countryCode": "SE",
      "defaultGoodsMark": "Port 3",
      "gln": "7350000000001",
      "name": "Kund AB Lager Göteborg",
      "postalCode": "41120",
      "street1": "Hamngatan 1"
    }
  ]
}
Response 200
{
  "createdCount": 42,
  "failedCount": 42,
  "results": [
    {
      "error": {
        "code": "string",
        "detail": "string"
      },
      "index": 42,
      "name": "Acme AB",
      "outcome": "string"
    }
  ],
  "updatedCount": 42
}

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

GET /customers/{customerNumber}/contacts

List customer contacts

Returns a paginated list of the contact persons registered on the customer, default contact first. Use a contact's id as customerContactId when creating orders.

customers:read Paginated

Path parameters

Field Type Description
customerNumber Required string Customer number of the customer whose contacts to list.

Query parameters

Field Type Description
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Responses

200 PagedResult_PublicCustomerContactResponse

Paginated response: the fields below sit in items[], wrapped in totalCount, page, pageSize, totalPages, hasPreviousPage and hasNextPage. Paginated

Field Type Description
email string · nullable Email address. Null if not set.
id string(uuid) Internal unique identifier — usable as customerContactId in order creation.
isDefault boolean Whether this is the customer's default contact.
mobile string · nullable Mobile phone number. Null if not set.
name string · nullable Full name of the contact person.
phone string · nullable Phone number. Null if not set.
title string · nullable Job title, e.g. Purchasing Manager . Null if not set.
404 ProblemDetails No customer with that customer number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl "https://api.fluit.cloud/preview/customers/{customerNumber}/contacts" \
  -H "X-Api-Key: fluit_live_sk_..."
Response 200
{
  "aggregates": [
    {
      "currencyCode": "SEK",
      "key": "string",
      "mixedCurrencies": true,
      "value": "299.00"
    }
  ],
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "email": "order@acme.se",
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "isDefault": true,
      "mobile": "string",
      "name": "Anna Svensson",
      "phone": "+46 8 123 45 67",
      "title": "string"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

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

POST /customers/{customerNumber}/contacts/batch

Add or update many of a customer's contacts in one call

Adds and updates up to 500 contact persons of one customer per call — the list GET /preview/customers/{customerNumber}/contacts returns.

Show the full description

A contact has no code in Fluit, so each row is matched on name within the customer (case and surrounding spaces ignored): an existing contact with that name gets the fields the row carries, otherwise a new contact is added. A re-sent batch therefore updates instead of adding duplicates. A field that is omitted or null is left as it is — this endpoint never clears a field. isDefault: true makes the contact the customer's default. The HTTP status describes the request, not the rows: a well-formed batch always answers 200, and every row carries its own outcome ( created , updated or failed ) plus an error when it failed. Row error codes include BulkUpsert.Ambiguous (the customer already has two contacts with that name), BulkUpsert.DuplicateInBatch (the same name twice in the batch) and the contact's own validation errors. mode is upsert (default), create or update . An Idempotency-Key is required like on every POST under /preview.

Path parameters

Field Type Description
customerNumber Required string Customer number of the customer whose contacts to load.

Body required

Field Type Description
contacts Required BatchUpsertCustomerContactsRow[] The contacts to add or update. At most 500 per call.
mode enum upsert (default) adds missing contacts and updates existing ones, create fails a row whose contact already exists, update fails a row whose contact does not. Upsert Create Update

Responses

200 BatchUpsertCustomerContactsResponse
Field Type
createdCount integer
failedCount integer
results BatchUpsertCustomerContactsRowResult[] · nullable
updatedCount integer
400 ProblemDetails The batch is empty (BulkUpsert.Empty) or has more than 500 rows (BulkUpsert.TooManyRows), a row lacks name, a field is too long, or mode is unknown.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No customer with that customer number.
Field Type
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standard errors: 401 403 Errors

Examples

curl
curl -X POST "https://api.fluit.cloud/preview/customers/{customerNumber}/contacts/batch" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Two contacts
{
  "contacts": [
    {
      "email": "anna.berg@example.com",
      "isDefault": true,
      "name": "Anna Berg",
      "title": "Inköpare"
    },
    {
      "name": "Erik Lind",
      "phone": "+46 8 123 45 67"
    }
  ]
}
Response 200
{
  "createdCount": 42,
  "failedCount": 42,
  "results": [
    {
      "error": {
        "code": "string",
        "detail": "string"
      },
      "index": 42,
      "name": "Anna Svensson",
      "outcome": "string"
    }
  ],
  "updatedCount": 42
}

Base URL https://api.fluit.cloud/preview. 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.

BatchUpsertCustomerAddressesRow

BatchUpsertCustomerAddressesRow
Field Type Description
city string · nullable City. Required for a new address.
contactPerson string · nullable Who receives deliveries at the address.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE . Required for a new address.
defaultGoodsMark string · nullable Goods mark printed on deliveries to the address.
email string · nullable Email for delivery notices.
gln string · nullable GLN (Global Location Number) of the address.
isDefault boolean · nullable true makes this the customer's default delivery address.
name Required string Name on the address, e.g. the receiving company or site. Part of the match key.
notes string · nullable Internal note.
phone string · nullable Phone number for the carrier.
postalCode Required string Postal code. Part of the match key (spaces ignored).
street1 Required string Street address line 1. Part of the match key.
street2 string · nullable Street address line 2 — c/o, building, gate.

BatchUpsertCustomerAddressesRowError

BatchUpsertCustomerAddressesRowError
Field Type
code string · nullable
detail string · nullable

BatchUpsertCustomerAddressesRowResult

BatchUpsertCustomerAddressesRowResult
Field Type Description
error BatchUpsertCustomerAddressesRowError
index integer Zero-based position of the row in the request.
name string · nullable The row's name, as sent.
outcome string · nullable created , updated or failed .

BatchUpsertCustomerContactsRow

BatchUpsertCustomerContactsRow
Field Type Description
email string · nullable Email address.
isDefault boolean · nullable true makes this the customer's default contact.
mobile string · nullable Mobile number.
name Required string Full name. Identifies the contact within the customer: an existing contact with the same name (case and surrounding spaces ignored) is updated, otherwise a new one is added.
notes string · nullable Internal note.
phone string · nullable Phone number.
title string · nullable Job title.

BatchUpsertCustomerContactsRowError

BatchUpsertCustomerContactsRowError
Field Type
code string · nullable
detail string · nullable

BatchUpsertCustomerContactsRowResult

BatchUpsertCustomerContactsRowResult
Field Type Description
error BatchUpsertCustomerContactsRowError
index integer Zero-based position of the row in the request.
name string · nullable The row's name, as sent.
outcome string · nullable created , updated or failed .

BatchUpsertCustomerItemsRow

BatchUpsertCustomerItemsRow
Field Type Description
conversionFactor decimal · nullable Our base units per customer unit, greater than 0.
customerDescription string · nullable The customer's own description of the item.
customerItemNo string · nullable The customer's own number for the item. Required when the row creates a new customer item.
customerNumber Required string The customer. Must exist. One batch may span several customers.
customerUnit string · nullable The unit the customer orders in, when it differs from ours.
isActive boolean · nullable false deactivates the customer item.
itemNumber Required string Our item number. With customerNumber it identifies the row. Must exist.

BatchUpsertCustomerItemsRowError

BatchUpsertCustomerItemsRowError
Field Type
code string · nullable
detail string · nullable

BatchUpsertCustomerItemsRowResult

BatchUpsertCustomerItemsRowResult
Field Type Description
customerNumber string · nullable The row's customer number, as sent.
error BatchUpsertCustomerItemsRowError
index integer Zero-based position of the row in the request.
itemNumber string · nullable The row's item number, as sent.
outcome string · nullable created , updated or failed .