NAV
shell python javascript

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.

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

Sandbox

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.

Information

Profile

The Profile is a Dict with the following format:

Variable Description Type Example
platform Name of the Platform str Uber
country Country str Mexico
user_uuid 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@gmail.com
phone_prefix Phone Prefix str +52
phone_number Phone Number str 15583490938
gender Gender str Male
birthday Birthday str 1980-06-16
city_name City of Operation str Mexico City
url_picture URL of the Profile Picture str URL
id_type ID Type str RFC
id_number ID Number str VST190815509
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 Platinium
level_number Level Number (1 being the lowest) int 3
metrics_info Other Metrics, Platform Specific dict {"acceptance_rate": 0.97, "cancelation_rate": 0.17}
vehicle_info Vehicle Info, Platform Specific dict {"type": "CAR", "make": "Ford", "model": "Fiesta", "year": 2017}
bank_info Bank Info, Platform Specific dict {"account_number": "6461801921********", "bank_name": "STP", "holder_name": "Jose Carlos Huerta Garcia"}
other_info Other Info, Platform Specific dict {"debt_pending": 1000, "debt_paid": 540, "debt_accumulated": 1540}

Earnings

The Earnings are a List of Dict with the following format:

Variable Description Type Example
worker_id Worker ID str b00738d7-2e7d-4a57-afe4-a72abfb02530
platform Platform Name str uber
datestr Specific Day str 2020-01-20
amount Amount float 345.45
currency Currency str MXN
other_info Additional Info, Platform Specific dict {"count_trips": 7, "online_hours": 4.15}

Events

The Events are a List of Dict with the following format:

Variable Description Type Example
worker_id Worker ID str b00738d7-2e7d-4a57-afe4-a72abfb02530
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
start_date Start of the Event str 2020-01-20 12:03:12
amount Value of the Event float 345.45
currency Currency str MXN
duration Duration in seconds int 876
distance Distance float 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 {"datestr": "2021-05-23", "date_requested": "Sun, May 23", "time_requested": "5:19 PM", "trip_type": "TRIP", "trip_subtype": "UberX", "distance_str": "1.5 km", "duration_str": "6min 56sec", "points_earned": "1 point", "cash_collected": "", "trip_timestamp": 1621808394, "earnings_amount": 33.16, "payouts": 0.0, "taxes": 0.77}

Integration

Widget

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

Webview

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

When you initiate your webview, you need to pass your client_id in the URL string.

https://www.palenca.com/form/{client_id}

We will automatically generate a user_id, and pass it back to you afterward.

You can also choose to pass your own internal user_id as an additional parameter to the URL.

https://www.palenca.com/form/{client_id}/{user_id}

Socket

We are using a Socket to pass information about what happens in the widget.

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

A webhook is a web callback that Palenca uses to send information whenever an Event occurs (e.g: a user connected successfully to Uber)

The format of the data is the same as the /get-user route.

To set it up, get in contact with your account manager.

Anytime an Event happens, we will send a POST request to the URL that you created (e.g: https://www.myco.com/palenca-events)

Drivers

Uber

Create User

import requests

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

payload = {
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    '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://www.palenca.com/uber/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@gmail.com",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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"
}

This endpoint allows you to :

HTTP Request

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

Payload

Parameter Description
email email of the Uber user account (e.g: jose@gmail.com)
password password of the Uber user account
user_id your own user id from your database (e.g: 03eb0d70)

Validate User

import requests

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

payload = {
    'code': '1234',
    '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://www.palenca.com/uber/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"
}'
const axios = require('axios')
const data = JSON.stringify({
    'code': '1234',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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",
    "profile": {
        "platform": "uber",
        "country": "mx",
        "user_uuid": "505100c1-f645-40c1-b9ad-3312b4252c6d",
        "first_name": "Jairo",
        "last_name": "Huerta Rincon",
        "email": "jhuertarincon@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "+5215540086725",
        "birthday": "1987-10-27",
        "city_name": "Guadalajara",
        "url_picture": "url",
        "id_type": "",
        "id_number": "",
        "rating": 4.98,
        "lifetime_trips": 10868,
        "time_since_ft": "3 years",
        "level_name": "Diamond",
        "level_number": 4,
        "metrics_info": {
            "acceptance_rate": 0.97,
            "cancelation_rate": 0.08,
            "thumbs_up": "High"
        },
        "bank_info": {},
        "list_vehicle_info": [
            {
                "vehicle_type": "CAR",
                "vehicle_make": "Volkswagen",
                "vehicle_model": "Polo",
                "vehicle_year": 2018,
                "vehicle_license_plate": "JPB1824",
                "vehicle_license_plate_state": "JA",
                "vehicle_vin": "MEX6G2607JT022324"
            }
        ],
        "other_info": {}
    },
    "earnings": [
        {
            "datestr": "2020-12-16",
            "earnings": 1420.45,
            "currency": "MXN",
            "other_info": {
                "count_trips": 20.0,
                "online_hours": 10.39,
                "ontrip_hours": 10.25,
                "driver_canceled_trips": 3.0,
                "acceptance_rate": 1.0,
                "loyalty_points": 20.0
            }
        },
        {
            "datestr": "2020-12-17",
            "earnings": 1024.8,
            "currency": "MXN",
            "other_info": {
                "count_trips": 16.0,
                "online_hours": 7.72,
                "ontrip_hours": 7.41,
                "driver_canceled_trips": 4.0,
                "acceptance_rate": 1.0,
                "loyalty_points": 16.0
            }
        },
        ...
    ],
    "events": [
      {
        "platform": "uber", 
        "event_id": "7f0e222e-2597-4166-9a16-2fc12ce035c2", 
        "type": "rideshare", 
        "start_date": "2021-06-06 21:30:41", 
        "timezone": "America/Mexico_City", 
        "duration": 373, 
        "distance": 4.1, 
        "distance_unit": "km", 
        "start_location": {
          "pickup_address": "Ciudad de M\u00e9xico, CDMX, M\u00e9xico"
        },
        "end_location": {
          "dropoff_address": "\u00c1rea Federal Central de Abastos, Ciudad de M\u00e9xico, CDMX, M\u00e9xico"
        },
        "amount": 58.26,
        "currency": "MXN",
        "other_info": {
          "datestr": "2021-06-06", "date_requested": "Sun, Jun 6", "time_requested": "9:30 PM", "trip_type": "TRIP", "trip_subtype": "UberX", "distance_str": "4.1 km", "duration_str": "6min 13sec", "points_earned": "1 point", "cash_collected": "MX$53.02", "trip_timestamp": 1623033041, "earnings_amount": 56.86, "payouts": -53.02, "taxes": -1.4
        }
      },   
      {
        "platform": "uber",
        "event_id": "88da6c3e-9391-4c07-8274-c8274a45237b", 
        "type": "rideshare",
        "start_date": "2021-06-06 21:00:51", 
        "timezone": "America/Mexico_City",
        "duration": 1150,
        "distance": 5.8,
        "distance_unit": "km",
        "start_location": {
          "pickup_address": "Cerrada Zaragoza, Barrio San Pablo, Iztapalapa"
        },
        "end_location": {
          "dropoff_address": "Cerrada Zaragoza, Barrio San Pablo, Iztapalapa"
        },
        "amount": 59.54,
        "currency": "MXN",
        "other_info": {
          "datestr": "2021-06-06", "date_requested": "Sun, Jun 6", "time_requested": "9:00 PM", "trip_type": "TRIP", "trip_subtype": "UberX", "distance_str": "5.8 km", "duration_str": "19min 10sec", "points_earned": "1 point", "cash_collected": "MX$100.00", "trip_timestamp": 1623031251, "earnings_amount": 57.83, "payouts": -100.0, "taxes": -1.71
        }
      },
      ...
    ]
}

This endpoint allows you to:

HTTP Request

POST https://www.palenca.com/uber/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)

Get User

import requests

url = 'https://www.palenca.com/uber/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://www.palenca.com/uber/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/uber/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",
    "profile": {
        "platform": "uber",
        "country": "mx",
        "user_uuid": "505100c1-f645-40c1-b9ad-3312b4252c6d",
        "first_name": "Jairo",
        "last_name": "Huerta Rincon",
        "email": "jhuertarincon@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "+5215540086725",
        "birthday": "1987-10-27",
        "city_name": "Guadalajara",
        "url_picture": "url",
        "id_type": "",
        "id_number": "",
        "rating": 4.98,
        "lifetime_trips": 10868,
        "time_since_ft": "3 years",
        "level_name": "Diamond",
        "level_number": 4,
        "metrics_info": {
            "acceptance_rate": 0.97,
            "cancelation_rate": 0.08,
            "thumbs_up": "High"
        },
        "bank_info": {},
        "list_vehicle_info": [
            {
                "vehicle_type": "CAR",
                "vehicle_make": "Volkswagen",
                "vehicle_model": "Polo",
                "vehicle_year": 2018,
                "vehicle_license_plate": "JPB1824",
                "vehicle_license_plate_state": "JA",
                "vehicle_vin": "MEX6G2607JT022324"
            }
        ],
        "other_info": {}
    },
    "earnings": [
        {
            "datestr": "2020-12-16",
            "earnings": 1420.45,
            "currency": "MXN",
            "other_info": {
                "count_trips": 20.0,
                "online_hours": 10.39,
                "ontrip_hours": 10.25,
                "driver_canceled_trips": 3.0,
                "acceptance_rate": 1.0,
                "loyalty_points": 20.0
            }
        },
        {
            "datestr": "2020-12-17",
            "earnings": 1024.8,
            "currency": "MXN",
            "other_info": {
                "count_trips": 16.0,
                "online_hours": 7.72,
                "ontrip_hours": 7.41,
                "driver_canceled_trips": 4.0,
                "acceptance_rate": 1.0,
                "loyalty_points": 16.0
            }
        },
        ...
    ],
    "events": [
      {
        "platform": "uber", 
        "event_id": "7f0e222e-2597-4166-9a16-2fc12ce035c2", 
        "type": "rideshare", 
        "start_date": "2021-06-06 21:30:41", 
        "timezone": "America/Mexico_City", 
        "duration": 373, 
        "distance": 4.1, 
        "distance_unit": "km", 
        "start_location": {
          "pickup_address": "Ciudad de M\u00e9xico, CDMX, M\u00e9xico"
        },
        "end_location": {
          "dropoff_address": "\u00c1rea Federal Central de Abastos, Ciudad de M\u00e9xico, CDMX, M\u00e9xico"
        },
        "amount": 58.26,
        "currency": "MXN",
        "other_info": {
          "datestr": "2021-06-06", "date_requested": "Sun, Jun 6", "time_requested": "9:30 PM", "trip_type": "TRIP", "trip_subtype": "UberX", "distance_str": "4.1 km", "duration_str": "6min 13sec", "points_earned": "1 point", "cash_collected": "MX$53.02", "trip_timestamp": 1623033041, "earnings_amount": 56.86, "payouts": -53.02, "taxes": -1.4
        }
      },   
      {
        "platform": "uber",
        "event_id": "88da6c3e-9391-4c07-8274-c8274a45237b", 
        "type": "rideshare",
        "start_date": "2021-06-06 21:00:51", 
        "timezone": "America/Mexico_City",
        "duration": 1150,
        "distance": 5.8,
        "distance_unit": "km",
        "start_location": {
          "pickup_address": "Cerrada Zaragoza, Barrio San Pablo, Iztapalapa"
        },
        "end_location": {
          "dropoff_address": "Cerrada Zaragoza, Barrio San Pablo, Iztapalapa"
        },
        "amount": 59.54,
        "currency": "MXN",
        "other_info": {
          "datestr": "2021-06-06", "date_requested": "Sun, Jun 6", "time_requested": "9:00 PM", "trip_type": "TRIP", "trip_subtype": "UberX", "distance_str": "5.8 km", "duration_str": "19min 10sec", "points_earned": "1 point", "cash_collected": "MX$100.00", "trip_timestamp": 1623031251, "earnings_amount": 57.83, "payouts": -100.0, "taxes": -1.71
        }
      },
      ...
    ]
}

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

HTTP Request

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

Change bank account

import requests

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

payload = {
    '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://www.palenca.com/uber/create-user'

payload_create_user = {
    'email': 'jose@gmail.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://www.palenca.com/uber/change-bank-account'

payload_switch_deposit = {
    '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://www.palenca.com/uber/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": "1234",
   "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://www.palenca.com/uber/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@gmail.com",
   "password": "MyGreatPassword62",
   "purpose": "CHANGE_BANK_ACCOUNT"
}'

curl --location --request POST 'https://www.palenca.com/uber/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": "1234",
   "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': '1234',
    '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://www.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({
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db',
    'purpose': 'CHANGE_BANK_ACCOUNT'
})

let config = {
  method: 'post',
  url: 'https://www.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({
    'code': '1234',
    '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://www.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://www.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)

Didi

Create User

import requests

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

payload = {
    'phone_number': '15578799890',
    '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://www.palenca.com/didi/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": "15578799890",
   "country": "mx
}'
const axios = require('axios')
const data = JSON.stringify({
    'phone_number': '15578799890',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://www.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"
}

This endpoint allows you to :

HTTP Request

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

Payload

Parameter Description
phone_number phone number of the Didi user account (e.g: 5576716450)
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://www.palenca.com/didi/validate-user'

payload = {
    'code': '123456',
    '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://www.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": "123456"
}'
const axios = require('axios')
const data = JSON.stringify({
    'code': '123456',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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",
    "profile": {
        "platform": "didi",
        "country": "mx",
        "user_uuid": "650911144900052",
        "first_name": "Cristian Gabriel",
        "last_name": "Huerta Garcia",
        "email": "c***@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "18118562710",
        "birthday": "",
        "city_name": "Monterrey",
        "url_picture": "url",
        "id_type": "",
        "id_number": "",
        "rating": 4.98,
        "lifetime_trips": 379,
        "time_since_ft": "1+ months",
        "level_name": "Express",
        "level_number": "1",
        "metrics_info": {},
        "bank_info": {
            "name": "Cristian Gabriel Huerta Garcia",
            "account_number": "0025835040********",
            "bank_code": "002",
            "bank_name": "",
            "holder_address": "Residencial santa Catarina",
            "holder_name": "Cristian Gabriel Huerta Garcia"
        },
        "list_vehicle_info": [
            {
                "create_time": "2021-01-16 10:46:54",
                "modify_time": "2021-01-28 08:02:03",
                "car_id": "360287970211322864",
                "car_owner_id": 650911144900052,
                "owner_name": "GABRIEL Huerta Rincon",
                "owner_address": "",
                "owner_phone": "",
                "vehicle_owner_id": 650911144900052,
                "plate_no": "RSX582B",
                "vin": "LSGKB54H1JV026973",
                "year": "2018",
                "brand_name": "Chevrolet-Cavalier",
                "city_name": "Monterrey",
                "driver_name": "CRISTIAN GABRIEL Huerta Garcia",
                "audit_remark": "Approved"
            }
        ],
        "other_info": {}
    },
    "earnings": [
        {
            "datestr": "2021-03-10",
            "earnings": 515.72,
            "currency": "MXN",
            "other_info": {}
        },
        {
            "datestr": "2021-03-09",
            "earnings": 364.27,
            "currency": "MXN",
            "other_info": {}
        },
        ...
    ],
    "trips": [
        {
            "trip_id": "TVRRME1UTTNOak0zTVRBME1ETTBNVGN4Tmc9PQ==",
            "start_datestr": "2021-03-10 04:03:02",
            "amount": 77.76,
            "currency": "MXN",
            "other_info": {
                "driver_id": "650911144900052",
                "transaction_id": "21201159",
                "status": "1",
                "status_desc": "Paid",
                "sub_title": "",
                "pay_time": "2021-03-10 04:28:08",
                "fee_name": "Trip Earnings",
                "total_fee": "7776",
                "trade_type": "1",
                "product_id": "30",
                "car_level": "2400",
                "reliable_level": 1,
                "is_offline": 1,
                "is_pay": "1",
                "amount_display": "MXN$77.76",
                "total_fee_display": "MXN$77.76",
                "reward_info": ""
            }
        },
        {
            "trip_id": "TVRRME1UTTNOak0zTVRBME1ERTBNVFkwTUE9PQ==",
            "start_datestr": "2021-03-10 03:36:31",
            "amount": 21.25,
            "currency": "MXN",
            "other_info": {
                "driver_id": "650911144900052",
                "transaction_id": "21200979",
                "status": "1",
                "status_desc": "Paid",
                "sub_title": "",
                "pay_time": "2021-03-10 03:46:08",
                "fee_name": "Trip Earnings",
                "total_fee": "2125",
                "trade_type": "1",
                "product_id": "30",
                "car_level": "2400",
                "reliable_level": 1,
                "is_offline": 1,
                "is_pay": "1",
                "amount_display": "MXN$21.25",
                "total_fee_display": "MXN$21.25",
                "reward_info": ""
            }
        },
        ...
    ]
}

This endpoint allows you to:

HTTP Request

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

Payload

Parameter Description
code 6 digits code received by SMS (e.g: 123456)
user_id your own user id from your database (e.g: 03eb0d70)

Get User

import requests

url = 'https://www.palenca.com/didi/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://www.palenca.com/didi/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/didi/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",
    "profile": {
        "platform": "didi",
        "country": "mx",
        "user_uuid": "650911144900052",
        "first_name": "Cristian Gabriel",
        "last_name": "Huerta Garcia",
        "email": "c***@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "18118562710",
        "birthday": "",
        "city_name": "Monterrey",
        "url_picture": "url",
        "id_type": "",
        "id_number": "",
        "rating": 4.98,
        "lifetime_trips": 379,
        "time_since_ft": "1+ months",
        "level_name": "Express",
        "level_number": "1",
        "metrics_info": {},
        "bank_info": {
            "name": "Cristian Gabriel Huerta Garcia",
            "account_number": "0025835040********",
            "bank_code": "002",
            "bank_name": "",
            "holder_address": "Residencial santa Catarina",
            "holder_name": "Cristian Gabriel Huerta Garcia"
        },
        "list_vehicle_info": [
            {
                "create_time": "2021-01-16 10:46:54",
                "modify_time": "2021-01-28 08:02:03",
                "car_id": "360287970211322864",
                "car_owner_id": 650911144900052,
                "owner_name": "GABRIEL Huerta Rincon",
                "owner_address": "",
                "owner_phone": "",
                "vehicle_owner_id": 650911144900052,
                "plate_no": "RSX582B",
                "vin": "LSGKB54H1JV026973",
                "year": "2018",
                "brand_name": "Chevrolet-Cavalier",
                "city_name": "Monterrey",
                "driver_name": "CRISTIAN GABRIEL Huerta Garcia",
                "audit_remark": "Approved"
            }
        ],
        "other_info": {}
    },
    "earnings": [
        {
            "datestr": "2021-03-10",
            "earnings": 515.72,
            "currency": "MXN",
            "other_info": {}
        },
        {
            "datestr": "2021-03-09",
            "earnings": 364.27,
            "currency": "MXN",
            "other_info": {}
        },
        ...
    ],
    "trips": [
        {
            "trip_id": "TVRRME1UTTNOak0zTVRBME1ETTBNVGN4Tmc9PQ==",
            "start_datestr": "2021-03-10 04:03:02",
            "amount": 77.76,
            "currency": "MXN",
            "other_info": {
                "driver_id": "650911144900052",
                "transaction_id": "21201159",
                "status": "1",
                "status_desc": "Paid",
                "sub_title": "",
                "pay_time": "2021-03-10 04:28:08",
                "fee_name": "Trip Earnings",
                "total_fee": "7776",
                "trade_type": "1",
                "product_id": "30",
                "car_level": "2400",
                "reliable_level": 1,
                "is_offline": 1,
                "is_pay": "1",
                "amount_display": "MXN$77.76",
                "total_fee_display": "MXN$77.76",
                "reward_info": ""
            }
        },
        {
            "trip_id": "TVRRME1UTTNOak0zTVRBME1ERTBNVFkwTUE9PQ==",
            "start_datestr": "2021-03-10 03:36:31",
            "amount": 21.25,
            "currency": "MXN",
            "other_info": {
                "driver_id": "650911144900052",
                "transaction_id": "21200979",
                "status": "1",
                "status_desc": "Paid",
                "sub_title": "",
                "pay_time": "2021-03-10 03:46:08",
                "fee_name": "Trip Earnings",
                "total_fee": "2125",
                "trade_type": "1",
                "product_id": "30",
                "car_level": "2400",
                "reliable_level": 1,
                "is_offline": 1,
                "is_pay": "1",
                "amount_display": "MXN$21.25",
                "total_fee_display": "MXN$21.25",
                "reward_info": ""
            }
        },
        ...
    ]
}

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

HTTP Request

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

Change bank account

import requests

url = 'https://www.palenca.com/didi/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://www.palenca.com/didi/create-user'

payload_create_user = {
    'email': 'jose@gmail.com',
    '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://www.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://www.palenca.com/didi/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://www.palenca.com/didi/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://www.palenca.com/didi/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@gmail.com",
   "purpose": "CHANGE_BANK_ACCOUNT"
}'

curl --location --request POST 'https://www.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://www.palenca.com/didi/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://www.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@gmail.com',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
    'purpose': 'CHANGE_BANK_ACCOUNT'
})

let config = {
  method: 'post',
  url: 'https://www.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://www.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({
    '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://www.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://www.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://www.palenca.com/beat/create-user'

payload = {
    'phone_number': '15578799890',
    'password': 'MyGreatPassword62',
    '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://www.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": "15578799890",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'phone_number': '15578799890',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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",
   "profile": {
       "uuid": "i4428",
       "partner_enabled": "false",
       "email": "jose@gmail.com",
       "gender": "male",
       "fist_name": "Jose Carlos",
       "last_name": "Huerta Garcia",
       "phone_prefix": "52",
       "phone_number": "5513850928",
       "curp": "GOSS940901HJCNDN05",
       "birth_date": "20/06/1995",
       "license_no_exp": "21/04/2021",
       "license_no": "01N2813778",
       "photo_url": "url_picture",
       "RFC": "MAAL7203141D7",
       "bank_name": "Banco Azteca, S.A. Institucion De Banca Multiple",
       "bank_clabe": "127180013602793547",
       "bank_account_holder": "Jose Carlos Huerta Garcia",
       "lifetimetrips": 1697,
       "driver_rating": "4.9",
       "count_votes": 59,
       "perc_one_star": "1.69"

   },
   "earnings": [
        {
           "datetime_str": 2020-09-19,
           "week_start": "2020-09-18",
           "week_end": "2020-09-25",
           "count_trips": 54,
           "amount_total": 2917,
           "amount_earnings": 1997,
           "amount_comission": 404.34,
           "amount_surge": 0,
           "amount_tolls": 0,
           "amount_referrals": 0,
           "amount_bonus": 920,
           "acceptance_rate": "100"
       },
       {
           "datetime_str": 2020-09-26,
           "week_start": "2020-09-25",
           "week_end": "2020-10-2",
           "count_trips": 45,
           "amount_total": 1917,
           "amount_earnings": 997,
           "amount_comission": 204.34,
           "amount_surge": 0,
           "amount_tolls": 0,
           "amount_referrals": 0,
           "amount_bonus": 120,
           "acceptance_rate": "100"
       },
       ...
   ] 
}

This endpoint allows you to :

HTTP Request

POST https://www.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)

Get User

import requests

url = 'https://www.palenca.com/beat/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://www.palenca.com/beat/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/beat/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",
   "profile": {
       "uuid": "i4428",
       "partner_enabled": "false",
       "email": "jose@gmail.com",
       "gender": "male",
       "fist_name": "Jose Carlos",
       "last_name": "Huerta Garcia",
       "phone_prefix": "52",
       "phone_number": "5513850928",
       "curp": "GOSS940901HJCNDN05",
       "birth_date": "20/06/1995",
       "license_no_exp": "21/04/2021",
       "license_no": "01N2813778",
       "photo_url": "url_picture",
       "RFC": "MAAL7203141D7",
       "bank_name": "Banco Azteca, S.A. Institucion De Banca Multiple",
       "bank_clabe": "127180013602793547",
       "bank_account_holder": "Jose Carlos Huerta Garcia",
       "lifetimetrips": 1697,
       "driver_rating": "4.9",
       "count_votes": 59,
       "perc_one_star": "1.69"

   },
   "earnings": [
        {
           "datetime_str": 2020-09-19,
           "week_start": "2020-09-18",
           "week_end": "2020-09-25",
           "count_trips": 54,
           "amount_total": 2917,
           "amount_earnings": 1997,
           "amount_comission": 404.34,
           "amount_surge": 0,
           "amount_tolls": 0,
           "amount_referrals": 0,
           "amount_bonus": 920,
           "acceptance_rate": "100"
       },
       {
           "datetime_str": 2020-09-26,
           "week_start": "2020-09-25",
           "week_end": "2020-10-2",
           "count_trips": 45,
           "amount_total": 1917,
           "amount_earnings": 997,
           "amount_comission": 204.34,
           "amount_surge": 0,
           "amount_tolls": 0,
           "amount_referrals": 0,
           "amount_bonus": 120,
           "acceptance_rate": "100"
       },
       ...
   ] 
}

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

HTTP Request

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

Cabify

Create User

import requests

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

payload = {
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    '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://www.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@gmail.com",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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",
   "profile": {
       "driver_id": "ed2aac5c3d277db3c131537a2404bbc5",
       "first_name": "Jose Carlos",
       "last_name": "Huerta Garcia",
       "phone_number": "5513850928",
       "email": "jose@gmail.com",
       "photo_url": "url_picture",
       "rating": "4.9",
       "active_region_id": "mexico",
       "country": "MX",
       "bank_holder_name": "Jose Carlos Huerta Garcia",
       "rfc": "MAAL7203141D7",
       "clabe": "127180013634616003",
       "bank_name": "Banco Azteca",
       "lifetimetrips": 1697
   },
   "trips": [
        {
           "trip_id": "236ec3a60ddb4a21afc84a63198a1b06",
           "trip_date": "2020-09-19",
           "earnings": 27.09,
           "currency": "MXN",
           "trip_type": "Economy"
       },
       {
           "trip_id": "8538e17d37454edfa46e59cf383d6e02",
           "trip_date": "2020-09-20",
           "earnings": 46.76,
           "currency": "MXN",
           "trip_type": "Economy"
       },
       ...
   ] 
}

This endpoint allows you to :

HTTP Request

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

Payload

Parameter Description
email email of the Cabify user account (e.g: jose@gmail.com)
password password of the Cabify user account
user_id your own user id from your database (e.g: 03eb0d70)

Get User

import requests

url = 'https://www.palenca.com/cabify/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://www.palenca.com/cabify/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/cabify/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",
   "profile": {
       "driver_id": "ed2aac5c3d277db3c131537a2404bbc5",
       "first_name": "Jose Carlos",
       "last_name": "Huerta Garcia",
       "phone_number": "5513850928",
       "email": "jose@gmail.com",
       "photo_url": "url_picture",
       "rating": "4.9",
       "active_region_id": "mexico",
       "country": "MX",
       "bank_holder_name": "Jose Carlos Huerta Garcia",
       "rfc": "MAAL7203141D7",
       "clabe": "127180013634616003",
       "bank_name": "Banco Azteca",
       "lifetimetrips":"1697"
   },
   "trips": [
        {
           "trip_id": "236ec3a60ddb4a21afc84a63198a1b06",
           "trip_date": "2020-09-19",
           "earnings": 27.09,
           "currency": "MXN",
           "trip_type": "Economy"
       },
       {
           "trip_id": "8538e17d37454edfa46e59cf383d6e02",
           "trip_date": "2020-09-20",
           "earnings": 46.76,
           "currency": "MXN",
           "trip_type": "Economy"
       },
       ...
   ] 
}

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

Bolt

Create User

import requests

url = 'https://www.palenca.com/bolt/create-user'

payload = {
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    '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://www.palenca.com/bolt/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@gmail.com",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.palenca.com/bolt/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",
   "profile": {
       "driver_id": 2648452,
       "root_id": 2648452,
       "full_name": "Jose Carlos Huerta Garcia",
       "email": "jose@gmail.com",
       "phone": "+5215539611234",
       "photo_url": "url_picture",
       "country": "mx",
       "city_name": "Mexico City",
       "driver_can_select_car": "1",
       "selected_car_name": "H31AZN Chevrolet Aveo 2016",
       "rating": 4.88,
       "activity_score": 100
   },
   "earnings": [
        {
           "driver_id": 448407,
           "start_date": "2020-06-01",
           "end_date": "2020-06-01",
           "total_net": 115.742,
           "total_revenue": 149,
           "total_rides_revenue":  149,
           "total_revenue_in_app_payments":  0,
           "total_revenue_not_in_app_payments":  149,
           "total_bonus_and_compensation":  0,
           "total_service_fee":  -23.778,
           "total_booking_fee":  -9.48,
       },
       {
           "driver_id": 448407,
           "start_date": "2020-06-01",
           "end_date": "2020-06-01",
           "total_net": 115.742,
           "total_revenue":  149,
           "total_rides_revenue": 149,
           "total_revenue_in_app_payments": 0,
           "total_revenue_not_in_app_payments": 149,
           "total_bonus_and_compensation": 0,
           "total_service_fee": -23.778,
           "total_booking_fee": -9.48,
       },
       ...
   ] 
}

This endpoint allows you to :

HTTP Request

POST https://www.palenca.com/bolt/create-user

Payload

Parameter Description
email email of the Bolt user account (e.g: jose@gmail.com)
password password of the Bolt user account
user_id your own user id from your database (e.g: 03eb0d70)

Get User

import requests

url = 'https://www.palenca.com/bolt/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://www.palenca.com/bolt/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/bolt/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",
   "profile": {
       "driver_id": 2648452,
       "root_id": 2648452,
       "full_name": "Jose Carlos Huerta Garcia",
       "email": "jose@gmail.com",
       "phone": "+5215539611234",
       "photo_url": "url_picture",
       "country": "mx",
       "city_name": "Mexico City",
       "driver_can_select_car": "1",
       "selected_car_name": "H31AZN Chevrolet Aveo 2016",
       "rating": 4.88,
       "activity_score": 100
   },
   "earnings": [
        {
           "driver_id": 448407,
           "start_date": "2020-06-01",
           "end_date": "2020-06-01",
           "total_net": 115.742,
           "total_revenue": 149,
           "total_rides_revenue":  149,
           "total_revenue_in_app_payments":  0,
           "total_revenue_not_in_app_payments":  149,
           "total_bonus_and_compensation":  0,
           "total_service_fee":  -23.778,
           "total_booking_fee":  -9.48,
       },
       {
           "driver_id": 448407,
           "start_date": "2020-06-01",
           "end_date": "2020-06-01",
           "total_net": 115.742,
           "total_revenue":  149,
           "total_rides_revenue": 149,
           "total_revenue_in_app_payments": 0,
           "total_revenue_not_in_app_payments": 149,
           "total_bonus_and_compensation": 0,
           "total_service_fee": -23.778,
           "total_booking_fee": -9.48,
       },
       ...
   ] 
}

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

HTTP Request

GET https://www.palenca.com/bolt/get-user/user_id_from_your_db

99

Create User

import requests

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

payload = {
    'phone_number': '7196507051',
    '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://www.palenca.com/99/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": "7196507051"
}'
const axios = require('axios')
const data = JSON.stringify({
    'phone_number': '7196507051',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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": "The code was sent to your phone"
}

This endpoint allows you to :

HTTP Request

POST https://www.palenca.com/99/create-user

Payload

Parameter Description
phone_number phone number of the 99 user account (e.g: 7196507051)
user_id your own user id from your database (e.g: 03eb0d70)

Validate User

import requests

url = 'https://www.palenca.com/99/validate-user'

payload = {
    'code': '1234',
    '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://www.palenca.com/99/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"
}'
const axios = require('axios')
const data = JSON.stringify({
    'code': '1234',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.palenca.com/99/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",
   "profile": {
       "user_uuid": "628cdf56-95f1-4397-a154-281112781240",
       "first_name": "Thiago Emiliano",
       "last_name": "Da Silva",
       "email": "thiago@gmail.com",
       "phone_number": "+557196507051",
       "picture": "url_picture",
       "lifetime_trips": 916,
       "time_since_ft": "3 months",
       "rating": 4.94
   },
   "earnings": [
        {
           "datestr": "2020-10-27",
           "earnings": 433.6,
           "currency": "BRL"
       },
       {
           "datestr": "2020-10-26",
           "earnings": 354.2,
           "currency": "BRL"
       },
       ...
   ] 
}

This endpoint allows you to:

HTTP Request

POST https://www.palenca.com/99/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)

Get User

import requests

url = 'https://www.palenca.com/99/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://www.palenca.com/99/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/99/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",
   "profile": {
       "user_uuid": "628cdf56-95f1-4397-a154-281112781240",
       "first_name": "Thiago Emiliano",
       "last_name": "Da Silva",
       "email": "thiago@gmail.com",
       "phone_number": "+557196507051",
       "picture": "url_picture",
       "lifetime_trips": 916,
       "time_since_ft": "3 months",
       "rating": 4.94
   },
   "earnings": [
        {
           "datestr": "2020-10-27",
           "earnings": 433.6,
           "currency": "BRL"
       },
       {
           "datestr": "2020-10-26",
           "earnings": 354.2,
           "currency": "BRL"
       },
       ...
   ]
}

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

HTTP Request

GET https://www.palenca.com/99/get-user/user_id_from_your_db

Couriers

Rappi

Create User

import requests

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

payload = {
  'email': 'jose@gmail.com',
  '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://www.palenca.com/rappi/create-user' \
--header 'x-api-key: your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "email": "jose@gmail.com",
   "country": "co",
   "user_id": "user_id_from_your_db"
}'
const axios = require('axios')
const data = JSON.stringify({
   'email': 'jose@gmail.com',
   'country': 'co',
   'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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://www.palenca.com/rappi/create-user

Payload

Parameter Description
email email of the Rappi user account (e.g: jose@gmail.com)
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)

Validate User

import requests

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

payload = {
    'code': '123456',
    'password': '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://www.palenca.com/rappi/validate-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "code": "123456",
   "country": "co",
   "user_id": "user_id_from_your_db"
}'
const axios = require('axios')
const data = JSON.stringify({
    'code': '123456',
    'password': 'co'
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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",
    "profile": {
        "platform": "rappi",
        "country": "mx",
        "user_uuid": "89522",
        "first_name": "DILAN BRANDON",
        "last_name": "Huerta Garcia",
        "email": "bcdilan2923@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "5578517012",
        "gender": "M",
        "birthday": "1999-05-29",
        "city_name": "Ciudad de México",
        "url_picture": "https://core-rappi-mx.s3.amazonaws.com/profile-pics-sk/uploads/profile_documents/89522-1-url_front.jpg",
        "id_type": "curp",
        "id_number": "HGCD990529HDFRML00",
        "rating": "4.0",
        "lifetime_trips": "",
        "time_since_ft": "",
        "level_name": "bronze",
        "level_number": "",
        "metrics_info": {
            "acceptance_rate": 87,
            "points": "0"
        },
        "bank_info": {},
        "list_vehicle_info": [
            {
                "transport_media_type": "bicycle"
            }
        ],
        "other_info": {
            "debt_paid": 0,
            "debt_accumulated": 1120.47,
            "debt_pending": 1120.47,
            "has_uber": true,
            "cashless": false,
            "is_active": true,
            "is_expert": false
        }
    },
    "earnings": [
        {
            "datestr": "2020-09-13",
            "earnings": 601.64,
            "currency": "MXN",
            "other_info": {
                "debt": -199.0,
                "debt_confirmed": -199.0
            }
        },
        {
            "datestr": "2020-09-12",
            "earnings": 269.46,
            "currency": "MXN",
            "other_info": {
                "debt": -479.0,
                "debt_confirmed": -479.0
            }
        },
        {
            "datestr": "2020-09-11",
            "earnings": 335.44,
            "currency": "MXN",
            "other_info": {
                "debt": -947.51,
                "debt_confirmed": -947.51
            }
        }
        ...
    ]
}

This endpoint allows you to:

HTTP Request

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

Payload

Parameter Description
code 6 digits code received by SMS (e.g: 123456)
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://www.palenca.com/rappi/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://www.palenca.com/rappi/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/rappi/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",
    "profile": {
        "platform": "rappi",
        "country": "mx",
        "user_uuid": "89522",
        "first_name": "DILAN BRANDON",
        "last_name": "Huerta Garcia",
        "email": "bcdilan2923@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "5578517012",
        "gender": "M",
        "birthday": "1999-05-29",
        "city_name": "Ciudad de México",
        "url_picture": "https://core-rappi-mx.s3.amazonaws.com/profile-pics-sk/uploads/profile_documents/89522-1-url_front.jpg",
        "id_type": "curp",
        "id_number": "HGCD990529HDFRML00",
        "rating": "4.0",
        "lifetime_trips": "",
        "time_since_ft": "",
        "level_name": "bronze",
        "level_number": "",
        "metrics_info": {
            "acceptance_rate": 87,
            "points": "0"
        },
        "bank_info": {},
        "list_vehicle_info": [
            {
                "transport_media_type": "bicycle"
            }
        ],
        "other_info": {
            "debt_paid": 0,
            "debt_accumulated": 1120.47,
            "debt_pending": 1120.47,
            "has_uber": true,
            "cashless": false,
            "is_active": true,
            "is_expert": false
        }
    },
    "earnings": [
        {
            "datestr": "2020-09-13",
            "earnings": 601.64,
            "currency": "MXN",
            "other_info": {
                "debt": -199.0,
                "debt_confirmed": -199.0
            }
        },
        {
            "datestr": "2020-09-12",
            "earnings": 269.46,
            "currency": "MXN",
            "other_info": {
                "debt": -479.0,
                "debt_confirmed": -479.0
            }
        },
        {
            "datestr": "2020-09-11",
            "earnings": 335.44,
            "currency": "MXN",
            "other_info": {
                "debt": -947.51,
                "debt_confirmed": -947.51
            }
        }
        ...
    ]
}

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

HTTP Request

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

Uber Eats

Create User

import requests

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

payload = {
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    '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://www.palenca.com/uber/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@gmail.com",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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": "El código de Uber se mandó a tu teléfono"
}

This endpoint allows you to :

HTTP Request

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

Payload

Parameter Description
email email of the Uber user account (e.g: jose@gmail.com)
password password of the Uber user account
user_id your own user id from your database (e.g: 03eb0d70)

Validate User

import requests

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

payload = {
    'code': '1234',
    '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://www.palenca.com/uber/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"
}'
const axios = require('axios')
const data = JSON.stringify({
    'code': '1234',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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",
   "profile": {
       "user_uuid": "628cdf56-95f1-4397-a154-281112781240",
       "first_name": "Juan Vicente",
       "last_name": "Luevano Perea",
       "email": "juanvicenteluevanoperea2016@gmail.com",
       "phone_number": "+5214651185106",
       "picture": "url_picture",
       "lifetime_trips": 916,
       "time_since_ft": "3 months",
       "rating": 4.94,
       "thumbs_up": "--",
       "loyalty_value": "Platinium",
       "loyalty_tier": "TIER_3",
       "acceptance_rate": 0.97,
       "cancelation_rate": 0.17,
       "vehicle_make": "Ford",
       "vehicle_model": "Fiesta",
       "vehicle_year": 2017,
       "vehicle_license_plate": "F83BDE",
       "vehicle_license_plate_state": "DF",
       "vehicle_vin": "3FADP4BJXHM127878",
       "vehicle_type": "CAR"
   },
   "earnings": [
        {
           "datestr": "2020-10-27",
           "start_date": "2020-10-27 04:00:00",
           "end_date": "2020-10-28 03:59:59",
           "earnings": 627.11,
           "currency": "MXN",
           "count_trips": 13,
           "online_hours": 6.81,
           "ontrip_hours": 4.45,
           "driver_canceled_trips": 0,
           "acceptance_rate": 0.81,
           "loyalty_points": 13
       },
       {
           "datestr": "2020-10-26",
           "start_date": "2020-10-26 04:00:00",
           "end_date": "2020-10-27 03:59:59",
           "earnings": 445.63,
           "currency": "MXN",
           "count_trips": 7,
           "online_hours": 4.15,
           "ontrip_hours": 2.76,
           "driver_canceled_trips": 0,
           "acceptance_rate": 0.78,
           "loyalty_points": 7
       },
       ...
   ] 
}

This endpoint allows you to:

HTTP Request

POST https://www.palenca.com/uber/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)

Get User

import requests

url = 'https://www.palenca.com/uber/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://www.palenca.com/uber/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/uber/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",
   "profile": {
       "user_uuid": "628cdf56-95f1-4397-a154-281112781240",
       "first_name": "Juan Vicente",
       "last_name": "Luevano Perea",
       "email": "juanvicenteluevanoperea2016@gmail.com",
       "phone_number": "+5214651185106",
       "picture": "url_picture",
       "lifetime_trips": 916,
       "time_since_ft": "3 months",
       "rating": 4.94,
       "thumbs_up": "--",
       "loyalty_value": "Platinium",
       "loyalty_tier": "TIER_3",
       "acceptance_rate": 0.97,
       "cancelation_rate": 0.17,
       "vehicle_make": "Ford",
       "vehicle_model": "Fiesta",
       "vehicle_year": 2017,
       "vehicle_license_plate": "F83BDE",
       "vehicle_license_plate_state": "DF",
       "vehicle_vin": "3FADP4BJXHM127878",
       "vehicle_type": "CAR"
   },
   "earnings": [
        {
           "datestr": "2020-10-27",
           "start_date": "2020-10-27 04:00:00",
           "end_date": "2020-10-28 03:59:59",
           "earnings": 627.11,
           "currency": "MXN",
           "count_trips": 13,
           "online_hours": 6.81,
           "ontrip_hours": 4.45,
           "driver_canceled_trips": 0,
           "acceptance_rate": 0.81,
           "loyalty_points": 13
       },
       {
           "datestr": "2020-10-26",
           "start_date": "2020-10-26 04:00:00",
           "end_date": "2020-10-27 03:59:59",
           "earnings": 445.63,
           "currency": "MXN",
           "count_trips": 7,
           "online_hours": 4.15,
           "ontrip_hours": 2.76,
           "driver_canceled_trips": 0,
           "acceptance_rate": 0.78,
           "loyalty_points": 7
       },
       ...
   ] 
}

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

HTTP Request

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

Didi Food

Create User

import requests

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

payload = {
    'phone_number': '15578799890',
    '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://www.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",
   "phone_number": "15578799890",
   "country": "mx
}'
const axios = require('axios')
const data = JSON.stringify({
    'phone_number': '15578799890',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
});

const config = {
  method: 'post',
  url: 'https://www.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"
}

This endpoint allows you to :

HTTP Request

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

Payload

Parameter Description
phone_number phone number of the Didi Food user account (e.g: 5576716450)
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://www.palenca.com/didi-food/validate-user'

payload = {
    'code': '123456',
    '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://www.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": "123456"
}'
const axios = require('axios')
const data = JSON.stringify({
    'code': '123456',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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",
    "profile": {
        "platform": "didi-food",
        "country": "mx",
        "user_uuid": "650911144900052",
        "first_name": "Cristian Gabriel",
        "last_name": "Huerta Garcia",
        "email": "c***@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "18118562710",
        "birthday": "",
        "city_name": "Monterrey",
        "url_picture": "url",
        "id_type": "",
        "id_number": "",
        "rating": 4.98,
        "lifetime_trips": 379,
        "time_since_ft": "1+ months",
        "level_name": "Express",
        "level_number": "1",
        "metrics_info": {},
        "bank_info": {
            "name": "Cristian Gabriel Huerta Garcia",
            "account_number": "0025835040********",
            "bank_code": "002",
            "bank_name": "",
            "holder_address": "Residencial santa Catarina",
            "holder_name": "Cristian Gabriel Huerta Garcia"
        },
        "list_vehicle_info": [
            {
                "create_time": "2021-01-16 10:46:54",
                "modify_time": "2021-01-28 08:02:03",
                "car_id": "360287970211322864",
                "car_owner_id": 650911144900052,
                "owner_name": "GABRIEL Huerta Rincon",
                "owner_address": "",
                "owner_phone": "",
                "vehicle_owner_id": 650911144900052,
                "plate_no": "RSX582B",
                "vin": "LSGKB54H1JV026973",
                "year": "2018",
                "brand_name": "Chevrolet-Cavalier",
                "city_name": "Monterrey",
                "driver_name": "CRISTIAN GABRIEL Huerta Garcia",
                "audit_remark": "Approved"
            }
        ],
        "other_info": {}
    },
    "earnings": [
        {
            "datestr": "2021-03-10",
            "earnings": 515.72,
            "currency": "MXN",
            "other_info": {}
        },
        {
            "datestr": "2021-03-09",
            "earnings": 364.27,
            "currency": "MXN",
            "other_info": {}
        },
        ...
    ],
    "trips": [
        {
            "trip_id": "TVRRME1UTTNOak0zTVRBME1ETTBNVGN4Tmc9PQ==",
            "start_datestr": "2021-03-10 04:03:02",
            "amount": 77.76,
            "currency": "MXN",
            "other_info": {
                "driver_id": "650911144900052",
                "transaction_id": "21201159",
                "status": "1",
                "status_desc": "Paid",
                "sub_title": "",
                "pay_time": "2021-03-10 04:28:08",
                "fee_name": "Trip Earnings",
                "total_fee": "7776",
                "trade_type": "1",
                "product_id": "30",
                "car_level": "2400",
                "reliable_level": 1,
                "is_offline": 1,
                "is_pay": "1",
                "amount_display": "MXN$77.76",
                "total_fee_display": "MXN$77.76",
                "reward_info": ""
            }
        },
        {
            "trip_id": "TVRRME1UTTNOak0zTVRBME1ERTBNVFkwTUE9PQ==",
            "start_datestr": "2021-03-10 03:36:31",
            "amount": 21.25,
            "currency": "MXN",
            "other_info": {
                "driver_id": "650911144900052",
                "transaction_id": "21200979",
                "status": "1",
                "status_desc": "Paid",
                "sub_title": "",
                "pay_time": "2021-03-10 03:46:08",
                "fee_name": "Trip Earnings",
                "total_fee": "2125",
                "trade_type": "1",
                "product_id": "30",
                "car_level": "2400",
                "reliable_level": 1,
                "is_offline": 1,
                "is_pay": "1",
                "amount_display": "MXN$21.25",
                "total_fee_display": "MXN$21.25",
                "reward_info": ""
            }
        },
        ...
    ]
}

This endpoint allows you to:

HTTP Request

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

Payload

Parameter Description
code 6 digits code received by SMS (e.g: 123456)
user_id your own user id from your database (e.g: 03eb0d70)

Get User

import requests

url = 'https://www.palenca.com/didi-food/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://www.palenca.com/didi-food/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/didi-food/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",
    "profile": {
        "platform": "didi-food",
        "country": "mx",
        "user_uuid": "650911144900052",
        "first_name": "Cristian Gabriel",
        "last_name": "Huerta Garcia",
        "email": "c***@gmail.com",
        "phone_prefix": "+52",
        "phone_number": "18118562710",
        "birthday": "",
        "city_name": "Monterrey",
        "url_picture": "url",
        "id_type": "",
        "id_number": "",
        "rating": 4.98,
        "lifetime_trips": 379,
        "time_since_ft": "1+ months",
        "level_name": "Express",
        "level_number": "1",
        "metrics_info": {},
        "bank_info": {
            "name": "Cristian Gabriel Huerta Garcia",
            "account_number": "0025835040********",
            "bank_code": "002",
            "bank_name": "",
            "holder_address": "Residencial santa Catarina",
            "holder_name": "Cristian Gabriel Huerta Garcia"
        },
        "list_vehicle_info": [
            {
                "create_time": "2021-01-16 10:46:54",
                "modify_time": "2021-01-28 08:02:03",
                "car_id": "360287970211322864",
                "car_owner_id": 650911144900052,
                "owner_name": "GABRIEL Huerta Rincon",
                "owner_address": "",
                "owner_phone": "",
                "vehicle_owner_id": 650911144900052,
                "plate_no": "RSX582B",
                "vin": "LSGKB54H1JV026973",
                "year": "2018",
                "brand_name": "Chevrolet-Cavalier",
                "city_name": "Monterrey",
                "driver_name": "CRISTIAN GABRIEL Huerta Garcia",
                "audit_remark": "Approved"
            }
        ],
        "other_info": {}
    },
    "earnings": [
        {
            "datestr": "2021-03-10",
            "earnings": 515.72,
            "currency": "MXN",
            "other_info": {}
        },
        {
            "datestr": "2021-03-09",
            "earnings": 364.27,
            "currency": "MXN",
            "other_info": {}
        },
        ...
    ],
    "trips": [
        {
            "trip_id": "TVRRME1UTTNOak0zTVRBME1ETTBNVGN4Tmc9PQ==",
            "start_datestr": "2021-03-10 04:03:02",
            "amount": 77.76,
            "currency": "MXN",
            "other_info": {
                "driver_id": "650911144900052",
                "transaction_id": "21201159",
                "status": "1",
                "status_desc": "Paid",
                "sub_title": "",
                "pay_time": "2021-03-10 04:28:08",
                "fee_name": "Trip Earnings",
                "total_fee": "7776",
                "trade_type": "1",
                "product_id": "30",
                "car_level": "2400",
                "reliable_level": 1,
                "is_offline": 1,
                "is_pay": "1",
                "amount_display": "MXN$77.76",
                "total_fee_display": "MXN$77.76",
                "reward_info": ""
            }
        },
        {
            "trip_id": "TVRRME1UTTNOak0zTVRBME1ERTBNVFkwTUE9PQ==",
            "start_datestr": "2021-03-10 03:36:31",
            "amount": 21.25,
            "currency": "MXN",
            "other_info": {
                "driver_id": "650911144900052",
                "transaction_id": "21200979",
                "status": "1",
                "status_desc": "Paid",
                "sub_title": "",
                "pay_time": "2021-03-10 03:46:08",
                "fee_name": "Trip Earnings",
                "total_fee": "2125",
                "trade_type": "1",
                "product_id": "30",
                "car_level": "2400",
                "reliable_level": 1,
                "is_offline": 1,
                "is_pay": "1",
                "amount_display": "MXN$21.25",
                "total_fee_display": "MXN$21.25",
                "reward_info": ""
            }
        },
        ...
    ]
}

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

HTTP Request

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

Change bank account

import requests

url = 'https://www.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://www.palenca.com/didi-food/create-user'

payload_create_user = {
    'email': 'jose@gmail.com',
    '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://www.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://www.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://www.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://www.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@gmail.com",
   "purpose": "CHANGE_BANK_ACCOUNT"
}'

curl --location --request POST 'https://www.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://www.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://www.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@gmail.com',
    'user_id': 'user_id_from_your_db',
    'country': 'mx'
    'purpose': 'CHANGE_BANK_ACCOUNT'
})

let config = {
  method: 'post',
  url: 'https://www.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://www.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://www.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://www.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://www.palenca.com/cornershop/create-user'

payload = {
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    '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://www.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@gmail.com",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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",
   "profile": {
       "worker_id": 2648452,
       "status": "NOT-AVAILABLE",
       "email": "jose@gmail.com",
       "full_name": "Jose Carlos Huerta Garcia",
       "phone_number": "+5215539611234",
       "photo_url": "url_picture",
       "curp": "AURC950620HDFGNR05",
       "transportation_types": "CAR",
       "is_available": "FALSE",
       "card_id": "card_8772d58bc553c1be01fd653d42e20434",
       "card_issuer": "RAPYD",
       "card_holder_first_name": "Jose Carlos",
       "card_holder_last_name": "Huerta Garcia",
       "picking _speed": "1.59",
       "rating": 4.88,
       "accepted_rate": 0.91
   },
   "earnings": [
        {
           "worker_id": "2020-09-19",
           "start_date": "2020-06-01",
           "end_date": "2020-06-07",
           "payment_datestr": "2020-06-12",
           "amount": 1136.05,
           "currency": "MXN",
           "iva": 142


       },
       {
           "worker_id": "2020-09-19",
           "start_date": "2020-06-01",
           "end_date": "2020-06-07",
           "payment_datestr": "2020-06-12",
           "amount": 1136.05,
           "currency": "MXN",
           "iva": 142
       },
       ...
   ] 
}

This endpoint allows you to :

HTTP Request

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

Payload

Parameter Description
email email of the Cornershop user account (e.g: jose@gmail.com)
password password of the Cornershop user account
user_id your own user id from your database (e.g: 03eb0d70)

Get User

import requests

url = 'https://www.palenca.com/cornershop/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://www.palenca.com/cornershop/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/cornershop/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",
   "profile": {
       "worker_id": 2648452,
       "status": "NOT-AVAILABLE",
       "email": "jose@gmail.com",
       "full_name": "Jose Carlos Huerta Garcia",
       "phone_number": "+5215539611234",
       "photo_url": "url_picture",
       "curp": "AURC950620HDFGNR05",
       "transportation_types": "CAR",
       "is_available": "FALSE",
       "card_id": "card_8772d58bc553c1be01fd653d42e20434",
       "card_issuer": "RAPYD",
       "card_holder_first_name": "Jose Carlos",
       "card_holder_last_name": "Huerta Garcia",
       "picking _speed": "1.59",
       "rating": 4.88,
       "accepted_rate": 0.91
   },
   "earnings": [
        {
           "worker_id": "2020-09-19",
           "start_date": "2020-06-01",
           "end_date": "2020-06-07",
           "payment_datestr": "2020-06-12",
           "amount": 1136.05,
           "currency": "MXN",
           "iva": 142


       },
       {
           "worker_id": "2020-09-19",
           "start_date": "2020-06-01",
           "end_date": "2020-06-07",
           "payment_datestr": "2020-06-12",
           "amount": 1136.05,
           "currency": "MXN",
           "iva": 142
       },
       ...
   ] 
}

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

iFood

Create User

import requests

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

payload = {
    'email': 'jose@gmail.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://www.palenca.com/ifood/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@gmail.com",
   "country": "co",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    'country': 'co',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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": "success",
  "profile": {
      "user_uuid": "88482662-0452-4b02-85d4-80a3fc3a27d7",
      "name": "DILAN BRANDON Huerta Garcia",
      "phone_number": "+573118958763",
      "email": "dilan@hotmail.com",
      "birthday": "1992-07-29",
      "DRIVERS_LICENSE_EXPIRATION_DATE": null,
      "DELIVERY_SERVICES_ARRIVED": "136",
      "DRIVERS_LICENSE": null,
      "ROUTES_ACCEPTED_DAY": "0",
      "INACTIVATION_REASON": null,
      "ORDERS_ACCEPTED_DAY": "0",
      "VEHICLE_LICENSE_PLATE": null,
      "ROUTES_CANCELLATIONS_DAY": "0",
      "RUT": null,
      "ROUTES_ACCEPTED": "141",
      "TERMS_AND_CONDITIONS_AGREED": "1",
      "ROUTES_OFFERED": "172",
      "IDENTITY_DOCUMENT_FRONT_PHOTO": "/worker/51037/attribute/143/file/content",
      "ORDERS_CONSECUTIVE_REJECTS_DAY": "0",
      "VEHICLE_DOCUMENT_EXPIRATION_DATE": null,
      "IS_GLUU_USER": null,
      "ROUTES_CONSECUTIVE_REJECTS_DAY": "0",
      "DESIRED_REGION": null,
      "CASH_ON_DELIVERY_ENABLED": "true",
      "REFER_NAME": null,
      "ORDERS_COMPLETED_DAY": "0",
      "ROUTES_COMPLETED_DAY": "0",
      "OFFLINE_WORKING_DAY": "2",
      "ROUTES_AUTO_CANCELLATIONS_DAY": "0",
      "EPS_SISBEN_CERTIFICATE": "/worker/51037/attribute/174/file/content",
      "CONTINUOUS_MOVEMENT_CANDIDATE": null,
      "MODAL_RENTAL_EXTERNAL_ID": null,
      "ROUTES_CONSECUTIVE_AUTO_CANCELLATIONS_DAY": "0",
      "IDENTITY_DOCUMENT_BACK_PHOTO": "/worker/51037/attribute/142/file/content",
      "AMBASSADOR": null,
      "IDENTITY_DOCUMENT": "18863572",
      "VEHICLE_DOCUMENT_PHOTO": null,
      "ROUTES_REJECTED_DAY": "0",
      "BLOCKED_WORKING_DAY": "0",
      "BUFFERED_ORDERS_COMPLETED_TOTAL_WHEN_DEVICE_ID_CHANGE": "23",
      "ORDERS_REJECTED_DAY": "0",
      "BANK_CERTIFICATE": "/worker/51037/attribute/171/file/content",
      "WORKER_PHOTO": "/worker/51037/attribute/50/file/content",
      "BACKGROUND_CHECK_VALIDATION_DETAIL": null,
      "CPF": "18863512",
      "DRIVER_REFER_ID": null,
      "PICKUP_SERVICES_ARRIVED": "136",
      "ROUTES_REJECTED_BY_TIMEOUT_DAY": "0",
      "EMAIL_AGE_SCORE": null,
      "DRIVERS_LICENSE_PHOTO": null,
      "REMAINING_PAUSE_MINUTES": null,
      "ORDERS_REJECTED_BY_TIMEOUT_DAY": "0",
      "VEHICLE_LICENSE_PLATE_PHOTO": null,
      "ORDERS_COMPLETED_TOTAL": "135",
      "DEVICE": "ANDROID",
      "CLOSED_REGION_NOTIFICATION_ENABLED": null,
      "accountNumber": "8800728123",
      "bankName": "BANCO DAVIVIENDA S.A.",
      "bankAccountType": "SAVINGS_BANK_ACCOUNT",
      "account": "8800728123",
      "balance_amount": 1119090,
      "balance_amount_with_taxes": 1119090
  },
  "earnings": [
      {
          "uuid": "9a67a9c6-eed7-46f7-9e16-ca665217b5de",
          "date": "2021-02-12T15:37:17.525207-02:00",
          "type": "CREDIT",
          "cause": "ROUTE_COMPLETED",
          "dynamicFreightMultiplierApplied": false,
          "value": 3835.45
      },
      {
          "uuid": "73cda175-cb70-46e6-b1bf-baf83aad8748",
          "date": "2021-02-12T14:46:32.133413-02:00",
          "type": "CREDIT",
          "cause": "ROUTE_COMPLETED",
          "dynamicFreightMultiplierApplied": false,
          "value": 3487.55
      },
      ...
  ],
  "trips": {}
}

This endpoint allows you to :

HTTP Request

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

Payload

Parameter Description
email email of the Ifood user account (e.g: jose@gmail.com)
password password of the Ifood 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://www.palenca.com/ifood/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://www.palenca.com/ifood/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/ifood/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",
  "profile": {
      "user_uuid": "88482662-0452-4b02-85d4-80a3fc3a27d7",
      "name": "DILAN BRANDON Huerta Garcia",
      "phone_number": "+573118958763",
      "email": "dilan@hotmail.com",
      "birthday": "1992-07-29",
      "DRIVERS_LICENSE_EXPIRATION_DATE": null,
      "DELIVERY_SERVICES_ARRIVED": "136",
      "DRIVERS_LICENSE": null,
      "ROUTES_ACCEPTED_DAY": "0",
      "INACTIVATION_REASON": null,
      "ORDERS_ACCEPTED_DAY": "0",
      "VEHICLE_LICENSE_PLATE": null,
      "ROUTES_CANCELLATIONS_DAY": "0",
      "RUT": null,
      "ROUTES_ACCEPTED": "141",
      "TERMS_AND_CONDITIONS_AGREED": "1",
      "ROUTES_OFFERED": "172",
      "IDENTITY_DOCUMENT_FRONT_PHOTO": "/worker/51037/attribute/143/file/content",
      "ORDERS_CONSECUTIVE_REJECTS_DAY": "0",
      "VEHICLE_DOCUMENT_EXPIRATION_DATE": null,
      "IS_GLUU_USER": null,
      "ROUTES_CONSECUTIVE_REJECTS_DAY": "0",
      "DESIRED_REGION": null,
      "CASH_ON_DELIVERY_ENABLED": "true",
      "REFER_NAME": null,
      "ORDERS_COMPLETED_DAY": "0",
      "ROUTES_COMPLETED_DAY": "0",
      "OFFLINE_WORKING_DAY": "2",
      "ROUTES_AUTO_CANCELLATIONS_DAY": "0",
      "EPS_SISBEN_CERTIFICATE": "/worker/51037/attribute/174/file/content",
      "CONTINUOUS_MOVEMENT_CANDIDATE": null,
      "MODAL_RENTAL_EXTERNAL_ID": null,
      "ROUTES_CONSECUTIVE_AUTO_CANCELLATIONS_DAY": "0",
      "IDENTITY_DOCUMENT_BACK_PHOTO": "/worker/51037/attribute/142/file/content",
      "AMBASSADOR": null,
      "IDENTITY_DOCUMENT": "18863572",
      "VEHICLE_DOCUMENT_PHOTO": null,
      "ROUTES_REJECTED_DAY": "0",
      "BLOCKED_WORKING_DAY": "0",
      "BUFFERED_ORDERS_COMPLETED_TOTAL_WHEN_DEVICE_ID_CHANGE": "23",
      "ORDERS_REJECTED_DAY": "0",
      "BANK_CERTIFICATE": "/worker/51037/attribute/171/file/content",
      "WORKER_PHOTO": "/worker/51037/attribute/50/file/content",
      "BACKGROUND_CHECK_VALIDATION_DETAIL": null,
      "CPF": "18863512",
      "DRIVER_REFER_ID": null,
      "PICKUP_SERVICES_ARRIVED": "136",
      "ROUTES_REJECTED_BY_TIMEOUT_DAY": "0",
      "EMAIL_AGE_SCORE": null,
      "DRIVERS_LICENSE_PHOTO": null,
      "REMAINING_PAUSE_MINUTES": null,
      "ORDERS_REJECTED_BY_TIMEOUT_DAY": "0",
      "VEHICLE_LICENSE_PLATE_PHOTO": null,
      "ORDERS_COMPLETED_TOTAL": "135",
      "DEVICE": "ANDROID",
      "CLOSED_REGION_NOTIFICATION_ENABLED": null,
      "accountNumber": "8800728123",
      "bankName": "BANCO DAVIVIENDA S.A.",
      "bankAccountType": "SAVINGS_BANK_ACCOUNT",
      "account": "8800728123",
      "balance_amount": 1119090,
      "balance_amount_with_taxes": 1119090
  },
  "earnings": [
      {
          "uuid": "9a67a9c6-eed7-46f7-9e16-ca665217b5de",
          "date": "2021-02-12T15:37:17.525207-02:00",
          "type": "CREDIT",
          "cause": "ROUTE_COMPLETED",
          "dynamicFreightMultiplierApplied": false,
          "value": 3835.45
      },
      {
          "uuid": "73cda175-cb70-46e6-b1bf-baf83aad8748",
          "date": "2021-02-12T14:46:32.133413-02:00",
          "type": "CREDIT",
          "cause": "ROUTE_COMPLETED",
          "dynamicFreightMultiplierApplied": false,
          "value": 3487.55
      },
      ...
  ],
  "trips": {}
}

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

Mensajeros urbanos

Create User

import requests

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

payload = {
    'email': 'jose@gmail.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://www.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@gmail.com",
   "country": "co",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'email': 'jose@gmail.com',
    'password': 'MyGreatPassword62',
    'country': 'co',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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",
  "profile": {
      "platform": "mu",
      "country": "mx",
      "user_uuid": "797051",
      "first_name": "José Carlos",
      "last_name": "Aguilar Rincón",
      "email": "jose@vech.com.mx",
      "phone_prefix": "+57",
      "phone_number": "3106976035",
      "gender": null,
      "birthday": "",
      "city_name": "Bucaramanga",
      "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",
      "id_type": "",
      "id_number": "1085740840",
      "rating": "4.9556",
      "lifetime_trips": "",
      "time_since_ft": "",
      "level_name": "No VIP",
      "level_number": "0",
      "metrics_info": {},
      "bank_info": {},
      "list_vehicle_info": {
          "vehicle": "Bicicleta - ",
          "vehicle_plate": null
      },
      "other_info": {
          "activation_status": "Activo"
      }
  },
  "earnings": [
    {
      "datestr": "2021-05-08",
      "earnings": 7293.0,
      "currency": "COP",
      "other_info": [
        {
          "value": 3335,
          "date": "2021-05-08 08:30:09",
          "balance": 47214,
          "name": "Pago por servicio prepagado",
          "uuid": "6096923d89455",
          "type": 10
        },
        {
          "value": 3958,
          "date": "2021-05-08 08:29:32",
          "balance": 43879,
          "name": "Pago por servicio prepagado",
          "uuid": "60969218d822a",
          "type": 10
        }
      ]
    },
    {
      "datestr": "2021-05-08",
      "earnings": 0.0,
      "currency": "COP",
      "other_info": null
    },
    ...
  ]
}

This endpoint allows you to :

HTTP Request

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

Payload

Parameter Description
email email of the mensajeros urbanos user account (e.g: jose@gmail.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://www.palenca.com/mensajeros-urbanos/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://www.palenca.com/mensajeros-urbanos/get-user/user_id_from_your_db' \
--header 'x-api-key: my_api_key'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/mensajeros-urbanos/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",
  "profile": {
      "platform": "mu",
      "country": "mx",
      "user_uuid": "797051",
      "first_name": "José Carlos",
      "last_name": "Aguilar Rincón",
      "email": "jose@vech.com.mx",
      "phone_prefix": "+57",
      "phone_number": "3106976035",
      "gender": null,
      "birthday": "",
      "city_name": "Bucaramanga",
      "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",
      "id_type": "",
      "id_number": "1085740840",
      "rating": "4.9556",
      "lifetime_trips": "",
      "time_since_ft": "",
      "level_name": "No VIP",
      "level_number": "0",
      "metrics_info": {},
      "bank_info": {},
      "list_vehicle_info": {
          "vehicle": "Bicicleta - ",
          "vehicle_plate": null
      },
      "other_info": {
          "activation_status": "Activo"
      }
  },
  "earnings": [
    {
      "datestr": "2021-05-08",
      "earnings": 7293.0,
      "currency": "COP",
      "other_info": [
        {
          "value": 3335,
          "date": "2021-05-08 08:30:09",
          "balance": 47214,
          "name": "Pago por servicio prepagado",
          "uuid": "6096923d89455",
          "type": 10
        },
        {
          "value": 3958,
          "date": "2021-05-08 08:29:32",
          "balance": 43879,
          "name": "Pago por servicio prepagado",
          "uuid": "60969218d822a",
          "type": 10
        }
      ]
    },
    {
      "datestr": "2021-05-08",
      "earnings": 0.0,
      "currency": "COP",
      "other_info": null
    },
    ...
  ]
}

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

HTTP Request

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

Restaurants

Rappi

Create User

import requests

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

payload = {
    'email': 'm.colag@mirazur.fr',
    'password': '*****',
    'user_id': 'e93cf891'
}

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://www.palenca.com/restaurant/rappi/create-user' \
--header 'x-api-key: your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "m.colag@mirazur.fr",
    "password": "*****",
    "user_id": "e93cf891"
}'
const axios = require('axios')
const data = JSON.stringify({
  'email':'m.colag@mirazur.fr',
  'password':'*****',
  'user_id':'e93cf891'
});

const config = {
  method: 'post',
  url: 'https://www.palenca.com/restaurant/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:

{
  "profile": {
    "brand_id": "65682",
    "brand_name": "El Retorno del Godín",
    "brand_logo":  "url_logo",
    "partner_id": 160395,
    "partner_email": "elretornodelgodin@gmail.com",
    "partner_nickname": "elretornodelgodin",
    "start_date": "2020-12-25",
    "lifetime_orders": 24,
    "availability_rate": 0.78263,
    "conversion_rate": 0.15671,
    "cancelled_rate": 0,
    "courier_waiting_time": 1.39466,
    "defect_rate": 0,
    "store_id":  "1923261234",
    "store_name":  "El Retorno del Godín",
    "store_rating": 4.2,
    "store_count_reviews": 5,
    "country_code": "mx",
    "phones": [],
    "emails": [],
    "city_id": 3,
    "city_name": "Ciudad de México",
    "address": "Río Lerma 232, Cuauhtémoc, 54076 Ciudad de México, CDMX",
    "schedules": {
       "mon": [{"closeAt": "09:45PM", "openAt": "12:15PM"}],
       "tue": [{"closeAt": "09:45PM", "openAt": "12:15PM"}],
       "wed": [{"closeAt": "09:45PM", "openAt": "12:15PM"}],
       "thu": [{"closeAt": "09:45PM", "openAt": "12:15PM"}],
       "fri": [{"closeAt": "09:45PM", "openAt": "12:15PM"}],
       "sat": [{"closeAt": "09:45PM", "openAt": "12:15PM"}],
       "sun": [{"closeAt": "06:45PM", "openAt": "12:15PM"}],         
    }, 
    "partner_identification_type": "RFC",
    "partner_identification_number": "GOCJ940614TY6",
    "banK_holder_name": "Juan Carlos Godin",
    "banK_account_number": "002180701012345678",
    "bank_name": "BANAMEX - BANCO NACIONAL DE MÉXICO SA",
    "banK_account_type": "Cta Corriente",
  },
  "earnings": {
    "brand_id": "65682",
    "store_id":  "1923261234",
    "currency":  "MXN",
    "data": [
      {
        "datestr": "2021-01-19",
          "amount": 1234.0,
          "orders": 5,
      },
      {
        "datestr": "2021-01-20",
          "amount": 436.4,
          "orders": 2,
      },
      ...
    ]
  }
}

This endpoint allows you to create and get data for a Rappi Restaurant.

HTTP Request

POST https://www.palenca.com/restaurant/rappi/create-user

Payload

Parameter Description
email User Email used to log in Rappi
password User Password used to log in Rappi
user_id User ID in your backend

Get User

import requests

url = 'https://www.palenca.com/restaurant/rappi/get-user/e93cf891'

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

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

print(response.text)
curl 'https://www.palenca.com/restaurant/rappi/get-user/e93cf891' \
--header 'x-api-key: your_api_key' \
--header 'Content-Type: application/json'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/restaurant/rappi/get-user/e93cf891',
  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 the same type of response a the Create User route

This endpoint allows you to get Rappi Restaurant data from a previously created User

HTTP Request

GET https://www.palenca.com/restaurant/rappi/get-user/<USER_ID>

Didi Food

Create User

import requests

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

payload = {
    'country': 'mx',
    'phone_number': '5576749012',
    'password': '*****',
    'user_id': 'e93cf891'
}

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://www.palenca.com/restaurant/didi-food/create-user' \
--header 'x-api-key: your_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "country": "mx",
    "phone_number': "5576749012",
    "password": "*****",
    "user_id": "e93cf891"
}'
const axios = require('axios')
const data = JSON.stringify({
  'country': 'mx',
  'phone_number': '5576749012',
  'password': '*****',
  'user_id': 'e93cf891'
});

const config = {
  method: 'post',
  url: 'https://www.palenca.com/restaurant/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:

{
  "profile" : {
    "country_code": "MX",
    "brand_id": "57646077043086412334", 
    "brand_name": "El Retorno del Godín",
    "partner_name": "Juan Carlos Godin",
    "partner_phone": "15585161234",
    "partner_identification_type": "RFC",
    "partner_identification_number": "GOCJ940614TY6",
    "tax_photo": "url_tax_photo",
    "store_id": "5764607765805531234",
    "store_name": "El Retorno del Godín",
    "store_logo": "url_logo",
    "store_phone": [{"phone": "5570261234", "callingCode": "+52", "type": 1}],  
    "city_id": "52090100",
    "city_name": "Ciudad de México",
    "currency": "MXN",
    "lifetime_orders": 48,
    "working_hours": 8.6,
    "confirmation_rate": 100.00,
    "cancelation_rate": 0,
    "avg_produce_time": 23.82,
    "score_total": 6.93,
    "shop_online_duration": 8.79,
    "sales_item_num": 65,
    "cook_timeout_order_rate": 0.75,
    "reject_order_rate": 0,
    "negative_evaluated_rate": 0,

  },
  "earnings" : {
    "brand_id": "57646077043086412334",
    "store_id": "5764607765805531234",
    "currency":  "MXN",
    "data": [
      {
        "datestr": "2021-01-19",
        "amount": 1234.0,
      },
      {
        "datestr": "2021-01-20",
        "amount": 436.4,
      },
      ...
    ]
  }
}

This endpoint allows you to create and get data for a Didi Food Restaurant.

HTTP Request

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

Payload

Parameter Description
country Country in Didi Food (e.g: "mx", "co", "br")
phone_number User Phone Number used to log in Didi Food
password User Password used to log in Didi Food
user_id User ID in your backend

Get User

import requests

url = 'https://www.palenca.com/restaurant/didi-food/get-user/e93cf891'

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

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

print(response.text)
curl 'https://www.palenca.com/restaurant/didi-food/get-user/e93cf891' \
--header 'x-api-key: your_api_key' \
--header 'Content-Type: application/json'
const axios = require('axios')

const config = {
  method: 'get',
  url: 'https://www.palenca.com/restaurant/didi-food/get-user/e93cf891',
  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 the same type of response a the Create User route

This endpoint allows you to get Didi Food Restaurant data from a previously created User

HTTP Request

GET https://www.palenca.com/restaurant/didi-food/get-user/<USER_ID>

Uber Eats

Available Soon

HTTP Request

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

HR

PEMEX

Create User

import requests

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

payload = {
    'username': '123453',
    'password': 'MyGreatPassword62',
    '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://www.palenca.com/pemex/create-user' \
--header 'x-api-key: my_api_key' \
--header 'Content-Type: application/json' \
--data-raw '{
   "user_id": "user_id_from_your_db",
   "username": "123453",
   "password": "MyGreatPassword62"
}'
const axios = require('axios')
const data = JSON.stringify({
    'username': '123453',
    'password': 'MyGreatPassword62',
    'user_id': 'user_id_from_your_db'
});

const config = {
  method: 'post',
  url: 'https://www.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",
        "profile": {
            "platform": "pemex",
            "country": "mx",
            "user_uuid": "138535",
            "first_name": "JUAN",
            "last_name": "CARDOSO MARQUEZ",
            "email": "juancardosom@hotmail.com",
            "phone_prefix": "+52",
            "phone_number": "5566798905",
            "birthday": "19-JUN-1961",
            "city_name": "ECATEPEC",
            "url_picture": "",
            "id_type": "CURP",
            "id_number": "CAMJ610619HDFRRL01",
            "rating": "",
            "bank_info": {},
            "other_info": {}
        },
        "earnings": [{
            "platform": "pemex",
            "datestr": "2021-05-04",
            "earnings": 12463.23,
            "currency": "MXN",
            "other_info": {}
        }, {
            "platform": "pemex",
            "datestr": "2021-04-25",
            "earnings": 12463.23,
            "currency": "MXN",
            "other_info": {}
        }, {
            "platform": "pemex",
            "datestr": "2021-04-11",
            "earnings": 12463.23,
            "currency": "MXN",
            "other_info": {}
        }, {
            "platform": "pemex",
            "datestr": "2021-03-28",
            "earnings": 12463.23,
            "currency": "MXN",
            "other_info": {}
        }, {
            "platform": "pemex",
            "datestr": "2021-03-14",
            "earnings": 12463.23,
            "currency": "MXN",
            "other_info": {}
        }
        ...
      ]
    }

This endpoint allows you to:

HTTP Request

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

Payload

Parameter Description
username username of the Pemex user account (e.g: jose@gmail.com)
password password of the Pemex user account
user_id your own user id from your database (e.g: 03eb0d70)

Get User

import requests

url = 'https://www.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://www.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://www.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:

{
        "message": "success",
        "user_id": "user_123456780979",
        "profile": {
            "platform": "pemex",
            "country": "mx",
            "user_uuid": "138535",
            "first_name": "JUAN",
            "last_name": "CARDOSO MARQUEZ",
            "email": "juancardosom@hotmail.com",
            "phone_prefix": "+52",
            "phone_number": "5566798905",
            "birthday": "19-JUN-1961",
            "city_name": "ECATEPEC",
            "url_picture": "",
            "id_type": "CURP",
            "id_number": "CAMJ610619HDFRRL01",
            "rating": "",
            "bank_info": {},
            "other_info": {}
        },
        "earnings": [{
            "platform": "pemex",
            "datestr": "2021-05-04",
            "earnings": 12463.23,
            "currency": "MXN",
            "other_info": {}
        }, {
            "platform": "pemex",
            "datestr": "2021-04-25",
            "earnings": 12463.23,
            "currency": "MXN",
            "other_info": {}
        }, {
            "platform": "pemex",
            "datestr": "2021-04-11",
            "earnings": 12463.23,
            "currency": "MXN",
            "other_info": {}
        }, {
            "platform": "pemex",
            "datestr": "2021-03-28",
            "earnings": 12463.23,
            "currency": "MXN",
            "other_info": {}
        }, {
            "platform": "pemex",
            "datestr": "2021-03-14",
            "earnings": 12463.23,
            "currency": "MXN",
            "other_info": {}
        }
        ...
      ]
    }

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

HTTP Request

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

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