메인 콘텐츠로 건너뛰기

재사용 가능한 문서 조회

이 엔드포인트를 사용하여 새로운 문서 캡처 흐름을 시작하기 전에 사용자가 이미 재사용 가능한 문서를 보유하고 있는지 확인하세요. 문서가 발견되면, 해당 documentIdPOST /processes/v1 (Document 유형)에 직접 전달하여 캡처 단계를 건너뛸 수 있습니다.

엔드포인트

환경URL
프로덕션GET https://api.id.unico.app/documents/v1
샌드박스GET https://api.id.uat.unico.app/documents/v1

요청

헤더
헤더
AuthorizationBearer <access_token> (인증 참조)
APIKEY문서 캡처 및 재사용이 활성화된 프로비저닝된 API 키.
쿼리 파라미터
파라미터유형필수설명
codestring사용자 식별자 (서식 없는 CPF 또는 CURP).
typestring조회할 문서 유형. 허용되는 값: BR_RG, BR_CNH, BR_CIN, BR_PASSPORT.
참고

위의 type 값은 이 엔드포인트에 특화된 것입니다. 다음과 혼동하지 마세요:

  • POST 요청의 subject.duiTypeDUI_TYPE_* 접두사를 사용하며, 문서 유형이 아닌 사람을 식별합니다 (예: DUI_TYPE_BR_CPF).
  • 응답의 documentType — 전체 레지스트리 경로를 사용합니다 (예: unico.moja.dictionary.br.cnh.v2.Cnh).

예시

curl -X GET "https://api.id.unico.app/documents/v1?code=12345678909&type=BR_CNH" \
-H "Authorization: Bearer $TOKEN" \
-H "APIKEY: $API_KEY"

응답

200 OK
{
"items": [
{
"documentType": "unico.moja.dictionary.br.cnh.v2.Cnh",
"documentId": "doc-abc-123"
}
]
}
필드유형설명
itemsarray사용자에게서 발견된 재사용 가능한 문서 목록. 제공된 codetype에 대해 재사용 가능한 문서가 없으면 빈 배열.
items[].documentTypestring문서 유형 식별자. 가능한 값: unico.moja.dictionary.br.rg.v2.Rg, unico.moja.dictionary.br.cnh.v2.Cnh, unico.moja.dictionary.br.cin.v1.Cin, unico.moja.dictionary.br.passaporte.v1.Passaporte.
items[].documentIdstring문서 식별자. 문서를 재사용하려면 POST /processes/v1document.documentId에 이 값을 전달하세요.
403 Forbidden

Bearer 토큰 또는 APIKEY가 누락되었거나, 만료되었거나, 유효하지 않습니다.

429 Too Many Requests

요청 속도 제한에 도달했습니다. Retry-After 응답 헤더에 표시된 간격 후에 다시 시도하세요. 속도 제한을 참조하세요.

documentId를 재사용에 활용하기

documentId를 획득하면, 캡처를 건너뛰기 위해 Document 프로세스 요청에 전달하세요:

{
"subject": {
"code": "12345678909",
"name": "Luke Skywalker"
},
"document": {
"purpose": "onboarding",
"authProcessId": "<biometric-process-id>",
"documentId": "doc-abc-123"
}
}
필드설명
document.purpose이 문서 프로세스의 비즈니스 목적. 허용되는 값: creditprocess, carpurchase, paybypaycheck, onboarding, fgts. 이 값들은 Document API에 특화되어 있으며 생체인식 SDK의 purpose 열거형과 다릅니다.
document.authProcessId이 사용자를 위해 이전에 생성된 생체인식 프로세스의 ID (POST /processes/v1에서).
document.documentId이 엔드포인트의 응답에서 얻은 문서 ID. 제공되면 document.files를 생략할 수 있으며 플랫폼이 이전에 캡처된 문서를 자동으로 가져옵니다.

전체 Document 프로세스 요청 스키마는 문서 프로세스 생성을 참조하세요.

오류 코드

코드메시지설명
20507O parâmetro subject.code é inválido.잘못된 형식이거나 존재하지 않는 식별자 값 (CPF 또는 CURP).
20002O parâmetro APIKey não foi informado.APIKEY 헤더 누락.
20001O parâmetro authtoken não foi informado.인증 토큰 헤더 누락.