# ID,Address Document Proof

## POST /document-proof/id-documents/

> Create Id Document

```json
{"openapi":"3.1.0","info":{"title":"BeetleLabs","version":"1.0.0"},"servers":[{"url":"https://beetlelabs.ai/beetlelabs-verification","description":"Local development server"}],"paths":{"/document-proof/id-documents/":{"post":{"tags":["ID,Address Document Proof"],"summary":"Create Id Document","operationId":"create_id_document_document_proof_id_documents__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDDocumentCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"IDDocumentCreate":{"properties":{"document_type":{"$ref":"#/components/schemas/DocumentType"},"document_number":{"type":"string","title":"Document Number"},"full_name":{"type":"string","title":"Full Name"},"date_of_birth":{"type":"string","format":"date","title":"Date Of Birth"},"expiry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiry Date"},"nationality":{"type":"string","title":"Nationality"},"front_image_url":{"type":"string","title":"Front Image Url"},"back_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Back Image Url"},"session_id":{"type":"string","format":"uuid4","title":"Session Id"}},"type":"object","required":["document_type","document_number","full_name","date_of_birth","nationality","front_image_url","session_id"],"title":"IDDocumentCreate"},"DocumentType":{"type":"string","enum":["PASSPORT","NRIC","DRIVING_LICENSE","AADHAAR","PAN","BANK_STATEMENT","UTILITY_BILL"],"title":"DocumentType"},"IDDocumentResponse":{"properties":{"document_type":{"$ref":"#/components/schemas/DocumentType"},"document_number":{"type":"string","title":"Document Number"},"full_name":{"type":"string","title":"Full Name"},"date_of_birth":{"type":"string","format":"date","title":"Date Of Birth"},"expiry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiry Date"},"nationality":{"type":"string","title":"Nationality"},"front_image_url":{"type":"string","title":"Front Image Url"},"back_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Back Image Url"},"id":{"type":"string","format":"uuid4","title":"Id"},"session_id":{"type":"string","format":"uuid4","title":"Session Id"},"verified":{"type":"boolean","title":"Verified"},"uploaded_at":{"type":"string","format":"date-time","title":"Uploaded At"}},"type":"object","required":["document_type","document_number","full_name","date_of_birth","nationality","front_image_url","id","session_id","verified","uploaded_at"],"title":"IDDocumentResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## GET /document-proof/id-documents/{document\_id}

> Get Id Document

```json
{"openapi":"3.1.0","info":{"title":"BeetleLabs","version":"1.0.0"},"servers":[{"url":"https://beetlelabs.ai/beetlelabs-verification","description":"Local development server"}],"paths":{"/document-proof/id-documents/{document_id}":{"get":{"tags":["ID,Address Document Proof"],"summary":"Get Id Document","operationId":"get_id_document_document_proof_id_documents__document_id__get","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"IDDocumentResponse":{"properties":{"document_type":{"$ref":"#/components/schemas/DocumentType"},"document_number":{"type":"string","title":"Document Number"},"full_name":{"type":"string","title":"Full Name"},"date_of_birth":{"type":"string","format":"date","title":"Date Of Birth"},"expiry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiry Date"},"nationality":{"type":"string","title":"Nationality"},"front_image_url":{"type":"string","title":"Front Image Url"},"back_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Back Image Url"},"id":{"type":"string","format":"uuid4","title":"Id"},"session_id":{"type":"string","format":"uuid4","title":"Session Id"},"verified":{"type":"boolean","title":"Verified"},"uploaded_at":{"type":"string","format":"date-time","title":"Uploaded At"}},"type":"object","required":["document_type","document_number","full_name","date_of_birth","nationality","front_image_url","id","session_id","verified","uploaded_at"],"title":"IDDocumentResponse"},"DocumentType":{"type":"string","enum":["PASSPORT","NRIC","DRIVING_LICENSE","AADHAAR","PAN","BANK_STATEMENT","UTILITY_BILL"],"title":"DocumentType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## PATCH /document-proof/id-documents/{document\_id}

> Update Id Document

```json
{"openapi":"3.1.0","info":{"title":"BeetleLabs","version":"1.0.0"},"servers":[{"url":"https://beetlelabs.ai/beetlelabs-verification","description":"Local development server"}],"paths":{"/document-proof/id-documents/{document_id}":{"patch":{"tags":["ID,Address Document Proof"],"summary":"Update Id Document","operationId":"update_id_document_document_proof_id_documents__document_id__patch","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDDocumentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"IDDocumentUpdate":{"properties":{"verified":{"type":"boolean","title":"Verified"},"verification_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verification Notes"}},"type":"object","required":["verified","verification_notes"],"title":"IDDocumentUpdate"},"IDDocumentResponse":{"properties":{"document_type":{"$ref":"#/components/schemas/DocumentType"},"document_number":{"type":"string","title":"Document Number"},"full_name":{"type":"string","title":"Full Name"},"date_of_birth":{"type":"string","format":"date","title":"Date Of Birth"},"expiry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiry Date"},"nationality":{"type":"string","title":"Nationality"},"front_image_url":{"type":"string","title":"Front Image Url"},"back_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Back Image Url"},"id":{"type":"string","format":"uuid4","title":"Id"},"session_id":{"type":"string","format":"uuid4","title":"Session Id"},"verified":{"type":"boolean","title":"Verified"},"uploaded_at":{"type":"string","format":"date-time","title":"Uploaded At"}},"type":"object","required":["document_type","document_number","full_name","date_of_birth","nationality","front_image_url","id","session_id","verified","uploaded_at"],"title":"IDDocumentResponse"},"DocumentType":{"type":"string","enum":["PASSPORT","NRIC","DRIVING_LICENSE","AADHAAR","PAN","BANK_STATEMENT","UTILITY_BILL"],"title":"DocumentType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## GET /document-proof/sessions/{session\_id}/id-document

> Get Session Id Document

```json
{"openapi":"3.1.0","info":{"title":"BeetleLabs","version":"1.0.0"},"servers":[{"url":"https://beetlelabs.ai/beetlelabs-verification","description":"Local development server"}],"paths":{"/document-proof/sessions/{session_id}/id-document":{"get":{"tags":["ID,Address Document Proof"],"summary":"Get Session Id Document","operationId":"get_session_id_document_document_proof_sessions__session_id__id_document_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IDDocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"IDDocumentResponse":{"properties":{"document_type":{"$ref":"#/components/schemas/DocumentType"},"document_number":{"type":"string","title":"Document Number"},"full_name":{"type":"string","title":"Full Name"},"date_of_birth":{"type":"string","format":"date","title":"Date Of Birth"},"expiry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiry Date"},"nationality":{"type":"string","title":"Nationality"},"front_image_url":{"type":"string","title":"Front Image Url"},"back_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Back Image Url"},"id":{"type":"string","format":"uuid4","title":"Id"},"session_id":{"type":"string","format":"uuid4","title":"Session Id"},"verified":{"type":"boolean","title":"Verified"},"uploaded_at":{"type":"string","format":"date-time","title":"Uploaded At"}},"type":"object","required":["document_type","document_number","full_name","date_of_birth","nationality","front_image_url","id","session_id","verified","uploaded_at"],"title":"IDDocumentResponse"},"DocumentType":{"type":"string","enum":["PASSPORT","NRIC","DRIVING_LICENSE","AADHAAR","PAN","BANK_STATEMENT","UTILITY_BILL"],"title":"DocumentType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## POST /document-proof/address-proofs/

> Create Address Proof

```json
{"openapi":"3.1.0","info":{"title":"BeetleLabs","version":"1.0.0"},"servers":[{"url":"https://beetlelabs.ai/beetlelabs-verification","description":"Local development server"}],"paths":{"/document-proof/address-proofs/":{"post":{"tags":["ID,Address Document Proof"],"summary":"Create Address Proof","operationId":"create_address_proof_document_proof_address_proofs__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressProofCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressProofResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddressProofCreate":{"properties":{"document_type":{"$ref":"#/components/schemas/DocumentType"},"document_url":{"type":"string","title":"Document Url"},"address":{"type":"string","title":"Address"},"address_type":{"anyOf":[{"$ref":"#/components/schemas/AddressType"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"session_id":{"type":"string","format":"uuid4","title":"Session Id"}},"type":"object","required":["document_type","document_url","address","session_id"],"title":"AddressProofCreate"},"DocumentType":{"type":"string","enum":["PASSPORT","NRIC","DRIVING_LICENSE","AADHAAR","PAN","BANK_STATEMENT","UTILITY_BILL"],"title":"DocumentType"},"AddressType":{"type":"string","enum":["Residential","Business"],"title":"AddressType"},"AddressProofResponse":{"properties":{"document_type":{"$ref":"#/components/schemas/DocumentType"},"document_url":{"type":"string","title":"Document Url"},"address":{"type":"string","title":"Address"},"address_type":{"anyOf":[{"$ref":"#/components/schemas/AddressType"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"id":{"type":"string","format":"uuid4","title":"Id"},"session_id":{"type":"string","format":"uuid4","title":"Session Id"},"is_primary":{"type":"boolean","title":"Is Primary"},"verified":{"type":"boolean","title":"Verified"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["document_type","document_url","address","id","session_id","is_primary","verified","created_at"],"title":"AddressProofResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```

## GET /document-proof/sessions/{session\_id}/address-proofs

> Get Session Address Proofs

```json
{"openapi":"3.1.0","info":{"title":"BeetleLabs","version":"1.0.0"},"servers":[{"url":"https://beetlelabs.ai/beetlelabs-verification","description":"Local development server"}],"paths":{"/document-proof/sessions/{session_id}/address-proofs":{"get":{"tags":["ID,Address Document Proof"],"summary":"Get Session Address Proofs","operationId":"get_session_address_proofs_document_proof_sessions__session_id__address_proofs_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AddressProofResponse"},"title":"Response Get Session Address Proofs Document Proof Sessions  Session Id  Address Proofs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddressProofResponse":{"properties":{"document_type":{"$ref":"#/components/schemas/DocumentType"},"document_url":{"type":"string","title":"Document Url"},"address":{"type":"string","title":"Address"},"address_type":{"anyOf":[{"$ref":"#/components/schemas/AddressType"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"id":{"type":"string","format":"uuid4","title":"Id"},"session_id":{"type":"string","format":"uuid4","title":"Session Id"},"is_primary":{"type":"boolean","title":"Is Primary"},"verified":{"type":"boolean","title":"Verified"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["document_type","document_url","address","id","session_id","is_primary","verified","created_at"],"title":"AddressProofResponse"},"DocumentType":{"type":"string","enum":["PASSPORT","NRIC","DRIVING_LICENSE","AADHAAR","PAN","BANK_STATEMENT","UTILITY_BILL"],"title":"DocumentType"},"AddressType":{"type":"string","enum":["Residential","Business"],"title":"AddressType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}
```
