Pular para o conteúdo principal

Retrieve Profile - GET

To get the Profile corresponding to a user's account, you need to make a GET request to the endpoint

GET https://api.palenca.com/v1/accounts/:account_id/profile
const axios = require('axios')

const config = {
method: 'get',
url: 'https://api.palenca.com/v1/accounts/:account_id/profile',
headers: {
'x-api-key': 'private_api_key',
'Content-Type': 'application/json'
}
};

(async () => {
try {
const {data} = await axios(config)
console.info(JSON.stringify(response.data))
} catch (error) {
console.error(error)
}
})()

Returns a JSON structured like this:

{
"success": true,
"error": null,
"data": {
"account_id": "472f02e8-6b24-43a7-b529-3f71d6ecc81c",
"profile": {
"first_name": "Jairo",
"last_name": "Huerta Rincon",
"phone": "+5215540086725",
"email": "jayroplascencia@gmail.com",
"address": null,
"city_name": "Puebla",
"picture_url": "https://www.example.com"
},
"bank_info": {
"account_number": null,
"holder_name": null,
"holder_address": null,
"bank_name": null,
"bank_code": null
},
"vehicle_info": {
"type": "car",
"brand": "Volkswagen",
"model": "Vento",
"year": "2016",
"license_plate": "MXT5576",
"vin": "MEX5H2604GT013450"
},
"metrics_info": {
"acceptance_rate": 0.98,
"cancellation_rate": 0.35,
"thumbs_up": null,
"rating": 4.89,
"time_since_first_trip": "5.5 years",
"level_name": "Blue",
"debt_pending": null,
"debt_paid": null,
"activation_status": "active"
},
"ids_info": [
{
"type": "social_security_number",
"name": "nss",
"value": "32128929096"
},
{
"type": "tax",
"name": "rfc",
"value": "RIHJ941031QG7"
},
]
}
}

Query params

ParameterDescriptionTypeRequiredExample
account_idThe ID of the accountuuidTrue054d0a9d-38ec-40cb-a31c-09b483242e4a