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

# Your available credits

> The credits your organisation can spend on enrichments, in the wallet of the key you signed with: a `VFN_TEST_` key sees the test wallet and a `VFN_LIVE_` key the live one. `unit_price` is what one candidate costs and `candidates_affordable` is how many more the balance covers. A campaign that costs more than the balance is refused with `402 INSUFFICIENT_CREDITS` and nothing is created. This call changes nothing. With no billing account or no test wallet you still get `200`, with `billing_configured` or `wallet_configured` false and `wallet` null.

**Scope:** `enrichment:credits`



## OpenAPI

````yaml /enrichment-api/api-reference/openapi.json get /enrichment-credits
openapi: 3.1.0
info:
  title: Record Enrichment API
  version: 1.0.0
  description: >-
    Collect work, location, shift and salary details from your own candidate
    database. You need two things: your **key id** and your **secret**.
    Everything else is generated. See Authentication for how.
servers:
  - url: https://api-bc.userecord.io/api/v1/partner
    description: Enrichment API
security: []
tags:
  - name: Enrichments
  - name: Enrichment campaigns
  - name: Enrichment candidates
  - name: Enrichment results
  - name: Enrichment credits
paths:
  /enrichment-credits:
    get:
      tags:
        - Enrichment credits
      summary: Your available credits
      description: >-
        The credits your organisation can spend on enrichments, in the wallet of
        the key you signed with: a `VFN_TEST_` key sees the test wallet and a
        `VFN_LIVE_` key the live one. `unit_price` is what one candidate costs
        and `candidates_affordable` is how many more the balance covers. A
        campaign that costs more than the balance is refused with `402
        INSUFFICIENT_CREDITS` and nothing is created. This call changes nothing.
        With no billing account or no test wallet you still get `200`, with
        `billing_configured` or `wallet_configured` false and `wallet` null.


        **Scope:** `enrichment:credits`
      operationId: getEnrichmentCredits
      parameters: []
      responses:
        '200':
          description: The wallet, the price of one candidate and what the balance covers
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    const: true
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      mode:
                        type: string
                        enum:
                          - live
                          - test
                        description: >-
                          Which wallet this is: the mode of the key you signed
                          with
                      currency:
                        type: string
                        description: 1 credit is 1 unit of this currency
                      billing_configured:
                        type: boolean
                        description: >-
                          false when your organisation has no billing account
                          yet
                      wallet_configured:
                        type: boolean
                        description: >-
                          false when this wallet was never set up (a test wallet
                          on an older account). Nothing can be spent from it
                      wallet:
                        anyOf:
                          - type: object
                            properties:
                              granted:
                                type: number
                                description: Credits added in all
                              consumed:
                                type: number
                                description: Credits spent in all
                              balance:
                                type: number
                                description: Credits you can still spend
                          - type: 'null'
                        description: null when billing or this wallet is not set up
                      unit_price:
                        anyOf:
                          - type: number
                          - type: 'null'
                        description: >-
                          Credits one candidate costs when added to an
                          enrichment campaign. null when no price is set
                      candidates_affordable:
                        anyOf:
                          - type: integer
                          - type: 'null'
                        description: >-
                          How many more candidates the balance covers at the
                          current price. null when the wallet or price is
                          unknown
              example:
                success: true
                data:
                  mode: live
                  currency: INR
                  billing_configured: true
                  wallet_configured: true
                  wallet:
                    granted: 1000
                    consumed: 500
                    balance: 500
                  unit_price: 8
                  candidates_affordable: 62
      security:
        - ApiKey: []
          SecretKey: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: pcall GET "/api/v1/partner/enrichment-credits"
        - lang: javascript
          label: JavaScript
          source: |-
            const res = await call("GET", "/api/v1/partner/enrichment-credits");
            const { data } = await res.json();
        - lang: python
          label: Python
          source: |-
            res = call("GET", "/api/v1/partner/enrichment-credits")
            data = res.json()["data"]
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your key id, `VFN_TEST_…` or `VFN_LIVE_…`. Sent on every request.
    SecretKey:
      type: apiKey
      in: header
      name: x-secret-key
      description: >-
        Your secret, `VFN_SK_…`. **Not a real header, and never sent to the
        API.** It is only a form field for Try it, which uses it to sign your
        request in your browser. In your own code you sign each request with the
        secret and send `x-api-key`, `x-timestamp` and `x-signature` (see
        Authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.