Skip to content

CustomerAddKycDocument

Endpoint

POST /customer/kyc/documents

Authorization

Requires SESSION_CUSTOMER token.

Description

Attaches an uploaded file to the authenticated customer's KYC profile. If step_id is provided, the document is attached to that specific KYC step.

The request uses file_id returned by POST /upload. File metadata is resolved on the server through StorageManager; the client should not send trusted file_name, content_type, file_size, or checksum.

Request

{
  "kyc_id": 1,
  "step_id": 10,
  "type": "passport",
  "file_id": "2d8b3e5c-5b02-43f4-8b31-1a1cc33c7d12"
}

Parameters

Name Type Required Description
kyc_id int Yes KYC profile id
step_id int No Step id to attach the document to
type string No Document type marker
file_id string Yes Storage file UUID returned by POST /upload

Response

{
  "document": {
    "id": 1,
    "customer_id": 100,
    "kyc_id": 1,
    "step_id": 10,
    "brand": "default",
    "type": "passport",
    "status": 0,
    "file_id": "2d8b3e5c-5b02-43f4-8b31-1a1cc33c7d12",
    "file_name": "passport.pdf",
    "content_type": "application/pdf",
    "file_size": 245000,
    "checksum": "..."
  }
}

Errors

HTTP Error Description
400 INVALID_DATA Required fields are missing
403 PERMISSION_DENIED Profile or file does not belong to the customer
404 RET_NOT_FOUND KYC profile was not found