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.

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.

object (Address)
object (Address)
phoneNumber
string

Phone number represented with E.164 standard.

Responses

Request samples

Content type
application/json
{
  • "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
{
  • "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

Response samples

Content type
application/json
{
  • "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

Response samples

Content type
application/json
{
  • "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.

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.

object (Address)
object (Address)
phoneNumber
string

Phone number represented with E.164 standard.

Responses

Request samples

Content type
application/json
{
  • "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
{
  • "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

Response samples

Content type
application/json
{
  • "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

Request samples

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

Response samples

Content type
application/json
{
  • "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

Response samples

Content type
application/json
{
  • "accounts": [
    ]
}

Get account.

Return all the data of a bank account.

Authorizations:
openId (
  • email profile
)
path Parameters
accountId
required
string
Example: a1b2c3

Responses

Response samples

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

Delete account.

Delete a bank account and all its data.

Authorizations:
openId (
  • email profile
)
path Parameters
accountId
required
string
Example: a1b2c3

Responses

Response samples

Content type
application/json
{
  • "errors": [
    ]
}