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

# Download batch job results

> Streams the processed output file for a completed or cancelled batch job. The response includes a `Content-Disposition` header with the original filename.

**Errors**
- `400 not_completed` — Job must be `COMPLETED` or `CANCELLED` before downloading.
- `400 process_error` — Job ended with an error. No output file available.
- `400` — Invalid `process_id` or job does not belong to your account.



## OpenAPI

````yaml https://api.revenuebase.ai/v2/openapi.json get /v2/jobs/{process_id}/download
openapi: 3.1.0
info:
  title: Revenuebase API v2
  version: 0.1.0
servers:
  - url: https://api.revenuebase.ai
security: []
paths:
  /v2/jobs/{process_id}/download:
    get:
      tags:
        - Jobs
      summary: Download batch job results
      description: >-
        Streams the processed output file for a completed or cancelled batch
        job. The response includes a `Content-Disposition` header with the
        original filename.


        **Errors**

        - `400 not_completed` — Job must be `COMPLETED` or `CANCELLED` before
        downloading.

        - `400 process_error` — Job ended with an error. No output file
        available.

        - `400` — Invalid `process_id` or job does not belong to your account.
      operationId: download_job_v2_jobs__process_id__download_get
      parameters:
        - name: process_id
          in: path
          required: true
          schema:
            type: integer
            title: Process Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                title: Response Download Job V2 Jobs  Process Id  Download Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
      x-codeSamples:
        - lang: Python
          label: Python SDK
          source: |-
            from revenuebase_sdk import RevenuebaseClient

            client = RevenuebaseClient()

            data = client.jobs.download(process_id=42)
            with open("results.csv", "wb") as f:
                f.write(data)
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-key

````