---
title: "Generate invoices for multiple contracts"
method: POST
path: "/api/v1/documents/contracts/invoices/batch_invoicing"
tags: ["invoices"]
---

# Generate invoices for multiple contracts

`POST /api/v1/documents/contracts/invoices/batch_invoicing`

## Headers

- `x-api-key` string, nullable

## Request body

- BatchContractInvoiceRequest[] — Generate invoices for multiple contracts.
  - `contractId` string, uuid, required
  - `items` object[], required
  - `period` integer, required
  - `memo` string, nullable
  - `finalize` boolean

## Response `200`

Successful Response

- BatchInvoicingResponse
  - `results` BatchInvoiceResult[]
    - `contractId` string, uuid, required
    - `counterpartyId` string, uuid, nullable
    - `periodNumber` integer, nullable
    - `status` string, required
    - `invoice` InvoiceResponse — Invoice response.
      - `id` string, uuid, required
      - `onchainTransactionId` string, nullable
      - `transaction` InvoiceTransactionInfo — Minimal transaction info embedded in invoice response.
        - `onchainTransactionId` string, required
        - `amount` number, required
        - `txHash` string, required
        - `type` string, required
        - `createdAt` string, date-time, required
      - `amount` string, required
      - `discount` string, nullable
      - `currency` 'USD' | 'EUR' | 'GBP' | 'JPY' | 'CHF' | 'CAD' | 'AUD' | 'NZD' | 'SEK' | 'NOK' | 'AED' | 'HKD', required — Supported invoice/contract currencies. G10 majors + AED/HKD.
      - `comment` string, nullable
      - `emailMessage` string, nullable
      - `invoiceNumber` string, nullable
      - `periodNumber` integer, nullable
      - `issuedDate` string, date, nullable
      - `dueDate` string, date, nullable
      - `items` object[]
      - `paymentMethods` union[]
        - union
          - IBANAccountDetailsOutput — IBAN (SEPA) external account.
            - `bankName` string, required
            - `bankAddress` string, nullable
            - `currency` string, nullable
            - `accountHolderType` 'individual' | 'business', required — Account holder type.
            - `accountHolderFirstName` string, nullable
            - `accountHolderLastName` string, nullable
            - `accountHolderBusinessName` string, nullable
            - `accountHolderAddress` UserAddress — Address schema for user. Canonical field names: street_address, address_line_2, city, state, country, zip. Accepts legacy Align/IBAN field names (street_line_1, street_line_2, postal_code) for backward compatibility with existing JSONB data.
              - …
            - `relationship` 'charity' | 'commercial_investment' | 'corporate_card' | 'credit_card' | 'dividend' | 'family' | 'financial_services' | 'good_sold' | 'goods_bought' | 'government' | 'insurance' | 'intergroup_transfer' | 'intra_group_dividends' | 'information_technology' | 'leasing' | 'loan_charges' | 'merchant_settlement' | 'mobile_wallet' | 'none' | 'non_resident_transfer_between_accounts' | 'pension' | 'personal_expenses' | 'prepaid_cards' | 'professional' | 'rental' | 'resident_transfer_between_accounts' | 'salaries' | 'telecommunications' | 'travel' | 'utility_bill' — Unified contact relationship / transfer purpose. Values match Align AlignTransferPurpose (the more granular set). Mapped to Swipelux AccountHolderRelationship via ``swipelux_relationship``.
            - `paymentReference` string, nullable
            - `accountType` 'sepa' | 'uaefts'
            - `ibanNumber` string, required
            - `bic` string, nullable
            - `beneficiaryName` string, nullable, required — Frontend-only alias derived from account holder fields.
          - USExternalAccountDetailsOutput — US domestic (ACH) external account.
            - `bankName` string, required
            - `bankAddress` string, nullable
            - `currency` string, nullable
            - `accountHolderType` 'individual' | 'business', required — Account holder type.
            - `accountHolderFirstName` string, nullable
            - `accountHolderLastName` string, nullable
            - `accountHolderBusinessName` string, nullable
            - `accountHolderAddress` UserAddress — Address schema for user. Canonical field names: street_address, address_line_2, city, state, country, zip. Accepts legacy Align/IBAN field names (street_line_1, street_line_2, postal_code) for backward compatibility with existing JSONB data.
              - …
            - `relationship` 'charity' | 'commercial_investment' | 'corporate_card' | 'credit_card' | 'dividend' | 'family' | 'financial_services' | 'good_sold' | 'goods_bought' | 'government' | 'insurance' | 'intergroup_transfer' | 'intra_group_dividends' | 'information_technology' | 'leasing' | 'loan_charges' | 'merchant_settlement' | 'mobile_wallet' | 'none' | 'non_resident_transfer_between_accounts' | 'pension' | 'personal_expenses' | 'prepaid_cards' | 'professional' | 'rental' | 'resident_transfer_between_accounts' | 'salaries' | 'telecommunications' | 'travel' | 'utility_bill' — Unified contact relationship / transfer purpose. Values match Align AlignTransferPurpose (the more granular set). Mapped to Swipelux AccountHolderRelationship via ``swipelux_relationship``.
            - `paymentReference` string, nullable
            - `accountType` 'ach' | 'fedwire'
            - `us` USAccountDetails, required — US domestic account details (ACH).
              - …
            - `beneficiaryName` string, nullable, required — Frontend-only alias derived from account holder fields.
          - SwiftAccountDetailsOutput — SWIFT (international wire) external account.
            - `bankName` string, required
            - `bankAddress` string, nullable
            - `currency` string, nullable
            - `accountHolderType` 'individual' | 'business', required — Account holder type.
            - `accountHolderFirstName` string, nullable
            - `accountHolderLastName` string, nullable
            - `accountHolderBusinessName` string, nullable
            - `accountHolderAddress` UserAddress — Address schema for user. Canonical field names: street_address, address_line_2, city, state, country, zip. Accepts legacy Align/IBAN field names (street_line_1, street_line_2, postal_code) for backward compatibility with existing JSONB data.
              - …
            - `relationship` 'charity' | 'commercial_investment' | 'corporate_card' | 'credit_card' | 'dividend' | 'family' | 'financial_services' | 'good_sold' | 'goods_bought' | 'government' | 'insurance' | 'intergroup_transfer' | 'intra_group_dividends' | 'information_technology' | 'leasing' | 'loan_charges' | 'merchant_settlement' | 'mobile_wallet' | 'none' | 'non_resident_transfer_between_accounts' | 'pension' | 'personal_expenses' | 'prepaid_cards' | 'professional' | 'rental' | 'resident_transfer_between_accounts' | 'salaries' | 'telecommunications' | 'travel' | 'utility_bill' — Unified contact relationship / transfer purpose. Values match Align AlignTransferPurpose (the more granular set). Mapped to Swipelux AccountHolderRelationship via ``swipelux_relationship``.
            - `paymentReference` string, nullable
            - `accountType` 'swift'
            - `swift` SwiftDetails, required — SWIFT (international wire) account details.
              - …
            - `beneficiaryName` string, nullable, required — Frontend-only alias derived from account holder fields.
          - ContactWalletResponse — Wallet payment method block used by invoice/payment method schemas.
            - `address` string, required
            - `chainId` string, nullable
            - `currency` string
            - `internal` boolean
          - EmailAccountInput — Email contact input.
            - `accountType` 'email'
            - `email` string, required
      - `status` 'draft' | 'sent' | 'paid' | 'cancelled' | 'client_paid' | 'client_declined', required — Invoice status.
      - `client` InvoiceParticipant — Minimal participant info for invoice response.
        - `email` string, required
        - `displayName` string, nullable
        - `address` UserAddress — Address schema for user. Canonical field names: street_address, address_line_2, city, state, country, zip. Accepts legacy Align/IBAN field names (street_line_1, street_line_2, postal_code) for backward compatibility with existing JSONB data.
          - `streetAddress` string, nullable
          - `addressLine2` string, nullable
          - `city` string, nullable
          - `state` string, nullable
          - `country` 'AF' | 'AX' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BQ' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'CV' | 'KH' | 'CM' | 'CA' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CW' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'SZ' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GG' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IM' | 'IL' | 'IT' | 'JM' | 'JP' | 'JE' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'ME' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MK' | 'MP' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'BL' | 'SH' | 'KN' | 'LC' | 'MF' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'RS' | 'SC' | 'SL' | 'SG' | 'SX' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'SS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' — ISO 3166-1 alpha-2 country codes.
          - `zip` string, nullable
      - `contractor` InvoiceParticipant — Minimal participant info for invoice response.
        - `email` string, required
        - `displayName` string, nullable
        - `address` UserAddress — Address schema for user. Canonical field names: street_address, address_line_2, city, state, country, zip. Accepts legacy Align/IBAN field names (street_line_1, street_line_2, postal_code) for backward compatibility with existing JSONB data.
          - `streetAddress` string, nullable
          - `addressLine2` string, nullable
          - `city` string, nullable
          - `state` string, nullable
          - `country` 'AF' | 'AX' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BQ' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'CV' | 'KH' | 'CM' | 'CA' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CW' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'SZ' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GG' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IM' | 'IL' | 'IT' | 'JM' | 'JP' | 'JE' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'ME' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MK' | 'MP' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'BL' | 'SH' | 'KN' | 'LC' | 'MF' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'RS' | 'SC' | 'SL' | 'SG' | 'SX' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'SS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW' — ISO 3166-1 alpha-2 country codes.
          - `zip` string, nullable
      - `contract` InvoiceContractInfo — Minimal contract info embedded in invoice response.
        - `id` string, uuid, required
        - `type` 'service' | 'employment' | 'nda' | 'contractor' | 'default_contractor' | 'custom' | 'vendor' | 'milestone' | 'msa' | 'other', required — Contract type.
        - `status` 'pending_approval_by_contractor' | 'pending_approval_by_client' | 'active' | 'completed' | 'cancelled' | 'paused', required — Contract status.
        - `period` string, nullable
        - `isRecurring` boolean, required
        - `activationAt` string, date-time, nullable
        - `expirationAt` string, date-time, nullable
      - `invoiceLink` string, nullable
      - `documents` InvoiceDocumentInfo[]
        - `id` string, uuid, required
        - `name` string, required
        - `key` string, required
      - `paidAt` string, date-time, nullable
      - `createdAt` string, date-time, required
      - `updatedAt` string, date-time, required
    - `detail` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/hevn-inc/apis/hevn-api.md) · [All operations](https://skmtc.net/hevn-inc/apis/hevn-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hevn-inc/hevn-api/versions/e6301d6796bf/schema)
