Looking for the previous documentation?Go to v1.docs.pluggy.ai
POST/categorize

Categorize

Limitations#

The transactions list can contain up to 5000 elements to be categorized per request. If you need to categorize more than 5000 transactions, split them into multiple requests.

Requests are limited to 600 per minute per application, shared with the other Enrichment API endpoints. Over the limit the API answers 429 with a Retry-After header. See Rate limits.

Request Body

object
clientUserIdstring

identifier for the user (ie. email or cpf)

isBusinessboolean

If the holder is a Business, if not is a Person.

Default: false

accountTypestring

Type of the account holder of the transactions

CHECKINGCREDIT_CARD

Default: "CHECKING"

transactionsobject[]

Transactions to enrich, max 5000

itemsobject

Example

json
{
  "clientUserId": "string",
  "isBusiness": false,
  "accountType": "CHECKING",
  "transactions": [
    {
      "id": "string",
      "description": "string",
      "type": "CREDIT",
      "amount": 0,
      "date": "string",
      "paymentData": {
        "paymentMethod": "string",
        "reason": "string",
        "payer": {
          "name": "string",
          "accountNumber": "string",
          "branchNumber": "string",
          "routingNumber": "string",
          "documentNumber": {
            "type": "CPF",
            "value": "string"
          }
        },
        "receiver": {
          "name": "string",
          "accountNumber": "string",
          "branchNumber": "string",
          "routingNumber": "string",
          "documentNumber": {
            "type": "CPF",
            "value": "string"
          }
        }
      },
      "creditCardMetadata": {
        "payeeMCC": "string"
      }
    }
  ]
}

Responses

200200
object
resultsobject[]
itemsobject

Example response

json
{
  "results": [
    {
      "id": "12345",
      "date": "2022-05-01T00:00:00.000Z",
      "description": "Mc Donalds",
      "type": "DEBIT",
      "amount": 100,
      "category": "Eating out",
      "merchant": {
        "name": "mc donalds",
        "businessName": "ARCOS DOURADOS COMERCIO DE ALIMENTOS LTDA",
        "cnpj": "44.444.444/0001-44"
      }
    }
  ]
}
curl -X POST \
'https://enrichment-api.pluggy.ai/categorize' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY' \
-d '{ "clientUserId": "string", "isBusiness": false, "accountType": "CHECKING", "transactions": [ { "id": "string", "description": "string", "type": "CREDIT", "amount": 0, "date": "string", "paymentData": { "paymentMethod": "string", "reason": "string", "payer": { "name": "string", "accountNumber": "string", "branchNumber": "string", "routingNumber": "string", "documentNumber": { "type": "CPF", "value": "string" } }, "receiver": { "name": "string", "accountNumber": "string", "branchNumber": "string", "routingNumber": "string", "documentNumber": { "type": "CPF", "value": "string" } } }, "creditCardMetadata": { "payeeMCC": "string" } } ] }'
Sample response
{
"results": [
{
"id": "12345",
"date": "2022-05-01T00:00:00.000Z",
"description": "Mc Donalds",
"type": "DEBIT",
"amount": 100,
"category": "Eating out",
"merchant": {
"name": "mc donalds",
"businessName": "ARCOS DOURADOS COMERCIO DE ALIMENTOS LTDA",
"cnpj": "44.444.444/0001-44"
}
}
]
}