---
agentTools:
  projectIndex: https://docs.boostr.cl/llms.txt
---

# 🔐 AFP

Permite saber si la persona está afiliada a una AFP

> 📘 Este servicio requiere usar un API KEY
>
> [Pídela aquí](https://docs.boostr.cl/reference/pricing)

Este servicio permite buscar en la Superintendencia de Pensiones si el RUT indicado está inscrito en alguna AFP, el nombre de está y la fecha de afiliación.

El RUT puede venir en formato:

* 111111111
* 11111111-1
* 11.111.111-1

El dígito verificador es obligatorio, si no lo conoce puede obtenerlo utilizando nuestro [generador de dígito verificador.](https://docs.boostr.cl/reference/rut-genera-dv)

***

#### Beta

Este servicio está en la categoría beta y podría sufrir cambios sin previo aviso, por lo que se recomienda consultar diariamente la documentación.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.boostr.cl/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "name": "X-API-KEY",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/rut/afp/{rut}.json": {
      "get": {
        "summary": "🔐 AFP",
        "description": "Permite saber si la persona está afiliada a una AFP",
        "operationId": "rut-get-afp",
        "parameters": [
          {
            "name": "rut",
            "in": "path",
            "description": "RUT para buscar.",
            "schema": {
              "type": "string",
              "default": "16.163.631-2"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"status\": \"success\",\n\t\"data\": {\n\t\t\"fullname\": \"GABRIEL BORIC FONT\",\n\t\t\"document_number\": 16163631,\n\t\t\"dv\": \"2\",\n\t\t\"afp\": \"AFP MODELO\",\n\t\t\"afp_date\": \"2014-03-01\"\n\t}\n}"
                  },
                  "Rut inválido": {
                    "value": "{\n  \"status\": \"error\",\n  \"data\": \"\",\n  \"code\": \"U-02\",\n  \"message\": \"Rut inválido\"\n}"
                  },
                  "Origen offline": {
                    "value": "{\n  \"status\": \"error\",\n  \"data\": \"\",\n  \"code\": \"U-10\",\n  \"message\": \"No se logró obtener información desde el origen.\"\n}"
                  },
                  "Rut not found": {
                    "value": "{\n  \"status\": \"error\",\n  \"data\": \"\",\n  \"code\": \"U-11\",\n  \"message\": \"El RUT ingresado no posee AFP registrada.\"\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "success"
                        },
                        "data": {
                          "type": "object",
                          "properties": {
                            "fullname": {
                              "type": "string",
                              "example": "GABRIEL BORIC FONT"
                            },
                            "document_number": {
                              "type": "integer",
                              "example": 16163631,
                              "default": 0
                            },
                            "dv": {
                              "type": "string",
                              "example": "2"
                            },
                            "afp": {
                              "type": "string",
                              "example": "AFP MODELO"
                            },
                            "afp_date": {
                              "type": "string",
                              "example": "2014-03-01"
                            }
                          }
                        }
                      }
                    },
                    {
                      "title": "Rut inválido",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "error"
                        },
                        "data": {
                          "type": "string",
                          "example": ""
                        },
                        "code": {
                          "type": "string",
                          "example": "U-02"
                        },
                        "message": {
                          "type": "string",
                          "example": "Rut inválido"
                        }
                      }
                    },
                    {
                      "title": "Origen offline",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "error"
                        },
                        "data": {
                          "type": "string",
                          "example": ""
                        },
                        "code": {
                          "type": "string",
                          "example": "U-10"
                        },
                        "message": {
                          "type": "string",
                          "example": "No se logró obtener información desde el origen."
                        }
                      }
                    },
                    {
                      "title": "Rut not found",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "example": "error"
                        },
                        "data": {
                          "type": "string",
                          "example": ""
                        },
                        "code": {
                          "type": "string",
                          "example": "U-11"
                        },
                        "message": {
                          "type": "string",
                          "example": "El RUT ingresado no posee AFP registrada."
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "401",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"error\",\n  \"data\": \"\",\n  \"code\": \"U-06\",\n  \"message\": \"No tiene permiso a este servicio\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "error"
                    },
                    "data": {
                      "type": "string",
                      "example": ""
                    },
                    "code": {
                      "type": "string",
                      "example": "U-06"
                    },
                    "message": {
                      "type": "string",
                      "example": "No tiene permiso a este servicio"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "429",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"error\",\n  \"data\": \"\",\n  \"code\": \"RATELIMIT\",\n  \"message\": \"429 Too Many Request\",\n  \"details\": \"Superaste el límite máximo permitido.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "error"
                    },
                    "data": {
                      "type": "string",
                      "example": ""
                    },
                    "code": {
                      "type": "string",
                      "example": "RATELIMIT"
                    },
                    "message": {
                      "type": "string",
                      "example": "429 Too Many Request"
                    },
                    "details": {
                      "type": "string",
                      "example": "Superaste el límite máximo permitido."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": false
  },
  "x-readme-fauxas": true,
  "_id": "654e7dc803529d00186e828b:68f6f794831a2d22a92137aa"
}
```