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

# GST Certificate v2

> Processes a GST certificate document (PDF or image) and extracts structured information using OCR technology.

**Document Requirements:**

* Clear, high-resolution document
* Valid GST certificate
* Supported formats: PDF, JPG, JPEG, PNG
* Maximum file size: 10 MB


## OpenAPI

````yaml POST /v2/ocr/gst-certificate/
openapi: 3.0.0
info:
  title: KonnectNXT API Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://bgv.konnectnxt.com/api
    description: Production
  - url: https://testbgv.konnectnxt.com/api
    description: QA
security:
  - bearerAuth: []
paths:
  /v2/ocr/gst-certificate/:
    post:
      tags:
        - OCR
      summary: Extract data from GST certificate
      description: >-
        Processes a GST certificate document (PDF or image) and extracts
        structured information using OCR technology.
      operationId: extractGstCertificateData
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GstCertificateOcrRequest'
            examples:
              Example:
                summary: Basic GST certificate OCR request
                value:
                  document_url: https://example.com/documents/gst-certificate.pdf
      responses:
        '200':
          description: GST certificate data extracted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GstCertificateOcrSuccessResponse'
              examples:
                successfulExtraction:
                  summary: Successful GST certificate extraction
                  value:
                    status: success
                    code: 200
                    message: Operation completed successfully
                    data:
                      gstin: 27AABCU9603R1ZX
                      legal_name: SAMPLE ENTERPRISES PRIVATE LIMITED
                      trade_name: SAMPLE ENTERPRISES
                      pan_number: AABCU9603R
                      address: >-
                        123, Sample Street, Industrial Area, Mumbai,
                        Maharashtra, 400001
                      constitution_of_business: Private Limited Company
                      type_of_registration: Regular
                      date_of_liability: null
                      valid_from: '2020-01-15'
                      valid_upto: NA
                      is_provisional: false
                    credits_used: 10
                    credits_remaining: 5000
        '400':
          description: Bad request due to invalid input data.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Error'
                  - $ref: '#/components/schemas/APIErrorData'
              examples:
                Document URL Missing:
                  summary: Document URL missing
                  value:
                    status: error
                    code: 400
                    message: '`document_url` is required.'
                    data: null
                Invalid Document URL:
                  summary: Invalid Document URL
                  value:
                    status: error
                    code: 400
                    message: Enter a valid `document_url`
                    data: null
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '422':
          description: Unprocessable Entity - Document processing failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_WithCredits'
              examples:
                Document Non Compliant:
                  summary: Document is non compliant to request/quality standard
                  value:
                    status: error
                    code: 422
                    message: Document quality is too low or unreadable
                    data: null
                Invalid Document:
                  summary: No GST certificate detected in document
                  value:
                    status: error
                    code: 422
                    message: INVALID_DOCUMENT
                    data: null
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    GstCertificateOcrRequest:
      type: object
      required:
        - document_url
      properties:
        document_url:
          type: string
          format: uri
          description: >+
            Publicly accessible URL of the GST certificate document to be
            processed.


            **Requirements:**

            - Must be a valid HTTP/HTTPS URL

            - Document must be publicly accessible

            - Supported formats: PDF, JPG, JPEG, PNG

          example: https://example.com/documents/gst-certificate.pdf
    GstCertificateOcrSuccessResponse:
      allOf:
        - $ref: '#/components/schemas/APIBaseResponse'
        - type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/GstCertificateData'
        - $ref: '#/components/schemas/Credits'
    Error:
      allOf:
        - $ref: '#/components/schemas/APIBaseResponse'
    APIErrorData:
      type: object
      properties:
        data:
          type: object
          nullable: true
          example: null
    Error_WithCredits:
      allOf:
        - $ref: '#/components/schemas/Error'
        - $ref: '#/components/schemas/APIErrorData'
        - $ref: '#/components/schemas/Credits'
    APIBaseResponse:
      type: object
      required:
        - status
        - code
        - message
      properties:
        status:
          $ref: '#/components/schemas/APIStatus'
        code:
          $ref: '#/components/schemas/HTTPCode'
        message:
          $ref: '#/components/schemas/APIMessage'
    GstCertificateData:
      type: object
      description: Extracted GST certificate information
      properties:
        gstin:
          type: string
          nullable: true
          description: GST Identification Number (15 characters)
          example: 27AABCI6363G1ZJ
        legal_name:
          type: string
          nullable: true
          description: Legal name of the business
          example: SUSTENANCE'S GROWTH CULTIVATION PRIVATE
        trade_name:
          type: string
          nullable: true
          description: Trade name of the business
          example: SUSTENANCE'S GROWTH CULTIVATION PRIVATE
        pan_number:
          type: string
          nullable: true
          description: PAN number of the business
          example: AABCI6363G
        address:
          type: string
          nullable: true
          description: Complete business address
          example: >-
            B - 403 , 4TH FLR , B BLOCK , CLUB HOUSE , RAGHAVENDRA PANCHJANYA
            APT , MIYAPUR , HYDERABAD , Hyderabad , Telangana , 500049
        constitution_of_business:
          type: string
          nullable: true
          description: Type of business constitution
          example: Private Limited Company
        type_of_registration:
          type: string
          nullable: true
          description: Type of GST registration
          example: Regular
        date_of_liability:
          type: string
          format: date
          nullable: true
          description: Date of liability (YYYY-MM-DD format)
          example: null
        valid_from:
          type: string
          format: date
          nullable: true
          description: Certificate valid from date (YYYY-MM-DD format)
          example: '2019-03-01'
        valid_upto:
          type: string
          nullable: true
          description: Certificate valid upto date (YYYY-MM-DD format or 'NA')
          example: NA
        is_provisional:
          type: boolean
          nullable: true
          description: Whether the certificate is provisional
          example: false
    Credits:
      type: object
      properties:
        credits_used:
          $ref: '#/components/schemas/CreditsUsed'
        credits_left:
          $ref: '#/components/schemas/CreditsLeft'
      required:
        - credits_used
        - credits_left
    APIStatus:
      type: string
      enum:
        - success
        - error
      description: Overall status of the API
    HTTPCode:
      type: integer
      description: HTTP status code
      example: 400
    APIMessage:
      type: string
      description: Description of the response or error
      example: Invalid request parameters
    CreditsUsed:
      type: integer
      description: Represents the total number of credits used in this request.
      example: 3
    CreditsLeft:
      type: integer
      description: 'Represents the remaining credits available for use. '
      example: 4040
  responses:
    '401':
      description: Unauthorized
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - $ref: '#/components/schemas/APIErrorData'
          examples:
            Missing Token:
              summary: Bearer token is missing or invalid.
              value:
                status: error
                code: 401
                message: Bearer token is missing or invalid.
                data: null
            Incorrect Token Format:
              summary: Token format is incorrect
              value:
                status: error
                code: 401
                message: Token format is incorrect
                data: null
            No Admin Found:
              summary: No admin found for this request
              value:
                status: error
                code: 401
                message: No admin user found for this organization
                data: null
            Invalid API Key:
              summary: Invalid API Key
              value:
                status: error
                code: 401
                message: Invalid API key (organization ID)
                data: null
            User not Found:
              summary: User not found
              value:
                status: error
                code: 401
                message: User not found.
                data: null
    '403':
      description: Forbidden
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - $ref: '#/components/schemas/APIErrorData'
          examples:
            Token Revoked:
              summary: Token access has been Revoked, Contact Support.
              value:
                status: error
                code: 403
                message: Token access has been Revoked, Contact Support.
                data: null
            Token Inactive:
              summary: Token is Inactive, Contact Support.
              value:
                status: error
                code: 403
                message: Token is Inactive, Contact Support.
                data: null
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - $ref: '#/components/schemas/APIErrorData'
          examples:
            Internal Server Error:
              summary: Internal Server Error.
              value:
                status: error
                code: 500
                message: Internal Server Error.
                data: null
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key issued by KonnectNXT. Pass as `Authorization: Bearer
        <your_api_key>`.

````