personsApi documentation (1.0.0)

Download OpenAPI specification:Download

Documentation and interface contract for the personsApi, the API responsible for managing natural persons (individual & professional) for all types of profiles, whether partner or individual.

Persons

addPerson

Create a person as a business object.

header Parameters
X-Correlation-ID
string

Correlation identifier

Request Body schema: application/json
id
required
string

Technical identifier generated by the authentication server, which identifies a person.

picture
string

Link to the profile picture.

lastName
string

Last name of a person.

firstName
string

First name of a person.

gender
string
Enum: "MALE" "FEMALE"

Gender of the person.

dateOfBirth
string <date>

Date of birth of the person.

email
required
string

Email address of the person.

object (Phone)

Phone number.

object (Address)

The object representing a postal address of the property to rent.

type
required
string
Enum: "PART" "PRO"

Person type.

status
string
Enum: "MISSING_INFORMATIONS" "ACTIVATED" "ACTIVATION_IN_PROGRESS"

The status of the natural person.

  • By default, a natural person is created with the status: "MISSING_INFORMATIONS".
  • For the natural person to be active and able to operate on our platform, they must have the status: "ACTIVATED"
  • To move to "ACTIVATED" status, the following information must be provided:
    • dateOfBirth
    • phoneNumber
    • address
operation
string
Enum: "CREATION" "INVITATION"

Enum indicating whether the person creation was triggered from an invitation by another user (PRO), or through a standard account creation flow.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "picture": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "gender": "MALE",
  • "dateOfBirth": "2019-08-24",
  • "email": "string",
  • "phoneNumber": {
    },
  • "address": {
    },
  • "type": "PART",
  • "status": "MISSING_INFORMATIONS",
  • "operation": "CREATION"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "picture": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "gender": "MALE",
  • "dateOfBirth": "2019-08-24",
  • "email": "string",
  • "phoneNumber": {
    },
  • "address": {
    },
  • "type": "PART",
  • "status": "MISSING_INFORMATIONS",
  • "operation": "CREATION",
  • "links": [
    ]
}

listPerson

List persons.

query Parameters
currentPage
integer >= 0

Current page number. Do not send this attribute on the first call.

sizePage
integer >= 3

Number of elements per page.

attachmentIds
string
Example: attachmentIds=id1,id2,id3

Filter by attachment identifiers (comma-separated).

personIds
string
Example: personIds=p1,p2,p3

Filter by person identifiers (comma-separated).

search
string
Example: search=mohamed

Free-text search on last name, first name or email (case-insensitive).

status
string
Example: status=MISSING_INFORMATIONS

Filter by person status.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "totalElements": 0,
  • "totalPages": 0,
  • "currentPage": 0,
  • "content": [
    ]
}

getPerson

Retrieve a person by their id.

path Parameters
person-id
required
string

Technical id of the person.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "picture": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "gender": "MALE",
  • "dateOfBirth": "2019-08-24",
  • "email": "string",
  • "phoneNumber": {
    },
  • "address": {
    },
  • "type": "PART",
  • "status": "MISSING_INFORMATIONS",
  • "operation": "CREATION",
  • "links": [
    ]
}

putPerson

Update a person.

path Parameters
person-id
required
string

Technical id of the person.

header Parameters
X-Correlation-ID
string

Correlation identifier

Request Body schema: application/json
id
required
string

Technical identifier generated by the authentication server, which identifies a person.

picture
string

Link to the profile picture.

lastName
string

Last name of a person.

firstName
string

First name of a person.

gender
string
Enum: "MALE" "FEMALE"

Gender of the person.

dateOfBirth
string <date>

Date of birth of the person.

email
required
string

Email address of the person.

object (Phone)

Phone number.

object (Address)

The object representing a postal address of the property to rent.

type
required
string
Enum: "PART" "PRO"

Person type.

status
string
Enum: "MISSING_INFORMATIONS" "ACTIVATED" "ACTIVATION_IN_PROGRESS"

The status of the natural person.

  • By default, a natural person is created with the status: "MISSING_INFORMATIONS".
  • For the natural person to be active and able to operate on our platform, they must have the status: "ACTIVATED"
  • To move to "ACTIVATED" status, the following information must be provided:
    • dateOfBirth
    • phoneNumber
    • address
operation
string
Enum: "CREATION" "INVITATION"

Enum indicating whether the person creation was triggered from an invitation by another user (PRO), or through a standard account creation flow.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "picture": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "gender": "MALE",
  • "dateOfBirth": "2019-08-24",
  • "email": "string",
  • "phoneNumber": {
    },
  • "address": {
    },
  • "type": "PART",
  • "status": "MISSING_INFORMATIONS",
  • "operation": "CREATION"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "picture": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "gender": "MALE",
  • "dateOfBirth": "2019-08-24",
  • "email": "string",
  • "phoneNumber": {
    },
  • "address": {
    },
  • "type": "PART",
  • "status": "MISSING_INFORMATIONS",
  • "operation": "CREATION",
  • "links": [
    ]
}

deletePerson

Delete a person.

path Parameters
person-id
required
string

Technical id of the person.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{ }

activatePerson

Activate a person's account.

path Parameters
person-id
required
string

Technical id of the person.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "picture": "string",
  • "lastName": "string",
  • "firstName": "string",
  • "gender": "MALE",
  • "dateOfBirth": "2019-08-24",
  • "email": "string",
  • "phoneNumber": {
    },
  • "address": {
    },
  • "type": "PART",
  • "status": "MISSING_INFORMATIONS",
  • "operation": "CREATION",
  • "links": [
    ]
}

Favorites

addFavorites

Save an entity as a favorite.

path Parameters
person-id
required
string

Technical id of the person.

header Parameters
X-Correlation-ID
string

Correlation identifier

Request Body schema: application/json
id
string

Technical and unique identifier generated automatically.

entityType
required
string (entityTypeFavorites)
Enum: "TRIP" "HOST"

Entity type.

entityId
required
string

The id of the entity in question.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "entityType": "TRIP",
  • "entityId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "entityType": "TRIP",
  • "entityId": "string",
  • "links": [
    ]
}

listFavorites

List favorites.

path Parameters
person-id
required
string

Technical id of the person.

query Parameters
entityType
required
string (entityTypeFavorites)
Enum: "TRIP" "HOST"

Entity type.

currentPage
integer >= 0

Current page number. Do not send this attribute on the first call.

sizePage
integer >= 3

Number of elements per page.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "totalElements": 0,
  • "totalPages": 0,
  • "currentPage": 0,
  • "content": [
    ]
}

deleteFavorite

Delete a favorite.

path Parameters
person-id
required
string

Technical id of the person.

favorite-id
required
string

Technical id of the favorite.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{ }

Attachments

addAttachment

Save an entity as an attachment.

path Parameters
person-id
required
string

Technical id of the person.

header Parameters
X-Correlation-ID
string

Correlation identifier

Request Body schema: application/json
id
string

Technical and unique identifier generated automatically, which identifies a link between a user and an entity.

entityType
string
Enum: "ORGANIZATION" "ESTABLISHMENT"

Entity type.

entityId
string

The id of the entity in question.

Responses

Request samples

Content type
application/json
{
  • "id": "string",
  • "entityType": "ORGANIZATION",
  • "entityId": "string"
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "entityType": "ORGANIZATION",
  • "entityId": "string",
  • "links": [
    ]
}

listAttachments

List attachments.

path Parameters
person-id
required
string

Technical id of the person.

query Parameters
currentPage
integer >= 0

Current page number. Do not send this attribute on the first call.

sizePage
integer >= 3

Number of elements per page.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{
  • "totalElements": 0,
  • "totalPages": 0,
  • "currentPage": 0,
  • "content": [
    ]
}

deleteAttachment

Delete an attachment.

path Parameters
person-id
required
string

Technical id of the person.

query Parameters
entity-id
required
string

Technical id of the attachment entity.

header Parameters
X-Correlation-ID
string

Correlation identifier

Responses

Response samples

Content type
application/json
{ }