# Introduction

Users are generally your customers, also often referred to as end users. They can be:

  • Physical Users, representing an actual human being.
  • Legal Entities, representing a company, association, etc.
  • Anonymous, which are users with close to no declarative data, intended for specific and limited use cases.

Users can also have hierarchical parent-children relations between them.

# Key attributes

Below are some of the most important User attributes.

Attribute Type Description
email string Unique and valid email address.
specifiedUSPerson integer Indicates if the user is a US Person.
userTypeId integer The type of user. See list of types.
kycLevel integer The current level of KYC validation. See list of levels.
kycReview integer The current status of the KYC validation. See list of statuses.
kycComment string A comment set by Treezor upon KYC review. It concatenates information for each KYC Review update, with the date, the kycReview and kycLevel values, and the comment from Treezor.
userStatus string The user status as set by Treezor. Can be one of the following values:
  • PENDING – User has just been created.
  • VALIDATED – User is validated.
  • CANCELED – User is deleted.
entityType integer See list of types
employeeType integer Used in the context of parent-children relations
controllingPersonType integer Used in the context of parent-children relations
parentType string Used in the context of parent-children relations
parentUserId integer Used in the context of parent-children relations
title string The title of the user, used when sending physical cards. Can be one of the following:
  • M – Stands for mister (Mr.)
  • MME – Stands for misses (Mrs.)
  • MLLE – Stands for miss
firstname string The first name of the user, used when sending physical cards.
lastname string The last name of the user, used when sending physical cards.
middleNames string The middlenames of the user, if any.
address{1-3} string Postal address of the user, used when sending physical cards. See limitations regarding address fields length
postcode string Postcode of the user, used when sending physical cards.
city string The user's address city, used when sending physical cards.
state string The user's address state, if any. May be used when sending physical cards.
country string The residence country of the user in the ISO 3166-1 alpha-2 format. Used when sending physical cards.
position string Only for NGOs, indicating their geographic activity coverage.
legal{Name|Form|...} string Used to describe Legal Entities
birthday string The birthday of the user in the YYYY-MM-DD format.
occupation string The job description of the user.
occupationType string The professional status of the user, used for Physical Users, which can be: self_employed, public_sector_employees, private_sector_employees, retired_people_and_students, without_any_professional_activity
timezone string The local timezone of the user in tz database format Area/Location (opens new window) (e.g., America/New_York, Europe/Paris)
language string The preferred language of the user (ISO 639-1).
onStockExchange integer The Legal Entity presence on Stock Exchange:
Thumbs icon

Best practice – For autoentrepreneurs (userTypeId=1 and legalForm=1000):

  • Their professionnal address should be set in the primary address fields
  • Their personal address should be set in the secondary address fields. Should one of the secondary address fields be set, all others must be set too before submitting a KYC Review.
code icon

API – Swagger documentation available

For a complete list of User attributes, check the Users section of the Swagger.

# Types (userTypeId)

# Using unique and valid email addresses

During your Sandbox development phase, we recommend that stakeholders (Developers, QA testers, etc.) use their own email address with a random +tag suffixed to it.

For example, if your email address is firstname.lastname@example.com, you can use:

  • firstname.lastname+test1@example.com
  • firstname.lastname+test2@example.com
  • firstname.lastname+testn@example.com

All of which are unique and valid addresses that automatically redirect emails to firstname.lastname@domain.tld.

Please note the use of disposable email addresses or services is strongly discouraged and can be rejected by Treezor's API.

# Structure

# Endpoints

# Authenticated endpoints

Endpoint Description Scope
POST /v1/users Create a User legal, admin
GET /v1/users Search for Users read_only
GET /v1/users/{userId} Retrieve a User based on its id read_only
PUT /v1/users/{userId} Update a User read_write
DELETE /v1/users/{userId} Delete a User read_write, admin
PUT /v1/users/{userId}/FreezeAssets Freeze/Unfreeze a User admin

# Public endpoints

You should add a confirmationCode parameter in the query to improve on security.

Endpoint Description
POST /onboard/users Start the onboarding, create a user with an UUID.
GET /onboard/users/confirm/{trzConnectUserId}/{confirmationCode} Link to confirm the email address
GET /onboard/users/{trzConnectUserId}/{confirmationCode} Fetch a user's data during onboarding
PUT /onboarding/users/{trzConnectUserId}/{confirmationCode} Finalize the onboarding, fetch a user's JWT

# Diagram

Last Updated: 4/10/2024, 7:14:25 AM