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
- JavaScript
- Python
- curl
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)
}
})()
import requests
url = 'https://api.palenca.com/v1/accounts/:account_id/profile'
headers = {
'x-api-key': 'private_api_key',
'Content-Type': 'application/json'
}
response = requests.request('GET', url, headers=headers)
curl --location --request GET 'https://api.palenca.com/v1/accounts/:account_id/profile'
--header 'x-api-key: private_api_key' \
--header 'Content-Type: application/json' \
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
Parameter | Description | Type | Required | Example |
---|---|---|---|---|
account_id | The ID of the account | uuid | True | 054d0a9d-38ec-40cb-a31c-09b483242e4a |