Skip to main content

Quickstart

1. Get your Private API Key and Widget ID

To integrate with Palenca, you'll need a Private API Key and Widget ID.

Request access to Palenca by clicking here.

2. Login with your custom Widget

Once you have your Widget ID, you'll be able to launch your custom widget where users can log in to the platforms they work in.

3. Get the data

To get the employment data from the workers that connected with Palenca, you can

  • either login to your console
  • request it programatically using the user_id

If you want to do it programatically, execute the following cURL request using your Private API Key:

curl --location --request GET 'https://apiv2.palenca.com/v1/users/:user_id/accounts' \
--header 'x-api-key: private_api_key' \
--header 'Content-Type: application/json'

The full documentation for this endpoint can be found here.

It will return a JSON listing the accounts for that specific user.

This is an example of how the JSON response is structured:

{
"success": true,
"error": null,
"data": {
"user_id": "6c7be3cd-cd73-4043-a1b7-7583dd09ed03",
"accounts": [
{
"account_id": "d2fddb33-25a8-436d-bfb1-e4593dc2db26",
"country": "mx",
"platform": "uber",
"status": "success",
"identifier": "gonzalo@palenca.com",
"worker_id": "6061221b-01ea-42b8-a27d-9be359868284",
"failed_reason": "",
"status_details": "",
"warning": null
},
{
"account_id": "8c911268-442c-428a-959f-34f07c2737d3",
"country": "mx",
"platform": "didi",
"status": "validation_pending",
"identifier": "1155787774",
"worker_id": "650910981326762",
"failed_reason": "",
"status_details": "",
"warning": null
},
{
"account_id": "691a9931-b727-4c3e-b988-645ca493f60c",
"country": "mx",
"platform": "imss",
"status": "failed",
"identifier": "NAMP960111HCMLNS03",
"worker_id": "NAMP960111HCMLNS03",
"failed_reason": "invalid_credentials",
"status_details": "invalid_credentials",
"warning": null
}
]
}
}

Now that you have an account_id you can start searching for the worker's information.

For example if you want to retrieve the worker's profile, you'll have to execute this request:

curl --location --request GET 'https://apiv2.palenca.com/v1/accounts/:account_id/profile' \
--header 'x-api-key: private_api_key' \
--header 'Content-Type: application/json'

The full documentation for this endpoint can be found here.

This endpoint will return personal information, earnings and more data for the worker that logged in successfully using your widget.

You can check here for more information retrieving endpoints.

Congratulations, you're now integrated with Palenca!