NAV
shell python javascript

🚀 New API!

Upgrade to the latest version to take advantage of new features and quick responses, the new API is faster for you, for more information visit: documentation.palenca.com

Introduction

Welcome to Palenca!

You can use our API to access marketplaces data for Gig Workers and Restaurants in LatAm.

You can view code examples on the right hand side, in the dark area.

You can choose among several programming languages.

This documentation is being continuously written, corrected, and edited. If you find something's wrong or you want to share an improvement with us, reach out to us at support@palenca.com.

Authentication

headers = {
    'x-api-key': 'your_api_key',
}
# With shell, you can just pass the correct header with each request
curl "api_endpoint_here" \
  -H "x-api-key: your_api_key"
const headers = {
  'x-api-key': 'your_api_key'
}

Make sure to replace your_api_key with your own API key.

Palenca uses API keys to allow access to the API.

The API key must be included in all API requests in a header that looks like the following:

x-api-key: your_api_key

Versioning

When calling the /get-user endpoint, the API call should be made with a x-api-version header which guarantees that your call is using the correct API version. The header looks like the following example:

x-api-version: 1.1.0

If no version is passed, the default version will be 1.0.0.

Countries

# Setting of the country of the User
curl --location --request POST 'https://api.palenca.com/uber/create-user' \
--header 'x-api-key: your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "email": "jayroplascencia@gmail.com",
   "password": "mygreatpassword"
}'

When performing POST requests, you have to set the country code of the User in the post body.

Here is the list of available countries with their respective codes and the platforms supported in them:

Country Code Platforms
Argentina ar Beat, Cabify, Didi, PedidosYa, Rapiboy, Rappi, Uber
Brazil br iFood, Uber, Noventa Nove, Uber Eats
Bolivia bo PedidosYa, Uber
Chile cl Beat, Cabify, Cornershop, Didi, inDriver, PedidosYa, Rappi, Uber, Uber Eats
Costa Rica cr PedidosYa, Uber
Colombia co Cabify, Didi, Didi Food, iFood, inDriver, Mensajeros Urbanos, PedidosYa, Rappi, Uber
Ecuador ec Cabify, PedidosYa, Rappi, Uber, Uber Eats
El Salvador sv PedidosYa, Uber Eats
MĂ©xico mx 99minutos, Beat, Cabify, Cornershop, Didi, Didi Food, inDriver, Lalamove, Mensajeros Urbanos, Rappi, Uber, Uber Eats, Worky, Runa, IMSS, ISSSTE, Pemex
Panamá pa PedidosYa, Uber, Uber Eats
PerĂş pe 99minutos, Cabify, Cornershop, Didi, inDriver, PedidosYa, Rappi, Uber
Venezuela ve PedidosYa

Sandbox

API Key

In order to test quickly the endpoints without needing real Gig Workers accounts, you can use the Sandbox.

Just add sandbox_ in front of your API Key.

For example, your API Key becomes sandbox_2d16732c-6dbf-4b44-8902-5a8c435d1aac.

You will be able to see quickly the format of responses that you can expect from each endpoint.

Versioning

Versioning works the same way as in the production environment, check the Versioning section.

Widget

If you want to test the widget with the sandbox mode ON, you can either

Testing Webhooks

To test the webhooks in sandbox mode you can add webhook_url where the value correspond to in the params for /:platform/create-user or /:platform/validate-user, Palenca will fire a notification to the specified URL, example of response:

{
    "webhook_url": "https://service.com/webhook",
    "company_name": "Palenca Sandbox",
    "user_id": "custom-user-id",
    "platform": "rappi",
    "data": {
        "webhook_type": "USER",
        "webhook_action": "CREATED",
        "user_id": "custom-user-id",
        "platform": "rappi",
        "error": {}
    }
}

Sandbox Error Responses

Invalid credentials (401)

{
    "message": "INVALID_CREDENTIALS",
    "user_id": "7654321",
    "is_sandbox": true
}

User not found (404)

{
    "message": "NOT_FOUND",
    "user_id": "7654321",
    "is_sandbox": true,
    "details": "Profile User is None"
}

Sandbox error (500)

{
    "message": "SANDBOX_ERROR",
    "user_id": "7654321",
    "is_sandbox": true
}

Credentials

# For IMSS and ISSSTE users, make sure to use tax_id field when creating a user
# For example:
curl --location --request POST 'https://api.palenca.com/issste/create-user' \
--header 'x-api-key: sandbox_my_api_key' \
--header 'Content-Type: application/json' \
--header 'x-api-version: 1.1.0' \
--data-raw '{
   "country": "mx",
   "platform": "issste",
   "tax_id": "GOPJ930704HDFPRR05"
}'

# Successfully create a user
curl --location --request POST 'https://api.palenca.com/uber/create-user' \
--header 'x-api-key: sandbox_my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "email": "jayroplascencia@gmail.com"
}'


# Get a 401, using invalid email couple
curl --location --request POST 'https://api.palenca.com/uber/create-user' \
--header 'x-api-key: sandbox_my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "email": "jayroplascencias@gmail.com"
}'

# Successfully validate a user
curl --location --request POST 'https://api.palenca.com/uber/validate-user-code' \
--header 'x-api-key: sandbox_my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "code": "1234"
}'

# Get a 401, using an invalid code
curl --location --request POST 'https://api.palenca.com/uber/validate-user-code' \
--header 'x-api-key: sandbox_my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "code": "1343"
}'


# Successfully validate a user password
curl --location --request POST 'https://api.palenca.com/uber/validate-user' \
--header 'x-api-key: sandbox_my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "password": "mygreatpassword"
}'

# Get a 401, using an invalid password
curl --location --request POST 'https://api.palenca.com/uber/validate-user' \
--header 'x-api-key: sandbox_my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "password": "mygreatpasswords"
}'

# Successfully get a user
curl --location --request GET 'https://api.palenca.com/uber/get-user/user_id_from_your_db' \
--header 'x-api-key: sandbox_my_api_key' \
--header 'x-api-version: 1.1.0'

# Successfully get another user with different data
curl --location --request GET 'https://api.palenca.com/uber/get-user/1234567' \
--header 'x-api-key: sandbox_my_api_key' \
--header 'x-api-version: 1.1.0'

# Get a 404
curl --location --request GET 'https://api.palenca.com/uber/get-user/7654321' \
--header 'x-api-key: sandbox_my_api_key' \
--header 'x-api-version: 1.1.0'

To get examples from Uber, Didi, Rappi, Ifood, and Rapiboy you have to use specific credentials. If not, you'll get a 401.

Platform Email, Phone Number, Token, Tax ID Password 2FA Code
Uber jayroplascencia@gmail.com or jose@palenca.com mygreatpassword or Bestpassword123* 1234 or 5678
Uber Eats jayroplascencia@gmail.com or jose@palenca.com mygreatpassword or Bestpassword123* 1234 or 5678
Didi 5576716451 or 5571765164 or 5571765064 N/A 123456 or 234567 or 345678
Rappi jayroplascencia@gmail.com or jose@palenca.com or 5576716451 or 5571765164 N/A 123456 or 456789
Ifood jayroplascencia@gmail.com or jose@palenca.com mygreatpassword or Bestpassword123* N/A
99minutos c5dd2f56875c7d03da5cd3g0e8047eb69fc76f9c or 51b018d034cd348adc9fc76db1a74e6a5d4d7b1o N/A N/A
Cabify jayroplascencia@gmail.com or jose@palenca.com mygreatpassword or Bestpassword123* N/A
Cornershop jayroplascencia@gmail.com or jose@palenca.com mygreatpassword or Bestpassword123* N/A
Beat 5576716451 or 5571765164 1234 or 5678 N/A
PedidosYa elpibedeoro@gmail.com or jose@palenca.com GoldenPassword or Bestpassword123* N/A
Rapiboy jayroplascencia@gmail.com or jose@palenca.com mygreatpassword or Bestpassword123* N/A
IMSS GOPJ930704HDFPRR05 N/A N/A
Indriver 5576716451 or 5571765164 N/A 1234 or 5678
ISSSTE GOPJ930704HDFPRR05 N/A N/A
Runa jayroplascencia@gmail.com or jose@palenca.com mygreatpassword or Bestpassword123* N/A
Worky jayroplascencia@gmail.com or jose@palenca.com or 5571765164 Any password works N/A
Pemex 123456 or 891011 mygreatpassword or Bestpassword123 N/A

For other platforms, you can use any credentials you want.

In order to perform GET requests (for ex: GET uber/get-user/< user_id >), you can use any ID you want.

However, we have some interesing IDs you might want to check:

Id Result
1234567 status 200, but data returned is different than using other IDs
7654321 status 404

Finally, make sure you check out the sandbox examples in the shell tab on the right.

Information

Profile

Profile is a Dict with the following format:

Variable Description Type Example
worker_id Worker ID used by the platform str 628cdf56-95f1-4397-a154-281112781240
first_name First Name str Jose Carlos
last_name Last Name str Huerta Garcia
email Email str jose@palenca.com
phone_prefix Phone Prefix str +52
phone_number Phone Number str 15583490938
activation_status Activation Status str active
city_name City of Operation str Mexico City
id_type ID Type str, nullable RFC
id_number ID Number str VST190815509
metrics_info Other Metrics, Platform Specific dict metrics_info variables
vehicle_info Vehicle Info, Platform Specific dict vehicle_info variables
bank_info Bank Info, Platform Specific dict bank_info variables
other_info Other Info, Platform Specific dict other_info variables
employment_info Employment Info, Platform Specific dict employment_info variables

metrics_info

Variable Description Type Example
rating Worker Rating float 4.91
lifetime_trips All trips realized on the platform int 3874
time_since_ft Time since First Trip str 9 months
level_name Level Name str Diamond
acceptance_rate Acceptance Rate float 0.97
cancellation_rate Rate of trips cancelled after being accepted float 0.05
picking_speed Average Picking Speed float 2.06
completion_rate Rate of trips completed float 0.97
hours_worked Total hours worked float 8.5
pickup_services_arrived Number of Pickup Services Arrived int 265
delivery_services_arrived Number of Delivery Services Arrived int 265
points Points int 0

vehicle_info

Variable Description Type Example
type Vehicle Type str car
brand Vehicle Brand str Ford
model Vehicle Model str Fiesta
year Vehicle Year str 2017
license_plate Vehicle License Plate str ABC123
vin Vehicle VIN str 3SCK2AEG8M1006777

bank_info

Variable Description Type Example
bank_code Bank Code str 01
bank_name Bank Name str Banco Azteca
holder_name Account Holder Name str Jose Carlos Huerta Garcia
holder_address Account Holder Address str Calle de la Reforma #123
account_number Account Number str 6461801921********

other_info

Variable Description Type Example
points Points list[dict] [{"Puntos":-3.0,"Cantidad":0,"Nombre":"Llega tarde"},{"Puntos":-8.0,"Cantidad":0,"Nombre":"No voy"},{"Puntos":-10.0,"Cantidad":0,"Nombre":"Falto a una reserva"}]
debt_pending Debt Pending int 2012
debt_paid Debt Paid int 480
estimated_lifetime_trips A proxy for number of trips int 788
estimated_time_since_ft A proxy for start date for worker str 3+ months
url_picture URL of the Profile Picture str URL
gender Gender str male
personal_email Personal Email str gonzalo@palenca.com
nationality Nationality str Mexicano
civil_status Civil Status str Soltero(a)
curp Curp str CURS901112HCMRNL00

employment_info

Variable Description Type Example
id Employer's id str Y5060456
employer Employer's name str PALENCA
federal_entity Employer's federal entity str CIUDAD DE MEXICO
end_of_rights End of Rights str 2021-06-21
years_in_company Years in Company int 0
monthly_salary Monthly salary float 96419.0
quoted_days Quoted days str 31
quoted_weeks Quoted weeks str 233
start_date Contract Start Date str 2021-12-16
end_date Contract End Date str 2022-03-01
compensation_type Compensation Type str Fijo
vacation_days Vacation Days str 20
workshift Workshift str Completa
base_salary Salary Base float 2405.5
outsourcer_employee Outsourcer Employee bool true
outsourcer_detail Outsourcer Detail str ''
social_insurance Social insurance number str 96119227245
pdf_url Url that downloads user's employment pdf when clicked str https://example-url.s3.amazonaws.com/user_id.pdf
job_title Employer's job title str Software Engineer
employment_history User's employment history dict {"employer": "COMPANY SA DE CV", "start_date": "24/03/2022", "end_date": null, "base_salary": 336.93 }

Earnings

Earnings is a List of Dict with the following format:

Variable Description Type Example
datestr Specific Day str 2020-01-20
amount Amount (Is the old field earnings deprecated in v1.1.0) float 345.45
currency Currency str MXN
other_info Additional Info, Platform Specific dict other_info variables

other_info

Variable Description Type Example
cash_received Cash Received int 0
tips Tips int 39
promotions Promotions int 10
count_trips Number of Trips int 2
debt Debt float 0.0
balance Balance float, nullable 3457.45
fee Fee float 35.62

Events

Events is a List of Dict with the following format:

Variable Description Type Example
platform Platform Name str uber
event_id Event ID str df3740a9-ff4c-425c-b688-f8717b85179b
type Event Type str rideshare
timezone Event Type str America/Mexico_City
country Country str, nullable mx
start_date Start of the Event str 2020-01-20 12:03:12
amount Amount of the event float 345.45
currency Currency str MXN
duration Duration in seconds int, nullable 876
distance Distance float, nullable 10.1
distance_unit Distance Unit str km
start_location Start Location dict {"pickup_address": "Patriotismo, Col Escandon Miguel Hidalgo, 11800 Ciudad de MĂ©xico, Ciudad de MĂ©xico"}
end_location End Location dict {"dropoff_address": "Calle Cholula, Hippodromo, Cuauhtémoc"}
other_info Additional Info, Platform Specific dict other_info variables

other_info

Variable Description Type Example
date_requested Date Requested str Sun, May 23
time_requested Time Requested str 5:19 PM
trip_type Trip Type str TRIP
trip_subtype Trip Subtype str UberX
points_earned Points Earned int 1 point
cash_received Cash Received int 100
is_cash_payment Is Cash Payment bool false
trip_timestamp Trip Timestamp int 1621808394
earnings_amount Earnings Amount float 33.16
base_fare Base Fare for trip float 76.18
payouts Payouts float 0.0
taxes Taxes float 0.77

Integration

Palenca Link is the client-side and the secure way to link the user accounts to Palenca and allow you to access their data via the Palenca API.

Palenca Link will handle credential validation, multi-factor authentication, and error handling for each platform that we support.

<script src="https://link.palenca.com/v1/index.min.js"></script>
npm install @palenca/palenca-link
import Link from "@palenca/palenca-link";
Parameter Example Description Required
apiKey 6187344f-d2e9-4ff1-a0ca-7a1ad512682d The private API key True
clientId 6187344f Your Client ID True
containerName palenca_link The lib will take this param to build the iFrame True
initialState open Defines the initial state. open by default. You can reload the widget using close(reload=true) False
userId 12345 Your own user id from your database False
lang es Replaces the browser's auto-detected language. Available languages: es, en & pt. null by default False
platform uber After the user's consent, the form of the selected platform will be displayed. null by default False
sandbox false If set to true, the sandbox mode is enabled. false by default False
hideLogo false If set to true, your company logo is hidden. false by default False
hideConsent false If set to true, the consent page is hidden. false by default False
hideWhatsApp false If set to true, the whatsapp floating button is hidden. false by default False
utms {'utm_source': 'x', 'utm_campaign': 'y'} All the utms will be appended to the redirect_url False
sandboxWebhookUrl https://palenca.com/sandbox_webhook Used to test webhooks. The API will fire a notification to the specified URL False
styles.width size in % or px Width of the container max is 100%. False
styles.height size in % or px Height of the container max is 100% False
styles.overflow hidden Specifies whether to clip the content or to add scrollbars. False
styles.position relative Specifies the type of positioning method used for an element. False

The Palenca Link works with postMessage events, then you need to catch and handle them.

The events are listed here:

Event name Description
authenticated Indicates that your API key is correct and that the widget has been initialized
connection_error An error occurred meanwhile trying to connect a user with the platform
successful_connection The user was connected successfully with the platform
// authenticated
{
  signal: "authenticated",
  sandbox: true
}
// connection_error
{
  signal: "connection_error",
  sandbox: true,
  platform: "uber",
  message: "INVALID_CREDENTIALS",
  user_id: "12345",
  country: "br"
}
// successful_connection
{
  signal: "successful_connection",
  sandbox: true,
  message: "SUCCESS",
  user_id: "12345",
  platform: "uber",
  country: "br"
}
  1. Standalone
  2. Open Palenca Link using a button

Widget

Base URL

Using our Widget is a secure and easy way to let your users connect with their different platforms.

The base URL of the widget is https://widget.palenca.com/?client_id={client_id}

You need to pass your client_id in the URL string.

Parameters

You can taylor the widget to your need using the following parameters.

For example, it is highly recommended that you pass your own internal user_id as an additional parameter to the URL.

This will make it easy to match the internal information that you have from your user to the information Palenca provide you.

https://widget.palenca.com/?client_id={client_id}&user_id={user_id}

You can check all the available URL parameters below.

string Description
client_id Your client id (Required) (e.g: 3jqx7d2v)
user_id Your own user id from your database (e.g: 03eb0d70)
is_sandbox If set to true, the sandbox mode is enabled
hide_whatsapp If set to true, the whatsapp floating button is hidden
hide_logo If set to true, your company logo is hidden
platform After the user's consent, the form of the selected platform will be displayed (e.g. uber)
lng Replaces the browser's auto-detected language. Available languages: es, en & pt
hide_consent If set to true, the consent page is hidden
utm_* All the params that start with utm_ will be appended to the redirect_url
sandbox_webhook_url Used to test webhooks. The API will fire a notification to the specified URL

Standalone

You can directly send your users to our widget.

To do so, you have to redirect the users to your url.

https://widget.palenca.com/?client_id={client_id}&user_id={user_id}

Webpage

You can directly embed our widget in your web page using iframe.

The src of the iframe must have your URL as value and you need to set a width and a height on the iframe.

Here is a working example:

<iframe src="https://widget.palenca.com/?client_id={client_id}&user_id={user_id}" style="width: 100%; border: none; height: 100%; overflow: scroll;"></iframe>

Mobile

You can directly embed our widget in your mobile app using Webview.

When you initiate your webview, make sure to include your client_id in the url.

https://widget.palenca.com/?client_id={client_id}&user_id={user_id}

Socket

We are using a Socket to pass information about what happens in the widget. To use the socket, you must set the user_id with your own internal user_id

You can listen to the Events to the following url: https://socket.palenca.com/

The Event information will be sent with the following format:

{ 'type': 'USER_CONECTED', 'user': 'user_1617986178891', 'platform': 'rappi' }

Webhook

Description

A webhook is a way for an app to provide other applications with real-time information. Palenca delivers data programmatically to inform you about a user that connected successfully or new earnings available.

For example, Palenca will send a webhook when - an Uber worker connected successfully, after the MFA validation - new earnings data are available after a successful refresh

To receive Palenca webhooks, you need to set up an endpoint on your server that can listen to POST requests, then provide this endpoint URL to Palenca.

Retries

If we are not receiving a 200 or 201 status code within 30 seconds after the first POST to the webhook URL, Palenca will try to resend the webhook up to three times with a few minutes in between each post.

Types

Webhook type Webhook action
USER CREATED
USER UPDATED
PAYMENT_RETENTION CREATED
EARNINGS DEFAULT_UPDATE

USER: CREATED

Fired when a User is created (and validated for the platforms with MFA) successfully.

{
  "webhook_type": "USER",
  "webhook_action": "CREATED",
  "user_id": "custom_user_id",
  "platform": "rappi",
  "error": {}
}

Once this webhook has been fired, you can fetch the Profile of the User, using the /get-user endpoint

USER: UPDATED

Available only for IMSS as of June 10, 2022. This webhook is fired when a User's profile was refreshed to look for changes in his or her employment situation.

{
    "webhook_type": "USER",
    "webhook_action": "UPDATED",
    "user_id": "custom_user_id",
    "platform": "imss",
    "updated": true,
    "error": {}
}

Once this webhook has been fired, you can fetch the Profile of the User, using the /get-user endpoint, to see the updated profile.

EARNINGS: DEFAULT_UPDATE

Fired when new earnings are available for a User.

This webhook can be triggered at different moments following a successful user login:

The key earnings represents the number of days with earnings that were recovered for the user.

{
  "webhook_type": "EARNINGS",
  "webhook_action": "DEFAULT_UPDATE",
  "user_id": "custom_user_id",
  "platform": "rappi",
  "earnings": 25,
  "error": {}
}

Once this webhook has been fired, you can fetch the Earnings of the User, using the /get-user endpoint

PAYMENT_RETENTION: CREATED

Fired when a Payment retention is performed successfully.

{
  "webhook_type": "PAYMENT_RETENTION",
  "webhook_action": "CREATED",
  "user_id": "custom_user_id",
  "platform": "uber",
  "error": {}
}

Once this webhook has been fired, every week, you will receive a fixed amount of the user's salary.

ERROR

When there is an error, we include the details in the key error

{
  "webhook_type": "USER",
  "webhook_action": "CREATED",
  "user_id": "custom_user_id",
  "platform": "rappi",
  "error": {
    "type": "INVALID_CREDENTIALS",
    "message": "Invalid email or password",
    "status": 400
  }
}

Drivers

Uber

Create User

import requests

url = 'https://api.palenca.com/uber/create-user'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'email': 'jose@palenca.com'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/uber/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'email': 'jose@palenca.com'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/uber/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
   "message": "CONFIRMATION_CODE_SENT",
   "user_id": "user_id_from_your_db",
   "platform": "uber"
}

This endpoint allows you to :

Note: If the Uber driver you are currently validating has disabled MFA (Multi-factor authentication), you will receive a status code of 201 (instead of 200) when calling this endpoint. This is not an error; it means that no validate-user is needed because the user has disabled MFA.

HTTP Request

POST https://api.palenca.com/uber/create-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
email email of the Uber user account (e.g: jose@palenca.com)

Validate User Code

import requests

url = 'https://api.palenca.com/uber/validate-user-code'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'code': '1234'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/uber/validate-user-code' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "code": "1234"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'code': '1234'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/uber/validate-user-code',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "PASSWORD_REQUIRED",
    "user_id": "user_id_from_your_db",
    "is_sandbox": true,
    "platform": "uber",
    "country": "mx"
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/uber/validate-user-code

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
code 4 digits code received by SMS (e.g: 1234)

Validate User

import requests

url = 'https://api.palenca.com/uber/validate-user'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    "password": "MyGreatPassword62"
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/uber/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    "password": "MyGreatPassword62"
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/uber/validate-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "uber"
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/uber/validate-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
password password of the Uber user account

Get User

import requests

url = 'https://api.palenca.com/uber/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/uber/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/uber/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "uber",
    "country": "mx",
    "profile": {
        "worker_id": "505100c1-f645-40c1-b9ad-3312b4252c6d",
        "first_name": "Jairo",
        "last_name": "Huerta Rincon",
        "email": "jayroplascencia@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "+5215540086725",
        "activation_status": "activated",
        "id_type": null,
        "id_number": "",
        "city_name": "Puebla",
        "employment_info": {},
        "metrics_info": {
            "rating": 4.89,
            "lifetime_trips": 5624,
            "time_since_ft": "5.5 years",
            "level_name": "Blue",
            "acceptance_rate": 0.98,
            "cancellation_rate": 0.35
        },
        "vehicle_info": {
            "type": "car",
            "brand": "Volkswagen",
            "model": "Vento",
            "year": "2016",
            "license_plate": "MXT5576",
            "vin": "MEX5H2604GT013450"
        },
        "bank_info": {},
        "other_info": {
            "url_picture": "https://www.example.com"
        }
    },
    "earnings": [
          {
              "datestr": "2021-04-30",
              "amount": 0.0,
              "currency": "MXN",
              "other_info": {
                  "cash_received": 0,
                  "tips": 0,
                  "promotions": 0,
                  "balance": null
              }
          },
          {
              "datestr": "2021-04-29",
              "amount": 326.95,
              "currency": "MXN",
              "other_info": {
                  "cash_received": -159,
                  "tips": 0,
                  "promotions": 0,
                  "balance": null
              }
          },
          {
              "datestr": "2021-04-28",
              "amount": 257.71,
              "currency": "MXN",
              "other_info": {
                  "cash_received": -132,
                  "tips": 0,
                  "promotions": 0,
                  "balance": null
              }
          },
          {
              "datestr": "2021-04-27",
              "amount": 309.84,
              "currency": "MXN",
              "other_info": {
                  "cash_received": -32,
                  "tips": 0,
                  "promotions": 0,
                  "balance": null
              }
          },
        ...
    ],
    "events":[
      {
          "platform": "uber",
          "event_id": "0cfb3308-b1a5-4f53-a37d-2034f75a3cf8",
          "type": "rideshare",
          "timezone": "America/Mexico_City",
          "country": null,
          "start_date": "2021-10-11 10:49:13",
          "amount": 25.12,
          "currency": "MXN",
          "duration": 602,
          "distance": 5.89,
          "distance_unit": "km",
          "start_location": {
              "pickup_address": "Tlaxcalancingo, Pue., MĂ©xico"
          },
          "end_location": {
              "dropoff_address": "La Noria, Puebla, Pue., MĂ©xico"
          },
          "other_info":{}
      },
    ...
  ]
}

This endpoint allows you to retrieve the data that you already requested for a given User

HTTP Request

GET https://api.palenca.com/uber/get-user/user_id_from_your_db

Change bank account

import requests

url = 'https://api.palenca.com/uber/change-bank-account'

payload = {
    'country': 'mx',
    'code': '1234',
    'user_id': 'user_id_from_your_db',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)



# Full flow
import requests

url = 'https://api.palenca.com/uber/create-user'

payload_create_user = {
    'country': 'mx',
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db',
    'purpose': 'CHANGE_BANK_ACCOUNT'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

requests.request('POST', url, headers=headers, json=payload_create_user)

url = 'https://api.palenca.com/uber/change-bank-account'

payload_switch_deposit = {
    'country': 'mx',
    'code': '1234',
    'user_id': 'user_id_from_your_db',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
}

response = requests.request('POST', url, headers=headers, json=payload_switch_deposit)

print(response.text)
curl --location --request POST 'https://api.palenca.com/uber/change-bank-account' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "country": "mx",
   "user_id": "user_id_from_your_db",
   "code": "1234",
   "bank_account": {
      "clabe": "64618020217711114",
      "full_name": "Jose Felipe Fernandez Rincon",
      "birth_date": "1996-07-24",
      "post_code": "06100",
      "city": "Distrito Federal",
      "bank_name": "STP",
      "address": "Av de las Maestras 379"
  }
}'



# Full flow
curl --location --request POST 'https://api.palenca.com/uber/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com",
   "password": "MyGreatPassword62",
   "purpose": "CHANGE_BANK_ACCOUNT"
}'

curl --location --request POST 'https://api.palenca.com/uber/change-bank-account' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "country": "mx",
   "user_id": "user_id_from_your_db",
   "code": "1234",
   "bank_account": {
      "clabe": "64618020217711114",
      "full_name": "Jose Felipe Fernandez Rincon",
      "birth_date": "1996-07-24",
      "post_code": "06100",
      "city": "Distrito Federal",
      "bank_name": "STP",
      "address": "Av de las Maestras 379"
  }
}'
const axios = require('axios')

const data = JSON.stringify({
    'country': 'mx',
    'code': '1234',
    'user_id': 'user_id_from_your_db',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
})

const config = {
  method: 'post',
  url: 'https://api.palenca.com/uber/change-bank-account',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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


// Full flow
const axios = require('axios')
let data = JSON.stringify({
    'country': 'mx',
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db',
    'purpose': 'CHANGE_BANK_ACCOUNT'
})

let config = {
  method: 'post',
  url: 'https://api.palenca.com/uber/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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

data = JSON.stringify({
    'country': 'mx',
    'code': '1234',
    'user_id': 'user_id_from_your_db',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
})

config = {
  method: 'post',
  url: 'https://api.palenca.com/uber/change-bank-account',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db"
}

This endpoint allows you to :

In order to change bank account, you'll have to :

  1. Create a Uber User with a "purpose" body key set to "CHANGE_BANK_ACCOUNT"
  2. Make the following request: POST /uber/change-bank-account

HTTP Request

POST https://api.palenca.com/uber/change-bank-account

Payload

Parameter Description
code 4 digits code received by SMS in order to allow (e.g: 1234)
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User. Should be mx for now
bank_account A json representing the bank account the user wants to use to receive his money
bank_account.clabe The CLABE of the bank account (e.g: 64618020217711114)
bank_account.full_name Full name of the user (e.g: Jose Felipe Fernandez Rincon)
bank_account.birth_date YYYY-MM-DD formated birthdate of the user (e.g: 1996-07-24)
bank_account.post_code The post code where the user lives (e.g: 06100)
bank_account.city Name of the city where the user lives (e.g: Distrito Federal)
bank_account.bank_name The name of the bank the user wants to use to receive his money (e.g: STP)
bank_account.address Street name + street number of the user's address (e.g: Av de las Maestras 379)

Set up payment retention (only for MĂ©xico)

import requests

url = 'https://api.palenca.com/users/user_id_from_your_db/setup-payment-retention'

payload = {
  'tax_id': 'COAA660510HDFNLL12',
  'weekly_payment': 100,
  'country': 'mx',
  'platform': 'uber'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/users/user_id_from_your_db/setup-payment-retention' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tax_id": "COAA660510HDFNLL12",
  "weekly_payment": 100,
  "country": "mx",
  "platform": "uber"
}'
const axios = require('axios')
const data = JSON.stringify({
  'tax_id': 'COAA660510HDFNLL12',
  'weekly_payment': 100,
  'country': 'mx',
  'platform': 'uber'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/users/user_id_from_your_db/setup-payment-retention',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
  "message": "PENDING",
  "user_id": "user_id_from_your_db",
  "platform": "uber",
  "country": "mx",
  "weekly_payment": 100
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/uber/setup-payment-retention

Payload

Parameter Description
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User. Must be "mx" for for now (only available in Mexico)
platform The platform for which you want to set up a payment retention. Must be "uber" for now
tax_id The tax id of the user. Must be a RFC or a CURP for now (only available in Mexico)

Didi

Create User

import requests

url = 'https://api.palenca.com/didi/create-user'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'phone_number': '5576716451'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/didi/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "phone_number": "5576716451"

}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'phone_number': '5576716451'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/didi/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
  "message":"CONFIRMATION_CODE_SENT",
  "user_id": "user_id_from_your_db",
  "platform": "didi",
  "country": "mx"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/didi/create-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
phone_number phone number of the Didi user account (e.g: 5576716450)

Validate User

import requests

url = 'https://api.palenca.com/didi/validate-user'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'phone_number': '5576716451',
    'code': '123456'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/didi/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "phone_number": "5576716451",
   "code": "123456"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'phone_number': '5576716451',
    'code': '123456'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/didi/validate-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "didi",
    "country": "mx"
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/didi/validate-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
phone_number phone number of the Didi user account (e.g: 5576716450)
code 6 digits code received by SMS (e.g: 123456)

Get User

import requests

url = 'https://api.palenca.com/didi/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/didi/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'\
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/didi/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "didi",
    "country": "mx",
    "profile": {
        "worker_id": "650911144900052",
        "first_name": "Cristian Gabriel",
        "last_name": "Huerta Garcia",
        "email": "jayroplascencia@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "18118562710",
        "activation_status": "activated",
        "id_type": "rfc",
        "id_number": "CACR7801068J5",
        "city_name": "Monterrey",
        "employment_info": {},
        "metrics_info": {
          "rating": 4.92,
          "lifetime_trips": 4914,
          "time_since_ft": "1+ years",
          "acceptance_rate": 0.82,
          "completion_rate": 0.89,
          "level_name":  "Express"
        },
        "vehicle_info": {
          "type": "car",
          "brand": "Volkswagen-Jetta",
          "year": "2017",
          "license_plate": "Y22BDR",
          "vin": "3VW2K1AJ2HM386023"
      },
        "bank_info":  {
          "bank_code": "002",
          "holder_name": "Cristian Gabriel Huerta Garcia",
          "holder_address": "ProlongaciĂłn nernardo quintana 3009 int 8 col Cerrito colorado 2 cp 76116",
          "account_number": "0026809027********"
      },
        "other_info": {
          "url_picture": "https://img0.didiglobal.com/static/zhuancheimg/upload/rooster20200315/6509109205242866d46d21b78939ef98d37e8d7225eb516/2889bf9801386044739862cd101aa986ac10af7e_tailor"
      }
    },
    "earnings": [
        {
            "datestr": "2021-03-10",
            "amount": 515.72,
            "currency": "MXN",
            "other_info": {
              "cash_received": 277,
              "balance": null
              }
        },
        {
            "datestr": "2021-03-09",
            "amount": 364.27,
            "currency": "MXN",
            "other_info": {
              "cash_received": 240,
              "balance": null
              }
            }
        ...
    ],
    "events": [
      {
          "platform": "didi",
          "event_id": "TVRRME1UTTNOak0zTVRJNU56STVNVGd4TWc9PQ==",
          "type": "rideshare",
          "timezone": "America/Mexico_City",
          "country": "mx",
          "start_date": "2021-03-22 17:29:24",
          "amount": 40.0,
          "currency": "MXN",
          "duration": 925,
          "distance": null,
          "distance_unit": "",
          "start_location": {},
          "end_location": {},
          "other_info": {
              "cash_received": 40,
              "is_cash_payment": true
          }
      },
      {
          "platform": "didi",
          "event_id": "TVRRME1UTTNOak0zTVRJNU56STVNVGd4TWc9PQ==",
          "type": "rideshare",
          "timezone": "America/Mexico_City",
          "country": "mx",
          "start_date": "2021-03-22 17:29:24",
          "amount": 40.0,
          "currency": "MXN",
          "duration": 925,
          "distance": null,
          "distance_unit": "",
          "start_location": {},
          "end_location": {},
          "other_info": {
              "cash_received": 40,
              "is_cash_payment": true
          }
      },
      ...
    ]
}

This endpoint allows you to retrieve the data that you already requested for a given User

HTTP Request

GET https://api.palenca.com/didi/get-user/user_id_from_your_db

Change bank account

import requests

url = 'https://api.palenca.com/didi/change-bank-account'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'code': '123456',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)



# Full flow
import requests

url = 'https://api.palenca.com/didi/create-user'

payload_create_user = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'email': 'jose@palenca.com',
    'purpose': 'CHANGE_BANK_ACCOUNT'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

requests.request('POST', url, headers=headers, json=payload_create_user)

url = 'https://api.palenca.com/didi/validate-user'

payload_validate_user = {
    'code': '123456',
    'user_id': 'user_id_from_your_db'
}

requests.request('POST', url, headers=headers, json=payload_validate_user)

url = 'https://api.palenca.com/didi/change-bank-account'

payload_switch_deposit = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'code': '123456',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
}

response = requests.request('POST', url, headers=headers, json=payload_switch_deposit)

print(response.text)
curl --location --request POST 'https://api.palenca.com/didi/change-bank-account' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "code": "123456",
   "bank_account": {
      "clabe": "64618020217711114",
      "full_name": "Jose Felipe Fernandez Rincon",
      "birth_date": "1996-07-24",
      "post_code": "06100",
      "city": "Distrito Federal",
      "bank_name": "STP",
      "address": "Av de las Maestras 379"
  }
}'



# full flow
curl --location --request POST 'https://api.palenca.com/didi/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com",
   "purpose": "CHANGE_BANK_ACCOUNT"
}'

curl --location --request POST 'https://api.palenca.com/didi/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "code": "1234"
}'

curl --location --request POST 'https://api.palenca.com/didi/change-bank-account' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "code": "123456",
   "bank_account": {
      "clabe": "64618020217711114",
      "full_name": "Jose Felipe Fernandez Rincon",
      "birth_date": "1996-07-24",
      "post_code": "06100",
      "city": "Distrito Federal",
      "bank_name": "STP",
      "address": "Av de las Maestras 379"
  }
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'code': '123456',
    'user_id': 'user_id_from_your_db',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
})

const config = {
  method: 'post',
  url: 'https://api.palenca.com/didi/change-bank-account',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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



// full flow
const axios = require('axios')
let data = JSON.stringify({
    'email': 'jose@palenca.com',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
    'purpose': 'CHANGE_BANK_ACCOUNT'
})

let config = {
  method: 'post',
  url: 'https://api.palenca.com/didi/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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

data = JSON.stringify({
    'code': '123456',
    'user_id': 'user_id_from_your_db'
})

config = {
  method: 'post',
  url: 'https://api.palenca.com/didi/validate-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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

// once you got user verification code for switch deposit

data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'code': '123456',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
})

config = {
  method: 'post',
  url: 'https://api.palenca.com/didi/change-bank-account',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db"
}

This endpoint allows you to :

In order to change bank account, you'll have to :

  1. Create a Didi User with a "purpose" body key set to "CHANGE_BANK_ACCOUNT"
  2. Validate the Didi User
  3. Change the bank account

HTTP Request

POST https://api.palenca.com/didi/change-bank-account

Payload

Parameter Description
code 6 digits code received by SMS in order to allow (e.g: 123456)
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User. Should be mx for now
bank_account A json representing the bank account the user wants to use to receive his money
bank_account.clabe The CLABE of the bank account (e.g: 64618020217711114)
bank_account.full_name Full name of the user (e.g: Jose Felipe Fernandez Rincon)
bank_account.birth_date YYYY-MM-DD formated birthdate of the user (e.g: 1996-07-24)
bank_account.post_code The post code where the user lives (e.g: 06100)
bank_account.city Name of the city where the user lives (e.g: Distrito Federal)
bank_account.bank_name The name of the bank the user wants to use to receive his money (e.g: STP)
bank_account.address Street name + street number of the user's address (e.g: Av de las Maestras 379)

Beat

Create User

import requests

url = 'https://api.palenca.com/beat/create-user'

payload = {
    'phone_number': '5576716451',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/beat/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "phone_number": "5576716451",
   "password": "MyGreatPassword62",
   "country": "mx",
}'
const axios = require('axios')
const data = JSON.stringify({
    'phone_number': '5576716451',
    'password': '1234',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/beat/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "beat",
    "country": "mx"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/beat/create-user

Payload

Parameter Description
phone_number phone number of the Beat user account (e.g: 5576716450)
password password of the Beat user account
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)

Get User

import requests

url = 'https://api.palenca.com/beat/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/beat/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/beat/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "beat",
    "country": "mx",
    "profile": {
        "worker_id": "l83jm",
        "first_name": "Jose",
        "last_name": "Aguilar Evangelista",
        "email": "jose@palenca.com",
        "phone_prefix": "+52",
        "phone_number": "5576714345",
        "activation_status": "activated",
        "id_type": "curp",
        "id_number": "JAEA940905HDFVVB01",
        "city_name": "",
        "employment_info": {},
        "metrics_info":{
          "rating":4.77,
          "lifetime_trips":296
        },
        "vehicle_info":{
            "type":"car",
            "brand":"Suzuki",
            "model":"Ertiga",
            "year":"2020",
            "license_plate":"NTR1786",
            "vin":"MHYNC22S6LJ110150"
        },
        "bank_info":{
            "bank_name":"Hsbc Mexico, S.A., Institucion De Banca Multiple, Grupo Financie",
            "holder_name":"Jose Aguilar Evangelista",
            "account_number":"021180065191923684"
        },
        "other_info":{
          "url_picture":"https://s3.amazonaws.com/beat-mexico/d/avatar/bUFMeE9jMjBxNU5IcGkweDdmN1hYQT09Ojq-9N6igSEHCUtHEgUw4QyR/xxhdpi/606978d93c3923effdd682b4685c47ea.jpg",
          "gender":"male"
        }
    },
    "earnings": [
        {
            "datestr": "2022-03-24",
            "amount": 37727.0,
            "currency": "CLP",
            "other_info": {
                "cash_received": 39500,
                "balance": null
            }
        },
        {
            "datestr": "2022-03-23",
            "amount": 28542.0,
            "currency": "CLP",
            "other_info": {
                "cash_received": 30800,
                "balance": null
            }
        },
        {
            "datestr": "2022-03-22",
            "amount": 29739.0,
            "currency": "CLP",
            "other_info": {
                "cash_received": 34600,
                "balance": null
            }
        }
        ...
    ],
    "events": [
        {
            "platform": "beat",
            "event_id": "WDBDQVR3RGRGZm5nb3d3am1RVC91Zz09Ojq-9N6igSEHCUtHEgUw4QyR",
            "type": "rideshare",
            "timezone": null,
            "country": null,
            "start_date": "2022-03-24 22:51:44",
            "amount": 5743.0,
            "currency": "CLP",
            "duration": null,
            "distance": null,
            "distance_unit": "",
            "start_location": {
                "pickup_address": "Pérez Román 9381, La Cisterna 7990404"
            },
            "end_location": {},
            "other_info": {
                "cash_received": 6700,
                "is_cash_payment": true
            }
        },
        {
            "platform": "beat",
            "event_id": "RGZPUzcrUERSQjlnTnIrTlBzZmxJdz09Ojq-9N6igSEHCUtHEgUw4QyR",
            "type": "rideshare",
            "timezone": null,
            "country": null,
            "start_date": "2022-03-24 22:22:12",
            "amount": 4545.0,
            "currency": "CLP",
            "duration": null,
            "distance": null,
            "distance_unit": "",
            "start_location": {
                "pickup_address": "Enrique Madrid Osorio 47, Maipo 8080251"
            },
            "end_location": {},
            "other_info": {
                "cash_received": 5300,
                "is_cash_payment": true
            }
        },
        ...
    ]
}

This endpoint allows you to retrieve the data that you already requested for a given User

HTTP Request

GET https://api.palenca.com/beat/get-user/user_id_from_your_db

Cabify

Create User

import requests

url = 'https://api.palenca.com/cabify/create-user'

payload = {
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/cabify/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com",
   "password": "MyGreatPassword62",
   "country": "mx",
}'
const axios = require('axios')
const data = JSON.stringify({
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/cabify/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "cabify",
    "country": "mx"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/cabify/create-user

Payload

Parameter Description
email email of the Cabify user account (e.g: jose@palenca.com)
password password of the Cabify user account
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)

Get User

import requests

url = 'https://api.palenca.com/cabify/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/cabify/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/cabify/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "cabify",
    "country": "mx",
    "profile": {
        "worker_id": "2bee4c204296db28d84868cae6595b6e",
        "first_name": "Jose",
        "last_name": "Carlos Mora",
        "email": "josecarlos00@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "5576714345",
        "id_type": "rfc",
        "id_number": "EAEF841004MH6",
        "activation_status": "activated",
        "city_name": "Puebla",
        "employment_info": {},
        "metrics_info":{
            "rating": 4.9
        },
        "vehicle_info":{
            "type": "car"
        },
        "bank_info":{
            "bank_name": "BANREGIO",
            "holder_name": "Jose Carlos Mora",
            "account_number": "058597000005820601"
        },
        "other_info": {
            "url_picture": "https://cabify.s3.amazonaws.com/production/avatars/2bee4c204296db28d84868cae6595b6e/54ac46ba8349d8b1388b4bbc.jpg?v=1628562447",
        }
    },
    "earnings": [
      {
        "datestr": "2021-05-09",
        "amount": 194.65,
        "currency": "MXN",
        "other_info": {
          "cash_received": 0,
          "balance": null,
          "fee": 71.35
        }
      },
      {
        "datestr": "2021-05-08",
        "amount": 161.03,
        "currency": "MXN",
        "other_info": {
          "cash_received": 0,
          "balance": null,
          "fee": 58.97
        }
      },
      {
        "datestr": "2021-05-07",
        "amount": 0.0,
        "currency": "MXN",
        "other_info": {
          "cash_received": 0,
          "balance": null,
          "fee": 0.0
        }
      }
        ...
    ],
    "events": [
      {
        "platform": "cabify",
        "event_id": "6ad1520672eb47b78a1d837de18a7d7b",
        "type": "trips",
        "timezone": "",
        "country": "mx",
        "start_date": "2021-05-09 16:51:41",
        "amount": 115.42,
        "currency": "MXN",
        "duration": 1980,
        "distance": 19.5,
        "distance_unit": "km",
        "start_location": {},
        "end_location": {},
        "other_info": {
          "cash_received": 0,
          "is_cash_payment": false
        }
      },
      ...
    ]
}

This endpoint allows you to retrieve the data that you already requested for a given User

Noventa Nove

Create User

import requests

url = 'https://api.palenca.com/noventa-nove/create-user'

payload = {
    'user_id': 'user_id_from_your_db',
    'phone_number': '5576716451',
    'country': 'br'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/noventa-nove/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "phone_number": "5576716451",
   "country": "br"
}'
const axios = require('axios')
const data = JSON.stringify({
  'user_id': 'user_id_from_your_db',
  'phone_number': '5576716451',
  'country': 'br'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/noventa-nove/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "CONFIRMATION_CODE_SENT",
    "user_id": "user_id_from_your_db",
    "platform": "noventa_nove",
    "country": "mx"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/noventa-nove/create-user

Payload

Parameter Description
phone_number phone number of the Noventa Nove user account (e.g: 7196507051)
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)

Validate User

import requests

url = 'https://api.palenca.com/noventa-nove/validate-user'

payload = {
    'code': '123456',
    'country': 'br',
    'phone_number': '5576716451',
    'user_id': 'user_id_from_your_db'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/noventa-nove/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "code": "123456",
    "country": "br",
    "phone_number": "5576716451",
    "user_id": "user_id_from_your_db"
}'
const axios = require('axios')
const data = JSON.stringify({
    'code': '123456',
    'country': 'br',
    'phone_number': '5576716451',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/noventa-nove/validate-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "noventa_nove",
    "country": "br"
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/noventa-nove/validate-user

Payload

Parameter Description
code 4 digits code received by SMS (e.g: 1234)
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)

Get User

import requests

url = 'https://api.palenca.com/noventa-nove/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/noventa-nove/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/noventa-nove/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:


{
   "message": "SUCCESS",
   "user_id": "user_1234567",
   "platform": "cabify",
   "country": "br",
   "profile": {
        "worker_id": "650911081321242",
        "first_name": "",
        "last_name": "CARLO AZEVEDO M",
        "email": "hello@yahoo.com.br",
        "phone_prefix": "+55",
        "phone_number": "18118562610",
        "activation_status": "unknown",
        "id_type": null,
        "id_number": "",
        "city_name": "Rio de Janeiro",
        "employment_info": {},
        "metrics_info": {
            "rating": 4.94,
            "lifetime_trips": 1100,
            "time_since_ft": "1+ years",
            "acceptance_rate": 0.0,
            "completion_rate": 0.0
        },
        "vehicle_info": {
            "type": "car",
            "brand": "Toyota-Etios Hatch ",
            "year": "2016",
            "license_plate": "PYC-1234",
            "vin": ""
        },
        "bank_info": {},
        "other_info": {}
    },
   "earnings": [
        {
           "datestr": "2020-10-27",
           "earnings": 433.6,
           "currency": "BRL"
       },
       {
           "datestr": "2020-10-26",
           "earnings": 354.2,
           "currency": "BRL"
       },
       ...
   ],
   "events": []
}

This endpoint allows you to retrieve the data that you already requested for a given User

HTTP Request

GET https://api.palenca.com/noventa-nove/get-user/user_id_from_your_db

Indriver

Create User

import requests

url = 'https://api.palenca.com/indriver/create-user'

payload = {
    'user_id': 'user_id_from_your_db',
    'phone_number': '5576716451',
    'country': 'mx'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/indriver/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "phone_number": "5576716451",
   "country": "mx",
}'
const axios = require('axios')
const data = JSON.stringify({
  'user_id': 'user_id_from_your_db',
  'phone_number': '5576716451',
  'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/indriver/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "CONFIRMATION_CODE_SENT",
    "details": "We sent you a login code",
    "user_id": "user_id_from_your_db"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/indriver/create-user

Payload

Parameter Description
phone_number phone number of the indriver user account (e.g: 7295740734)
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User (mx for Mexico, co for Colombia, pe for Peru)

Validate User

import requests

url = 'https://api.palenca.com/indriver/validate-user'

payload = {
    'code': '123456',
    'country': 'mx',
    'phone_number': '5576716451',
    'user_id': 'user_id_from_your_db'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/indriver/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "code": "123456",
    "country": "mx",
    "phone_number": "5576716451",
    "user_id": "user_id_from_your_db"
}'
const axios = require('axios')
const data = JSON.stringify({
    'code': '123456',
    'country': 'mx',
    'phone_number': '5576716451',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/indriver/validate-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "indriver",
    "country": "mx"
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/indriver/validate-user

Payload

Parameter Description
code 4 digits code received by SMS (e.g: 1234)
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User (mx for Mexico, co for Colombia, pe for Peru)

Get User

import requests

url = 'https://api.palenca.com/indriver/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/indriver/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/indriver/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "user_id": "user_id_from_your_db",
    "message": "SUCCESS",
    "country": "mx",
    "platform": "indriver",
    "profile": {
        "worker_id": "111960871",
        "first_name": "Guillermo Gibran",
        "last_name": "Navarro Jimenez",
        "email": "giddie_654@hotmail.com",
        "phone_prefix": "+52",
        "phone_number": "7776248945",
        "activation_status": "activated",
        "id_type": null,
        "id_number": "",
        "city_name": "Leon de los Aldama",
        "employment_info": {},
        "metrics_info": {
            "rating": 4.98,
            "lifetime_trips": 102
        },
        "vehicle_info": {
            "type": "car",
            "brand": "suzuki",
            "model": "Swift"
        },
        "bank_info": {},
        "other_info": {
            "url_picture": "https://indriver.com/upload/watchdocs/documents/12056107/2022-02-12/avatar/big/e475f0791e286d1de1fda3a75cd73423_w2.jpeg"
        }
    },
    "earnings": [
        {
            "datestr": "2022-02-28",
            "amount": 452.0,
            "currency": "MXN",
            "other_info": {
                "count_trips": 7,
                "balance": null
            }
        },
        {
            "datestr": "2022-02-27",
            "amount": 550.0,
            "currency": "MXN",
            "other_info": {
                "count_trips": 7,
                "balance": null
            }
        },
        ...
    ],
    "events": [
        {
            "platform": "indriver",
            "event_id": "3498132479",
            "type": "rideshare",
            "timezone": "America/Mexico_City",
            "country": "mx",
            "start_date": "2022-02-28",
            "amount": 125.0,
            "currency": "MXN",
            "duration": null,
            "distance": null,
            "distance_unit": "",
            "start_location": {
                "pickup_address": "Océano Pacífico de Linda Vista 134 (León, Lindavista)"
            },
            "end_location": {
                "dropoff_address": "Cto. HĂ©roes de Tenango (HĂ©roes de LeĂłn)"
            },
            "other_info": {}
        },
        {
            "platform": "indriver",
            "event_id": "3497527573",
            "type": "rideshare",
            "timezone": "America/Mexico_City",
            "country": "mx",
            "start_date": "2022-02-28",
            "amount": 52.0,
            "currency": "MXN",
            "duration": null,
            "distance": null,
            "distance_unit": "",
            "start_location": {
                "pickup_address": "Cuernavaca 213 (Killian, LeĂłn, Guanajuato)"
            },
            "end_location": {
                "dropoff_address": "Acereros de Pittsburgh 116 (Deportiva II, LeĂłn, Guanajuato)"
            },
            "other_info": {}
        },
      ...
    ]
}

This endpoint allows you to retrieve the data that you already requested for a given User

Couriers

Rappi

Create User

import requests

url = 'https://api.palenca.com/rappi/create-user'

payload = {
  'country': 'co',
  'user_id': 'user_id_from_your_db',
  'email': 'jose@palenca.com' # or 'phone': '5576716451'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/rappi/create-user' \
--header 'x-api-key: your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "co",
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com",
}'
# Can also use "phone": "5576716451" instead of "email": "jose@palenca.com"
const axios = require('axios')
const data = JSON.stringify({
   'country': 'co',
   'user_id': 'user_id_from_your_db',
   'email': 'jose@palenca.com' // or 'phone': '5576716451'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/rappi/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
   "message": "Hemos enviado un SMS de 6 dĂ­gitos al celular: ******1234"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/rappi/create-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
email email of the Rappi user account (e.g: jose@palenca.com)
phone phone number of the Rappi user account (e.g: 5576716451)

Validate User

import requests

url = 'https://api.palenca.com/rappi/validate-user'

payload = {
    'country': 'co',
    'user_id': 'user_id_from_your_db',
    'code': '123456'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/rappi/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "co",
   "user_id": "user_id_from_your_db",
   "code": "123456"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'co'
    'user_id': 'user_id_from_your_db',
    'code': '123456'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/rappi/validate-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "rappi",
    "country": "co"
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/rappi/validate-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
code 6 digits code received by SMS (e.g: 123456)

Get User

import requests

url = 'https://api.palenca.com/rappi/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/rappi/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/rappi/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "rappi",
    "country": "mx",
    "profile": {
        "worker_id": "89522",
        "first_name": "DILAN BRANDON",
        "last_name": "Huerta Garcia",
        "email": "bcdilan2923@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "5578517012",
        "activation_status": "activated",
        "id_type": "curp",
        "id_number": "HGCD990529HDFRML00",
        "city_name": "Ciudad de MĂ©xico",
        "employment_info": {},
        "metrics_info":{
          "acceptance_rate": 1.0,
          "points": 0,
          "completion_rate": 0.93,
          "rating": 5.0,
          "level_name": "bronze"
        },
        "vehicle_info": {
          "type":"motorcycle"
        },
        "bank_info": {},
        "other_info": {
          "debt_pending":0,
          "debt_paid":0,
          "gender":"male",
          "estimated_lifetime_trips": 49,
          "estimated_time_since_ft": "9+ months"
        }
    },
    "earnings": [
        {
          "datestr": "2021-08-05",
          "amount": 0.0,
          "currency": "MXN",
          "other_info": {
              "debt": 0.0,
              "balance": 0.0,
              "tips": 10.0,
              "promotions": 0.0

          }
      },
      {
          "datestr": "2021-08-04",
          "amount": 0.0,
          "currency": "MXN",
          "other_info": {
              "debt": 0.0,
              "balance": 0.0
          }
      },
      {
          "datestr": "2021-08-03",
          "amount": 0.0,
          "currency": "MXN",
          "other_info": {
              "estimated_time_since_ft": "3+ months",
              "estimated_lifetime_trips": 1455,
              "debt": 0.0,
              "balance": 0.0
          }
      },
        ...
    ],
    "events": [
      {
        "platform": "rappi",
        "event_id": "7b72e7c8-f70a-4843-b324-b9112de979c0",
        "type": "delivery",
        "timezone": "America/Mexico_City",
        "country": "mx",
        "start_date": "2022-05-19 17:06",
        "amount": 76.66,
        "currency": "MXN",
        "duration": 17,
        "distance": 5.133,
        "distance_unit": "km",
        "start_location": {
          "pickup_address": "CAFFENIO-Gran Plaza"
        },
        "end_location": {},
        "other_info": {
          "base_fare": 76.66,
          "taxes": -6.89
        }
      },
      {
          "platform": "rappi",
          "event_id": "0e4990f1-04de-443d-812b-f162f1e15a5a",
          "type": "delivery",
          "timezone": "America/Mexico_City",
          "country": "mx",
          "start_date": "2021-08-01 21:05",
          "amount": 76.4,
          "currency": "MXN",
          "duration": 1075,
          "distance": null,
          "distance_unit": "",
          "start_location": {
             "pickup_address": "Sushi-Loco Bosques"
          },
          "end_location": {},
          "other_info": {
            "base_fare": 45.33,
            "taxes": -5.67
          }
      },
      ...
    ]
}

This endpoint allows you to retrieve the data that you already requested for a given User

HTTP Request

GET https://api.palenca.com/rappi/get-user/user_id_from_your_db

Uber Eats

Create User

import requests

url = 'https://api.palenca.com/uber-eats/create-user'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'email': 'jose@palenca.com'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/uber-eats/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'email': 'jose@palenca.com'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/uber-eats/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
   "message": "El código de Uber se mandó a tu teléfono"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/uber-eats/create-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
email email of the Uber eats user account (e.g: jose@palenca.com)

Validate User Code

import requests

url = 'https://api.palenca.com/uber-eats/validate-user-code'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'code': '1234'

}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/uber-eats/validate-user-code' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "code": "1234"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'code': '1234'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/uber-eats/validate-user-code',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "PASSWORD_REQUIRED",
    "user_id": "user_id_from_your_db",
    "is_sandbox": true,
    "platform": "uber_eats",
    "country": "mx"
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/uber-eats/validate-user-code

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
code 4 digits code received by SMS (e.g: 1234)

Validate User

import requests

url = 'https://api.palenca.com/uber-eats/validate-user'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'password': 'MyGreatPassword62'

}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/uber-eats/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "password": "MyGreatPassword62",
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'password': 'MyGreatPassword62',

});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/uber-eats/validate-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "uber_eats"
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/uber-eats/validate-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
password password of the Uber eats user account

Get User

import requests

url = 'https://api.palenca.com/uber-eats/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/uber-eats/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/uber-eats/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "uber_eats",
    "country": "mx",
    "profile": {
        "worker_id": "505100c1-f645-40c1-b9ad-3312b4252c6d",
        "first_name": "Jairo",
        "last_name": "Huerta Rincon",
        "email": "jayroplascencia@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "+5215540086725",
        "activation_status": "activated",
        "id_type": null,
        "id_number": "",
        "city_name": "Puebla",
        "employment_info": {},
        "metrics_info": {
            "rating": 4.89,
            "lifetime_trips": 5624,
            "time_since_ft": "5.5 years",
            "level_name": "Blue",
            "acceptance_rate": 0.98,
            "cancellation_rate": 0.35
        },
        "vehicle_info": {
            "type": "car",
            "brand": "Volkswagen",
            "model": "Vento",
            "year": "2016",
            "license_plate": "MXT5576",
            "vin": "MEX5H2604GT013450"
        },
        "bank_info": {},
        "other_info": {
            "url_picture": "https://www.example.com"
        }
    },
    "earnings": [
          {
              "datestr": "2021-04-30",
              "amount": 0.0,
              "currency": "MXN",
              "other_info": {
                  "cash_received": 0,
                  "tips": 0,
                  "promotions": 0,
                  "balance": null
              }
          },
          {
              "datestr": "2021-04-29",
              "amount": 326.95,
              "currency": "MXN",
              "other_info": {
                  "cash_received": -159,
                  "tips": 0,
                  "promotions": 0,
                  "balance": null
              }
          },
          {
              "datestr": "2021-04-28",
              "amount": 257.71,
              "currency": "MXN",
              "other_info": {
                  "cash_received": -132,
                  "tips": 0,
                  "promotions": 0,
                  "balance": null
              }
          },
          {
              "datestr": "2021-04-27",
              "amount": 309.84,
              "currency": "MXN",
              "other_info": {
                  "cash_received": -32,
                  "tips": 0,
                  "promotions": 0,
                  "balance": null
              }
          },
        ...
    ],
    "events":[]
}

This endpoint allows you to retrieve the data that you already requested for a given User

HTTP Request

GET https://api.palenca.com/uber-eats/get-user/user_id_from_your_db

Didi Food

Create User

import requests

url = 'https://api.palenca.com/didi-food/create-user'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'phone_number': '5576716451'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/didi-food/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "phone_number": "5576716451"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'phone_number': '5576716451'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/didi-food/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
  "message":"CONFIRMATION_CODE_SENT",
  "user_id": "user_id_from_your_db",
  "platform": "didi_food",
  "country": "mx"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/didi-food/create-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
phone_number phone number of the Didi Food user account (e.g: 5576716450)

Validate User

import requests

url = 'https://api.palenca.com/didi-food/validate-user'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'phone_number': '5576716451',
    'code': '123456'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/didi-food/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "phone_number": "5576716451",
   "code": "123456"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'phone_number': '5576716451',
    'code': '123456'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/didi-food/validate-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "didi_food",
    "country": "mx"
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/didi-food/validate-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
phone_number phone number of the Didi Food user account (e.g: 5576716450)
code 6 digits code received by SMS (e.g: 123456)

Get User

import requests

url = 'https://api.palenca.com/didi-food/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/didi-food/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/didi-food/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "didi_food",
    "country": "mx",
    "profile": {
        "worker_id": "650911144900052",
        "first_name": "Cristian Gabriel",
        "last_name": "Huerta Garcia",
        "email": "c***@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "18118562710",
        "activation_status": "activated",
        "id_type": "curp",
        "id_number": "OIVJ980528HDFLLS09",
        "city_name": "Monterrey",
        "employment_info": {},
        "metrics_info":{
            "acceptance_rate":1.0,
            "cancellation_rate":1.0,
            "level_name": "Beginner"
        },
        "vehicle_info":{
            "type":"bicycle"
        },
        "bank_info": {
            "bank_code": "002",
            "holder_name": "Cristian Gabriel Huerta Garcia",
            "holder_address": "Residencial santa Catarina",
            "account_number": "0025835040********"
        },
        "other_info": {
          "url_picture": "url"
          }
    },
    "earnings": [
        {
            "datestr": "2021-03-10",
            "amount": 515.72,
            "currency": "MXN",
            "other_info": {
              "balance": null
            }
        },
        {
            "datestr": "2021-03-09",
            "amount": 364.27,
            "currency": "MXN",
            "other_info": {
              "balance": null
            }
        },
        ...
    ],
    "events": []
}

This endpoint allows you to retrieve the data that you already requested for a given User

HTTP Request

GET https://api.palenca.com/didi-food/get-user/user_id_from_your_db

Change bank account

import requests

url = 'https://api.palenca.com/didi-food/change-bank-account'

payload = {
    'code': '123456',
    'user_id': 'user_id_from_your_db',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)



# Full flow
import requests

url = 'https://api.palenca.com/didi-food/create-user'

payload_create_user = {
    'email': 'jose@palenca.com',
    'user_id': 'user_id_from_your_db',
    'purpose': 'CHANGE_BANK_ACCOUNT',
    'country': 'mx'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

requests.request('POST', url, headers=headers, json=payload_create_user)

url = 'https://api.palenca.com/didi-food/validate-user'

payload_validate_user = {
    'code': '123456',
    'user_id': 'user_id_from_your_db'
}

requests.request('POST', url, headers=headers, json=payload_validate_user)

url = 'https://api.palenca.com/didi-food/change-bank-account'

payload_switch_deposit = {
    'code': '123456',
    'user_id': 'user_id_from_your_db',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
}

response = requests.request('POST', url, headers=headers, json=payload_switch_deposit)

print(response.text)
curl --location --request POST 'https://api.palenca.com/didi-food/change-bank-account' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "code": "123456",
   "country": "mx",
   "bank_account": {
      "clabe": "64618020217711114",
      "full_name": "Jose Felipe Fernandez Rincon",
      "birth_date": "1996-07-24",
      "post_code": "06100",
      "city": "Distrito Federal",
      "bank_name": "STP",
      "address": "Av de las Maestras 379"
  }
}'



# full flow
curl --location --request POST 'https://api.palenca.com/didi-food/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com",
   "purpose": "CHANGE_BANK_ACCOUNT",
   "country": "mx"
}'

curl --location --request POST 'https://api.palenca.com/didi-food/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "code": "1234"
}'

curl --location --request POST 'https://api.palenca.com/didi-food/change-bank-account' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "code": "123456",
   "country": "mx",
   "bank_account": {
      "clabe": "64618020217711114",
      "full_name": "Jose Felipe Fernandez Rincon",
      "birth_date": "1996-07-24",
      "post_code": "06100",
      "city": "Distrito Federal",
      "bank_name": "STP",
      "address": "Av de las Maestras 379"
  }
}'
const axios = require('axios')
const data = JSON.stringify({
    'code': '123456',
    'user_id': 'user_id_from_your_db',
    'country': 'mx',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
})

const config = {
  method: 'post',
  url: 'https://api.palenca.com/didi-food/change-bank-account',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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



// full flow
const axios = require('axios')
let data = JSON.stringify({
    'email': 'jose@palenca.com',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
    'purpose': 'CHANGE_BANK_ACCOUNT'
})

let config = {
  method: 'post',
  url: 'https://api.palenca.com/didi-food/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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

data = JSON.stringify({
    'code': '123456',
    'user_id': 'user_id_from_your_db'
})

config = {
  method: 'post',
  url: 'https://api.palenca.com/didi-food/validate-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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

// once you got user verification code for switch deposit

data = JSON.stringify({
    'code': '123456',
    'user_id': 'user_id_from_your_db',
    'country': 'mx',
    'bank_account': {
        'clabe': '64618020217711114',
        'full_name': 'Jose Felipe Fernandez Rincon',
        'birth_date': '1994-07-24',
        'post_code': '06100',
        'city': 'Distrito Federal',
        'bank_name': 'STP',
        'address': 'Av de las Maestras 379'
    }
})

config = {
  method: 'post',
  url: 'https://api.palenca.com/didi-food/change-bank-account',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db"
}

This endpoint allows you to :

In order to change bank account, you'll have to :

  1. Create a Didi Food User with a "purpose" body key set to "CHANGE_BANK_ACCOUNT"
  2. Validate the Didi Food User
  3. Change the bank account

HTTP Request

POST https://api.palenca.com/didi-food/change-bank-account

Payload

Parameter Description
code 6 digits code received by SMS in order to allow (e.g: 123456)
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User. Should be mx for now
bank_account A json representing the bank account the user wants to use to receive his money
bank_account.clabe The CLABE of the bank account (e.g: 64618020217711114)
bank_account.full_name Full name of the user (e.g: Jose Felipe Fernandez Rincon)
bank_account.birth_date YYYY-MM-DD formated birthdate of the user (e.g: 1996-07-24)
bank_account.post_code The post code where the user lives (e.g: 06100)
bank_account.city Name of the city where the user lives (e.g: Distrito Federal)
bank_account.bank_name The name of the bank the user wants to use to receive his money (e.g: STP)
bank_account.address Street name + street number of the user's address (e.g: Av de las Maestras 379)

Cornershop

Create User

import requests

url = 'https://api.palenca.com/cornershop/create-user'

payload = {
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/cornershop/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com",
   "password": "MyGreatPassword62",
    "country": "mx"
}'
const axios = require('axios')
const data = JSON.stringify({
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/cornershop/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "cornershop",
    "country": "mx"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/cornershop/create-user

Payload

Parameter Description
email email of the Cornershop user account (e.g: jose@palenca.com)
password password of the Cornershop user account
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)

Get User

import requests

url = 'https://api.palenca.com/cornershop/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/cornershop/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/cornershop/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "cornershop",
    "country": "mx",
    "profile": {
        "worker_id": "6215158",
        "first_name": "Jose Carlos",
        "last_name": "Aguilar Rincon",
        "email": "jose@palenca.com",
        "phone_prefix": "+52",
        "phone_number": "5576716459",
        "activation_status": "activated",
        "id_type": "curp",
        "id_number": "JAEA940905HDFVVB01",
        "city_name": "Puebla",
        "employment_info": {},
        "metrics_info":{
            "rating":4.92,
            "acceptance_rate":0.96,
            "picking_speed":1.44
        },
        "vehicle_info":{
            "type":"motorcycle"
        },
        "bank_info": {},
        "other_info": {
            "url_picture": "https://superpal.s3.amazonaws.com:443/shopper-files/candidate/6295148/6f5600300015ae41d120c55e6ec058c2.jpg?versionId=370FbuECez7vTQJyTeSGhs6GrrKeazZ4"
        }
    },
    "earnings": [
      {
          "datestr":"2021-11-08",
          "amount":2331.1,
          "currency":"MXN",
          "other_info":{
              "balance":null
          }
      },
      {
          "datestr":"2021-11-07",
          "amount":3396.0,
          "currency":"MXN",
          "other_info":{
              "balance":null
          }
      },
      {
          "datestr":"2021-11-05",
          "amount":2904.3,
          "currency":"MXN",
          "other_info":{
              "balance":null
          }
      },
      ...
    ],
    "events": []
}

This endpoint allows you to retrieve the data that you already requested for a given User

iFood

Create User

import requests

url = 'https://api.palenca.com/ifood/create-user'

payload = {
    'country': 'co',
    'user_id': 'user_id_from_your_db',
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/ifood/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "co",
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'co',
    'user_id': 'user_id_from_your_db',
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/ifood/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "VERIFICATION_CODE_PHONE",
    "details": "code required"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/ifood/create-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
email email of the Ifood user account (e.g: jose@palenca.com)
password password of the Ifood user account

Validate User

import requests

url = 'https://api.palenca.com/ifood/validate-user'

payload = {
    'country': 'co',
    'user_id': 'user_id_from_your_db',
    'code': '123456',
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/ifood/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "co",
   "user_id": "user_id_from_your_db",
   "code": "123456",
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'co',
    'user_id': 'user_id_from_your_db',
    'code': '123456'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/ifood/validate-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "ifood",
    "country": "co"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/ifood/validate-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
code 6 digits code received by SMS (e.g: 123456)

Get User

import requests

url = 'https://api.palenca.com/ifood/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/ifood/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/ifood/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message":"SUCCESS",
    "user_id":"user_1234567",
    "platform":"ifood",
    "country":"co",
    "profile": {
        "worker_id": "10674748-ef6b-45be-ad94-a31681a228ee",
        "first_name": "Jaciel Pedro",
        "last_name": "Hernandez Brito",
        "email": "jayroplascencia@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "5512345678",
        "activation_status": "activated",
        "id_type": "rut",
        "id_number": "15807281",
        "city_name": "",
        "employment_info": {},
        "metrics_info":{
            "lifetime_trips":359,
            "acceptance_rate":0.92,
            "pickup_services_arrived":342,
            "delivery_services_arrived":358
        },
        "vehicle_info":{
            "type":"bicycle",
            "license_plate":"BICYCLE_VEHICLE_LICENSE_PLATE"
        },
        "bank_info":{
            "bank_name":"BANCA DIGITAL NEQUI",
            "account_number":"4522"
        },
        "other_info": {
            "url_picture":"/worker/8330/attribute/50/file/content"
        }
    },
    "earnings": [
      {
          "datestr":"2021-07-29",
          "amount":2522.98,
          "currency":"COP",
          "other_info":{
              "cash_received":1957,
              "promotions":24,
              "balance":107.18
          }
      },
      {
          "datestr":"2021-07-28",
          "amount":0.0,
          "currency":"COP",
          "other_info":{
              "cash_received":0,
              "promotions":0,
              "balance":1100.0
          }
      },
      {
          "datestr":"2021-07-27",
          "amount":1252.55,
          "currency":"COP",
          "other_info":{
              "cash_received":1084,
              "promotions":0,
              "balance":-747.25
          }
      },
        ...
    ],
    "events": []
}

This endpoint allows you to retrieve the data that you already requested for a given User

Rapiboy

Create User

import requests

url = 'https://api.palenca.com/rapiboy/create-user'

payload = {
    'country': 'ar',
    'user_id': 'user_id_from_your_db',
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/rapiboy/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "ar",
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'ar',
    'user_id': 'user_id_from_your_db',
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/rapiboy/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "rapiboy",
    "country": "ar"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/rapiboy/create-user

Payload

Parameter Description
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)
email email of the Rapiboy user account (e.g: jose@palenca.com)
password password of the Rapiboy user account

Get User

import requests

url = 'https://api.palenca.com/rapiboy/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/rapiboy/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/rapiboy/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "rapiboy",
    "country": "ar",
    "profile": {
        "worker_id": "456",
        "first_name": "Pedro",
        "last_name": "Martinez",
        "email": "jose@palenca.com",
        "phone_prefix": "+54",
        "phone_number": "91143667646",
        "activation_status": "activated",
        "id_type": "cuit",
        "id_number": "20388080001",
        "city_name": "Buenos Aires",
        "employment_info": {},
        "metrics_info": {},
        "vehicle_info": {
            "type": ""
        },
        "bank_info":{
            "bank_name":"Mercado Pago",
            "account_number":"0070086330004040631795"
        },
        "other_info": {
          "url_picture":"https://rapiboy.com/img/Motoboy/c2415a.jpg?v=d4ab",
          "points":[
              {
                  "Puntos":-3.0,
                  "Cantidad":0,
                  "Nombre":"Llega tarde"
              },
              {
                  "Puntos":-8.0,
                  "Cantidad":0,
                  "Nombre":"No Voy"
              },
              {
                  "Puntos":-10.0,
                  "Cantidad":0,
                  "Nombre":"Falto a un reserva"
              },
              {
                  "Puntos":-2.0,
                  "Cantidad":0,
                  "Nombre":"No Confirma"
              },
              {
                  "Puntos":-5.0,
                  "Cantidad":0,
                  "Nombre":"1 Estrella"
              },
              {
                  "Puntos":-0.5,
                  "Cantidad":0,
                  "Nombre":"2 Estrella"
              },
              {
                  "Puntos":0.5,
                  "Cantidad":0,
                  "Nombre":"5 Estrellas"
              },
              {
                  "Puntos":0.5,
                  "Cantidad":0,
                  "Nombre":"Reservas Lun a Jue (noche)"
              },
              {
                  "Puntos":2.0,
                  "Cantidad":0,
                  "Nombre":"Viernes noche"
              },
              {
                  "Puntos":4.0,
                  "Cantidad":0,
                  "Nombre":"Sábado noche"
              },
              {
                  "Puntos":2.5,
                  "Cantidad":0,
                  "Nombre":"Domingo noche"
              },
              {
                  "Puntos":2.0,
                  "Cantidad":0,
                  "Nombre":"Domingo mediodĂ­a"
              },
              {
                  "Puntos":5.0,
                  "Cantidad":0,
                  "Nombre":"Repartos con lluvia/nieve"
              },
              {
                  "Puntos":5.0,
                  "Cantidad":0,
                  "Nombre":"Feriado Nacional"
              },
              {
                  "Puntos":5.0,
                  "Cantidad":0,
                  "Nombre":"Fecha especial"
              },
              {
                  "Puntos":1.0,
                  "Cantidad":0,
                  "Nombre":"Puntos Extra"
              },
              {
                  "Puntos":2.0,
                  "Cantidad":0,
                  "Nombre":"Envio Suelto"
              },
              {
                  "Puntos":0.5,
                  "Cantidad":0,
                  "Nombre":"Monotributo"
              },
              {
                  "Puntos":0.5,
                  "Cantidad":0,
                  "Nombre":"Reservas con Intermediacion"
              }
          ]
      }
    },
    "earnings": [
        {
            "datestr": "2021-11-01",
            "amount": 46518.0,
            "currency": "ARS",
            "other_info": {
              "balance": null
            }
        },
        {
            "datestr": "2021-10-01",
            "amount": 47519.0,
            "currency": "ARS",
            "other_info": {
              "balance": null
            }
        },
        {
            "datestr": "2021-09-01",
            "amount": 39234.0,
            "currency": "ARS",
            "other_info": {
              "balance": null
            }
        },
        ...
    ],
    "events": []
}

This endpoint allows you to retrieve the data that you already requested for a given User

Lalamove

Create User

import requests

url = 'https://api.palenca.com/lalamove/create-user'

payload = {
    'phone_number': '5554763770',
    'password': 'MyGreatPassword62',
    'country': 'co',
    'user_id': 'user_id_from_your_db'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/lalamove/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "phone_number": "5554763770",
   "country": "co",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'phone_number': '5554763770',
    'password': 'MyGreatPassword62',
    'country': 'co',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/lalamove/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "lalamove",
    "country": "co"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/lalamove/create-user

Payload

Parameter Description
phone_number Phone number of the Lalamove user account (e.g: jose@palenca.com)
password password of the Lalamove user account
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)

Get User

import requests

url = 'https://api.palenca.com/lalamove/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/lalamove/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/lalamove/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
  "message": "SUCCESS",
  "user_id": "user_1234567",
  "platform": "lalamove",
  "country": "mx",
  "profile": {
    "worker_id": "111356",
    "first_name": "Juan Carlos",
    "last_name": "Aguilar",
    "email": "",
    "phone_prefix": "+52",
    "phone_number": "5554763770",
    "activation_status": "active",
    "id_type": "curp",
    "id_number": "AURC940610HDFGNR05",
    "city_name": "Ciudad de Mexico",
    "employment_info": {},
    "metrics_info": {
      "rating": 5.0
    },
    "vehicle_info":{
        "type":"motorcycle",
        "license_plate":"MNL4412"
    },
    "bank_info": {},
    "other_info": {
      "url_picture": "https://br-upload-appweb.lalamove.com/showhead.php?image_type=5&image_hash=E0akEJY4hgG2Z_q7BF9MRle57KswW1fA2pUG8SKp8ts82QgEyqspJFvQrVnnXAYZ&driver_id=111356",
    }
  },
  "earnings": [
    {
      "datestr": "2021-09-12",
      "amount": 0.0,
      "currency": "MXN",
      "other_info": {
        "cash_received": 0,
        "balance": null
      }
    },
    {
      "datestr": "2021-09-05",
      "amount": 0.0,
      "currency": "MXN",
      "other_info": {
        "cash_received": 0,
        "balance": null
      }
    },
    {
      "datestr": "2021-08-29",
      "amount": 0.0,
      "currency": "MXN",
      "other_info": {
        "cash_received": 0,
        "balance": null
      }
    }
    ...
  ],
  "events": []
}

This endpoint allows you to retrieve the data that you already requested for a given User

99minutos

Create User

import requests

url = 'https://api.palenca.com/99minutos/create-user'

payload = {
    'token': '51b018d034cd348adc9fc76db1a74e6a5d4d7b1o',
    'country': 'co',
    'user_id': 'user_id_from_your_db'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/99minutos/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "email": "jose@palenca.com",
   "country": "co",
   "token": "51b018d034cd348adc9fc76db1a74e6a5d4d7b1o"
}'
const axios = require('axios')
const data = JSON.stringify({
    'token': '51b018d034cd348adc9fc76db1a74e6a5d4d7b1o',
    'country': 'co',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/99minutos/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "99minutos",
    "country": "co"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/99minutos/create-user

Payload

Parameter Description
token Token from the QR code of the 99minutos user account (e.g: 51b018d034cd348adc9fc76db1a74e6a5d4d7b1o)
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)

Get User

import requests

url = 'https://api.palenca.com/99minutos/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/99minutos/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/99minutos/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
  "message": "SUCCESS",
  "user_id": "user_1234567",
  "platform": "99minutos",
  "country": "co",
  "profile": {
      "worker_id": "Don Veloz Smd 043",
      "first_name": "Juan Carlos",
      "last_name": "Fernandez Hernandez",
      "email": "",
      "phone_prefix": "+57",
      "phone_number": "3012701177",
      "activation_status": "unknown",
      "id_type": null,
      "id_number": "",
      "city_name": "",
      "employment_info": {},
      "metrics_info": {},
      "vehicle_info":{
          "type":"motorcycle",
          "license_plate":""
      },
      "bank_info": {},
      "other_info": {}
  },
  "earnings": [
      {
          "datestr": "2021-07-12",
          "amount": 8153.5,
          "currency": "COP",
          "other_info": {
            "balance": null
          }
      },
      {
          "datestr": "2021-07-11",
          "amount": 88444.5,
          "currency": "COP",
          "other_info": {
            "balance": null
          }
      },
      ...
  ],
  "events": []
}

This endpoint allows you to retrieve the data that you already requested for a given User

Mensajeros urbanos

Create User

import requests

url = 'https://api.palenca.com/mensajeros-urbanos/create-user'

payload = {
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62',
    'country': 'co',
    'user_id': 'user_id_from_your_db'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/mensajeros-urbanos/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "email": "jose@palenca.com",
   "country": "co",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'email': 'jose@palenca.com',
    'password': 'MyGreatPassword62',
    'country': 'co',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/mensajeros-urbanos/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "mu",
    "country": "mx"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/mensajeros-urbanos/create-user

Payload

Parameter Description
email email of the mensajeros urbanos user account (e.g: jose@palenca.com)
password password of the mensajeros urbanos user account
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)
user_id your own user id from your database (e.g: 03eb0d70)

Get User

import requests

url = 'https://api.palenca.com/mensajeros-urbanos/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/mensajeros-urbanos/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/mensajeros-urbanos/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
  "message": "SUCCESS",
  "user_id": "user_1234567",
  "platform": "mu",
  "country": "co",
  "profile": {
      "worker_id": "797051",
      "first_name": "José Carlos",
      "last_name": "Aguilar RincĂłn",
      "email": "jose@vech.com.mx",
      "phone_prefix": "+57",
      "phone_number": "3106976035",
      "activation_status": "activated",
      "id_type": "rut",
      "id_number": "1085740840",
      "city_name": "Bogota",
      "employment_info": {},
      "metrics_info":{
          "rating":4.96,
          "level_name":"No VIP"
      },
      "vehicle_info":{
          "type": "motorcycle",
          "license_plate": "JTR54D"
      },
      "bank_info": {},
      "other_info": {
          "url_picture": "https://muadmin.s3.us-west-2.amazonaws.com/images/recursos/foto492144.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAZETM5LSRV4ZOL4ES%2F20210514%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20210514T204010Z&X-Amz-SignedHeaders=host&X-Amz-Expires=300&X-Amz-Signature=4d2e8806d34574d5552f0358a13b2edd516931756a96889d827a07c98a24886a"
      }
  },
  "earnings": [
      {
        "datestr":"2022-03-03",
        "amount":16946.0,
        "currency":"COP",
        "other_info":{
            "cash_received":0,
            "balance":null
            }
      },
      {
        "datestr":"2022-03-02",
        "amount":16946.0,
        "currency":"COP",
        "other_info":{
            "cash_received":0,
            "balance":null
          }
      },
    ...
  ],
  "events": [{
            "platform": "mu",
            "event_id": "623cf43daba90",
            "type": "delivery",
            "timezone": "America/Bogota",
            "country": "co",
            "start_date": "2022-03-02 17:51:51",
            "amount": 7115.0,
            "currency": "COP",
            "duration": null,
            "distance": null,
            "distance_unit": "",
            "start_location": {},
            "end_location": {},
            "other_info": {}
        },
        {
            "platform": "mu",
            "event_id": "623cef014b71c",
            "type": "delivery",
            "timezone": "America/Bogota",
            "country": "co",
            "start_date": "2022-03-02 17:22:37",
            "amount": 4251.0,
            "currency": "COP",
            "duration": null,
            "distance": null,
            "distance_unit": "",
            "start_location": {},
            "end_location": {},
            "other_info": {}
        }]
}

This endpoint allows you to retrieve the data that you already requested for a given User

HTTP Request

GET https://api.palenca.com/mensajeros-urbanos/get-user/<user_id_from_your_db>

PedidosYa

Create User

import requests

url = 'https://api.palenca.com/pedidosya/create-user'

payload = {
    'country': 'ec',
    'user_id': 'user_id_from_your_db',
    'email': 'elpibedeoro@gmail.com',
    'password': 'GoldenPassword'
    'worker_id': 129672
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/pedidosya/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "ec",
   "user_id": "user_id_from_your_db",
   "email": "elpibedeoro@gmail.com",
   "password": "GoldenPassword"
   "worker_id": 129672
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'ec',
    'user_id': 'user_id_from_your_db',
    'email': 'elpibedeoro@gmail.com',
    'password': 'GoldenPassword'
    'worker_id': 129672
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/pedidosya/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "pedidosya",
    "country": "ec"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/pedidosya/create-user

Payload

Parameter Description
country Country of the User (eg: mx for Mexico or co for Colombia)
user_id Your own user id from your database (e.g: 03eb0d70)
email Email of the PedidosYa user account (e.g: jose@palenca.com)
password Password of the PedidosYa user account
worker_id Id of the PedidosYa user account

Get User

import requests

url = 'https://api.palenca.com/pedidosya/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/pedidosya/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/pedidosya/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "pedidosya",
    "country": "ec",
    "profile": {
        "worker_id": "129672",
        "first_name": "Pibe",
        "last_name": "Oro",
        "email": "elpibedeoro@gmail.com",
        "phone_prefix": "5939",
        "phone_number": "62768455",
        "activation_status": "activated",
        "id_type": null,
        "id_number": "",
        "city_name": "Guayaquil",
        "employment_info": {},
        "metrics_info":{
            "acceptance_rate":0.97,
            "hours_worked":10,
            "delivery_services_arrived":25
        },
        "bank_info": {},
        "vehicle_info":{
            "type":"motorcycle"
        },
        "other_info": {}
    },
    "earnings": [
        {
            "datestr": "2021-10-17",
            "earnings": 37.99,
            "currency": "USD",
            "other_info": {
              "tips":7,
              "balance":null
            }
        },
        {
            "datestr": "2021-10-16",
            "earnings": 6.43,
            "currency": "USD",
            "other_info": {
              "tips":7,
              "balance":null
            }
        },
        {
            "datestr": "2021-10-14",
            "earnings": 8.19,
            "currency": "USD",
            "other_info": {
              "tips":7,
              "balance":null
            }
        },
        ...
    ],
    "events": []
}

Picap

Create User

import requests

url = 'https://api.palenca.com/picap/create-user'

payload = {
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'tax_id': 'courier_tax_id',
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl --location --request POST 'https://api.palenca.com/picap/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "country": "mx",
   "user_id": "user_id_from_your_db",
   "tax_id": "courier_tax_id"
}'
const axios = require('axios')
const data = JSON.stringify({
    'country': 'mx',
    'user_id': 'user_id_from_your_db',
    'tax_id': 'courier_tax_id',
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/picap/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "picap",
    "country": "mx"
}

This endpoint allows you to :

HTTP Request

POST https://api.palenca.com/picap/create-user

Payload

Parameter Description
country Country of the User (eg: mx for Mexico or co for Colombia)
user_id Your own user id from your database (e.g: 03eb0d70)
tax_id Courier's CURP

Get User

import requests

url = 'https://api.palenca.com/picap/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-version': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/picap/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-version: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/picap/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-version': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "user_id": "213kju-user",
    "profile": {
        "worker_id": "1234-worker-id",
        "first_name": "José Carlos",
        "last_name": "ArgĂĽelles RodrĂ­guez",
        "email": "josedriver@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "56435578800",
        "activation_status": "unknown",
        "id_type": null,
        "id_number": "COURIER_TAX_ID",
        "city_name": "Ciudad de Mexico",
        "employment_info": {},
        "metrics_info": {
            "rating": 5.0,
            "lifetime_trips": 52,
            "acceptance_rate": 100.0,
            "cancellation_rate": 333.0
        },
        "vehicle_info": {
            "type": "motorcycle",
            "brand": "",
            "year": "",
            "license_plate": "KZJ17940"
        },
        "bank_info": {},
        "other_info": {}
    },
    "earnings": [
        {
            "datestr": "2022-03-25",
            "amount": 35.0,
            "currency": "MXN",
            "other_info": {
                "balance": null
            }
        },
        {
            "datestr": "2022-03-24",
            "amount": 135.0,
            "currency": "MXN",
            "other_info": {
                "balance": null
            }
        }
    ],
    "events": [],
    "message": "SUCCESS",
    "country": "mx",
    "platform": "picap"
}

HR

Runa

Create user

import requests

url = 'https://api.palenca.com/runa/create-user'

payload = {
    'user_id': 'user_id_from_your_db',
    'email': 'homero@simpsons.com',
    'password': '5up3rs3cur3pas5'
    'country': 'mx'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

curl --location --request POST 'https://api.palenca.com/runa/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user_id": "user_id_from_your_db",
    "email": "homero@simpsons.com",
    "password": "5up3rs3cur3pas5"
    "country": "mx"
}'
const axios = require('axios')

const data = JSON.stringify({
    'user_id': 'user_id_from_your_db',
    'email': 'homero@simpsons.com',
    'password': '5up3rs3cur3pas5'
    'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/runa/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "runa",
    "country": "mx",
}

Runa is a payroll and human resources software that has been designed for small and medium-sized companies in Latin America.

This endpoint allows you to register a Runa user with the Palenca API.

HTTP Request

POST https://api.palenca.com/runa/create-user

Payload

Parameter Description
user_id Your own user id from your database (e.g: 03eb0d70)
country User country
email Email used to login Runa
password Password used to login Runa

Get User

import requests

url = 'https://api.palenca.com/runa/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-verision': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

curl --location --request GET 'https://api.palenca.com/runa/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-verision: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/runa/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-verision': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_1234567",
    "platform": "runa",
    "country": "mx",
    "profile": {
      "worker_id": "12345",
      "first_name": "Homer",
      "last_name": "Simpson",
      "email": "homer@simpsons.com",
      "phone_prefix":null,
      "phone_number": "5511223344",
      "activation_status":null,
      "city_name": "",
      "id_type": "rfc",
      "id_number": "HOSM841012000",
      "metrics_info": {},
      "vehicle_info": {},
      "other_info": {
        "gender": "male",
        "personal_email": "homer@simpsons.com",
        "nationality": "Mexicano",
        "civil_status": "Soltero(a)",
        "curp": "MARJ921230HMCRSR03"
      },
      "bank_info": {
        "bank_name": "BANAMEX",
        "account_number": "002270601710085438"
      },
      "employment_info": {
        "employer": "PALENCA",
        "years_in_company": 0,
        "monthly_salary": 96419.0,
        "start_date": "2021-12-16",
        "end_date": "2022-03-01",
        "compensation_type": "Fijo",
        "vacation_days": "20",
        "workshift": "Completa",
        "base_salary": 2405.5,
        "outsourcer_employee": false,
        "social_insurance": "96119227245"
      },
      "earnings": [
        {
          "datestr": "2022-03-25",
          "earnings": 34945.01,
          "currency": "MXN",
          "other_info": {
            "start_date": "2022-03-16",
            "end_date": "2022-03-31",
            "paid_days": 15,
            "deductions": 13264.38,
            "earnings": 48209.39,
            "other_earnings": 0.0
          }
        },
        {
          "datestr": "2022-03-14",
          "earnings": 34945.01,
          "currency": "MXN",
          "other_info": {
            "start_date": "2022-03-01",
            "end_date": "2022-03-15",
            "paid_days": 14,
            "deductions": 13264.38,
            "earnings": 48209.39,
            "other_earnings": 0.0
          }
        }
      ]
    }
}

HTTP Request

GET https://api.palenca.com/runa/get-user/user_id_from_your_db

Worky

Create user

import requests

url = 'https://api.palenca.com/worky/create-user'

payload = {
    'user_id': 'user_id_from_your_db',
    'email_or_cellphone': 'extreme_worker@gmail.com',
    'password': 'SiX9iSmyBsFT09',
    'country': 'mx'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

curl --location --request POST 'https://api.palenca.com/worky/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user_id": "user_id_from_your_db",
    "email": "extreme_worker@gmail.com",
    "password": "SiX9iSmyBsFT09"
    "country": "mx"
}'
const axios = require('axios')

const data = JSON.stringify({
    'user_id': 'user_id_from_your_db',
    'email': 'extreme_worker@gmail.com',
    'password': 'SiX9iSmyBsFT09'
    'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/worky/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "worky",
    "country": "mx",
}

Worky is a payroll and human resources software that has been designed for small and medium-sized companies in Latin America.

This endpoint allows you to register a Worky user with the Palenca API.

HTTP Request

POST https://api.palenca.com/worky/create-user

Payload

Parameter Description
user_id Your own user id from your database (e.g: 128a-f443)
country User's country
email_or_cellphone Worky allows both methods; choose the one the employee uses
password Password used to login in Worky's app

Get User

import requests

url = 'https://api.palenca.com/worky/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-verision': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

curl --location --request GET 'https://api.palenca.com/worky/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-verision: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/worky/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-verision': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "tests",
    "country": "mx",
    "platform": "worky",
    "profile": {
        "worker_id": "96ac-aef88f6d3b8a",
        "first_name": "Bob",
        "last_name": "Ramirez",
        "email": "bob@company.co",
        "phone_prefix": null,
        "phone_number": "5512568790",
        "activation_status": null,
        "id_type": null,
        "id_number": null,
        "city_name": "",
        "employment_info": {
            "years_in_company": 2,
            "monthly_salary": 0.0,
            "start_date": "2020-04-01",
            "compensation_type": "Honorarios",
            "vacation_days": "10",
            "employer": "Bob Companies",
            "job_title": "Data Scientiest"
        },
        "metrics_info": {},
        "vehicle_info": {},
        "bank_info": {},
        "other_info": {
            "url_picture": "https://storage.googleapis.com/worky-public/secret-id.jpeg",
            "gender": "male",
            "nationality": "Mexicano",
            "civil_status": "Casado(a)"
        }
    },
    "earnings": [],
    "events": []
}

HTTP Request

GET https://api.palenca.com/worky/get-user/user_id_from_your_db

IMSS

Create User

import requests

url = 'https://api.palenca.com/imss/create-user'

payload = {
    'user_id': '123453',
    'tax_id': 'GOPJ930704HDFPRR05',
    'country': 'mx'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl -X POST 'https://api.palenca.com/imss/create-user' \
-H 'x-api-key: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
   "user_id": "UIGZ780475MCXJKD09",
   "tax_id": "UIGZ780475MCXJKD09",
   "country": "mx"
}'
const axios = require('axios')
const data = JSON.stringify({
    'tax_id': 'GOPJ930704HDFPRR05',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/imss/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "imss",
    "country": "mx",
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/imss/create-user

Payload

Parameter Description
tax_id CURP of the IMSS user account (e.g: GOPJ930704HDFPRR05)
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User (must be set to mx)

Get User

import requests

url = 'https://api.palenca.com/imss/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'x-api-verision': '1.1.0',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/imss/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key' \
--header 'x-api-verision: 1.1.0'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/imss/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'x-api-verision': '1.1.0',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message":"SUCCESS",
    "user_id": "user_1234567",
    "country":"mx",
    "platform":"imss",
    "profile": {
      "first_name": "Carlos",
      "last_name": "Cuevas Perez",
      "activation_status": "employed",
      "id_type": "curp",
      "id_number": "CUPC900823AR52",
      "other_info": {
          "gender": "male"
      },
      "employment_info": {
        "employer": "EMPRESA SA DE CV",
        "id": "D9313250",
        "base_salary": 3140.40,
        "quoted_days": null,
        "start_date": "2022-03-24",
        "quoted_weeks": "1332",
        "federal_entity": "CIUDAD DE MEXICO",
        "monthly_salary": 94212.0,
        "end_of_rights": "2021-06-21",
        "pdf_url": "https://aws.amazon.com/link-to-a-pdf.com"
        "employment_history": [
          {
              "employer": "COMPANY SA DE CV",
              "start_date": "24/03/2022",
              "end_date": null,
              "base_salary": 336.93,
              "basic_salary": 10249.41
          },
          {
              "employer": "SECURITY COMPANY SA",
              "start_date": "09/03/2022",
              "end_date": "23/03/2022",
              "base_salary": 550.86,
              "basic_salary": 16757.16
          },
          {
              "employer": "AWESOME STARTUP",
              "start_date": "21/02/2022",
              "end_date": "12/03/2022",
              "base_salary": 232.45,
              "basic_salary": 7071.13
          }
        ],
        "earnings": [
        {
            "datestr": "2022-06-01",
            "amount": 47120.58,
            "currency": "MXN",
            "other_info": {
                "balance": null,
                "start_date": "2022-06-01",
                "end_date": "2022-07-01"
            }
        },
        {
            "datestr": "2022-05-01",
            "amount": 47120.58,
            "currency": "MXN",
            "other_info": {
                "balance": null,
                "start_date": "2022-05-01",
                "end_date": "2022-06-01"
            }
        },
        {
            "datestr": "2022-04-01",
            "amount": 47120.58,
            "currency": "MXN",
            "other_info": {
                "balance": null,
                "start_date": "2022-04-01",
                "end_date": "2022-05-01"
            }
        }]
      }
    }
}

This endpoint allows you to recover all the information Palenca was able to obtain for this user.

Note: The field monthly_salary is computed based on these guidelines (rounded to 2 decimal places), but it may differ slightly from the actual monthly salary the user receives each month due to the user's company policies.

Inside the field employment_history, the variable basic_salary is computed just as monthly_salary, but it was called basic_salary to homogenize IMSS and ISSSTE's employment history. While base_salary and basic_salary are sometimes interchangeable terms, in our API they have distinct meanings. base_salary is the official salary for a day of work, while basic_salary represents an approximation of a user's monthly work pay.

HTTP Request

GET https://api.palenca.com/imss/get-user/user_id_from_your_db

ISSSTE

Create User

import requests

url = 'https://api.palenca.com/issste/create-user'

payload = {
    'user_id': '123453',
    'tax_id': 'GOPJ930704HDFPRR05',
    'country': 'mx'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl -X POST 'https://api.palenca.com/issste/create-user' \
-H 'x-api-key: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
   "user_id": "UIGZ780475MCXJKD09",
   "tax_id": "UIGZ780475MCXJKD09",
   "country": "mx"
}'
const axios = require('axios')
const data = JSON.stringify({
    'tax_id': 'GOPJ930704HDFPRR05',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/issste/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "user_id": "user_id_from_your_db",
    "platform": "issste",
    "country": "mx",
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/issste/create-user

Payload

Parameter Description
tax_id CURP of the issste user account (e.g: GOPJ930704HDFPRR05)
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User (must be set to mx)

Get User

import requests

url = 'https://api.palenca.com/issste/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/imss/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/imss/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "message": "SUCCESS",
    "country": "mx",
    "platform": "issste",
    "user_id": "GZSJ600475HDFLZW00",
    "profile": {
      "worker_id": "GZSJ600475HDFLZW00",
      "first_name": "Gustavo Ricardo",
      "last_name": "Zaragoza Pensado",
      "activation_status": "employed",
      "id_type": "curp",
      "id_number": "GZSJ600475HDFLZW000",
      "employment_info": {
        "monthly_salary": 23451.0,
        "start_date": "20/09/2013",
        "employer": "Ramo: Comision Nacional Del Agua (conagua)",
        "employment_history": [
          {
              "employer": "COMPANY SA DE CV",
              "start_date": "24/03/2022",
              "end_date": null,
              "basic_salary": 15400.0
          },
          {
              "employer": "SECURITY COMPANY SA",
              "start_date": "09/03/2022",
              "end_date": "23/03/2022",
              "basic_salary": 18900.0
          },
          {
              "employer": "AWESOME STARTUP",
              "start_date": "21/02/2022",
              "end_date": "12/03/2022",
              "basic_salary": 32400.0
          }
        ],
      },
      "earnings": [
        {
            "datestr": "2022-06-01",
            "amount": 47120.58,
            "currency": "MXN",
            "other_info": {
                "balance": null,
                "start_date": "2022-06-01",
                "end_date": "2022-07-01"
            }
        },
        {
            "datestr": "2022-05-01",
            "amount": 47120.58,
            "currency": "MXN",
            "other_info": {
                "balance": null,
                "start_date": "2022-05-01",
                "end_date": "2022-06-01"
            }
        },
        {
            "datestr": "2022-04-01",
            "amount": 47120.58,
            "currency": "MXN",
            "other_info": {
                "balance": null,
                "start_date": "2022-04-01",
                "end_date": "2022-05-01"
            }
        }],
      "other_info": {
          "gender": "male"
      }
    }
}

This endpoint allows you to recover all the information Palenca was able to obtain for this user.

Note: ISSSTE's API returns a user's basic salary. For more information on what basic salary means, check out this link.

HTTP Request

GET https://api.palenca.com/issste/get-user/user_id_from_your_db

Pemex

Create User

import requests

url = 'https://api.palenca.com/pemex/create-user'

payload = {
    'username': '123453',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

print(response.text)

curl -X POST 'https://api.palenca.com/pemex/create-user' \
-H 'x-api-key: your_api_key' \
-H 'Content-Type: application/json' \
-d '{
    "user_id": "user_id_from_your_db",
   "username": "123453",
   "password": "MyGreatPassword62",
   "country": "mx"
}'
const axios = require('axios')
const data = JSON.stringify({
    'username': '123453',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/pemex/create-user',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
        "message": "SUCCESS",
        "user_id": "user_123456780979",
        "platform": "pemex",
        "country": "mx"
}

This endpoint allows you to:

HTTP Request

POST https://api.palenca.com/pemex/create-user

Payload

Parameter Description
username username of the Pemex user account (e.g: jose@palenca.com)
password password of the Pemex user account
user_id your own user id from your database (e.g: 03eb0d70)
country Country of the User (mx for Mexico, co for Colombia, br for Brazil)

Get User

import requests

url = 'https://api.palenca.com/pemex/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/pemex/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/pemex/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "user_id": "user_test_pemex",
    "profile": {
        "worker_id": "998540",
        "first_name": "Octavio",
        "last_name": "Esmeralda",
        "activation_status": "retiree",
        "id_type": "CURP",
        "id_number": "OESMJ612348HDRL09",
        "employment_info": {
            "employer": "PEMEX CORPORATIVO"
        },
        "other_info": {
            "gender": "male"
        }
    },
    "earnings": [
        {
            "datestr": "2022-04-10",
            "amount": 13075.54,
            "currency": "MXN",
            "other_info": {
                "balance": null
            }
        },
        {
            "datestr": "2022-03-27",
            "amount": 13075.54,
            "currency": "MXN",
            "other_info": {
                "balance": null
            }
        },
        {
            "datestr": "2022-03-13",
            "amount": 13075.54,
            "currency": "MXN",
            "other_info": {
                "balance": null
            }
        },
        {
            "datestr": "2022-02-27",
            "amount": 13075.54,
            "currency": "MXN",
            "other_info": {
                "balance": null
            }
        },
        {
            "datestr": "2022-01-02",
            "amount": 13075.54,
            "currency": "MXN",
            "other_info": {
                "balance": null
            }
        }

    ],
    "message": "SUCCESS",
    "country": "mx",
    "platform": "pemex"
}

This endpoint allows you to retrieve the data that you already requested for a given User

HTTP Request

GET https://api.palenca.com/pemex/get-user/user_id_from_your_db

Clip

Get User

import requests

url = 'https://api.palenca.com/clip/get-user/user_id_from_your_db'

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('GET', url, headers=headers)

print(response.text)

curl --location --request GET 'https://api.palenca.com/clip/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/clip/get-user/user_id_from_your_db',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  }
}

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

Returns a JSON structured like this:

{
    "user_id": "user_test_clip",
    "profile": {
        "platform": "clip",
        "country": "mx",
        "worker_id": "191a358f-77a4-4e76-8245-bd00b28ed923",
        "first_name": "Maria Juana",
        "last_name": "Tapia Santa Teresa",
        "email": "info@empresaflores.mx",
        "phone_prefix": "+52",
        "phone_number": null,
        "gender": null,
        "birthday": null,
        "city_name": "",
        "url_picture": null,
        "id_type": null,
        "id_number": null,
        "rating": null,
        "lifetime_trips": null,
        "time_since_ft": null,
        "level_name": null,
        "metrics_info": {},
        "list_vehicle_info": [],
        "bank_info": {
            "account_number": "XXXXXXXXXXXXXX7365",
            "holder_name": "MARIA JUAN TAPIA SANTA TERESA",
            "bank_name": "BBVA Bancomer, S.A."
        },
        "other_info": {}
    },
    "earnings": [
        {
            "datestr": "2022-07-06",
            "earnings": 1076.0,
            "currency": "MXN",
            "other_info": {}
        },
        {
            "datestr": "2022-07-05",
            "earnings": 1110.0,
            "currency": "MXN",
            "other_info": {}
        },
        {
            "datestr": "2022-06-29",
            "earnings": 3585.0,
            "currency": "MXN",
            "other_info": {}
        },
        {
            "datestr": "2022-06-17",
            "earnings": 518.0,
            "currency": "MXN",
            "other_info": {}
        }
    ],
    "events": [
        {
            "platform": "clip",
            "event_id": "K2dPORT",
            "type": null,
            "timezone": null,
            "country": null,
            "start_date": "2022-07-07",
            "amount": 1076.0,
            "currency": "MXN",
            "duration": null,
            "distance": null,
            "distance_unit": "",
            "start_location": {},
            "end_location": {},
            "other_info": {}
        },
        {
            "platform": "clip",
            "event_id": "r4fSCfN",
            "type": null,
            "timezone": null,
            "country": null,
            "start_date": "2022-07-04",
            "amount": 1110.0,
            "currency": "MXN",
            "duration": null,
            "distance": null,
            "distance_unit": "",
            "start_location": {},
            "end_location": {},
            "other_info": {}
        },
        {
            "platform": "clip",
            "event_id": "ZddV5Zo",
            "type": null,
            "timezone": null,
            "country": null,
            "start_date": "2022-06-28",
            "amount": 3585.0,
            "currency": "MXN",
            "duration": null,
            "distance": null,
            "distance_unit": "",
            "start_location": {},
            "end_location": {},
            "other_info": {}
        },
        {
            "platform": "clip",
            "event_id": "wPnb2fK",
            "type": null,
            "timezone": null,
            "country": null,
            "start_date": "2022-06-15",
            "amount": 518.0,
            "currency": "MXN",
            "duration": null,
            "distance": null,
            "distance_unit": "",
            "start_location": {},
            "end_location": {},
            "other_info": {}
        }
    ],
    "message": "SUCCESS",
    "country": "mx",
    "platform": "clip"
}

This endpoint allows you to retrieve the data that you already requested for a given User

Errors

The API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your API key is wrong.
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable -- You requested a format that isn't json.
429 Too Many Requests
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.
{
  "error": "INVALID_CREDENTIALS"
}
{
  "error": "INVALID_CREDENTIALS"
}
{
  "error": "INVALID_CREDENTIALS"
}

We also send error messages like this one:

Error Enum Meaning
INVALID_TOKEN API key isn't correct
INVALID_CREDENTIALS User's password/email or password/phone is invalid
MISSING_PARAMS Request's body is incomplete
RATE_LIMIT_EXCEEDED You exceeded your rate limit
VERIFICATION_CODE_APP User has app based 2 step verification. To solve it, the user must change his 2 step verification method to sms.

Earnings

Get earnings

The POST https://api.palenca.com/earnings endpoint returns user-authorized earnings data. Earnings data is standardized across gig platforms, the data is returned in reverse-chronological order.

Results are paginated due to the large number of earnings associated with a Profile, manipulate the limit and offset parameters in conjunction with the total_earnings response body field to fetch all available earnings.

import requests

url = 'https://api.palenca.com/earnings'

payload = {
    "user_id": "user_id_from_your_db",
    "platform": "uber",
    "start_date": "2021-01-01",
    "end_date": "2022-01-01",
    "options": {
      "limit": 10
    }
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

curl --location --request POST 'https://api.palenca.com/earnings'
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user_id": "user_id_from_your_db",
    "platform": "uber",
    "start_date": "2021-01-01",
    "end_date": "2022-01-01",
    "options": {
      "limit": 10
    }
}'
const axios = require('axios')

const data = JSON.stringify({
    "user_id": "user_id_from_your_db",
    "platform": "uber",
    "start_date": "2021-01-01",
    "end_date": "2022-01-01",
    "options": {
      "limit": 10
    }
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/earnings',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
  "message":"SUCCESS",
  "user_id":"user_1619027247124",
  "platform":"uber",
  "total_earnings":250,
  "earnings":[
      {
          "datestr":"2021-10-01",
          "earnings":109.0,
          "currency":"MXN",
          "other_info":{

          }
      },
      {
          "datestr":"2021-09-01",
          "earnings":108.0,
          "currency":"MXN",
          "other_info":{

          }
      },
      {
          "datestr":"2021-08-01",
          "earnings":107.0,
          "currency":"MXN",
          "other_info":{

          }
      },
      {
          "datestr":"2021-07-01",
          "earnings":106.0,
          "currency":"MXN",
          "other_info":{

          }
      },
      {
          "datestr":"2021-06-01",
          "earnings":105.0,
          "currency":"MXN",
          "other_info":{

          }
      },
      {
          "datestr":"2021-05-01",
          "earnings":104.0,
          "currency":"MXN",
          "other_info":{

          }
      },
      {
          "datestr":"2021-04-01",
          "earnings":103.0,
          "currency":"MXN",
          "other_info":{

          }
      },
      {
          "datestr":"2021-03-01",
          "earnings":102.0,
          "currency":"MXN",
          "other_info":{

          }
      },
      {
          "datestr":"2021-02-01",
          "earnings":101.0,
          "currency":"MXN",
          "other_info":{

          }
      },
      {
          "datestr":"2021-01-01",
          "earnings":100.0,
          "currency":"MXN",
          "other_info":{

          }
      }
  ]
}

HTTP Request

POST https://api.palenca.com/earnings

Payload

Parameter Description Type Required Example
user_id Your own user id from your database str True 03eb0d70
platform Platform Name str True uber
start_date The earliest date for which data should be returned. Dates should be formatted as YYYY-MM-DD str True 2021-01-01
end_date The latest date for which data should be returned. Dates should be formatted as YYYY-MM-DD str True 2022-01-01
options An optional object to be used with the request obj False { limit: 10, offset: 0 }

Options payload

Parameter Description Type Maximum
limit The number of earnings to fetch. The default value is 150. int 150
offset The number of earnings to skip. The default value is 0. int

Events

Get events

The POST https://api.palenca.com/events endpoint returns user-authorized events data. Events data is standardized across gig platforms, the data is returned in reverse-chronological order.

Results are paginated due to the large number of events associated with a Profile, manipulate the limit and offset parameters in conjunction with the total_events response body field to fetch all available events.

import requests

url = 'https://api.palenca.com/events'

payload = {
    "user_id": "user_id_from_your_db",
    "platform": "uber",
    "start_date": "2021-01-01",
    "end_date": "2022-01-01",
    "options": {
      "limit": 10
    }
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

curl --location --request POST 'https://api.palenca.com/events'
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "user_id": "user_id_from_your_db",
    "platform": "uber",
    "start_date": "2021-01-01",
    "end_date": "2022-01-01",
    "options": {
      "limit": 10
    }
}'
const axios = require('axios')

const data = JSON.stringify({
    "user_id": "user_id_from_your_db",
    "platform": "uber",
    "start_date": "2021-01-01",
    "end_date": "2022-01-01",
    "options": {
      "limit": 10
    }
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/events',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

{
  "message":"SUCCESS",
  "user_id":"user_1619027247124",
  "platform":"uber",
  "total_events":250,
  "events":[
      {
            "platform": "uber",
            "event_id": "e8f2c7f8-9cd3-4b2a-9372-46ed17bd0ad7",
            "type": "",
            "timezone": "America/Bogota",
            "country": "co",
            "start_date": "2022-02-12 02:13:28",
            "amount": 4850.0,
            "currency": "COP",
            "duration": 319,
            "distance": 2.6,
            "distance_unit": "km",
            "start_location": {
                "pickup_address": "Cra 43C #7D 47, MedellĂ­n, Antioquia, Colombia"
            },
            "end_location": {
                "dropoff_address": "Cra. 45 #15 sur - 75, MedellĂ­n, Antioquia, Colombia"
            },
            "other_info": {
                "cash_received": 0,
                "is_cash_payment": false,
                "trip_timestamp": 1644632008
            }
        },
        {
            "platform": "uber",
            "event_id": "69c76b76-09e3-42e0-8e64-da3656f8f098",
            "type": "",
            "timezone": "America/Bogota",
            "country": "co",
            "start_date": "2022-02-12 02:12:39",
            "amount": 0.0,
            "currency": "COP",
            "duration": 0,
            "distance": null,
            "distance_unit": "",
            "start_location": {
                "pickup_address": "Cra. 36 #10a65, MedellĂ­n, Antioquia, Colombia"
            },
            "end_location": {
                "dropoff_address": "Cra. 36 #10a65, MedellĂ­n, Antioquia, Colombia"
            },
            "other_info": {
                "cash_received": 0,
                "is_cash_payment": false,
                "trip_timestamp": 1644631959
            }
        },
        {
            "platform": "uber",
            "event_id": "1d8329f1-dfd3-4056-a130-4c8bfe72905e",
            "type": "",
            "timezone": "America/Bogota",
            "country": "co",
            "start_date": "2022-02-12 01:57:52",
            "amount": 4625.0,
            "currency": "COP",
            "duration": 617,
            "distance": 2.8,
            "distance_unit": "km",
            "start_location": {
                "pickup_address": "Cl. 6 #43e-40, MedellĂ­n, Antioquia, Colombia"
            },
            "end_location": {
                "dropoff_address": "Cra. 36 #10a-53, MedellĂ­n, Antioquia, Colombia"
            },
            "other_info": {
                "cash_received": 0,
                "is_cash_payment": false,
                "trip_timestamp": 1644631072
            }
        },
        {
            "platform": "uber",
            "event_id": "0dc2f7d5-5f6e-42ce-96e1-d54a7b0fe300",
            "type": "",
            "timezone": "America/Bogota",
            "country": "co",
            "start_date": "2022-02-12 01:45:00",
            "amount": 4050.0,
            "currency": "COP",
            "duration": 256,
            "distance": 2.0,
            "distance_unit": "km",
            "start_location": {
                "pickup_address": "Cl. 6 Sur #43A-227, MedellĂ­n, El Poblado, MedellĂ­n, Antioquia, ColĂ´mbia"
            },
            "end_location": {
                "dropoff_address": "Cl 10 #43c75, MedellĂ­n, El Poblado, MedellĂ­n, Antioquia, ColĂ´mbia"
            },
            "other_info": {
                "cash_received": 0,
                "is_cash_payment": false,
                "trip_timestamp": 1644630300
            }
        },
        {
            "platform": "uber",
            "event_id": "4cd034ee-aa0a-476f-a032-f4d589a4e2d0",
            "type": "",
            "timezone": "America/Bogota",
            "country": "co",
            "start_date": "2022-02-12 01:27:09",
            "amount": 9425.0,
            "currency": "COP",
            "duration": 969,
            "distance": 6.8,
            "distance_unit": "km",
            "start_location": {
                "pickup_address": "Cra. 28 #29-85, MedellĂ­n, Antioquia, Colombia"
            },
            "end_location": {
                "dropoff_address": "Cl. 6 Sur #43a92, MedellĂ­n, Antioquia, Colombia"
            },
            "other_info": {
                "cash_received": 0,
                "is_cash_payment": false,
                "trip_timestamp": 1644629229
            }
        }
        ]
}

HTTP Request

POST https://api.palenca.com/events

Payload

Parameter Description Type Required Example
user_id Your own user id from your database str True 03eb0d70
platform Platform Name str True uber
start_date The earliest date for which data should be returned. Dates can be formatted as YYYY-MM-DD or YYYY-MM-DD HH:MM:SS for more accurate results str True 2021-01-01 10:55:12
end_date Dates can be formatted as YYYY-MM-DD or YYYY-MM-DD HH:MM:SS for more accurate results str True 2022-01-01 10:55:12
options An optional object to be used with the request obj False { limit: 10, offset: 0 }

Options payload

Parameter Description Type Maximum
limit The number of events to fetch. The default value is 150. int 150
offset The number of events to skip. The default value is 0. int

Delete a user

Deleting a user

The DELETE https://api.palenca.com/:platform/:user_id endpoint deletes all data (profile, earnings, and events) related to the specified user.

If you need to retrieve the user data again, you must create the user. See the documentation for the required platform.

import requests

url = 'https://api.palenca.com/:platform/:user_id'

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
curl --location --request DELETE 'https://api.palenca.com/:platform/:user_id'
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json'
const axios = require('axios')

const config = {
  method: 'delete',
  url: 'https://api.palenca.com/:platform/:user_id',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  }
};

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

Returns a JSON structured like this:

{
  "message": "USER_DELETED",
  "details": "The user :user_id has been deleted"
}

HTTP Request

DELETE https://api.palenca.com/:platform/:user_id

Query params

Parameter Description Type Required Example
user_id Your own user id from your database str True 03eb0d70
platform Platform Name str True uber

Get Failed Logins

The POST https://api.palenca.com/metrics/logins/get-failed-logins endpoint gets all the failed logins for a specific API key. Using limit and offset parameters, you can paginate the results to get the desired number of failed logins.

import requests

url = 'https://api.palenca.com/metrics/logins/get-failed-logins'

payload = {
    "platform": "uber",
    "options": {
      "limit": 10,
      "offset": 0
    }
}

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)

curl --location --request POST 'https://api.palenca.com/metrics/logins/get-failed-logins'
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "platform": "uber",
    "options": {
      "limit": 10,
      "offset": 0
    }
}'
const axios = require('axios')

const data = JSON.stringify({
    "platform": "uber",
    "options": {
      "limit": 10,
      "offset": 0
    }
});

const config = {
  method: 'post',
  url: 'https://api.palenca.com/metrics/logins/get-failed-logins',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
  data : data
};

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

Returns a JSON structured like this:

[
    {
        "created_at": "2022-05-04T15:52:51.987529",
        "platform": "uber",
        "login": "gonzalo@palenca.com",
        "country": "br",
        "error_type": "CREDENTIALS_INVALID",
        "user_id": "user_1"
    },
    {
        "created_at": "2022-04-29T18:13:28.142002",
        "platform": "uber",
        "login": "jayroplascencia@gmail.com",
        "country": "mx",
        "error_type": "CREDENTIALS_INVALID",
        "user_id": "user_2"
    },
    {
        "created_at": "2022-04-29T17:56:46.285849",
        "platform": "uber",
        "login": "jose@palenca.com",
        "country": "mx",
        "error_type": "CREDENTIALS_INVALID",
        "user_id": "user_3"
    },
    {
        "created_at": "2022-04-27T18:32:53.236205",
        "platform": "uber",
        "login": "jose@palenca.com",
        "country": "mx",
        "error_type": "CREDENTIALS_INVALID",
        "user_id": "user_4"
    },
    {
        "created_at": "2022-04-27T12:49:47.449842",
        "platform": "uber",
        "login": "pierre@palenca.com",
        "country": "mx",
        "error_type": "CREDENTIALS_INVALID",
        "user_id": "user_5"
    },
    {
        "created_at": "2022-04-26T17:15:29.420004",
        "platform": "uber",
        "login": "jayroplascencia@gmail.com",
        "country": "mx",
        "error_type": "CREDENTIALS_INVALID",
        "user_id": "user_6"
    },
    {
        "created_at": "2022-04-26T17:15:00.000564",
        "platform": "uber",
        "login": "jose@palenca.com",
        "country": "mx",
        "error_type": "CREDENTIALS_INVALID",
        "user_id": "user_7"
    },
    {
        "created_at": "2022-04-24T19:16:34.821333",
        "platform": "uber",
        "login": "quique@palenca.com",
        "country": "mx",
        "error_type": "VERIFICATION_CODE_PHONE",
        "user_id": "user_8"
    },
    {
        "created_at": "2022-04-24T19:16:07.816797",
        "platform": "uber",
        "login": "gonzalo@palenca.com",
        "country": "mx",
        "error_type": "VERIFICATION_CODE_PHONE",
        "user_id": "user_9"
    },
    {
        "created_at": "2022-04-24T19:15:42.035472",
        "platform": "uber",
        "login": "antoine@palenca.com",
        "country": "mx",
        "error_type": "VERIFICATION_CODE_PHONE",
        "user_id": "user_10"
    }
]

HTTP Request

POST https://api.palenca.com/metrics/logins/get-failed-logins

Payload

Parameter Description Type Required Example
platform Platform Name str True uber
options An optional object to be used with the request obj False { limit: 10, offset: 0 }

Options payload

Parameter Description Type Maximum
limit The number of failed logins to fetch. The default value is 150. int 150
offset The number of failed logins to skip. The default value is 0. int 0

Get User Ids

The GET https://api.palenca.com/metrics/logins/get-user-ids endpoint returns the user_id's and their platforms for a given x-api-key. Using limit and offset parameters, you can paginate the results to get the desired number of failed logins.

Note: This endpoint only returns user_ids for users who connected succesfully to Palenca. For users who couldn't connect, check out the documentation for the /get-failed-logins endpoint.

import requests

url = 'https://api.palenca.com/metrics/logins/get-user-ids'

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

params = {
    "limit": 100,
    "offset": 0
}

response = requests.request('GET', url, headers=headers, params=params)

curl --location --request GET 'https://api.palenca.com/metrics/logins/get-user-ids?limit=100&offset=0' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/metrics/logins/get-user-ids?offset=0&limit=100',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
};

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

Returns a JSON structured like this:

{
  "users":[
    {
      "user_id":"fghi",
      "platforms":[
        "beat",
        "rappi",
        "uber"
      ]
    },
    {
      "user_id":"abcde",
      "platforms":[
        "rappi",
        "uber"
      ]
    }
  ],
  "total_users": 2
}

HTTP Request

GET https://api.palenca.com/metrics/logins/get-user-ids

Payload

Parameter Description Type Required Example
limit Maximum number of users to retrieve, default is 150 int True 30
offset Number of users to skip, default is 0 int True 1

Note: Users are ordered by creation date in descending order, so using an offset greater than zero would skip the most recently created profiles.

Get Profile

The GET https://api.palenca.com/profiles/{user_id}?platform={platform} endpoint returns the profile a user has for a given platform. This endpoint returns the same information contained within profile after calling GET https://api.palenca.com/{platform}/get-user/{user_id}

Note: The response might vary between platforms.

import requests

url = 'https://api.palenca.com/profiles/{user_id}'

headers = {
  'x-api-key': 'your_api_key',
  'Content-Type': 'application/json'
}

params = {
    "platform": "your_platform"
}

response = requests.request('GET', url, headers=headers, params=params)

curl --location --request GET 'https://api.palenca.com/profiles/{user_id}?platform={platform}' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://api.palenca.com/profiles/{user_id}?platform={platform}',
  headers: {
    'x-api-key': 'your_api_key',
    'Content-Type': 'application/json'
  },
};

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

Returns a JSON structured like this:

{
    "user_id": "user_12345",
    "profile": {
        "platform": "rappi",
        "country": "ar",
        "worker_id": "721385",
        "first_name": "Miguel Gustavo",
        "last_name": "Castillo Torres",
        "email": "torres8@gmail.com",
        "phone_prefix": "+54",
        "phone_number": "4417695389",
        "gender": "male",
        "birthday": "1989-08-14",
        "city_name": "Cordoba",
        "url_picture": "",
        "id_type": "dni",
        "id_number": "67988398",
        "rating": 4.8,
        "lifetime_trips": null,
        "time_since_ft": "",
        "level_name": "silver",
        "metrics_info": {
            "acceptance_rate": 1.0,
            "completion_rate": 1.0,
            "points": 0
        },
        "list_vehicle_info": [
            {
                "type": "bicycle",
                "courier_type": "rappitendero"
            }
        ],
        "bank_info": {},
        "other_info": {
            "debt_pending": 5141,
            "debt_paid": 4000,
            "debt_accumulated": 9141,
            "activation_status": "activated",
            "address": "Av. Calle Interesante 7620"
        }
    },
    "message": "SUCCESS"
}

HTTP Request

GET https://api.palenca.com/profiles/{user_id}?platform={platform}

Payload

Parameter Description Type Required Example
platform The user's platform string True rappi

Note: For users registered in multiple platforms, a unique request is needed for each one.