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

# Submit Job via Single Document Upload

> Submits a document to Nectar for processing and creates a job to track its progress. The company must be active to submit a job. Each document submission is tracked as a job with an id that can be used to check processing status. This endpoint returns the jobId immediately while processing continues asynchronously. Note that since this endpoint requires a file upload, the request body must be form-data. The size limit for the utility bill is **25MB**, and the page limit for a submitted PDF file is **150**. You can also pass in the id of a site configured for your company in Nectar.



## OpenAPI

````yaml /api-reference/openapi-v2-2.json post /job/company/{company_id}
openapi: 3.1.0
info:
  title: Nectar API Documentation
  version: 1.0.0 (v1)
  description: >-
    Complete API documentation for v2.2 endpoints to managing companies, sites,
    data, and documents
servers:
  - url: https://external.nectarclimate.com/v2.2
    description: Nectar API Server
security: []
paths:
  /job/company/{company_id}:
    post:
      tags:
        - Jobs
      summary: Submit Job via Single Document Upload
      description: >-
        Submits a document to Nectar for processing and creates a job to track
        its progress. The company must be active to submit a job. Each document
        submission is tracked as a job with an id that can be used to check
        processing status. This endpoint returns the jobId immediately while
        processing continues asynchronously. Note that since this endpoint
        requires a file upload, the request body must be form-data. The size
        limit for the utility bill is **25MB**, and the page limit for a
        submitted PDF file is **150**. You can also pass in the id of a site
        configured for your company in Nectar.
      operationId: job_company_create
      parameters:
        - in: path
          name: company_id
          schema:
            type: string
            format: uuid
          description: ID of the company for which to submit the job.
          required: true
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/JobCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Job'
          description: ''
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: ''
        '403':
          description: 'Forbidden: Access to the company is denied.'
        '404':
          description: Company not found.
      security:
        - ExternalAuthentication: []
components:
  schemas:
    JobCreateRequest:
      type: object
      description: Serializer for form fields during job submission.
      properties:
        siteId:
          type:
            - string
            - 'null'
          format: uuid
          description: UUID of the site for the document
        document:
          type: string
          format: binary
          description: File object representing the document to be processed by the job.
      required:
        - document
    Job:
      type: object
      description: Serializer for the response of job status endpoint.
      properties:
        id:
          type: string
          description: The ID of the job.
          maxLength: 255
        status:
          allOf:
            - $ref: '#/components/schemas/JobStatusEnum'
          description: >-
            The current status of the job, one of: PENDING, COMPLETED,
            TERMINATED, FAILED.If the job status is FAILED, please contact our
            support team.


            * `PENDING` - Pending

            * `COMPLETED` - Completed

            * `FAILED` - Failed
        parsedDocumentIds:
          type: array
          items:
            type: string
          description: >-
            List of document IDs that were processed successfully by the job.
            This is only populated if the job is completed.
        duplicates:
          type: integer
          description: >-
            Number of duplicate files detected by the job. This is only
            populated if the job is completed.
        duplicateDocumentIds:
          type: array
          items:
            type: string
          description: >-
            List of document IDs that were identified as duplicates by the job.
            This is only populated if the job is completed.
        nonUtilityDocumentIds:
          type: array
          items:
            type: string
          description: >-
            List of document IDs that were identified as non-utility documents
            by the job. This is only populated if the job is completed.
        terminationReason:
          type: string
          description: >-
            The reason the job was terminated. This is only populated if the job
            is terminated.
      required:
        - id
        - status
    ErrorResponse:
      type: object
      description: Serializer for error responses.
      properties:
        detail:
          type: string
        error:
          type: string
    JobStatusEnum:
      enum:
        - PENDING
        - COMPLETED
        - FAILED
      type: string
      description: |-
        * `PENDING` - Pending
        * `COMPLETED` - Completed
        * `FAILED` - Failed
  securitySchemes:
    ExternalAuthentication:
      type: apiKey
      in: header
      name: X-API-KEY

````