Shared Objects
A good part of the data is shared between Reservation and RentalAgreement. Below you can easily find the definitions of these objects.
reservation Object
{
"id": "0",
"channel": "reservation_central",
"reservation_date": "2020-03-31T08:15:00-03:00",
"sales_channel" : "PARCERIA TELEFONICA"
}
The reservation object is used in the rental_agreement endpoint to represent the reservation that originated the rental to be analyzed. This field is required so that a rental_agreement can be linked to the reservation. It is represented as follows:
| name | type | description |
|---|---|---|
| id | integer | Identifier of the reservation that originated the rental. |
| channel | enum | Channel through which the reservation for this rental was made. |
| reservation_date | DateTime | Date and time, with time zone, when the reservation for this rental was made. |
| sales_channel | string | Sales channel through which the reservation was made (e.g.: PARCERIA MASTERCARD). |
The following enumerators exist for the channel field: walkin, reservation_central, app, website_mobile, website_desktop, partnerships and third_parties.
car Object
{
"model_group": "C",
"upgrade_model_group": "SV",
"group_description": "Sedan Médio 1.4",
"rental_daily_price": 48496
}
The car object represents a vehicle that is being reserved (reservation endpoint) or picked up (rental_agreement endpoint). The data sent is:
| name | type | description |
|---|---|---|
| model_group | string | The vehicle group, in uppercase letters. (required) |
| upgrade_model_group | string | The vehicle group of the upgrade, in uppercase letters. |
| group_description | string | A description of the vehicle group. |
| rental_daily_price | integer | The daily rate charged. |
client Object
The client object represents the data of the customer who is making the reservation or picking up the vehicle.
client (v1) Object
The "v1" example represents the sample payload before the migration of the main scoring to the reservation. For both reservations and rental_agreements.
{
"type": "natural_person",
"document_number": "123.456.789-00",
"name": "John Sample",
"gender": "female",
"birthdate": "2001-01-15",
"mother_name": "Mary Sample",
"email": "john.sample@sample.com.br",
"allowed_information_on_email": true,
"face_picture": "c77d1925-0e72-4634-8393-395dbbce498d",
"additional_pictures": [
"718b8caa-8ef5-446c-b101-2dbf6c7e401f",
"9c67f365-1427-4889-b963-d3729d437ff3",
"8006f82c-3a80-4371-914e-e88c91507711",
"42c6909e-51aa-4b6d-972f-f4684a047993",
"b7a88947-96bd-4557-81e9-a69a3c84f428"
],
"total_rents": 6,
"fidelity_points": 1200,
"documents": {
"rg": {
"document_number": "00000000",
"issuer": "SSP"
},
"cnh": {
"document_number": "000000000",
"security_code": "00000",
"first_issuance": "2015-07-20",
"expiration_date": "2030-07-26",
"state": "SP"
}
},
"residential_address": {
"street": "Av Brigadeiro Faria Lima",
"number": "2391",
"neighborhood": "Jardins",
"city": "SÃO PAULO",
"uf": "SP",
"complement": "",
"postal_code": "00000-000"
},
"commercial_address": {
"street": "Av Brigadeiro Faria Lima",
"number": "2391",
"neighborhood": "Jardins",
"city": "SÃO PAULO",
"uf": "SP",
"complement": "",
"postal_code": "00000-000"
},
"phones": [
{
"international_dial_code": "55",
"area_code": "11",
"number": "00000-0000",
"type": "mobile"
},
{
"international_dial_code": "55",
"area_code": "11",
"number": "00000-0000",
"type": "residential"
}
]
}
| name | type | description |
|---|---|---|
| type | enum | Enumerator that defines the client type. (required) |
| document_number | string | The client's CPF or Passport. (required) |
| name | string | The client's full name. (required) |
| gender | enum | The client's gender. (required) |
| birthdate | date | The client's date of birth. |
| mother_name | string | The full name of the client's mother. |
| string | The email provided by the client. (required) | |
| allowed_information_on_email | boolean | Flag indicating whether the client allowed marketing emails to be sent at registration. (required) |
| face_picture | GUID | GUID of the previously uploaded image whose content is a picture of the client's face. |
| additional_pictures | List of GUIDs | List of GUIDs of the additional images uploaded of the clients' faces and documents. |
| total_rents | integer | Total number of rentals of the client. |
| fidelity_points | integer | Number of loyalty points of the client. |
| documents | documents | Object containing the details of the client's documents. (required) |
| residential_address | address | The client's residential address. |
| commercial_address | address | The client's commercial address. |
| phones | List of phone | List of the client's phone numbers. (required) |
The following enumerators exist for the type field: natural_person, legal_person, replacement, fleet, uber, enterprise and agencia.
The following enumerators exist for the gender field: male, female and undefined.
client (v2) Object
This section concerns the information required for the fraud analysis flow primarily on the reservation.
The "client (v2)" object example represents the sample payload after the migration of the main scoring to the reservation. For both reservations and rental_agreements.
{
"type": "natural_person",
"document_number": "123.456.789-00",
"name": "John Sample",
"gender": "female",
"birthdate": "2001-01-15",
"mother_name": "Mary Sample",
"email": "john.sample@sample.com.br",
"allowed_information_on_email": true,
"face_picture": "c77d1925-0e72-4634-8393-395dbbce498d",
"additional_pictures": [
"718b8caa-8ef5-446c-b101-2dbf6c7e401f",
"9c67f365-1427-4889-b963-d3729d437ff3",
"8006f82c-3a80-4371-914e-e88c91507711",
"42c6909e-51aa-4b6d-972f-f4684a047993",
"b7a88947-96bd-4557-81e9-a69a3c84f428"
],
"total_rents": 6,
"fidelity_points": 1200,
"documents": {
"rg": {
"document_number": "00000000",
"issuer": "SSP"
},
"cnh": {
"document_number": "000000000",
"security_code": "00000",
"first_issuance": "2015-07-20",
"expiration_date": "2030-07-26",
"state": "SP"
}
},
"residential_address": {
"street": "Av Brigadeiro Faria Lima",
"number": "2391",
"neighborhood": "Jardins",
"city": "SÃO PAULO",
"uf": "SP",
"complement": "",
"postal_code": "00000-000"
},
"commercial_address": {
"street": "Av Brigadeiro Faria Lima",
"number": "2391",
"neighborhood": "Jardins",
"city": "SÃO PAULO",
"uf": "SP",
"complement": "",
"postal_code": "00000-000"
},
"phones": [
{
"international_dial_code": "55",
"area_code": "11",
"number": "00000-0000",
"type": "mobile"
},
{
"international_dial_code": "55",
"area_code": "11",
"number": "00000-0000",
"type": "residential"
}
]
}
| name | type | description |
|---|---|---|
| type | enum | Enumerator that defines the client type. - expected types: "natural_person", "legal_person", "replacement", "fleet", "uber", "agencia", "uber_semanal" (required) |
| document_number | string | The client's CPF or Passport. (required) |
| name | string | The client's full name. |
| gender | enum | The client's gender. (required) |
| birthdate | date | The client's date of birth. |
| mother_name | string | The full name of the client's mother. |
| string | The email provided by the client. | |
| allowed_information_on_email | boolean | Flag indicating whether the client allowed marketing emails to be sent at registration. (required) |
| face_picture | GUID | GUID of the previously uploaded image whose content is a picture of the client's face. |
| additional_pictures | List of GUIDs | List of GUIDs of the additional images uploaded of the clients' faces and documents. |
| total_rents | integer | Total number of rentals of the client. |
| fidelity_points | integer | Number of loyalty points of the client. |
| documents | documents | Object containing the details of the client's documents. (required) |
| residential_address | address | The client's residential address. |
| commercial_address | address | The client's commercial address. |
| phones | List of phone | List of the client's phone numbers. (required) |
The following enumerators exist for the type field: natural_person, legal_person, replacement, fleet, uber, enterprise and agencia.
The following enumerators exist for the gender field: male, female and undefined.
participant Object
The participant object represents a person involved in the rental who is not the main renter, that is, an additional driver or the financial manager. It is the definition used both in the additional_drivers list and in the financial_manager field of a RentalAgreement.
Its structure is the same as the client object, so the same serialization implementation can be reused.
Every participant sent goes through the same fraud analysis applied to the main renter, but the result of these analyses does not change the fraud_status of the RentalAgreement.
{
"type": "natural_person",
"segment": "ota",
"document_number": "987.654.321-00",
"name": "Jane Sample",
"gender": "female",
"birthdate": "1998-05-22",
"mother_name": "Mary Sample",
"email": "jane.sample@sample.com.br",
"allowed_information_on_email": true,
"face_picture": "e3b0c442-98fc-1c14-9afb-f4c8996fb924",
"additional_pictures": [
"718b8caa-8ef5-446c-b101-2dbf6c7e401f"
],
"total_rents": 2,
"fidelity_points": 0,
"documents": {
"rg": {
"document_number": "00000000",
"issuer": "SSP"
},
"cnh": {
"document_number": "000000000",
"security_code": "00000",
"first_issuance": "2018-03-10",
"expiration_date": "2028-03-10",
"state": "SP"
}
},
"residential_address": {
"street": "Av Brigadeiro Faria Lima",
"number": "2391",
"neighborhood": "Jardins",
"city": "SÃO PAULO",
"uf": "SP",
"complement": "",
"postal_code": "00000-000",
"country": "BRA"
},
"phones": [
{
"international_dial_code": "55",
"area_code": "11",
"number": "00000-0000",
"type": "mobile"
}
]
}
| name | type | description |
|---|---|---|
| type | enum | Enumerator that defines the participant type. (required) |
| segment | string | Segment the participant belongs to. |
| document_number | string | The participant's CPF, CNPJ or Passport. (required) |
| name | string | The participant's full name. (required) |
| gender | enum | The participant's gender. (required) |
| birthdate | date | The participant's date of birth. |
| mother_name | string | The full name of the participant's mother. |
| string | The email provided by the participant. (required) | |
| allowed_information_on_email | boolean | Flag indicating whether the participant allowed marketing emails to be sent at registration. (required) |
| face_picture | GUID | GUID of the previously uploaded image whose content is a picture of the participant's face. |
| additional_pictures | List of GUIDs | List of GUIDs of the additional images uploaded of the participant's face and documents. |
| total_rents | integer | Total number of rentals of the participant. |
| fidelity_points | integer | Number of loyalty points of the participant. |
| documents | documents | Object containing the details of the participant's documents. (required) |
| residential_address | address | The participant's residential address. |
| commercial_address | address | The participant's commercial address. |
| phones | List of phone | List of the participant's phone numbers. (required) |
The following enumerators exist for the type field: natural_person, legal_person, replacement, fleet, uber, enterprise, agencia and uber_semanal.
The following enumerators exist for the gender field: male, female and undefined.
billing Object
{
"name": "Agência AAA",
"document_number": "00.000.000/0001-00",
"voucher_type":"ABCD75",
"voucher_description": "Pagamento pela Agência"
}
The billing object is used to represent who is responsible for paying the rental, and it is represented as follows:
| name | type | description |
|---|---|---|
| name | string | Name of the person or company responsible for paying the rental. |
| document_number | string | CPF, CNPJ or Passport of the person or company responsible for paying the rental. |
| voucher_type | string | Alphanumeric code that represents the type of voucher used. |
| voucher_description | string | Description of the type of voucher used. |
address Object
{
"street": "Rua do Exemplo",
"number": "111",
"neighborhood": "Bairro do Teste",
"city": "Aparecida de Goiânia",
"uf": "GO",
"complement": "",
"postal_code": "00000-000"
}
The address object is used to represent addresses across the entire API. Addresses within Brazilian territory are represented as follows:
| name | type | description |
|---|---|---|
| street | string | Street of the address, including the street type, avoiding abbreviations whenever possible. |
| number | string | Number of the property, including letters if it has any. |
| neighborhood | string | Neighborhood, without abbreviations. e.g.: Santa Felicidade |
| city | string | Full name of the city, without abbreviations. |
| uf | string | The federative unit, with two uppercase letters. e.g.: SP |
| complement | string | Any complements that help locate the property. e.g.: Apartamento 101, Conjunto 12 |
| postal_code | string | The postal code of the location, including the hyphen. |
| country | string | ISO 3166-1 alpha-3 code of the address country. |
For addresses whose country is not Brazil ("BRA"), the postal_code and the federative unit may be filled in freely.
documents Object
The documents object is used to represent the details of the document data provided by the client. The object is represented as follows:
| name | type | description |
|---|---|---|
| rg | rg | Object describing the information of the client's RG (Brazilian ID card). |
| cnh | cnh | Object describing the information of the client's CNH (Brazilian driver's license). |
| foreign_document | foreign_document | Object describing the information of the client's foreign document. |
rg Object
The rg object is used to represent the details of the RG data provided by the client. The object is represented as follows:
| name | type | description |
|---|---|---|
| document_number | string | Number of the client's RG. |
| issuer | string | Issuing authority and state of issuance of the client's RG. |
cnh Object
The cnh object is used to represent the details of the driver's license data provided by the client. The object is represented as follows:
| name | type | description |
|---|---|---|
| document_number | string | Registration number of the client's driver's license. |
| security_code | string | Security code of the client's driver's license. |
| first_issuance | date | Date of the first issuance of the client's driver's license. |
| expiration_date | string | Expiration date of the client's driver's license. |
| state | string | State of issuance of the client's driver's license. |
foreign_document Object
The foreign_document object is used to represent the foreign document provided by the client. The object is represented as follows:
| name | type | description |
|---|---|---|
| document_number | string | Number of the client's foreign document. |
| document_type | enum | Type of the foreign document. Accepts the values passport and other. |
| issuer_country | string | ISO 3166-1 alpha-3 code of the country that issued the document. |
phone Object
{
"international_dial_code": "1",
"area_code": "11",
"number": "99999-9999",
"type": "mobile"
}
A phone object represents a phone number, inside or outside Brazil, and its classification. Its fields are:
| name | type | description |
|---|---|---|
| international_dial_code | string | International dialing code, without zero or +, digits only. (required) |
| area_code | string | Area code, without zero, digits only. (required) |
| number | string | Phone number, without the hyphen. (required) |
| type | enum | Type of number: mobile, residential, commercial, etc. (required) |
The following enumerators exist for the phone type: residential, commercial, mobile.
coverage Object
{
"description": "S/ PROTEÇÃO AMERICAN PLATINUM",
"price": 0
}
A coverage object is related to a coverage purchased by the renter.
| name | type | description |
|---|---|---|
| description | string | Description of the purchased coverage. (required) |
| price | integer | Daily price of the coverage. (required) |