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

# Create multiple expenses



## OpenAPI

````yaml /.tooling/schemas/rest/tags/product-finops.json post /expenses/bulk
openapi: 3.1.0
info:
  title: Tesouro Partner API
  version: '2025-06-23'
  description: The Tesouro REST API, for Tesouro partners to integrate with our solution.
  termsOfService: https://tesouro.com/terms
  contact:
    name: Tesouro team
    url: https://tesouro.com/about/
    email: developers@tesouro.com
servers:
  - url: https://api.sandbox.tesouro.com
    description: Sandbox
security: []
tags:
  - name: Accounting connections
  - name: Accounting data pull
  - name: Accounting synchronized records
  - name: Accounting tax rates
  - name: Analytics
  - name: Approval policies
  - name: Approval requests
  - name: Bank details
  - name: Comments
  - name: Cost centers
  - name: Counterpart addresses
  - name: Counterpart bank accounts
  - name: Counterpart contacts
  - name: Counterpart VAT IDs
  - name: Counterparts
  - name: Credit notes
  - name: Custom tax rates
  - name: Data exports
  - name: Delivery notes
  - name: Departments
  - name: Disclosures
  - name: Documents
  - name: Events
  - name: Expenses
  - name: Files
  - name: Ledger accounts
  - name: Locations
  - name: Mail templates
  - name: Mailbox domains
  - name: Mailboxes
  - name: Measure units
  - name: OCR
  - name: OIDC applications
  - name: Organizations
  - name: Overdue reminders
  - name: Payable duplicates
  - name: Payable line items
  - name: Payables
  - name: Payment intents
  - name: Payment links
  - name: Payment methods
  - name: Payment records
  - name: Payment reminders
  - name: Payment terms
  - name: PDF templates
  - name: Products
  - name: Projects
  - name: Purchase orders
  - name: Receipts
  - name: Receivables
  - name: Recurrences
  - name: Roles
  - name: Tags
  - name: Text templates
  - name: Transactions
  - name: Users
  - name: Webhook deliveries
  - name: Webhook subscriptions
paths:
  /expenses/bulk:
    servers:
      - url: https://api.sandbox.tesouro.com/finops/v1
        description: Sandbox
    post:
      tags:
        - Expenses
      summary: Create multiple expenses
      operationId: post_expenses_bulk
      parameters:
        - required: true
          schema:
            type: string
            format: date
          example: '2025-06-23'
          name: x-finops-version
          in: header
        - name: x-organization-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 9d2b4c8f-2087-4738-ba91-7359683c49a4
          description: The ID of the entity that owns the requested resource.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExpenseBulkRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionBulkResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    ExpenseBulkRequest:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ExpenseRequest'
          type: array
          maxItems: 5000
          minItems: 1
          description: A list of expenses to create.
      type: object
      required:
        - data
    TransactionBulkResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/TransactionBulkObject'
          type: array
          maxItems: 5000
          minItems: 1
        status:
          $ref: '#/components/schemas/TransactionBulkStatusEnum'
          description: The overall status of the bulk creation operation.
      type: object
      required:
        - data
        - status
    ErrorSchemaResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorSchema'
      type: object
      required:
        - error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    ExpenseRequest:
      properties:
        amount:
          type: integer
          description: >-
            The transaction amount in [minor
            units](https://docs.tesouro.com/finops/support/currencies#minor-units).
            Positive values for in-flow, negative values for out-flow.
        currency:
          $ref: '#/components/schemas/CurrencyEnum'
          description: ISO currency code.
          examples:
            - USD
        department_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: ID of the department associated with this transaction.
        description:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          description: A human-readable description of the transaction.
        entity_user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: >-
            ID of the entity user who owns the transaction. Must be an active or
            invited user of the organization. When omitted and the request is
            made as an entity user, the caller becomes the owner; an explicit
            null leaves the transaction unowned. A caller limited to their own
            transactions may only name themselves or one of their direct
            reportees, and becomes the owner when the field is null.
        external_id:
          anyOf:
            - type: string
              maxLength: 128
            - type: 'null'
          description: >-
            External identifier for idempotency, if provided by the source
            system.
        ledger_account_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: ID of the ledger account from the Accounting service.
        location_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: ID of the location associated with this transaction.
        merchant_amount:
          type: integer
          description: Original merchant transaction amount in minor units.
        merchant_currency:
          $ref: '#/components/schemas/CurrencyEnum'
          description: ISO currency code for the `merchant_amount`.
        merchant_location:
          type: string
          maxLength: 128
          description: The merchant location.
          examples:
            - New York, US
        merchant_name:
          type: string
          maxLength: 128
          description: The merchant name.
          examples:
            - Acme Inc.
        partner_metadata:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          description: >-
            Extensible key-value pairs for storing additional custom information
            for partner needs.
        payment_method:
          $ref: '#/components/schemas/TransactionPaymentMethod'
        payment_processing_status:
          $ref: '#/components/schemas/TransactionStatusEnum'
          description: The current processing status of the transaction.
          default: created
        started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          description: Date and time when the transaction was initiated.
        subtype:
          $ref: '#/components/schemas/ExpenseSubtypeEnum'
          description: The kind of charge, such as a capture or a refund.
        type:
          type: string
          const: card
          description: The kind of expense.
      type: object
      required:
        - type
        - amount
        - currency
        - merchant_amount
        - merchant_currency
        - merchant_name
        - merchant_location
        - payment_method
        - subtype
    TransactionBulkObject:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          description: A unique system-generated ID assigned to the created transaction.
      type: object
    TransactionBulkStatusEnum:
      type: string
      enum:
        - success
        - partial_success
        - error
    ErrorSchema:
      properties:
        message:
          type: string
      type: object
      required:
        - message
    ValidationError:
      properties:
        ctx:
          type: object
        input: {}
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
      type: object
      required:
        - loc
        - msg
        - type
    CurrencyEnum:
      type: string
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SEK
        - SGD
        - SHP
        - SLE
        - SOS
        - SRD
        - SSP
        - SVC
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
    TransactionPaymentMethod:
      oneOf:
        - $ref: '#/components/schemas/CardPaymentMethod'
        - $ref: '#/components/schemas/BankAccountPaymentMethod'
      discriminator:
        propertyName: type
        mapping:
          bank_account: '#/components/schemas/BankAccountPaymentMethod'
          card: '#/components/schemas/CardPaymentMethod'
    TransactionStatusEnum:
      type: string
      enum:
        - created
        - processing
        - succeeded
        - declined
        - refunded
        - failed
    ExpenseSubtypeEnum:
      type: string
      enum:
        - capture
        - refund
        - cash_withdrawal
        - fee
        - adjustment
        - reversal
        - out_of_pocket
    CardPaymentMethod:
      properties:
        details:
          $ref: '#/components/schemas/CardPaymentMethodDetails'
        type:
          type: string
          const: card
      type: object
      required:
        - details
        - type
    BankAccountPaymentMethod:
      properties:
        details:
          $ref: '#/components/schemas/BankAccountPaymentMethodDetails'
        type:
          type: string
          const: bank_account
      type: object
      required:
        - details
        - type
    CardPaymentMethodDetails:
      properties:
        brand:
          $ref: '#/components/schemas/CardBrandEnum'
          maxLength: 32
          description: The card brand name.
        card_type:
          $ref: '#/components/schemas/CardTypeEnum'
          description: The card type
        expiry_month:
          type: integer
          maximum: 12
          minimum: 1
          description: The card's expiration month (1 - January, 12 - December).
        expiry_year:
          type: integer
          maximum: 2099
          exclusiveMinimum: 2001
          description: The card's expiration year.
        last4:
          type: string
          maxLength: 4
          minLength: 4
          description: The last four digits of the card number.
          examples:
            - 1234
      type: object
      required:
        - brand
        - card_type
        - expiry_month
        - expiry_year
        - last4
    BankAccountPaymentMethodDetails:
      properties:
        account_holder_name:
          anyOf:
            - type: string
            - type: 'null'
          description: The name of the person or business that owns this bank account.
          examples:
            - Bob Jones
        account_number:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The bank account number. US account numbers contain 9 to 12 digits.
            UK account numbers typically contain 8 digits.
          examples:
            - '12345678'
        bic:
          anyOf:
            - type: string
              maxLength: 11
            - type: 'null'
          description: >-
            The SWIFT/BIC code of the bank. Can be either 8 or 11 characters
            long.
          examples:
            - CHASUS33XXX
        currency:
          anyOf:
            - $ref: '#/components/schemas/CurrencyEnum'
            - type: 'null'
          description: ISO currency code of the bank account.
        iban:
          anyOf:
            - type: string
              maxLength: 34
            - type: 'null'
          description: The IBAN of the bank account, up to 34 characters.
          examples:
            - GB29NWBK60161331926819
        name:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          description: >-
            The name of the bank account, if available. For example, "Primary
            account" or "Savings account".
        routing_number:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The bank's routing transit number (RTN). US routing numbers consist
            of 9 digits.
        sort_code:
          anyOf:
            - type: string
            - type: 'null'
          description: The bank's sort code.
          examples:
            - '123456'
      type: object
    CardBrandEnum:
      type: string
      enum:
        - visa
        - mastercard
        - maestro
        - amex
        - union_pay
        - jcb
        - discover
        - dinners_club
        - unknown
    CardTypeEnum:
      type: string
      enum:
        - credit
        - debit
        - prepaid
        - unknown
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.