Palenca API (1.0)
On this page we list all the methods available in the Palenca API, as well as the complete reference of the parameters that each one accepts.
The Palenca API is designed with the REST standard in mind. The API endpoints are grouped by resources, have predictable URLs, responses are formatted in JSON, and we use standard HTTP response, authentication, and verb codes.
We have 2 environments: Sandbox and Production.
Sandbox: https://sandbox.palenca.com/v1
Production: https://api.palenca.com/v1
Before joining, we recommend that you familiarize yourself with the Entities that we manage in Palenca (Users, Accounts, Logins)
Create User
Register a new user in Palenca. A user represents a formal or gig economy worker.
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Request Body schema: application/json
widget_id required | string <uuid> required: Id of the Widget to which the user will be associated |
external_id | string optional: External unique identifier of the client (provided by your own application) |
Responses
Request samples
- Payload
{- "widget_id": "2b0956a2-58e7-4e97-804d-2852d40f05d7",
- "external_id": "1234567890"
}
Response samples
- 201
- 422
{- "success": true,
- "data": {
- "user_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
- "external_id": null
}, - "mistake": { }
}
Retrieve User
Returns the user corresponding to the specified id.
path Parameters
required | User Id (string) or User Id (string) User ID to obtain |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "user_id": "9a4e45ed-e8c4-4dc2-ba6f-875bd6117a86",
- "external_id": null,
- "widget_id": "8310u261-1ac1-437b-953b-7bd51713fu56"
}
}
Delete User
Elimina el usuario correspondiente al id especificado.
path Parameters
user_id required | string <uuid> ID del usuario a eliminar |
header Parameters
x-api-key | string Llave privada única por organización. Permite realizar peticiones en los ambientes Sandbox y Producción. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": null
}
Retrieve User Accounts
Returns the user accounts corresponding to the specified user id.
path Parameters
required | User Id (string) or User Id (string) User ID to obtain |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "user_id": "44215ab0-6069-458e-954e-83b81ef492c6",
- "accounts": [
- {
- "account_id": "5a5cd111-988e-4c2f-b75b-237787b7c00a",
- "country": "mx",
- "platform": "mc_avon",
- "identifier": "5547954515",
- "worker_id": null,
- "gov_id": null,
- "last_successful_connection": null,
- "warning": null,
- "status": "incomplete",
- "status_details": "validation_pending",
- "message": "The employee needs to complete the authentication process.",
- "recommendation": "This happens when the user does not complete the authentication process on the platform. Ask the user to complete the connection.",
- "next_step": null,
- "created_at": "2024-04-12T17:10:22.708741+00:00"
}, - {
- "account_id": "99642ab9-9e96-4d2d-b6ff-3659f587218c",
- "country": "mx",
- "platform": "issste",
- "identifier": "GUMH741209MZSLRR00",
- "worker_id": null,
- "gov_id": null,
- "last_successful_connection": null,
- "warning": null,
- "status": "incomplete",
- "status_details": "employment_info_in_imss",
- "message": null,
- "recommendation": null,
- "next_step": null,
- "created_at": "2024-04-19T21:56:10.270256+00:00"
}, - {
- "account_id": "65370479-fcb6-4759-a78b-eb50af2dc651",
- "country": "mx",
- "platform": "imss",
- "identifier": "GUMH741209MZSLRR00",
- "worker_id": "04037401702",
- "gov_id": null,
- "last_successful_connection": "2024-04-30T17:23:26.375449+00:00",
- "warning": null,
- "status": "success",
- "status_details": null,
- "message": null,
- "recommendation": null,
- "next_step": null,
- "created_at": "2024-04-19T21:55:56.212896+00:00"
}
]
}
}
List Users
Returns a paginated list of users created within a date range.
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Request Body schema: application/json
start_date required | string required: Start date of the search in YYYY-MM-DD format |
end_date required | string required: End date of the search in YYYY-MM-DD format |
object Default: {"items_per_page":100,"page":1} optional: Pagination options |
Responses
Request samples
- Payload
{- "start_date": "string",
- "end_date": "string",
- "options": {
- "items_per_page": 100,
- "page": 1
}
}
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "users": [
- {
- "user_id": "d7185025-974d-4618-auib-1ebd4b6d20de",
- "external_id": null,
- "widget_id": "8370h261-1ac1-437a-953b-7bd51743fa56"
}, - {
- "user_id": "d7135025-974d-4618-auib-1ebd4b6d20de",
- "external_id": null,
- "widget_id": "8370h261-1ac1-437a-953b-7bd51743fa56"
}
]
}, - "pagination": {
- "page": 1,
- "items_per_page": 100,
- "total_items": 38,
- "total_pages": 1
}
}
Create User And Account
Register a user along with their corresponding account in a single request. A user represents a formal or gig economy worker and an account represents an account of the worker on a specific platform . Currently available for IMSS and ISSSTE. If you want to use this endpoint to create gig economy accounts, contact us at support@palenca.com
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Request Body schema: application/json
widget_id | string <uuid> optional: Id of the Widget to which the user will be associated |
external_id | string optional: External unique identifier of the client (provided by your own application) |
country required | any Value: "mx" requerido: País |
platform required | any Enum: "imss" "issste" requerido: Plataforma con la cual se quiere hacer la conexión. |
identifier required | string required: User identifier (CURP). |
Responses
Request samples
- Payload
{- "widget_id": "2b0956a2-58e7-4e97-804d-2852d40f05d7",
- "external_id": "1234567890"
}
Response samples
- 200
- 201
- 422
{- "success": true,
- "error": null,
- "data": {
- "user_id": "ee15970e-034e-4bd0-8e43-61383cc4c7d1",
- "country": "mx",
- "platform": "imss",
- "account_id": "e0035a23-7sf0-4f82-9eua-97c913887e03",
- "next_step": null,
- "methods": [ ],
- "hint": null
}
}
Retrieve User Accounts
Returns the user accounts corresponding to the specified user id.
path Parameters
required | User Id (string) or User Id (string) User ID to obtain |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "user_id": "44215ab0-6069-458e-954e-83b81ef492c6",
- "accounts": [
- {
- "account_id": "5a5cd111-988e-4c2f-b75b-237787b7c00a",
- "country": "mx",
- "platform": "mc_avon",
- "identifier": "5547954515",
- "worker_id": null,
- "gov_id": null,
- "last_successful_connection": null,
- "warning": null,
- "status": "incomplete",
- "status_details": "validation_pending",
- "message": "The employee needs to complete the authentication process.",
- "recommendation": "This happens when the user does not complete the authentication process on the platform. Ask the user to complete the connection.",
- "next_step": null,
- "created_at": "2024-04-12T17:10:22.708741+00:00"
}, - {
- "account_id": "99642ab9-9e96-4d2d-b6ff-3659f587218c",
- "country": "mx",
- "platform": "issste",
- "identifier": "GUMH741209MZSLRR00",
- "worker_id": null,
- "gov_id": null,
- "last_successful_connection": null,
- "warning": null,
- "status": "incomplete",
- "status_details": "employment_info_in_imss",
- "message": null,
- "recommendation": null,
- "next_step": null,
- "created_at": "2024-04-19T21:56:10.270256+00:00"
}, - {
- "account_id": "65370479-fcb6-4759-a78b-eb50af2dc651",
- "country": "mx",
- "platform": "imss",
- "identifier": "GUMH741209MZSLRR00",
- "worker_id": "04037401702",
- "gov_id": null,
- "last_successful_connection": "2024-04-30T17:23:26.375449+00:00",
- "warning": null,
- "status": "success",
- "status_details": null,
- "message": null,
- "recommendation": null,
- "next_step": null,
- "created_at": "2024-04-19T21:55:56.212896+00:00"
}
]
}
}
Retrieve Account User
Returns the user associated with the account.
path Parameters
account_id required | string <uuid> requerido: Id of the account to fetch. |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "user_id": "d7135025-974d-4618-auib-1ebd4b6d20de",
- "external_id": null,
- "widget_id": "8370h261-1ac1-437a-953b-7bd51743fa56"
}
}
Create Account
Register a new account corresponding to a user. An account represents a worker account on a specific platform. Currently available for IMSS and ISSSTE. If you want to use this endpoint to create gig economy accounts * contact us at support@palenca.com
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Request Body schema: application/json
country required | any Value: "mx" requerido: País |
platform required | any Enum: "imss" "issste" requerido: Plataforma con la cual se quiere hacer la conexión. |
identifier required | string requerido: Identificador del usuario (CURP) |
user_id required | string <uuid> requerido: Id del usuario al que estará asociada la cuenta |
Responses
Request samples
- Payload
{- "country": "mx",
- "platform": "uber",
- "identifier": "user@example.com",
- "identifier_type": "email",
- "password": "s3cur3p4s5w0rd"
}
Response samples
- 200
- 201
- 422
{- "success": true,
- "error": null,
- "data": {
- "user_id": "ee15970e-034e-4bd0-8e43-61383cc4c7d1",
- "country": "mx",
- "platform": "imss",
- "account_id": "e0035a23-7sf0-4f82-9eua-97c913887e03",
- "next_step": null,
- "methods": [ ],
- "hint": null
}
}
Retrieve Account
Regresa la cuenta correspondiente al id especificado.
path Parameters
account_id required | string <uuid> requerido: Id de la cuenta a obtener |
header Parameters
x-api-key | string Llave privada única por organización. Permite realizar peticiones en los ambientes Sandbox y Producción. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "account_id": "9a5f5d78-0dff-4721-aa97-23adb9bb0093",
- "country": "mx",
- "platform": "imss",
- "identifier": "XXXX000806HTSRNNA3",
- "worker_id": "33170033814",
- "last_successful_connection": "2023-08-28T18:48:57.726787+00:00",
- "warning": null,
- "status": "success",
- "status_details": null,
- "message": null,
- "recommendation": null,
- "next_step": null,
- "created_at": "2023-06-08T02:15:20.652274+00:00"
}
}
Delete Account
Elimina la cuenta correspondiente al id especificado.
path Parameters
account_id required | string <uuid> requerido: Id de la cuenta a eliminar |
header Parameters
x-api-key | string Llave privada única por organización. Permite realizar peticiones en los ambientes Sandbox y Producción. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": null
}
List Logins
Returns a paginated list of logins created within a date range.
header Parameters
x-api-key | string Unique private key for each organization, enabling requests in both Sandbox and Production environments. |
Request Body schema: application/json
start_date required | string required: Start date of the search in YYYY-MM-DD format |
end_date required | string required: End date of the search in YYYY-MM-DD format |
object Default: {"items_per_page":100,"page":1} optional: Pagination options |
Responses
Request samples
- Payload
{- "start_date": "string",
- "end_date": "string",
- "options": {
- "items_per_page": 100,
- "page": 1
}
}
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "logins": [
- {
- "account_id": "b09ddeea-1f3f-4f0b-9601-29a1c578d69a",
- "created_at": "2024-07-30T19:16:54.819776+00:00",
- "status": "success",
- "status_details": null,
- "user_id": "af20084d-4350-4de2-912b-1684e5749c10",
- "gov_id": "gov_id_mock",
- "external_id": "external_id_mock",
- "identifier": "5511223344",
- "platform": "didi_food"
}, - {
- "account_id": "71490df1-f5bc-4647-b779-b5520f5e7c19",
- "created_at": "2023-10-13T03:42:31.105201+00:00",
- "status": "error",
- "status_details": "service_unavailable",
- "user_id": "7e6433a3-527a-4ea4-b972-a14fda2f60ff",
- "gov_id": null,
- "external_id": "12345678",
- "identifier": "HUNB050225HCHRJRA0",
- "platform": "imss"
}
]
}, - "pagination": {
- "page": 1,
- "items_per_page": 100,
- "total_items": 38,
- "total_pages": 1
}
}
Retrieve Account Profile
Returns the profile data of the worker that belongs to the account specified on the account_id.
path Parameters
account_id required | string <uuid> required: Id of the account for which you want to obtain the profile |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "account_id": "2a52f5e3-d2d2-4158-ae8f-42b986f9aa19",
- "external_id": null,
- "profile": {
- "first_name": "Josefa Antonia",
- "last_name": "Flores Bautista",
- "email": null,
- "birthday": "1987-03-12"
}, - "ids_info": [
- {
- "type": "social_security_number",
- "name": "nss",
- "value": "44022247047"
}
]
}
}
Retrieve Account Employment
Returns the employment data of the formal worker (IMSS, ISSSTE), corresponding to the account specified by the id.
path Parameters
account_id required | string <uuid> required: Id of the account for which you want to obtain the employment information |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "account_id": "2f1ab613-fc4d-41bb-8586-d06422a096ce",
- "external_id": "PIVM831130HDFXCF26",
- "employment_info": {
- "id_type": "social_security_number",
- "quoted_weeks": 82,
- "discounted_weeks": 38,
- "reintegrated_weeks": 0,
- "end_of_rights": null,
- "status": "unemployed",
- "employment_files": [
], - "employment_history_status": "complete"
}, - "employment_history": [
- {
- "employer": "CONSTRUCCIONES YAMILE",
- "employer_registration": "Y606341210",
- "start_date": "2019-11-12",
- "end_date": "2019-11-26",
- "job_title": null,
- "federal_entity": "CIUDAD DE MÉXICO",
- "base_salary": 116.02,
- "monthly_salary": 3529.33,
- "quoted_days": null,
- "payment_frequency": null,
- "payment_days": null,
- "designation": null,
- "modality": null
}, - {
- "employer": "GRUPO LARIOS SA DE CV",
- "employer_registration": "C226571510",
- "start_date": "2019-06-10",
- "end_date": "2019-08-04",
- "job_title": null,
- "federal_entity": "MÉXICO",
- "base_salary": 107.32,
- "monthly_salary": 3264.67,
- "quoted_days": null,
- "payment_frequency": null,
- "payment_days": null,
- "designation": null,
- "modality": null
}, - {
- "employer": "ALFA CONSTRUCTORA",
- "employer_registration": "Y337061213",
- "start_date": "2019-05-07",
- "end_date": "2020-02-22",
- "job_title": null,
- "federal_entity": "CIUDAD DE MÉXICO",
- "base_salary": 171.71,
- "monthly_salary": 5223.42,
- "quoted_days": null,
- "payment_frequency": null,
- "payment_days": null,
- "designation": null,
- "modality": null
}
], - "employment_events": [
- {
- "event_type": "discharge",
- "employer": "CONSTRUCCIONES YAMILA",
- "event_date": "2019-11-26",
- "event_end_date": null,
- "base_salary": 116.02
}, - {
- "event_type": "reentry",
- "employer": "CONSTRUCCIONES YAMILA",
- "event_date": "2019-11-12",
- "event_end_date": null,
- "base_salary": 116.02
}, - {
- "event_type": "discharge",
- "employer": "GRUPO LARIOSVEG SA DE CV",
- "event_date": "2019-08-04",
- "event_end_date": null,
- "base_salary": 107.32
}
], - "metadata": null
}
}
Retrieve Account Employment History
Returns the employment history data of the worker that belongs to the account specified on the account_id.
path Parameters
account_id required | string <uuid> required: Id of the account for which you want to obtain the employment information |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "gov_id": "61819960013",
- "platform": "carteira_trabalho",
- "account_id": "e61eeee1-f9d9-417c-adcb-bce03a8d0e9f",
- "external_id": "604116d83ae2",
- "employment_info": {
- "employer": "Freitas",
- "employer_registration": "88971946562",
- "start_date": "2023-12-27",
- "end_date": "2024-07-01",
- "job_title": "Urbanista",
- "street": "Travessa Benjamin Lima",
- "zip_code": "63299396",
- "city": "Fernandes",
- "neighborhood": "Moema",
- "tenure": "0 year(s) 6 month(s)",
- "modality": "Prazo indeterminado",
- "monthly_salary": "4375.01",
- "status": "unemployed"
}, - "employment_history": [
- {
- "employer": "Freitas",
- "employer_registration": "88971946562",
- "start_date": "2023-12-27",
- "end_date": "2024-07-01",
- "job_title": "Urbanista",
- "street": "Travessa Benjamin Lima",
- "zip_code": "63299396",
- "city": "Fernandes",
- "neighborhood": "Moema",
- "tenure": "0 year(s) 6 month(s)",
- "modality": "Prazo indeterminado",
- "monthly_salary": "4375.01"
}, - {
- "employer": "Nunes Ltda.",
- "employer_registration": "23914091118",
- "start_date": "2023-02-07",
- "end_date": "2023-12-21",
- "job_title": "Lutador de jiu-jitsu",
- "street": "Área Paulo da Mota",
- "zip_code": "77993202",
- "city": "da Rocha do Sul",
- "neighborhood": "Barra da Tijuca",
- "tenure": "0 year(s) 10 month(s)",
- "modality": "Prazo indeterminado",
- "monthly_salary": "3329.29"
}, - {
- "employer": "Lima",
- "employer_registration": "18430656890",
- "start_date": "2022-07-19",
- "end_date": "2023-01-08",
- "job_title": "Consultor de radiestesia",
- "street": "Alameda Porto",
- "zip_code": "48395278",
- "city": "Moura",
- "neighborhood": "Lapa",
- "tenure": "0 year(s) 5 month(s)",
- "modality": "Prazo indeterminado",
- "monthly_salary": "2374.07"
}, - {
- "employer": "Oliveira Rodrigues - ME",
- "employer_registration": "15804885835",
- "start_date": "2021-11-19",
- "end_date": "2022-07-09",
- "job_title": "Telegrafista",
- "street": "Aeroporto de Jesus",
- "zip_code": "59436882",
- "city": "Fogaça",
- "neighborhood": "Leblon",
- "tenure": "0 year(s) 7 month(s)",
- "modality": "Prazo indeterminado",
- "monthly_salary": "1773.1"
}, - {
- "employer": "Nascimento",
- "employer_registration": "99083329913",
- "start_date": "2020-11-26",
- "end_date": "2021-10-29",
- "job_title": "Orientador educacional",
- "street": "Esplanada Alexandre Lima",
- "zip_code": "83759834",
- "city": "Costela",
- "neighborhood": "Jardim Paulista",
- "tenure": "0 year(s) 10 month(s)",
- "modality": "Prazo indeterminado",
- "monthly_salary": "2258.73"
}
]
}
}
Retrieve Account Earnings
Returns a paginated list with the earnings data of the gig economy worker (Uber, Rappi, Didi, etc.), corresponding to the account specified by the id.
path Parameters
account_id required | string <uuid> required: Id of the account for which you want to obtain the profits |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Request Body schema: application/json
start_date required | string required: Start date of the search in YYYY-MM-DD format |
end_date required | string required: End date of the search in YYYY-MM-DD format |
object Default: {"items_per_page":100,"page":1} optional: Pagination options |
Responses
Request samples
- Payload
{- "start_date": "string",
- "end_date": "string",
- "options": {
- "items_per_page": 100,
- "page": 1
}
}
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "account_id": "e28f45c2-b137-407c-9aed-adaac2765b36",
- "earnings": [
- {
- "amount": 104.07,
- "currency": "pen",
- "earning_date": "2023-07-29",
- "cash_amount": null,
- "count_trips": 22
}, - {
- "amount": 26.73,
- "currency": "pen",
- "earning_date": "2023-07-30",
- "cash_amount": null,
- "count_trips": 10
}, - {
- "amount": 0,
- "currency": "pen",
- "earning_date": "2023-08-21",
- "cash_amount": null,
- "count_trips": 0
}
]
}, - "pagination": {
- "page": 1,
- "items_per_page": 100,
- "total_items": 25,
- "total_pages": 1
}, - "account_id": "e28f45c2-b137-407c-9aed-adaac2765b36"
}
Retrieve payment history of a Carteira de Trabalho account
Returns a paginated list of the payment history information of a worker inside the Carteira de Trabalho (CDT) account specified on the account_id.
path Parameters
account_id required | string <uuid> required: Id of the account for which you want to obtain the profits |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Request Body schema: application/json
start_date required | string required: Start date of the search in YYYY-MM-DD format |
end_date required | string required: End date of the search in YYYY-MM-DD format |
object Default: {"items_per_page":100,"page":1} optional: Pagination options |
Responses
Request samples
- Payload
{- "start_date": "string",
- "end_date": "string",
- "options": {
- "items_per_page": 100,
- "page": 1
}
}
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "gov_id": "61819960013",
- "account_id": "e61eeee1-f9d9-417c-adcb-bce03a8d0e9f",
- "earnings": [
- {
- "amount": 42487.53,
- "currency": "brl",
- "earning_date": "2024-07-01",
- "cash_amount": null,
- "count_trips": null,
- "employer": "Fernandes"
}, - {
- "amount": 43168,
- "currency": "brl",
- "earning_date": "2024-06-01",
- "cash_amount": null,
- "count_trips": null,
- "employer": "Gomes"
}, - {
- "amount": 30143.07,
- "currency": "brl",
- "earning_date": "2024-05-01",
- "cash_amount": null,
- "count_trips": null,
- "employer": "Martins"
}, - {
- "amount": 24960.83,
- "currency": "brl",
- "earning_date": "2024-04-01",
- "cash_amount": null,
- "count_trips": null,
- "employer": "da Cunha"
}, - {
- "amount": 33203.06,
- "currency": "brl",
- "earning_date": "2024-03-01",
- "cash_amount": null,
- "count_trips": null,
- "employer": "Mendes Souza - ME"
}, - {
- "amount": 30856.89,
- "currency": "brl",
- "earning_date": "2024-02-01",
- "cash_amount": null,
- "count_trips": null,
- "employer": "Costa"
}
]
}, - "pagination": {
- "page": 1,
- "items_per_page": 100,
- "total_items": 6,
- "total_pages": 1
}
}
Retrieve Employment Insights
Returns the employment insights of the formal worker (IMSS, ISSSTE), corresponding to the account specified by the ID. Palenca insights offer a list of pre-calculated variables that help risk and data science to make decisions with a greater degree of certainty.
path Parameters
account_id required | string <uuid> required: ID of the account for which you want to obtain employment information |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "account_id": "9a5e5d32-0dwe-4721-aa97-12adb9bb0093",
- "work_duration": 2,
- "salary_progression": 10,
- "periods_moonlighting": [ ],
- "periods_unemployed": [
- {
- "start_date": "2017-12-14",
- "end_date": "2018-07-18",
- "month_duration": 7.2
}, - {
- "start_date": "2018-08-30",
- "end_date": "2019-04-03",
- "month_duration": 7.2
}, - {
- "start_date": "2019-05-17",
- "end_date": "2020-03-14",
- "month_duration": 10.1
}, - {
- "start_date": "2020-03-23",
- "end_date": "2020-09-03",
- "month_duration": 5.5
}, - {
- "start_date": "2020-10-31",
- "end_date": "2021-05-17",
- "month_duration": 6.6
}, - {
- "start_date": "2021-08-23",
- "end_date": "2023-05-16",
- "month_duration": 21
}
]
}
}
Generate Employment Trends PDF
Generates a PDF file detailing the employment trends for the specified account, associated with IMSS and ISSSTE. This endpoint is exclusively for the creation of the PDF and the process takes approximately 1 minute.
After generation, the PDF can be retrieved via the 'employment_files' key within the response of the employment endpoint. This key contains an array of files related to employment history, including the newly generated PDF. For detailed information on accessing the generated PDF and understanding the response structure, please refer to the employment endpoint documentation.
⚠ This endpoint is not available in the Sandbox environment.
path Parameters
account_id required | string <uuid> Required: The account ID for which the employment trends PDF is to be generated. |
header Parameters
x-api-key | string Unique private key for each organization, enabling requests in both Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": { }
}
Retrieve Gig Insights
Regresa los insights de ganancias del trabajador de la gig economy (Uber, Rappi, Didi, etc.), correspondientes a la cuenta especificada mediante el id. Los insights de Palenca ofrecen una lista de variables precalculadas que ayudan a los equipos de riesgos y ciencia de datos a tomar decisiones con mayor grado de certeza.
path Parameters
account_id required | string <uuid> requerido: Id de la cuenta para la cual se quieren obtener los insighs de ganancias (gig economy) |
header Parameters
x-api-key | string Llave privada única por organización. Permite realizar peticiones en los ambientes Sandbox y Producción. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "message": null,
- "worker_information": {
- "account_id": "e28f45c2-b137-407c-9aed-adaac2765b36",
- "identifier": "email@gmail.com",
- "platform": "rappi",
- "country": "pe",
- "last_successful_connection": "2023-08-21T06:27:07.403566+00:00"
}, - "payment_capacity": {
- "median_weekly_income": 437.84000000000003,
- "average_days_worked_per_week": 6,
- "income_percentile": 84.38,
- "income_volatility": "above_average"
}, - "other_gig_accounts": [ ],
- "work_history": {
- "time_since_first_trip": null
}
}
}
Retrieve Widget
Returns the widget corresponding to the specified id.
path Parameters
widget_id required | string <uuid> required: Id of the widget to obtain |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "id": "8370b283-1he1-437b-953b-7bd51743fa56",
- "name": null,
- "company_id": "52y13fa2-a2a3-4166-a457-bs780c34iue2",
- "country": null,
- "platforms": [
- "imss",
- "cabify",
- "ninety_nine",
- "rappi",
- "issste",
- "uber"
], - "is_sandbox": false,
- "hide_logo": false,
- "hide_whatsapp": false,
- "hide_consent": false,
- "font_family": "",
- "primary_color": null,
- "border_radius": "",
- "custom_privacy_url": "",
- "whatsapp_number": "",
- "webhook_url": null,
- "countries": [
- "mx",
- "co",
- "pe"
], - "widget_type": "income_verification",
- "widget_internal_type": null
}
}
Update widget
Update widget.
Request Body schema: application/json
name | string Name of the widget |
countries | Array of strings Countries to display in the widget |
platforms | Array of strings Platforms to display in the widget |
require_gov_id | boolean Adds an extra step to request the Government ID (CURP, CPF, etc.) from the user |
hide_logo | boolean Hides the logo in the widget |
hide_whatsapp | boolean Hides the Whatsapp icon in the widget |
hide_consent | boolean Hides the consent screen in the widget |
font_family | string Font for modifying the text in the widget, must exist in Google Fonts |
primary_color | string Primary color to modify the widget in hexadecimal format (#FFFFFF) |
border_radius | string Defines the border radius for buttons and form fields (round, rounded, square) |
custom_privacy_url | string URL of the terms and conditions to display in the widget |
whatsapp_number | string Whatsapp number to receive messages from users |
Responses
Request samples
- Payload
{- "countries": [
- "mx",
- "br"
], - "platforms": [
- "imss",
- "carteira_trabalho"
], - "require_gov_id": false
}
Response samples
- 201
- 422
{- "success": true,
- "error": null,
- "data": {
- "id": "8370b283-1he1-437b-953b-7bd51743fa56",
- "name": null,
- "company_id": "52y13fa2-a2a3-4166-a457-bs780c34iue2",
- "country": null,
- "platforms": [
- "imss",
- "carteira_trabalho"
], - "is_sandbox": false,
- "hide_logo": false,
- "hide_whatsapp": false,
- "hide_consent": false,
- "font_family": "",
- "primary_color": null,
- "border_radius": "",
- "custom_privacy_url": "",
- "whatsapp_number": "",
- "webhook_url": null,
- "countries": [
- "mx",
- "br"
], - "widget_type": "income_verification",
- "widget_internal_type": null
}
}
List Widgets
Returns a list of registered widgets.
query Parameters
is_sandbox | boolean Default: false optional: Environment to which the widgets to be obtained correspond |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": [
- {
- "id": "8370b283-1he1-437b-953b-7bd51743fa56",
- "name": null,
- "company_id": "52y13fa2-a2a3-4166-a457-bs780c34iue2",
- "country": null,
- "platforms": [
- "imss",
- "cabify",
- "ninety_nine",
- "rappi",
- "issste",
- "uber"
], - "is_sandbox": false,
- "hide_logo": false,
- "hide_whatsapp": false,
- "hide_consent": false,
- "font_family": "",
- "primary_color": null,
- "border_radius": "",
- "custom_privacy_url": "",
- "whatsapp_number": "",
- "webhook_url": null,
- "countries": [
- "mx",
- "co",
- "pe"
], - "widget_type": "income_verification",
- "widget_internal_type": null
}, - {
- "id": "8370b283-1he1-437b-953b-7bd51743fa56",
- "name": null,
- "company_id": "52y13fa2-a2a3-4166-a457-bs780c34iue2",
- "country": null,
- "platforms": [
- "imss",
- "cabify",
- "noventa_nove",
- "rappi",
- "issste",
- "uber"
], - "is_sandbox": false,
- "hide_logo": false,
- "hide_whatsapp": false,
- "hide_consent": false,
- "font_family": "",
- "primary_color": null,
- "border_radius": "",
- "custom_privacy_url": "",
- "whatsapp_number": "",
- "webhook_url": null,
- "countries": [
- "mx",
- "co",
- "pe"
], - "widget_type": "income_verification",
- "widget_internal_type": null
}
]
}
Create widget
Create a new widget.
Request Body schema: application/json
name required | string required: Name of the widget |
countries required | Array of strings required: Countries to display in the widget |
platforms required | Array of strings required: Platforms to display in the widget |
is_sandbox required | boolean required: Environment of the widget (sandbox or production) |
require_gov_id | boolean Adds an extra step to request the Government ID (CURP, CPF, etc.) from the user |
Responses
Request samples
- Payload
{- "name": "My sandbox widget",
- "countries": [
- "mx",
- "br",
- "co"
], - "platforms": [
- "uber",
- "imss",
- "carteira_trabalho"
], - "is_sandbox": true,
- "require_gov_id": false
}
Response samples
- 201
- 422
{- "success": true,
- "error": null,
- "data": {
- "id": "8370b283-1he1-437b-953b-7bd51743fa56",
- "name": null,
- "company_id": "52y13fa2-a2a3-4166-a457-bs780c34iue2",
- "country": null,
- "platforms": [
- "imss",
- "uber",
- "carteira_trabalho"
], - "is_sandbox": false,
- "hide_logo": false,
- "hide_whatsapp": false,
- "hide_consent": false,
- "font_family": "",
- "primary_color": null,
- "border_radius": "",
- "custom_privacy_url": "",
- "whatsapp_number": "",
- "webhook_url": null,
- "countries": [
- "mx",
- "br",
- "co"
], - "widget_type": "income_verification",
- "widget_internal_type": null
}
}
Create Webhook
Registra un nuevo webhook. Para más información puedes consultar nuestra guía
header Parameters
x-api-key | string Llave privada única por organización. Permite realizar peticiones en los ambientes Sandbox y Producción. |
Request Body schema: application/json
url required | string required: webhook URL |
name | string required: Name to assign to the webhook |
widget_id required | string <uuid> required: Widget ID to which the webhook will be associated |
is_sandbox required | boolean required: Webhook environment (sandbox or production) |
sign_request | boolean Default: false optional: Parameter to define whether notifications to the webhook will be signed (hmac) |
Responses
Request samples
- Payload
{- "name": "My webhook",
- "is_sandbox": true,
- "sign_request": false,
- "widget_id": "b679c2fb-a096-4c26-a902-245f9bce66d9"
}
Response samples
- 201
- 422
{- "success": true,
- "error": null,
- "data": {
- "connect_flow_id": "01b12731-e175-45ef-81f5-a091719571cd",
- "webhook_id": "8a0812ue-1702-7634-a7e4-64063f5c5139",
- "name": "Test documentation",
- "widget_id": "01b12731-e175-45ef-81f5-a091719571cd",
- "is_sandbox": false,
- "is_active": true,
- "sign_request": false,
- "private_key": "ea284970a42e298b00222082d462"
}
}
Retrieve Webhook
Returns the webhook corresponding to the specified id.
path Parameters
webhook_id required | string <uuid> required: Id of the webhook to obtain |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "connect_flow_id": "01b12731-e175-45ef-81f5-a091719571cd",
- "webhook_id": "8a0812ue-1702-7634-a7e4-64063f5c5139",
- "name": "Test documentation",
- "widget_id": "01b12731-e175-45ef-81f5-a091719571cd",
- "is_sandbox": false,
- "is_active": true,
- "sign_request": false,
- "private_key": "ea284970a42e298b00222082d462"
}
}
Update Webhook
Updates the webhook corresponding to the specified id.
path Parameters
webhook_id required | string <uuid> required: Id of the webhook to update |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Request Body schema: application/json
url | string opcional: URL del webhook |
name | string opcional: Nombre a asignar al webhook |
widget_id | string <uuid> opcional: Widget ID al que estará asociado el webhook |
is_sandbox | boolean opcional: Entorno del webhook (sandbox o producción) |
sign_request | boolean opcional: Parámetro para definir si las notificaciones al webhook estarán firmadas (hmac) |
is_active | boolean opcional: Parámetro para activar o desactivar el webhook |
Responses
Request samples
- Payload
{- "name": "My webhook",
- "is_sandbox": true,
- "is_active": true,
- "sign_request": false,
- "widget_id": "b679c2fb-a096-4c26-a902-245f9bce66d9"
}
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "connect_flow_id": "01b12731-e175-45ef-81f5-a091719571cd",
- "webhook_id": "8a0812ue-1702-7634-a7e4-64063f5c5139",
- "name": "Test documentation",
- "widget_id": "01b12731-e175-45ef-81f5-a091719571cd",
- "is_sandbox": false,
- "is_active": true,
- "sign_request": false,
- "private_key": "ea284970a42e298b00222082d462"
}
}
Delete Webhook
Elimina el webhook correspondiente al id especificado.
path Parameters
webhook_id required | string <uuid> requerido: Id del webhook a eliminar |
header Parameters
x-api-key | string Llave privada única por organización. Permite realizar peticiones en los ambientes Sandbox y Producción. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": null
}
Retrieve Consents by Government ID
Returns the consents corresponding to the specified Government ID.
path Parameters
gov_id required | string The Government ID to retrieve consents. |
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Responses
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": {
- "gov_id": "12845736900",
- "consents": [
- {
- "account_id": "f31b4a17-91e3-497f-87fd-231b7d345678",
- "company_id": "87e9e85b-4eef-4d0a-a03a-577699398c86",
- "widget_id": "7f93c1e2-4e3b-456f-b89d-90b7d8f01234",
- "user_id": "87e9e85b-4eef-4d0a-a03a-577699398c86",
- "ip_address": "192.168.1.101",
- "timestamp": "2024-08-21T22:37:25.003Z",
- "consent_method": "tap_continue_button",
- "consent_language": "en",
- "country": "br",
- "platform": "carteira_de_trabalho",
- "company_name": "Palenca",
- "browser": "Mobile Safari 16.0",
- "device": "iOS 16.0",
- "created_at": "2024-08-21T22:37:25.647157+00:00"
}, - {
- "account_id": "da2e749e-5f89-4aab-aef1-20e7e4f9c3ac",
- "company_id": "87e9e85b-4eef-4d0a-a03a-577699398c86",
- "widget_id": "7f93c1e2-4e3b-456f-b89d-90b7d8f01234",
- "user_id": "28134d5e-ac20-49aa-85f0-3afe2a6b9ed3",
- "ip_address": "192.168.3.101",
- "timestamp": "2024-08-22T13:45:25.003Z",
- "consent_method": "tap_continue_button",
- "consent_language": "en",
- "country": "br",
- "platform": "carteira_de_trabalho",
- "company_name": "Palenca",
- "browser": "Mobile Safari 16.0",
- "device": "iOS 16.0",
- "created_at": "2024-08-22T13:45:25.647157+00:00"
}
]
}
}
Search Consents
Searches for consents within a specified date range with pagination options.
header Parameters
x-api-key | string Unique private key per organization. Allows requests to be made in Sandbox and Production environments. |
Request Body schema: application/json
start_date | string <date> |
end_date | string <date> |
object |
Responses
Request samples
- Payload
{- "start_date": "2020-08-03",
- "end_date": "2025-07-03",
- "options": {
- "items_per_page": 10,
- "page": 1
}
}
Response samples
- 200
- 422
{- "success": true,
- "error": null,
- "data": [
- {
- "account_id": "f31b4a17-91e3-497f-87fd-231b7d345678",
- "company_id": "87e9e85b-4eef-4d0a-a03a-577699398c86",
- "widget_id": "7f93c1e2-4e3b-456f-b89d-90b7d8f01234",
- "user_id": "87e9e85b-4eef-4d0a-a03a-577699398c86",
- "ip_address": "192.168.1.101",
- "timestamp": "2024-08-21T22:37:25.003Z",
- "consent_method": "tap_continue_button",
- "consent_language": "en",
- "country": "br",
- "platform": "carteira_de_trabalho",
- "company_name": "Palenca",
- "browser": "Mobile Safari 16.0",
- "device": "iOS 16.0",
- "created_at": "2024-08-21T22:37:25.647157+00:00"
}, - {
- "account_id": "da2e749e-5f89-4aab-aef1-20e7e4f9c3ac",
- "company_id": "87e9e85b-4eef-4d0a-a03a-577699398c86",
- "widget_id": "7f93c1e2-4e3b-456f-b89d-90b7d8f01234",
- "user_id": "28134d5e-ac20-49aa-85f0-3afe2a6b9ed3",
- "ip_address": "192.168.3.101",
- "timestamp": "2024-08-22T13:45:25.003Z",
- "consent_method": "tap_continue_button",
- "consent_language": "en",
- "country": "br",
- "platform": "carteira_de_trabalho",
- "company_name": "Palenca",
- "browser": "Mobile Safari 16.0",
- "device": "iOS 16.0",
- "created_at": "2024-08-22T13:45:25.647157+00:00"
}
]
}