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
required
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 Platfom.

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
required
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.

Transaction categories

Main Category
Subcategory
Income
Expense
BILLS_SUBSCRIPTIONS BILLS false true
INTERNET_PHONE false true
OTHER false true
SUBSCRIPTIONS false true
CREDIT_CARDS CREDIT_CARDS false true
OTHER false true
EATING_OUT COFFEE_SHOPS false true
OTHER false true
RESTAURANTS false true
TAKEAWAY_RESTAURANTS false true
EDUCATION COURSES false true
EDUCATIONAL_MATERIALS false true
KINDERGARTEN false true
OTHER false true
SCHOOLS false true
UNIVERSITIES false true
HEALTH_WELLNESS AID_EXPENSES false true
DRUGS false true
GYMS false true
MEDICAL_EXPENSES false true
OTHER false true
SPORT false true
WELLNESS_RELAX false true
HOUSING_FAMILY APPLIANCES false true
BABY_SITTING false true
CHILDHOOD false true
CONDO_EXPENSES false true
FURNITURE false true
GROCERIES false true
INSURANCES true true
LAUNDRY false true
MAINTENANCE_RENOVATION false true
NOURISHMENT true true
OTHER false true
RENTS false true
SERVANTS false true
VETERINARY false true
LEISURE BOOKS false true
CINEMA false true
CLUB_ASSOCIATIONS false true
GAMBLING false true
MAGAZINES_NEWSPAPERS false true
MOVIES_MUSICS false true
MUSEUMS_PARKS false true
OTHER false true
SPORT_EVENTS false true
THEATERS_CONCERTS false true
VIDEOGAMES false true
MORTGAGES_LOANS INSTALLMENT_PAYMENTS false true
LOANS true true
MORTGAGES false true
OTHER false true
OTHER CASH true true
CHECKS true true
OTHER true true
PROFITS OTHER true false
PROFITS true false
SHOPPING ACCESSORIZE false true
CLOTHING false true
FOOTWEAR false true
HI_TECH false true
JEWELLERY