> ## 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.

# Stage a batch of records

> Stage a batch of JSON records.



## OpenAPI

````yaml openapi.json PUT /uploads/{upload_id}/records
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/{upload_id}/records:
    put:
      tags:
        - Uploads
      summary: Stage a batch of records
      description: Stage a batch of JSON records.
      operationId: put_records_uploads__upload_id__records_put
      parameters:
        - in: path
          name: upload_id
          required: true
          schema:
            title: Upload Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PutRecordsRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutRecordsResponse'
          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
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Conflict
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Gone
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Content Too Large
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Service Unavailable
      security:
        - bearer: []
components:
  schemas:
    PutRecordsRequest:
      additionalProperties: false
      properties:
        records:
          items:
            $ref: '#/components/schemas/IncomingRecord'
          title: Records
          type: array
      required:
        - records
      title: PutRecordsRequest
      type: object
    PutRecordsResponse:
      properties:
        accepted:
          title: Accepted
          type: integer
        record_count:
          title: Record Count
          type: integer
        upload_id:
          title: Upload Id
          type: string
      required:
        - accepted
        - upload_id
        - record_count
      title: PutRecordsResponse
      type: object
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
        - error
      title: ErrorEnvelope
      type: object
    IncomingRecord:
      additionalProperties: false
      properties:
        data:
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
          title: Data
          type: object
        doc_type:
          title: Doc Type
          type: string
        id:
          title: Id
          type: string
      required:
        - id
        - doc_type
        - data
      title: IncomingRecord
      type: object
    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

````