Skip to navigation

Create a contact

View as Markdown

Creates a new contact. Send the contact’s legal identity directly — legal_name plus an address (and optional tax/VAT ids) — and the API resolves or creates the underlying legal entity for you.

Authentication

AuthorizationBearer

JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.

OR
AuthorizationBearer

Lucanto API key. Two prefixes:

  • lct_pat_<random><checksum> — personal access token (owner: User)
  • lct_live_<random><checksum> — workspace token, live data

Issue keys at /settings/api_keys (personal) or /:workspace_id/settings/api_keys (workspace). Plaintext token is shown once and never again.

Path parameters

workspace_idlongRequired>=1
Workspace ID. The numeric ID shown in your URLs.

Headers

Idempotency-KeystringOptional<=255 characters

Client-supplied unique key (recommended: UUID v4) for safe retries. Within 24 hours, repeating the same key with the same request (method, path, query, body) replays the original response instead of re-executing the action — once the action has run, a 5xx included; a request stopped before it ran is not stored. Reusing a key with a different request returns 422 idempotency_key_conflict (IETF draft §2.7).

Request

This endpoint expects an object.
legal_namestringRequired

The contact’s registered legal name (required).

addressobjectRequired

The contact’s main/billing address (required).

legal_registration_idstringOptional

Company registration ID (IČO).

tax_idstringOptional

Tax ID (DIČ).

vat_idstringOptional

VAT ID (IČ DPH), country-prefixed (e.g. SK2020123456).

vat_payer_typeenumOptional

VAT status. Omit for a non-VAT individual. If you send a VAT or registration ID without this, the contact is treated as a standard VAT payer.

Allowed values:
emailstringOptionalformat: "email"
phone_numberstringOptional
websitestringOptional
postal_addressobjectOptional
Optional separate correspondence address.

Response

Created
idlong

Contact ID (workspace-scoped). Not the legal-entity ID.

public_idstringRead-onlyformat: "^[a-z]+_[0-7][0-9a-hjkmnp-tv-z]{25}$"

Stable public identifier of this record. Never changes once assigned. Its prefix names the entity: doc_ document (invoice, proforma, credit note, quote, sales order), exp_ expense, cnt_ contact, prj_ project, ba_ bank account or cash register, txn_ transaction, lon_ loan, bst_ bank statement. Accepted in place of the numeric id in this resource’s path parameters and in request fields that reference it (customer_id, bank_account_id, …).

created_atdatetime
updated_atdatetime
legal_registration_idstring or nullOptional

Legal/company registration identifier (SK/CZ IČO). _id denotes identifier, not a foreign key; the value is an opaque string and may be alphanumeric outside SK/CZ (e.g. UK SC123456).

tax_idstring or nullOptional

Tax registration identifier (SK/CZ DIČ). An identifier string, not a number.

vat_idstring or nullOptional

VAT identifier (SK/CZ IČ DPH). Alphanumeric with a country prefix (e.g. SK2020123456, ATU12345678) — an identifier, not a number.

vat_payer_typeenum or nullOptional

VAT registration status (standard | non_payer_vat | foreign); nullable.

Allowed values:
emailstring or nullOptionalformat: "email"
phone_numberstring or nullOptional
websitestring or nullOptional
addressobject or nullOptional
postal_addressobject or nullOptional
legal_namestring or nullOptional

The contact’s registered legal name, including legal form (e.g. “ACME s.r.o.”). This is the contact’s name.

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error