> ## Documentation Index
> Fetch the complete documentation index at: https://docs.capa.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Get KYB Details

Retrieves the latest KYB (Know Your Business) verification details for a business user. Use this to check verification status and retrieve business profile data.

***

## Important Notes

* The `sessionUrl` field contains a URL to resume an in-progress KYB session, if available.
* KYB status values: `NOT_STARTED`, `IN_PROGRESS`, `VERIFIED`, `REJECTED`, `REVIEW_NEEDED`.

***

## Use Cases

* **Verification status check**: Determine whether a business user has completed KYB before allowing transactions.
* **Resume verification**: Use `sessionUrl` to redirect users with an in-progress session.

***

## Error Codes

### Common Errors

| HTTP Status | Code                   | Message                            |
| ----------- | ---------------------- | ---------------------------------- |
| 401         | `UNAUTHORIZED`         | "API Key is missing"               |
| 401         | `UNAUTHORIZED`         | "Invalid API Key format"           |
| 401         | `UNAUTHORIZED`         | "Invalid API Key"                  |
| 403         | `INVALID_PARTNER_FLOW` | "The partner has an invalid flow." |

### User Ownership Errors

| HTTP Status | Code           | Message                                              |
| ----------- | -------------- | ---------------------------------------------------- |
| 401         | `UNAUTHORIZED` | "Partner information is required for this operation" |
| 401         | `UNAUTHORIZED` | "User is not associated with the partner"            |

### Endpoint-Specific Errors

| HTTP Status | Code                    | Message                                    |
| ----------- | ----------------------- | ------------------------------------------ |
| 404         | `NOT_FOUND_ERROR`       | "Requested KYB verification was not found" |
| 500         | `INTERNAL_SERVER_ERROR` | "Failed to get user KYB details"           |


## OpenAPI

````yaml reference/openapi/KYBPartnerControllerV2_getUserKYBDetails.json GET /api/partner/v2/kyb/details
openapi: 3.0.0
info:
  title: Capa Partner API - V2
  description: >-
    Partner API for integrating cryptocurrency on-ramp and off-ramp services
    using Capa's infrastructure. Enable your users to seamlessly convert between
    fiat and crypto.
  version: v2
  contact: {}
servers:
  - url: https://staging-api.capa.fi
  - url: https://production-api.capa.fi
security: []
paths:
  /api/partner/v2/kyb/details:
    get:
      tags:
        - kyb
      operationId: KYBPartnerControllerV2_getUserKYBDetails
      parameters:
        - name: userId
          required: true
          in: query
          description: The user ID
          schema:
            example: 2a119021-ed39-4ab4-8690-db610c53f0fb
            type: string
      responses:
        '200':
          description: >-
            Returns the KYB (Know Your Business) verification details for the
            user.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  data:
                    type: object
                    properties:
                      verificationStatus:
                        type: string
                        description: Overall KYB verification status
                      businessInfo:
                        type: object
                        description: Basic business profile details
                        properties:
                          businessName:
                            type: string
                          countryOfConstitution:
                            type: string
                          taxId:
                            type: string
                      beneficialOwners:
                        type: array
                        items:
                          type: object
                          properties:
                            fullName:
                              type: string
                            ownershipPercent:
                              type: number
                      verificationSessionId:
                        type: string
                        description: External verification session identifier
                      createdAt:
                        type: string
                    x-readme-ref-name: GetUserKYBResultHttpResponse
              example:
                status: ok
                data:
                  verificationStatus: string
                  businessInfo:
                    businessName: string
                    countryOfConstitution: string
                    taxId: string
                  beneficialOwners:
                    - fullName: string
                      ownershipPercent: 0
                  verificationSessionId: string
                  createdAt: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: INVALID_USER_INPUT_ERROR
                message: Invalid User Input
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                UNAUTHORIZED:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: API Key is missing
                UNAUTHORIZED_2:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Invalid API Key format
                UNAUTHORIZED_3:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Invalid API Key
                UNAUTHORIZED_4:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Partner information is required for this operation
                UNAUTHORIZED_5:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: User is not associated with the partner
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                NOT_FOUND_ERROR:
                  value:
                    success: false
                    code: NOT_FOUND_ERROR
                    message: Requested resource was not found
                NOT_FOUND_ERROR_2:
                  value:
                    success: false
                    code: NOT_FOUND_ERROR
                    message: No KYB verification found for user {userId}
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: INTERNAL_SERVER_ERROR
                message: Internal server error
      security:
        - PartnerApiKey: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable error message.
        errors:
          type: array
          description: Optional per-field validation details.
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
      required:
        - success
        - code
        - message
  securitySchemes:
    PartnerApiKey:
      type: apiKey
      in: header
      name: partner-api-key
      description: API key for the affiliated partner performing the request.

````