Hoppa till innehållet

Leverantörer

Suppliers with their contact persons and supplier-specific prices, minimum order quantities and lead times. Addressed by supplierNumber.

9 anrop GET POST PATCH Bas-URL https://api.fluit.cloud/preview

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

GET /suppliers

List suppliers

Returns a paginated list of suppliers for the authenticated tenant. ?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.

Visa hela beskrivningen

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. Sorted by supplierNumber ascending.

Frågeparametrar

Fält Typ Beskrivning
search string Matches supplier number, name, organisation number and city, case-insensitively and on partial words.
isActive boolean Filters on whether the supplier is active.
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.

Svar

200 PagedResult_PublicSupplierResponse

Paginerat svar: raderna nedan ligger i items[], omgivna av totalCount, page, pageSize, totalPages, hasPreviousPage och hasNextPage. Paginerad

Fält Typ Beskrivning
city string · nullable City name. Null if not set.
contactPerson string · nullable Primary contact person at the supplier. Null if not set.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE , DE . Null if not set.
createdDate string(date-time) UTC timestamp when the supplier record was created.
currencyCode string · nullable ISO 4217 currency code purchase orders to this supplier are placed in.
deliveryTermCode string · nullable Code of the supplier's default delivery term / Incoterm. Null if not set.
deliveryTermName string · nullable Display name of the delivery term. Null if not set.
id string(uuid) Internal unique identifier (UUID v7).
isActive boolean Whether the supplier is active. Inactive suppliers cannot be used on new purchase orders.
isVatNumberValidated boolean True when the VAT number has been confirmed against the EU VIES register.
languageCode string · nullable ISO 639-1 language code used for purchase order documents, e.g. sv , en . Null if not set.
leadTimeDays integer · nullable Default lead time in calendar days from order to delivery. Null if not set.
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 name.
notes string · nullable Free-text internal notes (not visible to the supplier). Null if not set.
organizationNumber string · nullable Company registration number / org.nr. Null if not set.
ourCustomerNumber string · nullable Our customer number at the supplier — quoted on purchase orders. Null if not set.
paymentTermCode string · nullable Code of the supplier's default payment term — usable as paymentTermCode . Null if not set.
paymentTermName string · nullable Display name of the 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.
purchaseOrderEmail string · nullable Email address purchase orders are sent to. 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.
supplierNumber string · nullable Unique supplier number — business key used in all URL references.
vatNumber string · nullable EU VAT registration number, e.g. SE556012345601 . Null if not set.
website string · nullable Supplier website URL. Null if not set.

Standardfel: 401 403 Felhantering

Exempel

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

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

POST /suppliers

Create a supplier

Creates a new supplier for the authenticated tenant.

Visa hela beskrivningen

Only name is required. supplierNumber: if omitted a number is auto-generated from the tenant number sequence. currencyCode defaults to the tenant base currency and determines the currency of purchase orders and supplier prices. paymentTermCode and deliveryTermCode must match existing reference data (400 if unknown) and become the defaults on purchase orders to this supplier. The response body is the same representation as GET /preview/suppliers/{supplierNumber}; the canonical URL is returned in the Location header and in links.self.

Body krävs

Fält Typ Beskrivning
city string · nullable City name.
contactPerson string · nullable Primary contact person at the supplier.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE , DE .
currencyCode string · nullable ISO 4217 currency code purchase orders are placed in, e.g. SEK , EUR . Defaults to the tenant base currency.
deliveryTermCode string · nullable Delivery term / Incoterm code — see GET /preview/reference/delivery-terms.
leadTimeDays integer · nullable Default lead time in calendar days from order to delivery.
name Krävs string Full company name.
notes string · nullable Free-text internal notes (not visible to the supplier).
organizationNumber string · nullable Company registration number / org.nr.
paymentTermCode string · nullable Payment term code — see GET /preview/reference/payment-terms.
phone string · nullable Primary phone number.
postalCode string · nullable Postal / ZIP code.
purchaseOrderEmail string(email) · nullable Email address purchase orders are sent to.
street1 string · nullable Street address line 1.
street2 string · nullable Street address line 2 — c/o, suite, etc.
supplierNumber string · nullable Custom supplier number. Auto-generated from the tenant number sequence if omitted.
vatNumber string · nullable EU VAT registration number, e.g. SE556012345601 . Validated against the EU VIES register in the background.

Svar

201 PublicSupplierResponse
  • Location — URL of the newly created resource.
Fält Typ Beskrivning
city string · nullable City name. Null if not set.
contactPerson string · nullable Primary contact person at the supplier. Null if not set.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE , DE . Null if not set.
createdDate string(date-time) UTC timestamp when the supplier record was created.
currencyCode string · nullable ISO 4217 currency code purchase orders to this supplier are placed in.
deliveryTermCode string · nullable Code of the supplier's default delivery term / Incoterm. Null if not set.
deliveryTermName string · nullable Display name of the delivery term. Null if not set.
id string(uuid) Internal unique identifier (UUID v7).
isActive boolean Whether the supplier is active. Inactive suppliers cannot be used on new purchase orders.
isVatNumberValidated boolean True when the VAT number has been confirmed against the EU VIES register.
languageCode string · nullable ISO 639-1 language code used for purchase order documents, e.g. sv , en . Null if not set.
leadTimeDays integer · nullable Default lead time in calendar days from order to delivery. Null if not set.
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 name.
notes string · nullable Free-text internal notes (not visible to the supplier). Null if not set.
organizationNumber string · nullable Company registration number / org.nr. Null if not set.
ourCustomerNumber string · nullable Our customer number at the supplier — quoted on purchase orders. Null if not set.
paymentTermCode string · nullable Code of the supplier's default payment term — usable as paymentTermCode . Null if not set.
paymentTermName string · nullable Display name of the 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.
purchaseOrderEmail string · nullable Email address purchase orders are sent to. 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.
supplierNumber string · nullable Unique supplier number — business key used in all URL references.
vatNumber string · nullable EU VAT registration number, e.g. SE556012345601 . Null if not set.
website string · nullable Supplier website URL. Null if not set.
400 ProblemDetails A field failed validation, or the payment term or delivery term code does not exist.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
409 ProblemDetails The supplier number is already in use.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl -X POST "https://api.fluit.cloud/preview/suppliers" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Full supplier
{
  "city": "Göteborg",
  "countryCode": "SE",
  "currencyCode": "SEK",
  "deliveryTermCode": "DAP",
  "leadTimeDays": 14,
  "name": "Nordic Components AB",
  "organizationNumber": "5560001234",
  "paymentTermCode": "NET30",
  "phone": "+46812345678",
  "postalCode": "41250",
  "purchaseOrderEmail": "order@nordic-components.se",
  "street1": "Industrigatan 5",
  "supplierNumber": "SUP-001"
}
Minimal — name only
{
  "name": "Nordic Components AB"
}
Svar 201
{
  "city": "Stockholm",
  "contactPerson": "string",
  "countryCode": "SE",
  "createdDate": "2026-06-11T09:24:13.418",
  "currencyCode": "SEK",
  "deliveryTermCode": "STD",
  "deliveryTermName": "DAP Stockholm",
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "isActive": true,
  "isVatNumberValidated": true,
  "languageCode": "STD",
  "leadTimeDays": 42,
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "name": "Nordic Components AB",
  "notes": "string",
  "organizationNumber": "ABC-001",
  "ourCustomerNumber": "ABC-001",
  "paymentTermCode": "STD",
  "paymentTermName": "30 days net",
  "phone": "+46 8 123 45 67",
  "postalCode": "11122",
  "purchaseOrderEmail": "order@acme.se",
  "street1": "Storgatan 1",
  "street2": "string",
  "supplierNumber": "SUP-001",
  "vatNumber": "ABC-001",
  "website": "string"
}

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

GET /suppliers/{supplierNumber}

Get a supplier

Returns a single supplier identified by its supplier number (exact match, case-sensitive). Returns 404 Supplier.NotFound if no supplier has that number. paymentTermCode and deliveryTermCode can be passed straight back when creating a purchase order.

Visa hela beskrivningen

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.

suppliers:read Stödjer ETag

Sökvägsparametrar

Fält Typ Beskrivning
supplierNumber Krävs string Supplier number of the supplier to read.

Svar

200 PublicSupplierResponse
  • ETag — Weak validator for this representation. Pass it back in If-None-Match to get 304 Not Modified while the record is unchanged.
Fält Typ Beskrivning
city string · nullable City name. Null if not set.
contactPerson string · nullable Primary contact person at the supplier. Null if not set.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE , DE . Null if not set.
createdDate string(date-time) UTC timestamp when the supplier record was created.
currencyCode string · nullable ISO 4217 currency code purchase orders to this supplier are placed in.
deliveryTermCode string · nullable Code of the supplier's default delivery term / Incoterm. Null if not set.
deliveryTermName string · nullable Display name of the delivery term. Null if not set.
id string(uuid) Internal unique identifier (UUID v7).
isActive boolean Whether the supplier is active. Inactive suppliers cannot be used on new purchase orders.
isVatNumberValidated boolean True when the VAT number has been confirmed against the EU VIES register.
languageCode string · nullable ISO 639-1 language code used for purchase order documents, e.g. sv , en . Null if not set.
leadTimeDays integer · nullable Default lead time in calendar days from order to delivery. Null if not set.
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 name.
notes string · nullable Free-text internal notes (not visible to the supplier). Null if not set.
organizationNumber string · nullable Company registration number / org.nr. Null if not set.
ourCustomerNumber string · nullable Our customer number at the supplier — quoted on purchase orders. Null if not set.
paymentTermCode string · nullable Code of the supplier's default payment term — usable as paymentTermCode . Null if not set.
paymentTermName string · nullable Display name of the 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.
purchaseOrderEmail string · nullable Email address purchase orders are sent to. 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.
supplierNumber string · nullable Unique supplier number — business key used in all URL references.
vatNumber string · nullable EU VAT registration number, e.g. SE556012345601 . Null if not set.
website string · nullable Supplier website URL. Null if not set.
304 Tom 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 supplier with that supplier number.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl "https://api.fluit.cloud/preview/suppliers/{supplierNumber}" \
  -H "X-Api-Key: fluit_live_sk_..."
Svar 200
{
  "city": "Stockholm",
  "contactPerson": "string",
  "countryCode": "SE",
  "createdDate": "2026-06-11T09:24:13.418",
  "currencyCode": "SEK",
  "deliveryTermCode": "STD",
  "deliveryTermName": "DAP Stockholm",
  "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
  "isActive": true,
  "isVatNumberValidated": true,
  "languageCode": "STD",
  "leadTimeDays": 42,
  "links": {
    "self": "string"
  },
  "modifiedDate": "2026-06-11T09:24:13.418",
  "name": "Nordic Components AB",
  "notes": "string",
  "organizationNumber": "ABC-001",
  "ourCustomerNumber": "ABC-001",
  "paymentTermCode": "STD",
  "paymentTermName": "30 days net",
  "phone": "+46 8 123 45 67",
  "postalCode": "11122",
  "purchaseOrderEmail": "order@acme.se",
  "street1": "Storgatan 1",
  "street2": "string",
  "supplierNumber": "SUP-001",
  "vatNumber": "ABC-001",
  "website": "string"
}

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

PATCH /suppliers/{supplierNumber}

Update a supplier

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

Visa hela beskrivningen

Unknown fields are rejected with 400, naming the field and listing the ones this endpoint accepts. supplierNumber cannot be changed — it is the resource's address. name and currencyCode cannot be set to null. paymentTermCode and deliveryTermCode are looked up and must already exist — they are never created.

suppliers:write

Sökvägsparametrar

Fält Typ Beskrivning
supplierNumber Krävs string Supplier number of the supplier to update.

Body krävs

Fält Typ Beskrivning
city string · nullable City name. Pass null to clear.
contactPerson string · nullable Primary contact person at the supplier. Pass null to clear.
countryCode string · nullable ISO 3166-1 alpha-2 country code, e.g. SE , DE . Pass null to clear.
currencyCode string · nullable ISO 4217 currency code, e.g. SEK , EUR . Cannot be null.
deliveryTermCode string · nullable Code of the supplier's delivery term. The term must exist; it is never created. Pass null to clear.
isActive boolean · nullable Whether the supplier is active. Inactive suppliers cannot be used on new purchase orders.
languageCode string · nullable ISO 639-1 language code for purchase order documents. Pass null to clear.
leadTimeDays integer · nullable Default lead time in calendar days. Pass null to clear.
name string · nullable Full company name.
notes string · nullable Free-text internal notes. Pass null to clear.
organizationNumber string · nullable Company registration number / org.nr. Pass null to clear.
ourCustomerNumber string · nullable Our customer number at the supplier. Pass null to clear.
paymentTermCode string · nullable Code of the supplier's 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.
purchaseOrderEmail string(email) · nullable Email address purchase orders are sent to. Pass null to clear.
street1 string · nullable Street address line 1. Pass null to clear.
street2 string · nullable Street address line 2 — c/o, suite, etc. Pass null to clear.
vatNumber string · nullable EU VAT registration number, e.g. SE556012345601 . Changing it re-runs the background VIES validation. Pass null to clear.
website string · nullable Supplier website URL. Pass null to clear.

Svar

204 Tom body.
400 ProblemDetails The body is not a JSON object, contains a field this endpoint does not have, a reference code does not exist, or name or currencyCode was sent as null.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No supplier with that supplier number.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

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

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

GET /suppliers/{supplierNumber}/contacts

List supplier contacts

Returns the contact persons registered on a supplier, default contact first, then by name.

suppliers:read Paginerad

Sökvägsparametrar

Fält Typ Beskrivning
supplierNumber Krävs string Supplier number of the supplier whose contacts to list.

Frågeparametrar

Fält Typ Beskrivning
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Svar

200 PagedResult_PublicSupplierContactResponse

Paginerat svar: raderna nedan ligger i items[], omgivna av totalCount, page, pageSize, totalPages, hasPreviousPage och hasNextPage. Paginerad

Fält Typ Beskrivning
department string · nullable Department. Null if not set.
email string · nullable Email address. Null if not set.
id string(uuid) Internal unique identifier (UUID v7).
isDefault boolean Whether this is the supplier's default contact.
languageCode string · nullable ISO 639-1 language code for communication with this contact. Null if not set.
mobile string · nullable Mobile phone number. Null if not set.
name string · nullable Contact person's full name.
phone string · nullable Phone number. Null if not set.
title string · nullable Job title. Null if not set.
404 ProblemDetails No supplier with that supplier number.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

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

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

POST /suppliers/{supplierNumber}/contacts/batch

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

Adds and updates up to 500 contact persons of one supplier per call — the list GET /preview/suppliers/{supplierNumber}/contacts returns.

Visa hela beskrivningen

A contact has no code in Fluit, so each row is matched on name within the supplier (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 supplier'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 supplier 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.

Sökvägsparametrar

Fält Typ Beskrivning
supplierNumber Krävs string Supplier number of the supplier whose contacts to load.

Body krävs

Fält Typ Beskrivning
contacts Krävs BatchUpsertSupplierContactsRow[] 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

Svar

200 BatchUpsertSupplierContactsResponse
Fält Typ
createdCount integer
failedCount integer
results BatchUpsertSupplierContactsRowResult[] · 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.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No supplier with that supplier number.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

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

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

GET /suppliers/{supplierNumber}/items

List supplier prices

Returns the supplier-specific purchase price, minimum order quantity, order multiple and lead time for each item this supplier can deliver. Prices are expressed in the supplier's currency (see currencyCode on the supplier). validFrom/validTo bound the price period; a row with both null is always valid. Sorted by itemNumber ascending.

suppliers:read Paginerad

Sökvägsparametrar

Fält Typ Beskrivning
supplierNumber Krävs string Supplier number of the supplier whose prices to list.

Frågeparametrar

Fält Typ Beskrivning
itemNumber string Looks up the price for one item, matched exactly.
isActive boolean Filters on whether the price row is still active, so retired rows can be excluded.
page integer Page to return, 1-based. Default 1.
pageSize integer Number of records per page. Default 50, max 200.

Svar

200 PagedResult_PublicSupplierItemResponse

Paginerat svar: raderna nedan ligger i items[], omgivna av totalCount, page, pageSize, totalPages, hasPreviousPage och hasNextPage. Paginerad

Fält Typ Beskrivning
conversionFactor decimal Factor converting the supplier's unit to ours. Serialised as a decimal string.
id string(uuid) Internal unique identifier (UUID v7).
isActive boolean Whether the price row is active.
isPrimary boolean Whether this supplier is the primary source for the item.
itemName string · nullable Display name of the item in Fluit.
itemNumber string · nullable Item number in Fluit — the business key used in item and order endpoints.
leadTimeDays integer · nullable Lead time in calendar days for this specific item. When null, MRP falls back to the item-warehouse leadTimeDays, while the expected delivery date on a purchase order falls back to the supplier's default leadTimeDays.
minOrderQuantity decimal · nullable Minimum order quantity. Null if the supplier has no minimum. Serialised as a decimal string.
orderMultiple decimal · nullable Order quantities must be a multiple of this value. Null if unrestricted. Serialised as a decimal string.
supplierDescription string · nullable The supplier's own description of the item. Null if not set.
supplierItemNumber string · nullable The supplier's own article number for this item. Null if not set.
supplierUnit string · nullable The supplier's unit of measure, if it differs from ours. Null if the same.
unitPrice decimal Purchase price per unit, in the supplier's currency. Serialised as a decimal string.
validFrom string(date) · nullable First date this price is valid. Null if valid from the beginning.
validTo string(date) · nullable Last date this price is valid. Null if it does not expire.
404 ProblemDetails No supplier with that supplier number.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl "https://api.fluit.cloud/preview/suppliers/{supplierNumber}/items" \
  -H "X-Api-Key: fluit_live_sk_..."
Svar 200
{
  "aggregates": [
    {
      "currencyCode": "SEK",
      "key": "string",
      "mixedCurrencies": true,
      "value": "299.00"
    }
  ],
  "hasNextPage": true,
  "hasPreviousPage": true,
  "items": [
    {
      "conversionFactor": "299.00",
      "id": "0f8b2c1e-4d3a-4b7e-9f10-2a6c5d8e1b44",
      "isActive": true,
      "isPrimary": true,
      "itemName": "Widget A",
      "itemNumber": "WIDGET-A",
      "leadTimeDays": 42,
      "minOrderQuantity": "10",
      "orderMultiple": "299.00",
      "supplierDescription": "string",
      "supplierItemNumber": "ABC-001",
      "supplierUnit": "string",
      "unitPrice": "299.00",
      "validFrom": "2026-06-11",
      "validTo": "2026-06-11"
    }
  ],
  "page": 1,
  "pageSize": 50,
  "totalCount": 137,
  "totalPages": 3
}

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

PATCH /suppliers/{supplierNumber}/items/{itemNumber}

Update a supplier's terms for an item

Updates the lead time, minimum order quantity and order multiple on the supplier's active price row for the item — the row GET /preview/suppliers/{supplierNumber}/items returns with isActive true.

Visa hela beskrivningen

Only provided fields are updated (JSON Merge Patch semantics). Omitted fields are left unchanged. Pass null to clear a field. Unknown fields are rejected with 400, naming the field and listing the ones this endpoint accepts. Decimals are sent as strings ("12.5"); numbers are accepted too. leadTimeDays is 0 to 365 days. MRP uses this lead time for the supplier it picks (an active purchase agreement's supplier, else the primary supplier) before the item-warehouse leadTimeDays; see GET /preview/item-warehouses for the full order. Purchase quantities are rounded up to minOrderQuantity and then to orderMultiple.

suppliers:write

Sökvägsparametrar

Fält Typ Beskrivning
supplierNumber Krävs string Supplier number of the supplier.
itemNumber Krävs string Item number of the item.

Body krävs

Fält Typ Beskrivning
leadTimeDays integer · nullable Lead time in calendar days for this item from this supplier. Pass null to clear.
minOrderQuantity decimal · nullable Minimum order quantity, greater than 0. Pass null for no minimum.
orderMultiple decimal · nullable Order quantities are rounded up to a multiple of this, greater than 0. Pass null for no restriction.

Svar

204 Tom body.
400 ProblemDetails The body is not a JSON object, contains a field this endpoint does not have, or a field failed validation: SupplierItem.LeadTimeDays.Invalid, SupplierItem.MinOrderQuantity.Invalid, SupplierItem.OrderMultiple.Invalid.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No supplier with that supplier number, no item with that item number, or the supplier has no active price row for the item.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

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

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

POST /suppliers/{supplierNumber}/items/batch

Create or update many supplier prices in one call

Creates and updates up to 500 of a supplier's item prices and purchasing terms per call — the supplier's price list, as GET /preview/suppliers/{supplierNumber}/items returns it.

Visa hela beskrivningen

The supplier and the items must exist. Each row is identified by itemNumber : a supplier has one active price per item. A price 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. A price that does not exist is created, and then unitPrice is required. Prices are in the supplier's currency. priceBreaks replaces the price's quantity breaks (an empty list removes them). isPrimary: true makes the supplier the item's primary supplier and clears the flag on the item's other suppliers. supplierUnit and conversionFactor set the unit the supplier sells in; a unit missing on the item is created. Rows go through the same rules as the MCP tool action_UpsertSupplierItems 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 SupplierItem.UnknownItem (no item with that number), SupplierItem.UnitPriceRequired (a new price without unitPrice ), SupplierItem.DuplicateInBatch (the same item twice in the batch), SupplierItem.InvalidDateRange, SupplierItems.Upsert.* value errors (for example SupplierItems.Upsert.UnitPriceNegative), and with mode set SupplierItem.AlreadyExists or SupplierItem.NoSuchPrice. mode is upsert (default), create or update . Decimals are JSON strings ("12.5"); numbers are accepted too. Dates are yyyy-MM-dd . An Idempotency-Key is required like on every POST under /preview; derive it from the run, the supplier and the batch index.

Sökvägsparametrar

Fält Typ Beskrivning
supplierNumber Krävs string Supplier number of the supplier whose prices to load.

Body krävs

Fält Typ Beskrivning
items Krävs BatchUpsertSupplierItemsRow[] The prices to create or update. At most 500 per call.
mode enum upsert (default) creates missing prices and updates existing ones, create fails a row whose price already exists, update fails a row whose price does not. Upsert Create Update

Svar

200 BatchUpsertSupplierItemsResponse
Fält Typ
createdCount integer
failedCount integer
results BatchUpsertSupplierItemsRowResult[] · nullable
updatedCount integer
400 ProblemDetails The batch is empty (BulkUpsert.Empty) or has more than 500 rows (BulkUpsert.TooManyRows), a row lacks itemNumber, or mode is unknown.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable
404 ProblemDetails No supplier with that supplier number.
Fält Typ
detail string · nullable
instance string · nullable
status integer · nullable
title string · nullable
type string · nullable

Standardfel: 401 403 Felhantering

Exempel

curl
curl -X POST "https://api.fluit.cloud/preview/suppliers/{supplierNumber}/items/batch" \
  -H "X-Api-Key: fluit_live_sk_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d @body.json
Two prices, upsert
{
  "items": [
    {
      "itemNumber": "670-00001",
      "supplierItemNumber": "K-2M",
      "unitPrice": "120.00"
    },
    {
      "itemNumber": "670-00002",
      "leadTimeDays": 10,
      "supplierItemNumber": "K-5M",
      "unitPrice": "155.00"
    }
  ]
}
Primary supplier, carton unit and quantity breaks
{
  "items": [
    {
      "conversionFactor": "12",
      "isPrimary": true,
      "itemNumber": "670-00001",
      "leadTimeDays": 14,
      "minOrderQuantity": "2",
      "orderMultiple": "1",
      "priceBreaks": [
        {
          "minQuantity": "10",
          "unitPrice": "1250.00"
        }
      ],
      "supplierUnit": "KRT",
      "unitPrice": "1320.00",
      "validFrom": "2026-01-01"
    }
  ]
}
New prices on existing rows
{
  "items": [
    {
      "itemNumber": "670-00001",
      "unitPrice": "125.00"
    },
    {
      "itemNumber": "670-00002",
      "unitPrice": "159.00"
    }
  ],
  "mode": "update"
}
Svar 200
{
  "createdCount": 42,
  "failedCount": 42,
  "results": [
    {
      "error": {
        "code": "string",
        "detail": "string"
      },
      "index": 42,
      "itemNumber": "WIDGET-A",
      "outcome": "string"
    }
  ],
  "updatedCount": 42
}

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

BatchUpsertSupplierContactsRow

BatchUpsertSupplierContactsRow
Fält Typ Beskrivning
department string · nullable Department.
email string · nullable Email address.
isDefault boolean · nullable true makes this the supplier's default contact.
languageCode string · nullable Language the contact is written to in, e.g. sv or en .
mobile string · nullable Mobile number.
name Krävs string Full name. Identifies the contact within the supplier: 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.

BatchUpsertSupplierContactsRowError

BatchUpsertSupplierContactsRowError
Fält Typ
code string · nullable
detail string · nullable

BatchUpsertSupplierContactsRowResult

BatchUpsertSupplierContactsRowResult
Fält Typ Beskrivning
error BatchUpsertSupplierContactsRowError
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 .

BatchUpsertSupplierItemsPriceBreak

BatchUpsertSupplierItemsPriceBreak
Fält Typ Beskrivning
minQuantity decimal Quantity the break applies from, in the supplier's unit. Greater than 0.
unitPrice decimal Price per supplier unit from that quantity, in the supplier's currency.

BatchUpsertSupplierItemsRow

BatchUpsertSupplierItemsRow
Fält Typ Beskrivning
conversionFactor decimal · nullable Base units per supplier unit, greater than 0 — e.g. 12 for a carton of 12. A new price defaults to 1.
isActive boolean · nullable false deactivates the price. A new price is active.
isPrimary boolean · nullable true makes this supplier the item's primary supplier and clears the flag on every other supplier for the item; false clears it on this row.
itemNumber Krävs string Our item number. With the supplier in the path it identifies the row. The item must exist.
leadTimeDays integer · nullable Lead time in calendar days for this item from this supplier, 0 or more.
minOrderQuantity decimal · nullable Smallest quantity the supplier accepts per order, in the supplier's unit. Greater than 0.
notes string · nullable Internal note.
orderMultiple decimal · nullable Order quantities must be a multiple of this, in the supplier's unit. Greater than 0.
priceBreaks BatchUpsertSupplierItemsPriceBreak[] · nullable Quantity price breaks. Given, they replace all breaks on the price; an empty list removes them; omitted or null keeps them.
supplierDescription string · nullable The supplier's description of the article.
supplierItemNumber string · nullable The supplier's own article number.
supplierUnit string · nullable Code of the unit the supplier sells in, e.g. KRT , when it is not the item's base unit. Matched to the item's units; a missing one is created on the item.
unitPrice decimal · nullable Price per supplier unit, in the supplier's currency. Required when the row creates a new price.
validFrom string(date) · nullable First day the price applies.
validTo string(date) · nullable Last day the price applies.

BatchUpsertSupplierItemsRowError

BatchUpsertSupplierItemsRowError
Fält Typ
code string · nullable
detail string · nullable

BatchUpsertSupplierItemsRowResult

BatchUpsertSupplierItemsRowResult
Fält Typ Beskrivning
error BatchUpsertSupplierItemsRowError
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 .