Skip to main content

Person Creation

POST 

/v1/api/people/create

Creates a person.

The tenant's people rule decides which fields are unique keys (CPF, email and/or phone). Those fields are required, and a request without them returns 400.

If an enabled person of the same client, or of a related client (parent or sibling), already has the same unique keys, the API does not create another one and returns 409 with the existing person's ID. It still updates that person. Fields that are empty in the existing person get the values you sent, fields that already have a value keep it, and the loyalty level and program opt-in are applied.

To set the person's loyalty level, send loyaltyTier with loyaltyCredentialId. To opt the person into a loyalty program, send loyaltyProgramId. The API checks the level and the program before creating the person, so an invalid one returns 400 and creates nothing.

Request​

Body

    firstName stringnullable

    First name.

    lastName stringnullable

    Last name.

    email stringnullable

    Email. Required when email is a unique key in the people rule.

    phone stringnullable

    Phone. Required when phone is a unique key in the people rule.

    cpf stringnullable

    CPF. Required when CPF is a unique key in the people rule.

    passport stringnullable

    Passport.

    dob stringnullable

    Date of birth.

    country stringnullable

    Country of origin.

    registrationSource stringnullable

    Registration source.

    addressStreetName stringnullable

    Street.

    addressNumber stringnullable

    Address number.

    addressZipCode stringnullable

    Zip code.

    addressAdditionalInformation stringnullable

    Address complement.

    addressDistrict stringnullable

    Neighborhood.

    addressCity stringnullable

    City.

    addressState stringnullable

    State.

    ageGroup nullable

    Possible values: [ADULT, CHILD, null]

    Classification of the age group (Adult or Child).

    loyaltyTier stringnullable

    Loyalty level to set for the person. It must be one of the levels ("Níveis") registered in the credential sent in loyaltyCredentialId, which is required with it.

    loyaltyTierExpireAt stringnullable

    When the loyalty level expires, ISO 8601 (e.g. 2027-10-01T00:00:00Z). Optional, only used with loyaltyTier.

    loyaltyCredentialId stringnullable

    ID of the manual loyalty credential (type "Fidelidade Manual") that holds the level. Required with loyaltyTier.

    loyaltyProgramId stringnullable

    ID of a loyalty program registered in Niara ("Programa de Fidelidade"). Opts the person into that program.

    loyaltyProgramOptInDate stringnullable

    Opt-in date, ISO 8601 (e.g. 2026-03-01T10:00:00-03:00). Optional, requires loyaltyProgramId. Without it, the opt-in date is the time of the call. When the person already exists (409) and already opted into the program, the stored date stays.

    loyaltyOptIn booleannullabledeprecated

    Legacy flag with no effect on loyalty programs. To opt the person into a program, send loyaltyProgramId.

Responses​

Person created.

Schema
    firstName stringnullable

    First name.

    lastName stringnullable

    Last name.

    email stringnullable

    Email.

    phone stringnullable

    Phone.

    cpf stringnullable

    CPF.

    passport stringnullable

    Passport.

    dob stringnullable

    Date of birth.

    country stringnullable

    Country of origin.

    registrationSource stringnullable

    Registration source.

    addressStreetName stringnullable

    Street.

    addressNumber stringnullable

    Address number.

    addressZipCode stringnullable

    Zip code.

    addressAdditionalInformation stringnullable

    Address complement.

    addressDistrict stringnullable

    Neighborhood.

    addressCity stringnullable

    City.

    addressState stringnullable

    State.

    ageGroup nullable

    Possible values: [ADULT, CHILD, null]

    Classification of the age group (Adult or Child).

    loyaltyTier stringnullabledeprecated

    Legacy field, no longer updated. Read the person's levels from loyaltyData[].tier in the GET endpoints.

    loyaltyOptIn booleannullabledeprecated

    Legacy flag. It does not tell whether the person opted into a loyalty program.

    id stringnullable

    Person ID.

    creationDate stringnullable

    Creation date.

    enabled booleannullable

    Default value: true

    Whether the person is enabled or not.

Loading...