Clave Única (v1.0)

Download OpenAPI description
Overview
Languages
Servers
Production

https://api.khipu.com/

Account Link

Request

Éste metodo conecta a la cuenta del usuario en Clave Única, el sitio de identidad digital ofrecido por el gobierno chileno, y retorna un token vinculado a esa cuenta que puede ser usado en operaciones futuras, incluyendo otros servicios que requieren autenticación Clave Única.

Security
JWT or Api-Key
Bodyapplication/jsonRequerido
Usernamestring[ 1 .. 12 ] charactersrequerido

Identificación de usuario con acceso a la cuenta de Clave Única (RUN).

Ejemplo: "11.111.111-1"
Passwordstring>= 7 charactersrequerido

Contraseña de la cuenta para el sitio web de Clave Única.

Ejemplo: "wxyz1234!@#$"
curl -i -X POST \
  https://api.khipu.com/v1/cl/services/claveunica.cl/token \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "Username": "11.111.111-1",
    "Password": "wxyz1234!@#$"
  }'

Responses

Operación exitosa. Retorna un objeto JSON con los datos solicitados en el campo Data.

Bodyapplication/json
OperationIdstring<= 36 charactersrequerido

Unique identifier of the operation.

Ejemplo: "6baf6c19-e485-463b-ae24-a821b025c8a4"
Statusstringrequerido

Operation status, "OK" meaning that the credentials were correct and the account link was generated.

Value"OK"
Ejemplo: "OK"
Dataobjectrequerido

If the authentication challenge was successful, it includes the link for the account.

AccountLinkstringrequerido

Token generated to access the service account.

Ejemplo: "dFyRCVYNM0aGb1LSR/0B8e+eSVr1Zf1xj9YHmMVoiZWk28XtWEyIxEbGXnr1EdvS+QBPzjweau7tbf5QlDv97IQ2jwfUB=="
AdditionalInformationstring or nullrequerido

This field can be used to display relevant information specific to the response, for instance indicating that the Data field is incomplete.

Ejemplo: null
Errorobject or nullrequerido

Object with the error details, used when Status=ERROR. If Status=OK this field will be null. You can read a complete explanation of this object visiting this link Objeto con los detalles del error, utilizado cuando Status=ERROR. Si Status=OK este campo será nulo. Puede leer una explicación completa de este objeto visitando este enlace

Ejemplo: null
Codestring

Código interno del sistema que identifica el error.

Ejemplo: "E201"
Typestring

Indica cómo tratar este código de error específico, en función del tipo de error.

Enum"RETRY_IMMEDIATELY""DO_NOT_RETRY""WAIT_4_HOURS_BEFORE_RETRY""RETRY_AFTER_NOTIFICATION"
Ejemplo: "RETRY_IMMEDIATELY"
Descriptionstring

Descripción asociada al código de error.

Ejemplo: "El servicio destino utilizado para la extracción de datos no se encuentra disponible."
LifeSpanstring or nullrequerido

null in sync requests.

Ejemplo: null
Response
application/json
{ "OperationId": "6baf6c19-e485-463b-ae24-a821b025c8a4", "Status": "OK", "Data": { "AccountLink": "dFyRCVYNM0aGb1LSR/0B8e+eSVr1Zf1xj9YHmMVoiZWk28XtWEyIxEbGXnr1EdvS+QBPzjweau7tbf5QlDv97IQ2jwfUB==" }, "AdditionalInformation": null, "Error": null, "LifeSpan": null }