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

# Upload bulk transactions

> Submit a file of completed transactions for processing.
The CSV file must include required fields for SALE, RETURN, and PURCHASE transactions.
For RETURN and PURCHASE transactions, all line items must have negative total amounts. RETURN transactions should include parent_invoice_id when available.



## OpenAPI

````yaml POST /transactions/bulk
openapi: 3.0.1
info:
  title: Commenda Public APIs
  description: >-
    APIs for Commenda entity management, partner incorporation, indirect tax,
    compliance, and corporate operations.
  license:
    name: NONE
    url: NONE
  version: 1.0.0
servers:
  - url: https://api.prod.commenda.io/api/v1
    description: Commenda platform APIs, including Partner Incorporation and Commenda OS.
  - url: https://transaction-tax.api.in.commenda.io/api/v1
    description: Global Indirect Tax API.
security:
  - bearerAuth: []
paths:
  /transactions/bulk:
    post:
      summary: Bulk submit transactions
      description: >-
        Submit a file of completed transactions for processing.

        The CSV file must include required fields for SALE, RETURN, and PURCHASE
        transactions.

        For RETURN and PURCHASE transactions, all line items must have negative
        total amounts. RETURN transactions should include parent_invoice_id when
        available.
      operationId: submitBulkTransactions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The CSV file to upload.
                corporation_id:
                  type: string
                  description: >-
                    The unique identifier for a corporation associated with this
                    file.
      responses:
        '200':
          description: Transaction creation response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/BulkTransactionMetadata'
                  message:
                    type: string
                    example: Successfully uploaded transactions.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    BulkTransactionMetadata:
      type: object
      properties:
        upload_id:
          type: string
          description: The unique identifier for the bulk transaction upload.
          example: 2535af08-a139-4d0c-9827-1651e46dfbcf
        file_name:
          type: string
          description: The name of the file uploaded.
          example: example.csv
        transaction_count:
          type: integer
          description: The number of transactions in the file.
          example: 100
        size:
          type: integer
          description: The size of the file in bytes.
          example: 1024
        corporation_id:
          type: string
          description: The unique identifier for a corporation.
          example: 2535af08-a139-4d0c-9827-1651e46dfbcf
        created_at:
          type: number
          description: Timestamp in UTC when this bulk transaction upload was created.
          example: 1727284490
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: 'Specific Error type. Example: CLIENT_INVALID_REQUEST_BODY.'
              example: CLIENT_INVALID_REQUEST_BODY
            doc_url:
              type: string
              description: >-
                A link to the docs with details about this error. Example:
                https://sales-tax-docs.commenda.io/
              example: https://sales-tax-docs.commenda.io/
            title:
              type: string
              description: >-
                A short title describing the error. Example: Missing query
                parameters.
              example: Failed to validate the request body
            detail:
              type: string
              description: >-
                A json string with a description on how to fix the error.
                Example {"description":"Please pass in a valid corporation_id"}
            status:
              type: number
              description: >-
                The status code. It should be the same as the HTTP protocol
                status code. Example: 200
              example: 400
            instance:
              type: string
              description: >-
                The relative path that was hit by the user. Example:
                /api/v1/corporations/1
            Errors:
              type: array
              items:
                type: object
                properties:
                  details:
                    type: string
                    description: More details on how to solve this particular error.
                  pointer:
                    type: string
                    description: >-
                      Relative reference to missing or invalid piece of passed
                      information.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````