> ## 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 **800**. You can also pin the document to a specific site or utility account by passing the corresponding `siteId` and/or `accountId`. When provided, the parsed bill is allocated to that site/account instead of relying on best-effort auto-matching — recommended for compliance-sensitive uploads to prevent bills from landing on the wrong site. Free-text `notes` are shared with document processing as background context.



## OpenAPI

````yaml /api-reference/openapi-v2-1.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.1 endpoints to managing companies, sites,
    data, and documents
servers:
  - url: https://external.nectarclimate.com/v2.1
    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 **800**. You can also pin the document to a
        specific site or utility account by passing the corresponding `siteId`
        and/or `accountId`. When provided, the parsed bill is allocated to that
        site/account instead of relying on best-effort auto-matching —
        recommended for compliance-sensitive uploads to prevent bills from
        landing on the wrong site. Free-text `notes` are shared with document
        processing as background context.
      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 to pin the document to. When provided, the parsed
            bill is allocated to this site instead of relying on best-effort
            auto-matching.
        accountId:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            UUID of the utility account to pin the document to. When provided,
            the parsed bill is associated with this account (and its parent
            utility connection) instead of relying on best-effort auto-matching.
        notes:
          type: string
          description: >-
            Optional free-text notes about the submitted document (for example,
            what it contains or which site it belongs to). Shared with document
            processing as background context.
        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/CostReprocessJobStatusEnum'
          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
    CostReprocessJobStatusEnum:
      enum:
        - PENDING
        - COMPLETED
        - FAILED
      type: string
      description: |-
        * `PENDING` - Pending
        * `COMPLETED` - Completed
        * `FAILED` - Failed
  securitySchemes:
    ExternalAuthentication:
      type: apiKey
      in: header
      name: X-API-KEY

````