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

# Past employment history

> Search the EPFO by UAN, PAN or mobile and return the member's employment on record.



## OpenAPI

````yaml /suite/api-reference/openapi.json post /epfo/v1/employment-history.1
openapi: 3.1.0
info:
  title: Privue API Suite
  version: 1.0.0
  description: >-
    Business, tax, registry, employment and identity verification against
    official Indian sources, a person's own documents read through DigiLocker
    with their consent, and an EPF member's passbook read with the OTP they
    receive.


    **Authentication.** Every request takes your API key as a bearer token:
    `Authorization: Bearer <your-key>`.


    **One envelope.** Every check returns the reasons behind a refusal and the
    record the source held, and an empty `reasons` means the check passed.
    Branch on `reasons` rather than on the status code, because a call the
    source answered returns `200` whatever it concluded.


    **DigiLocker and EPFO passbook.** A DigiLocker endpoint returns `details`
    alone: what it read, as the source holds it. So do submitting an EPFO
    passbook OTP and reading the passbook; sending the OTP answers like a check.


    **Versioning.** Each endpoint is versioned on its own, directly in its path.
    A new version of one endpoint never moves another, so no release requires
    migrating every integration at once.
servers:
  - url: https://api.privue.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Checks
    description: One check on one subject, answered in the envelope every check shares.
  - name: DigiLocker
    description: >-
      A person's own documents, read through the consent they give at
      DigiLocker.
  - name: EPFO passbook
    description: >-
      A member's EPF passbook, read with the OTP sent to the mobile number on
      their account.
  - name: Orchestrated flows
    description: Every check on one business, asked and answered together in a single call.
  - name: Usage
    description: What you have called, and when.
paths:
  /epfo/v1/employment-history.1:
    post:
      tags:
        - Checks
      summary: Past employment history
      description: >-
        Search the EPFO by UAN, PAN or mobile and return the member's employment
        on record.
      operationId: epfo.employment-history.1
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmploymentHistoryRequest'
            examples:
              uan:
                summary: By UAN
                value:
                  uan: '100123456789'
              pan:
                summary: By PAN
                value:
                  pan: ABCPE1234F
              mobile:
                summary: By mobile
                value:
                  mobile: '9876543210'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmploymentHistoryResponse'
              examples:
                verified:
                  summary: A member found, one job closed and one open
                  value:
                    reasons: []
                    details:
                      accounts:
                        - uan: '100123456789'
                          name: ASHA RAO
                          gender: FEMALE
                          date_of_birth: '1990-03-12'
                      employments:
                        - uan: '100123456789'
                          member_id: MHBAN00123450000012345
                          name: ASHA RAO
                          father_or_husband_name: KIRAN RAO
                          establishment_id: MHBAN0012345000
                          establishment_name: ACME ENGINEERING PRIVATE LIMITED
                          date_of_joining: '2015-04-01'
                          tenure_months: 48
                          date_of_exit: '2019-03-31'
                        - uan: '100123456789'
                          member_id: KDMAL00987650000054321
                          name: ASHA RAO
                          father_or_husband_name: KIRAN RAO
                          establishment_id: KDMAL0098765000
                          establishment_name: GLOBEX SOLUTIONS PRIVATE LIMITED
                          date_of_joining: '2019-04-15'
                          tenure_months: 77
                          date_of_exit: null
                failed:
                  summary: No member found
                  value:
                    reasons:
                      - code: epfo-member-not-found
                        message: The EPFO holds no member under this identifier.
                    details: null
        '401':
          description: The API key is missing, malformed or not valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
        '403':
          description: The key is valid but is not entitled to this feature.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
        '422':
          description: >-
            The request failed validation, or the source would not accept the
            details in it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
        '429':
          description: >-
            The key is not cleared for this feature, or is sending too many
            requests. Nothing was called.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
        '503':
          description: >-
            The source could not be reached, or authentication is temporarily
            unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
        default:
          description: The request failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuiteError'
components:
  schemas:
    EmploymentHistoryRequest:
      properties:
        uan:
          anyOf:
            - type: string
              pattern: ^[0-9]{12}$
            - type: 'null'
          title: Uan
          description: Universal Account Number the EPFO issued the member
        pan:
          anyOf:
            - type: string
              pattern: ^[A-Z]{3}[ABCFGHJLPT][A-Z][0-9]{4}[A-Z]$
            - type: 'null'
          title: Pan
          description: PAN of the member
        mobile:
          anyOf:
            - type: string
              pattern: ^(?:\+91)?[6-9][0-9]{9}$
            - type: 'null'
          title: Mobile
          description: Mobile number on the member's EPF account, with or without +91
      type: object
      title: EmploymentHistoryRequest
      description: >-
        Send exactly one of `uan`, `pan` or `mobile` to search the EPFO by.


        Each is a search of its own, and a PAN and a mobile of one person can
        find different accounts.
    EmploymentHistoryResponse:
      properties:
        reasons:
          items:
            $ref: '#/components/schemas/Reason'
          type: array
          title: Reasons
          description: >-
            Why the check did not pass, worst first, each a stable code with the
            text for it. Empty when it passed
        details:
          anyOf:
            - $ref: '#/components/schemas/EmploymentHistory'
            - type: 'null'
          description: The EPFO's record of the member
      type: object
      title: EmploymentHistoryResponse
      description: >-
        A member's employment on record with the EPFO; `details` is null when it
        holds no member for the identifier.


        The EPFO holding no member is a finding about today: the same search
        made later asks the EPFO again, and can find one.
    SuiteError:
      properties:
        code:
          type: integer
          title: Code
          description: HTTP status code of the response
        timestamp:
          type: integer
          title: Timestamp
          description: Unix millisecond timestamp of when the response was produced
        message:
          type: string
          title: Message
          description: What went wrong, in one sentence
      type: object
      required:
        - code
        - timestamp
        - message
      title: SuiteError
      description: Why a request failed.
    Reason:
      properties:
        code:
          $ref: '#/components/schemas/ReasonCode'
          description: Stable code to branch on
        message:
          type: string
          title: Message
          description: What the code means, in one sentence
      type: object
      required:
        - code
        - message
      title: Reason
      description: One machine-readable reason a check did not pass.
    EmploymentHistory:
      properties:
        accounts:
          items:
            $ref: '#/components/schemas/EpfAccount'
          type: array
          minItems: 1
          title: Accounts
        employments:
          items:
            $ref: '#/components/schemas/EmploymentSpell'
          type: array
          title: Employments
      type: object
      required:
        - accounts
        - employments
      title: EmploymentHistory
      description: >-
        A member's employment on record with the EPFO, as one UAN, PAN or mobile
        found it.
    ReasonCode:
      type: string
      enum:
        - cin-not-registered
        - gstin-not-registered
        - gstin-inactive
        - pan-inactive
        - pan-name-mismatch
        - pan-date-of-birth-mismatch
        - udyam-not-registered
        - udyam-not-registered-for-pan
        - udyam-cancelled
        - gst-not-registered-for-pan
        - company-not-registered-for-pan
        - epfo-member-not-found
        - uan-not-registered-for-pan
        - driving-licence-not-registered
        - driving-licence-details-mismatch
        - driving-licence-expired
        - uan-not-registered-for-mobile
        - passport-not-registered
        - passport-name-mismatch
        - source-unavailable
        - details-refused
        - bank-account-unverified
        - bank-account-unsettled
      title: ReasonCode
      description: >-
        Why a check did not pass, as the stable code a client branches on.


        Declared rather than written as strings so that every code a check can
        answer with reaches the published schema, and a client reads the whole
        set from the API reference.
    EpfAccount:
      properties:
        uan:
          type: string
          pattern: ^[0-9]{12}$
          title: Uan
        name:
          type: string
          title: Name
        gender:
          type: string
          title: Gender
        date_of_birth:
          type: string
          format: date
          title: Date Of Birth
      type: object
      required:
        - uan
        - name
        - gender
        - date_of_birth
      title: EpfAccount
      description: One UAN found for the member, and who the EPFO holds it for.
    EmploymentSpell:
      properties:
        uan:
          type: string
          pattern: ^[0-9]{12}$
          title: Uan
        member_id:
          type: string
          title: Member Id
        name:
          type: string
          title: Name
        father_or_husband_name:
          type: string
          title: Father Or Husband Name
        establishment_id:
          type: string
          title: Establishment Id
        establishment_name:
          type: string
          title: Establishment Name
        date_of_joining:
          type: string
          format: date
          title: Date Of Joining
        tenure_months:
          type: integer
          title: Tenure Months
        date_of_exit:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date Of Exit
          description: >-
            Null for a spell the member is still in, or one the employer never
            closed
      type: object
      required:
        - uan
        - member_id
        - name
        - father_or_husband_name
        - establishment_id
        - establishment_name
        - date_of_joining
        - tenure_months
      title: EmploymentSpell
      description: One spell at one establishment, as the member's account records it.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key, sent as `Authorization: Bearer <your-key>`.'

````

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