---
updatedAt: 2025-03-13T22:48:45.000Z
agentTools:
  projectIndex: https://developers.palenca.com/llms.txt
---

# Retrieve payment history of a Carteira de Trabalho account

Returns a paginated list of the payment records of a CDT account.

 

# OpenAPI definition

```json
{
  "openapi": "3.0.2",
  "info": {
    "title": "Palenca API",
    "description": "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.\n\n 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.\n\n We have 2 environments: Sandbox and Production.\n\n **Sandbox**: https://sandbox.palenca.com/v1\n\n **Production**: https://api.palenca.com/v1 \n\n Before joining, we recommend that you familiarize yourself with the [Entities](/docs/v2/Guides/ApiConcepts/Entities) that we manage in Palenca (Users, Accounts, Logins)",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.palenca.com/",
      "description": "Production server (uses live data)"
    },
    {
      "url": "https://sandbox.palenca.com/",
      "description": "Sandbox server (uses test data) "
    }
  ],
  "x-tagGroups": [
    {
      "name": "Account and Login Management",
      "tags": [
        "Users",
        "Accounts",
        "Logins"
      ]
    },
    {
      "name": "Profile Information",
      "tags": [
        "Profile"
      ]
    },
    {
      "name": "Employment information",
      "tags": [
        "Employment Mexico",
        "Employment Brazil"
      ]
    },
    {
      "name": "Earnings information",
      "tags": [
        "Gig earnings",
        "CDT earnings"
      ]
    },
    {
      "name": "Other tools",
      "tags": [
        "Widgets",
        "Webhooks",
        "Consents"
      ]
    }
  ],
  "paths": {
    "/v1/accounts/{account_id}/earnings/search/": {
      "post": {
        "tags": [
          "CDT earnings"
        ],
        "summary": "Retrieve payment history of a Carteira de Trabalho account",
        "operationId": "retrieve_account_gig_earnings_v1_accounts__account_id__earnings_search_post",
        "description": "Returns a paginated list of the payment records of a CDT account.\n\n ",
        "parameters": [
          {
            "required": true,
            "schema": {
              "title": "Account Id",
              "type": "string",
              "format": "uuid"
            },
            "name": "account_id",
            "in": "path"
          },
          {
            "required": false,
            "schema": {
              "title": "X-Api-Key",
              "description": "You can find your API Keys in https://console.palenca.com/developers/api",
              "type": "string"
            },
            "name": "x-api-key",
            "in": "header"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchEarningsParams"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasePaginationResponse_EarningsDataBaseResponse_"
                },
                "examples": {
                  "carteira_trabalho": {
                    "value": {
                      "success": true,
                      "error": null,
                      "data": {
                        "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
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "BasePaginationResponse_EarningsDataBaseResponse_": {
        "title": "BasePaginationResponse[EarningsDataBaseResponse]",
        "required": [
          "success"
        ],
        "type": "object",
        "properties": {
          "success": {
            "title": "Success",
            "type": "boolean"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorResponse"
          },
          "data": {
            "$ref": "#/components/schemas/EarningsDataBaseResponse"
          },
          "pagination": {
            "$ref": "#/components/schemas/PaginationBaseResponse"
          }
        },
        "example": {
          "success": true,
          "data": {},
          "error": {},
          "pagination": {}
        }
      },
      "CurrencyCode": {
        "title": "CurrencyCode",
        "enum": [
          "mxn",
          "usd",
          "cop",
          "clp",
          "ars",
          "pen",
          "brl",
          "crc",
          "pab",
          "bob",
          "you see",
          "dop"
        ],
        "description": "An enumeration."
      },
      "EarningsBaseResponse": {
        "title": "EarningsBaseResponse",
        "type": "object",
        "properties": {
          "amount": {
            "title": "Amount",
            "type": "number"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode"
          },
          "earning_date": {
            "title": "Earning Date",
            "type": "string",
            "format": "date"
          },
          "cash_amount": {
            "title": "Cash Amount",
            "type": "number"
          },
          "count_trips": {
            "title": "Count Trips",
            "type": "integer"
          }
        }
      },
      "EarningsDataBaseResponse": {
        "title": "EarningsDataBaseResponse",
        "required": [
          "account_id"
        ],
        "type": "object",
        "properties": {
          "account_id": {
            "title": "Account Id",
            "type": "string",
            "format": "uuid"
          },
          "earnings": {
            "title": "Earnings",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EarningsBaseResponse"
            }
          }
        }
      },
      "ErrorDetailResponse": {
        "title": "ErrorDetailResponse",
        "type": "object",
        "properties": {
          "message": {
            "title": "Message",
            "type": "string"
          },
          "location": {
            "title": "Location",
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "title": "ErrorResponse",
        "type": "object",
        "properties": {
          "code": {
            "title": "Code",
            "type": "string"
          },
          "message": {
            "title": "Message",
            "type": "string"
          },
          "errors": {
            "title": "Errors",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ErrorDetailResponse"
            }
          }
        }
      },
      "OptionsSearchParams": {
        "title": "OptionsSearchParams",
        "type": "object",
        "properties": {
          "items_per_page": {
            "title": "Items Per Page",
            "type": "integer",
            "default": 100
          },
          "page": {
            "title": "Page",
            "type": "integer",
            "default": 1
          }
        }
      },
      "PaginationBaseResponse": {
        "title": "PaginationBaseResponse",
        "type": "object",
        "properties": {
          "page": {
            "title": "Page",
            "type": "integer"
          },
          "items_per_page": {
            "title": "Items Per Page",
            "type": "integer"
          },
          "total_items": {
            "title": "Total Items",
            "type": "integer"
          },
          "total_pages": {
            "title": "Total Pages",
            "type": "integer"
          }
        }
      },
      "SearchEarningsParams": {
        "title": "SearchEarningsParams",
        "required": [
          "start_date",
          "end_date"
        ],
        "type": "object",
        "properties": {
          "start_date": {
            "title": "Start Date",
            "type": "string",
            "description": "Start date of the search in YYYY-MM-DD format"
          },
          "end_date": {
            "title": "End Date",
            "type": "string",
            "description": "End date of the search in YYYY-MM-DD format"
          },
          "options": {
            "title": "Options",
            "description": "Pagination options",
            "allOf": [
              {
                "$ref": "#/components/schemas/OptionsSearchParams"
              }
            ],
            "default": {
              "items_per_page": 100,
              "page": 1
            }
          }
        }
      }
    }
  }
}
```