Solaris.Onboarding.Businesses (Solaris v1.0.0)

Copy Markdown View Source

Manage businesses (legal entities) in the Solaris platform.

Covers: business CRUD, commercial registration lookup, tax identifications, documents, legal representatives, beneficial owners, authorized persons, signees, and annual turnover.

Notes

  • Updating a non-null field triggers the change-request (SCA) flow.
  • Legal representatives can update any connected person's resource.
  • Tax IDs are mandatory for legal representatives and authorized persons.
  • The first tax identification must be primary: true.
  • One tax ID per country per entity.
  • WIdNr (Wirtschafts-Identifikationsnummer) is a Germany-specific identifier.

Summary

Functions

Adds an authorized person to a business account.

Adds a person as a signee for a business.

Creates a new business.

Records the annual turnover for a business.

Creates a beneficial owner record for a business.

Creates a Wirtschafts-Identifikationsnummer (Germany-specific business ID).

Creates a legal representative for a business.

Creates a tax identification for a business.

Downloads a document's raw binary content.

Finds a commercial registration by registration number and issuer.

Retrieves a specific business by ID.

Retrieves a specific authorized person.

Retrieves a specific beneficial owner.

Retrieves the identification number for a business.

Retrieves a specific tax identification.

Lists all businesses for the authenticated partner.

Lists authorized persons on a business account.

Lists all beneficial owners of a business.

Lists all documents for a business.

Lists all legal representatives of a business.

Lists all signees for a business.

Lists all tax identifications for a business.

Removes an authorized person from a business.

Removes a signee from a business.

Searches for a commercial registration by company name and country.

Streams all businesses across all pages.

Updates a business. May return 202 with change_request_id for SCA.

Uploads a document for a business.

Functions

add_authorized_person(business_id, person_id, opts \\ [])

@spec add_authorized_person(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Adds an authorized person to a business account.

Requires a change request unless the authorized person is a legal representative. The change request must be completed by a legal rep with ALONE or nil representation type.

add_signee(business_id, person_id, opts \\ [])

@spec add_signee(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Adds a person as a signee for a business.

create(attrs, opts \\ [])

@spec create(
  map(),
  keyword()
) :: {:ok, map()} | {:error, Solaris.Error.t()}

Creates a new business.

Required fields (vary by country)

  • :name — Legal name
  • :legal_form — e.g. "GmbH", "AG", "SOLE_PROPRIETOR"
  • :registration_number
  • :registration_issuer — Issuing authority
  • :address
  • :tax_country

Examples

{:ok, business} = Solaris.Onboarding.Businesses.create(%{
  name: "Acme GmbH",
  legal_form: "GMBH",
  registration_number: "HRB 12345",
  registration_issuer: "Amtsgericht Berlin",
  address: %{
    line_1: "Unter den Linden 1",
    postal_code: "10117",
    city: "Berlin",
    country: "DE"
  },
  tax_country: "DE"
})

create_annual_turnover(business_id, attrs, opts \\ [])

@spec create_annual_turnover(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Records the annual turnover for a business.

Examples

{:ok, _} = Solaris.Onboarding.Businesses.create_annual_turnover("cbac_123", %{
  amount: 500_000_00,
  currency: "EUR",
  year: 2023
})

create_beneficial_owner(business_id, attrs, opts \\ [])

@spec create_beneficial_owner(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Creates a beneficial owner record for a business.

The linked person must have: salutation, first_name, last_name, birth_date.

Examples

{:ok, owner} = Solaris.Onboarding.Businesses.create_beneficial_owner("cbac_123", %{
  person_id: "cper_789",
  ownership_percentage: 25,
  is_silent_partner: false
})

create_identification_number(business_id, attrs, opts \\ [])

@spec create_identification_number(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Creates a Wirtschafts-Identifikationsnummer (Germany-specific business ID).

Examples

{:ok, widnr} = Solaris.Onboarding.Businesses.create_identification_number("cbac_123", %{
  number: "DE123456789",
  country: "DE"
})

create_tax_identification(business_id, attrs, opts \\ [])

@spec create_tax_identification(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Creates a tax identification for a business.

Examples

{:ok, tax_id} = Solaris.Onboarding.Businesses.create_tax_identification("cbac_123", %{
  country: "DE",
  number: "29/815/08152",
  primary: true
})

download_document(business_id, document_id, opts \\ [])

@spec download_document(String.t(), String.t(), keyword()) ::
  {:ok, binary()} | {:error, Solaris.Error.t()}

Downloads a document's raw binary content.

find_registration(params, opts \\ [])

@spec find_registration(keyword(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Finds a commercial registration by registration number and issuer.

Examples

{:ok, reg} = Solaris.Onboarding.Businesses.find_registration(
  registration_number: "HRB 12345",
  registration_issuer: "Amtsgericht Berlin",
  country: "DE"
)

get(business_id, opts \\ [])

@spec get(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, Solaris.Error.t()}

Retrieves a specific business by ID.

get_authorized_person(business_id, person_id, opts \\ [])

@spec get_authorized_person(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Retrieves a specific authorized person.

get_beneficial_owner(business_id, owner_id, opts \\ [])

@spec get_beneficial_owner(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Retrieves a specific beneficial owner.

get_identification_number(business_id, opts \\ [])

@spec get_identification_number(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, Solaris.Error.t()}

Retrieves the identification number for a business.

get_tax_identification(business_id, tax_id, opts \\ [])

@spec get_tax_identification(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Retrieves a specific tax identification.

list(opts \\ [])

@spec list(keyword()) :: {:ok, map()} | {:error, Solaris.Error.t()}

Lists all businesses for the authenticated partner.

list_authorized_persons(business_id, opts \\ [])

@spec list_authorized_persons(
  String.t(),
  keyword()
) :: {:ok, [map()]} | {:error, Solaris.Error.t()}

Lists authorized persons on a business account.

list_beneficial_owners(business_id, opts \\ [])

@spec list_beneficial_owners(
  String.t(),
  keyword()
) :: {:ok, [map()]} | {:error, Solaris.Error.t()}

Lists all beneficial owners of a business.

list_documents(business_id, opts \\ [])

@spec list_documents(
  String.t(),
  keyword()
) :: {:ok, [map()]} | {:error, Solaris.Error.t()}

Lists all documents for a business.

list_signees(business_id, opts \\ [])

@spec list_signees(
  String.t(),
  keyword()
) :: {:ok, [map()]} | {:error, Solaris.Error.t()}

Lists all signees for a business.

list_tax_identifications(business_id, opts \\ [])

@spec list_tax_identifications(
  String.t(),
  keyword()
) :: {:ok, [map()]} | {:error, Solaris.Error.t()}

Lists all tax identifications for a business.

remove_authorized_person(business_id, person_id, opts \\ [])

@spec remove_authorized_person(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Removes an authorized person from a business.

remove_signee(business_id, person_id, opts \\ [])

@spec remove_signee(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Removes a signee from a business.

search_registration(search_params, opts \\ [])

@spec search_registration(keyword(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Searches for a commercial registration by company name and country.

Examples

{:ok, results} = Solaris.Onboarding.Businesses.search_registration(
  name: "Acme",
  country: "DE"
)

stream(opts \\ [])

@spec stream(keyword()) :: Enumerable.t()

Streams all businesses across all pages.

update(business_id, attrs, opts \\ [])

@spec update(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Updates a business. May return 202 with change_request_id for SCA.

update_beneficial_owner(business_id, owner_id, attrs, opts \\ [])

@spec update_beneficial_owner(String.t(), String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Updates a beneficial owner.

update_document(business_id, document_id, attrs, opts \\ [])

@spec update_document(String.t(), String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Updates document attributes.

update_identification_number(business_id, attrs, opts \\ [])

@spec update_identification_number(String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Updates the identification number.

update_tax_identification(business_id, tax_id, attrs, opts \\ [])

@spec update_tax_identification(String.t(), String.t(), map(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Updates a tax identification.

upload_document(business_id, file_data, opts \\ [])

@spec upload_document(String.t(), binary(), keyword()) ::
  {:ok, map()} | {:error, Solaris.Error.t()}

Uploads a document for a business.

Options

  • :document_type — e.g. "ARTICLES_OF_ASSOCIATION", "FINANCIAL_STATEMENT", "OTHER"
  • :customer_accessible — boolean
  • :filename, :content_type