Skip to main content
Use company operations to synchronize approved profile fields while Floral preserves a stable company ID. Creating with a Danish CVR can resolve the canonical company already present in the workspace.

Prerequisites

You need contacts:read to list or retrieve companies and contacts:write to create or change them. Metadata, custom fields, archive, and restore also require Work access. Discover available company fields with the custom-field-definition endpoint before writing customFields. Set these values once in your shell before running the examples:
Use a personal access token created for this workspace. The examples use synthetic IDs and values; replace them with values returned by your workspace.
Keep FLORAL_TOKEN in a secret manager outside local development. Never commit it to source control or include it in logs.

List companies

Company collections use cursor pagination. They default to active companies ordered by most recently updated.
Pass a non-null nextCursor back as cursor to fetch the next page. Do not inspect or construct cursor values.

Create or resolve a company

Create a company with a unique idempotency key. When you include organizationNumber, Floral can return the canonical workspace company for that CVR instead of adding a duplicate.
A successful request returns 201, a Location header, an ETag, and the complete company response. Save the company id and ETag.

Apply a partial update

Fetch the company detail and copy its response ETag before changing it:
Send only fields you intend to change. Omitted fields remain unchanged. An explicit null clears a nullable profile field or one custom-field value.
The response includes a new ETag. Replace your saved value before another update.

Archive and restore

Archive is a reversible state change. It requires both the latest ETag and a unique idempotency key.
Save the archive response’s ETag. To restore the same stable company ID, send that value with a new key:
Floral protects writes with two opaque values:
  • Send a unique Idempotency-Key when an operation requires one. Retrying the identical request with the same key replays its result for 24 hours. Within that operation, reusing the key with different canonical input returns 409 IDEMPOTENCY_CONFLICT.
  • Send the latest strong ETag as If-Match when an operation changes an existing resource. A stale value returns 412 VERSION_CONFLICT; a missing value returns 428 PRECONDITION_REQUIRED.
Keep the quote characters around an ETag, and replace your saved value after every successful write. See Reliability and retries for the complete retry rules.