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

# Open an upload

> Open an upload for the token's datasource.



## OpenAPI

````yaml openapi.json POST /uploads
openapi: 3.1.0
info:
  description: Push purchase orders and invoices into Pascal.
  title: Pascal Custom Source API
  version: '1'
servers:
  - url: https://app.teampascal.com/api/v1/custom-source
security: []
paths:
  /uploads:
    post:
      tags:
        - Uploads
      summary: Open an upload
      description: Open an upload for the token's datasource.
      operationId: open_upload_uploads_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OpenUploadRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpenUploadResponse'
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Forbidden
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Conflict
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Service Unavailable
      security:
        - bearer: []
components:
  schemas:
    OpenUploadRequest:
      additionalProperties: false
      properties:
        datasource:
          title: Datasource
          type: string
        dry_run:
          default: false
          title: Dry Run
          type: boolean
        mode:
          $ref: '#/components/schemas/UploadMode'
      required:
        - datasource
        - mode
      title: OpenUploadRequest
      type: object
    OpenUploadResponse:
      properties:
        created_at:
          format: date-time
          title: Created At
          type: string
        datasource:
          title: Datasource
          type: string
        dry_run:
          title: Dry Run
          type: boolean
        mode:
          title: Mode
          type: string
        status:
          $ref: '#/components/schemas/UploadStatus'
        upload_id:
          title: Upload Id
          type: string
      required:
        - upload_id
        - status
        - mode
        - dry_run
        - datasource
        - created_at
      title: OpenUploadResponse
      type: object
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
        - error
      title: ErrorEnvelope
      type: object
    UploadMode:
      enum:
        - incremental
        - full
      title: UploadMode
      type: string
    UploadStatus:
      enum:
        - in_progress
        - done
        - failed
        - expired
        - rejected
      title: UploadStatus
      type: string
    ErrorBody:
      properties:
        code:
          title: Code
          type: string
        details:
          $ref: '#/components/schemas/JsonValue'
        message:
          title: Message
          type: string
      required:
        - code
        - message
      title: ErrorBody
      type: object
    JsonValue: {}
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````