Skip to content

Onboard Client

A client is the business whose receivables you manage (you bill, factor, or collect on its behalf). Creating one provisions its default settings, products, and ledger accounts; the steps below customise what your integration needs.

  1. Create the client. Requires the CreateClients right.

    Terminal window
    curl -X POST "https://$HOST/clients" \
    -H "Authorization: Bearer $JWT" \
    -H "Content-Type: application/json" \
    -d '{
    "identificationNumber": "5566778899",
    "name": "Example Client AB",
    "locale": "SE",
    "contactInformation": { "name": "AR team", "email": "billing@example.com", "phone": "+46812345678" },
    "addressInformation": { "name": "Example Client AB", "address": "Storgatan 1", "zip": "11122", "city": "Stockholm", "countryCode": "SE" }
    }'

    Required fields are identificationNumber, name, and - when you send the nested objects - contactInformation.{email, phone} and addressInformation.{name, address, zip, city}. Creating a client auto-provisions default billing/bookkeeping settings, the standard products, and ledger accounts. The response contains the new id (prefix C.).

  2. Configure billing and bookkeeping settings. Requires UpdateClientBillingDetails and UpdateClientBookkeepingDetails.

    Terminal window
    curl -X PUT "https://$HOST/clients/$CLIENT_ID/settings/bookkeeping" \
    -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \
    -d '{ "export": { "method": "SIE", "voucherSeries": "A" } }'
  3. Enable the products the client should use (invoice service, factoring, reminders, collection). List the auto-created products and toggle the ones you need; requires ReadClientProducts and ToggleClientProducts.

    Terminal window
    curl "https://$HOST/client-products?clientId=$CLIENT_ID" -H "Authorization: Bearer $JWT"
    curl -X PUT "https://$HOST/client-products/$PRODUCT_ID/toggle" \
    -H "Authorization: Bearer $JWT" -H "Content-Type: application/json" \
    -d '{ "enabled": true }'

    For factoring products with recourse you must also send recourseDays.

  4. (Optional) Connect an ERP and enable sync so invoices and bookkeeping flow automatically. Set both invoiceErpId and bookkeepErpId via PUT /clients/$CLIENT_ID/erp-connect (ConnectErpToClient), then enable with PUT /clients/$CLIENT_ID/sync/enable.

  5. (Optional) Add client users and email recipients with POST /client-users and POST /clients/$CLIENT_ID/email-recipients.