faire.ai Platform (1.0.0)

Download OpenAPI specification:Download

The following document contains the documentation of faire.ai Platform.

Please, contact us at info@faire.ai if you want to try the Platform and get the credentials to call the API in test or production environments.

Authentication

openId

The API use OpenID Connect to authenticate and authorize the requests. Using curl, getting a token can be done calling the following endpoint with:

curl -X POST https://platform-dev.faire.ai/openid-connect/token \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'grant_type=client_credentials&client_id=<CLIENT_ID>&client_secret=<SECRET>

where CLIENT_ID and SECRET are the partner credentials provided by faire.ai.

persons

Persons operations.

Create a person.

Register a new person to the Platform.

Authorizations:
openId (email profile)
Request Body schema: application/json
personId
required
string

Unique identifier of a person.

firstName
required
string

First name.

lastName
required
string

Last name.

emailAddress
required
string <email>

Email address.

dateOfBirth
required
string <date>

Date of birth.

placeOfBirth
required
object (Place of birth)
gender
string
Enum: "MALE" "FEMALE"

Gender.

citizenship
required
string 2 characters

Citizenship represented with ISO 3166-1 alpha-2 code of the coutry.

fiscalCode
required
string

Fiscal code.

homeAddress
object (Address)
domicileAddress
object (Address)
phoneNumber
string

Phone number represented with E.164 standard.

Responses

201

Person created.

default

Error occurred.

post /persons

Development environment

https://platform-dev.faire.ai/persons

Production environment

https://platform.faire.ai/persons

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "personId": "123e4567-e89b-12d3-a456-426614174000",
  • "firstName": "John",
  • "lastName": "Doe",
  • "emailAddress": "john.doe@example.com",
  • "dateOfBirth": "2000-07-21",
  • "placeOfBirth":
    {
    },
  • "gender": "MALE",
  • "citizenship": "IT",
  • "fiscalCode": "RSSPPP00L21H501U",
  • "homeAddress":
    {
    },
  • "domicileAddress":
    {
    },
  • "phoneNumber": "+39XXXXXXXXXX"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "personId": "123e4567-e89b-12d3-a456-426614174000",
  • "firstName": "John",
  • "lastName": "Doe",
  • "emailAddress": "john.doe@example.com",
  • "dateOfBirth": "2000-07-21",
  • "placeOfBirth":
    {
    },
  • "gender": "MALE",
  • "citizenship": "IT",
  • "fiscalCode": "RSSPPP00L21H501U",
  • "homeAddress":
    {
    },
  • "domicileAddress":
    {
    },
  • "phoneNumber": "+39XXXXXXXXXX"
}

Get all persons.

Return all the data of the persons registered by the partner to the Platform.

Authorizations:
openId (email profile)

Responses

200

Persons retrieved.

default

Error occurred.

get /persons

Development environment

https://platform-dev.faire.ai/persons

Production environment

https://platform.faire.ai/persons

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "persons":
    [
    ]
}

Get a person.

Return the data of a single person registered by the partner to the Platfom.

Authorizations:
openId (email profile)
path Parameters
personId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Unique identifier of a person.

Responses

200

Person retrieved.

default

Error occurred.

get /persons/{personId}

Development environment

https://platform-dev.faire.ai/persons/{personId}

Production environment

https://platform.faire.ai/persons/{personId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "personId": "123e4567-e89b-12d3-a456-426614174000",
  • "firstName": "John",
  • "lastName": "Doe",
  • "emailAddress": "john.doe@example.com",
  • "dateOfBirth": "2000-07-21",
  • "placeOfBirth":
    {
    },
  • "gender": "MALE",
  • "citizenship": "IT",
  • "fiscalCode": "RSSPPP00L21H501U",
  • "homeAddress":
    {
    },
  • "domicileAddress":
    {
    },
  • "phoneNumber": "+39XXXXXXXXXX"
}

Update a person.

Update the data of an existing person.

Authorizations:
openId (email profile)
path Parameters
personId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Unique identifier of a person.

Request Body schema: application/json
personId
required
string

Unique identifier of a person.

firstName
required
string

First name.

lastName
required
string

Last name.

emailAddress
required
string <email>

Email address.

dateOfBirth
required
string <date>

Date of birth.

placeOfBirth
required
object (Place of birth)
gender
string
Enum: "MALE" "FEMALE"

Gender.

citizenship
required
string 2 characters

Citizenship represented with ISO 3166-1 alpha-2 code of the coutry.

fiscalCode
required
string

Fiscal code.

homeAddress
object (Address)
domicileAddress
object (Address)
phoneNumber
string

Phone number represented with E.164 standard.

Responses

200

Person's data updated.

default

Error occurred.

put /persons/{personId}

Development environment

https://platform-dev.faire.ai/persons/{personId}

Production environment

https://platform.faire.ai/persons/{personId}

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "personId": "123e4567-e89b-12d3-a456-426614174000",
  • "firstName": "John",
  • "lastName": "Doe",
  • "emailAddress": "john.doe@example.com",
  • "dateOfBirth": "2000-07-21",
  • "placeOfBirth":
    {
    },
  • "gender": "MALE",
  • "citizenship": "IT",
  • "fiscalCode": "RSSPPP00L21H501U",
  • "homeAddress":
    {
    },
  • "domicileAddress":
    {
    },
  • "phoneNumber": "+39XXXXXXXXXX"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "personId": "123e4567-e89b-12d3-a456-426614174000",
  • "firstName": "John",
  • "lastName": "Doe",
  • "emailAddress": "john.doe@example.com",
  • "dateOfBirth": "2000-07-21",
  • "placeOfBirth":
    {
    },
  • "gender": "MALE",
  • "citizenship": "IT",
  • "fiscalCode": "RSSPPP00L21H501U",
  • "homeAddress":
    {
    },
  • "domicileAddress":
    {
    },
  • "phoneNumber": "+39XXXXXXXXXX"
}

Delete a person.

Delete a person and all its data persisted on the Platform.

Authorizations:
openId (email profile)
path Parameters
personId
required
string <uuid>
Example: 123e4567-e89b-12d3-a456-426614174000

Unique identifier of a person.

Responses

204

Person has been deleted.

default

Error occurred.

delete /persons/{personId}

Development environment

https://platform-dev.faire.ai/persons/{personId}

Production environment

https://platform.faire.ai/persons/{personId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "errors":
    [
    ]
}

accounts

Accounts operations.

Create new account.

Register a new bank account of a person within the Platform.

Authorizations:
openId (email profile)
Request Body schema: application/json
accountId
string
personId
string

UUID value

iban
string
currency
string
bookedBalance
string

Booked balance.

holders
Array of strings

Responses

201

Account created

default

Error occurred.

post /accounts

Development environment

https://platform-dev.faire.ai/accounts

Production environment

https://platform.faire.ai/accounts

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "accountId": "a1b2c3",
  • "personId": "c6a7fe4e-5fc0-11eb-ae93-0242ac130002",
  • "iban": "BE71096123456769",
  • "currency": "EUR",
  • "bookedBalance": "1500.00",
  • "holders":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "accountId": "a1b2c3",
  • "personId": "c6a7fe4e-5fc0-11eb-ae93-0242ac130002",
  • "iban": "BE71096123456769",
  • "currency": "EUR",
  • "bookedBalance": "1500.00",
  • "holders":
    [
    ],
  • "operativity": "OPERATIVE"
}

Get accounts of a person.

Return all the bank accounts data of a person registered on the Platform.

Authorizations:
openId (email profile)
query Parameters
personId
required
string
Example: personId=123e4567-e89b-12d3-a456-426614174000

Responses

200

Account

default

Error occurred.

get /accounts

Development environment