Parcha Document Management API

The Document Management API from Parcha — 2 operation(s) for document management.

OpenAPI Specification

parcha-document-management-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Parcha Admin Document Management API
  version: 1.0.0
  description: API for managing Parcha jobs and checks
servers:
- url: https://api.parcha.ai/api/v1
  description: Agent Hub API server
- url: https://demo.parcha.ai/api/v1
  description: Sandbox API server
- url: https://us1.parcha.ai/api/v1
  description: Legacy API server
- url: http://{your-company-domain}.parcha.ai/api/v1
  description: Custom Enterpris server (your company's API server)
security:
- bearerAuth: []
tags:
- name: Document Management
paths:
  /uploadB64Document:
    post:
      tags:
      - Document Management
      summary: Upload Base64 Document
      description: Uploads a base64 encoded document to Google Cloud Storage and returns a presigned URL for accessing the uploaded document.
      operationId: upload_b64_document_uploadB64Document_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/parcha_backend__routers__shared_router__UploadDocumentRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/parcha_backend__routers__shared_router__DocumentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/uploadB64Document:
    post:
      tags:
      - Document Management
      summary: Upload Base64 Document
      description: Uploads a base64 encoded document to Google Cloud Storage and returns a presigned URL for accessing the uploaded document.
      operationId: upload_b64_document_api_v1_uploadB64Document_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/parcha_backend__routers__shared_router__UploadDocumentRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/parcha_backend__routers__shared_router__DocumentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
components:
  schemas:
    parcha_backend__routers__shared_router__UploadDocumentRequest:
      properties:
        b64_document:
          type: string
          title: B64 Document
          description: Base64 encoded document. The document content should be encoded in base64 format before sending.
        document_name:
          type: string
          title: Document Name
          description: Name of the document to be uploaded. This name will be used to reference the document in the cloud storage.
      type: object
      required:
      - b64_document
      - document_name
      title: UploadDocumentRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    parcha_backend__routers__shared_router__DocumentResponse:
      properties:
        url:
          type: string
          title: Url
          description: Presigned URL for the document. This URL can be used to access the uploaded document.
        expiration:
          type: string
          format: date-time
          title: Expiration
          description: The expiration date and time (in UTC) for the presigned URL. The URL will be valid until this time.
      type: object
      required:
      - url
      - expiration
      title: DocumentResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key obtained from your Parcha account settings. Include as Bearer token in the Authorization header.