User

Create an owned company for a user

Creates (or claims by identifier) a company and makes the user its owner. If a company with the given identifier already has memberships, the request fails with 422 (identifier already taken).

post/v1/users/{id}/companies

Path parameters

idstring required

The id of the resource. This is a UUID for most resources, but for user endpoints it is the user's Firebase UID (an opaque string), so no uuid format is asserted here.

Parameters

#/paths/~1v1~1users/get/parameters/0 — unresolved $ref

Request body

Response

The created/claimed company.

idstring uuid required
typestring

STI subclass. Always Company for this resource.

identifierstring required

Tax id (RUT in Chile) of the company. Digits plus verification digit.

namestring nullable
fantasy_namestring nullable
countrystring nullable
commercial_businessstring nullable
commercial_typeinteger nullable
addressstring nullable
contact_phonestring nullable
contact_emailstring nullable
constitution_datestring date-time nullable
purpose_to_use_cardsstring nullable
legal_addressobject nullable

Structured legal address (street, number, municipality_id, complement, city).

economic_activitiesobject[] nullable
interestsstring[]
notification_emailsstring[]
rutsobject nullable

Additional RUTs associated with the company.

referral_codestring
referrer_idstring uuid nullable
referral_approvedboolean nullable
collector_account_idstring uuid nullable
preferred_currencystring
verification_status'pending' | 'awaiting_review' | 'approved' | 'rejected'

KYC verification status.

kyc_completedboolean
plh_enabledboolean

Whether the company is enrolled in the PLH card program.

contracts_verifiedboolean
activatedboolean
activeboolean
can_delegate_payablesboolean
n_usersinteger

Number of member users (computed method).

n_cardsinteger

Number of cards (computed method).

n_virtual_cardsinteger

Number of virtual cards (computed method).

owner_idstring uuid nullable

User id of the owner membership (present on the index listing).

created_atstring date-time
updated_atstring date-time

Example response

{
  "type": "Company",
  "identifier": "770000001",
  "name": "Mi Empresa SpA",
  "fantasy_name": "Mi Empresa",
  "country": "CL",
  "preferred_currency": "clp",
  "verification_status": "approved"
}

Changes