# Update Transactions

This endpoint takes a reconciliationId and a corresponding ledger type and updates each provided transaction. In the case of General Ledger Transactions, it also takes a unique entityId.

Endpoint: PUT /api/{version}/transactions
Version: 1.0.0
Security: x-api-key

## Path parameters:

  - `version` (string, required)
    API version
    Enum: "v2", "v1"

## Query parameters:

  - `allowRedirect` (boolean)
    If set to true, the API will return a 303 redirect response if the response payload is too large. The header Location and body.data.url will also include the URL to the actual resource.
    Example: true

## Request fields (application/json;version=v2):

  - `body` (SubledgerTransaction (object) or GLTransactionV2 (object), required) — one of:
    - SubledgerTransaction:
      - `data` (object)
      - `data.reconciliationId` (string, required)
        Id of reconciliation
        Example: "5e94d5b63f557b001420bbe3"
      - `data.ledgerType` (string, required)
        Indicates whether every transaction uses general ledger or subledger
        Enum: "SUB_LEDGER"
      - `data.upsert` (boolean)
        If true, upserts the provided subledger transactions, only overwriting transactions with a matching transactionId. If false or absent, replaces existing subledger transactions for this reconciliation prior to inserting the provided subledger transactions.
      - `data.transactions` (array, required)
        Array of transactions
      - `data.transactions.transactionId` (string, required)
        Unique ERP Identification number
        Example: "TX12848472728"
      - `data.transactions.transactionDate` (string, required)
        Date of transaction in ISO 8601 format
        Example: "2020-04-13"
      - `data.transactions.accountType` (string, required)
        Type of account
        Enum: "Accounts Receivable", "Accounts Payable", "Fixed Assets", "Accumulated Depreciation", "Inventory", "Cash", "Sales", "Purchase", "Payroll", "Intercompany", "Leases", "Other"
      - `data.transactions.accountingDate` (string, required)
        Is the posting date - It determines when the transaction will be included in financial statements in ISO 8601 format
        Example: "2020-04-13"
      - `data.transactions.amount` (string, required)
        Dollar amount associated with this transaction. The amount may include non-numeric symbols, a minus sign for negatives, and a period or comma for decimals.
        Example: "15821.56"
      - `data.transactions.currency` (string, required)
        Currency of transaction
        Example: "USD"
      - `data.transactions.customer` (string)
        Debt or credit to or from a customer
        Example: "PepsiCo"
      - `data.transactions.vendor` (string)
        Debt or credit to or from a vendor
        Example: "Salesforce"
      - `data.transactions.assetNumber` (string)
        Unique asset identification number
        Example: "FA101"
      - `data.transactions.recordType` (string)
        Type of transaction hitting the subledger like: Credit memo, Journal entry, Payment, Invoice, etc.
        Example: "Credit memo"
      - `data.transactions.leaseId` (string)
        Unique lease identification number
        Example: "LSE1001"
      - `data.transactions.dueDate` (string)
        Due date of transaction.
        Example: "2020-05-13"
      - `data.transactions.description` (string)
        Description of transaction
        Example: "Credit memo for returned items"
      - `data.transactions.subsidiary` (string)
        Entity name
        Example: "PepsiCo North America"
      - `data.transactions.referenceNumber` (string)
        Unique identifier
        Example: "REF-485769"
      - `data.transactions.quantity` (string)
        Numeric value for quantity
        Example: "17"
      - `data.transactions.unitValue` (string)
        Dollar price per unit
        Example: "930.68"
      - `data.transactions.clearingIndicator` (string)
        To show if an amount has cleared the bank or not
        Enum: "CLEARED", "OPEN"
      - `data.transactions.assetType` (string)
        Type of asset/category of asset including Computers, Furniture, Software, etc...
        Example: "Computers"
      - `data.transactions.leaseType` (string)
        Enum: "FINANCIAL", "OPERATING"
      - `data.transactions.tradingPartner` (string)
        In relation to related parties. Unique identification of those trading parties.
        Example: "TP-001"
      - `data.transactions.locale` (string)
        Locale of balance. Defaults to en-US
        Example: "en-US"
    - GLTransactionV2:
      - `data` (object)
      - `data.reconciliationId` (string, required)
        ID of the reconciliation this transaction belongs to
        Example: "recon-123"
      - `data.account` (string, required)
        ID of gl account transactions are mapped to
        Example: "1000"
      - `data.ledgerType` (string, required)
        Indicates whether every transaction uses general ledger or subledger
        Enum: "GENERAL_LEDGER"
      - `data.period` (object, required)
        Posting period of transaction
      - `data.period.month` (string, required)
        Posting period month of transaction
        Enum: "january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"
      - `data.period.year` (string, required)
        Posting period year of transaction
        Example: "2024"
      - `data.entityId` (string, required)
        ID of entity
        Example: "5e94d5b63f557b001420bbe3"
      - `data.upsert` (boolean)
        If true, upserts the provided GL transactions, only overwriting transactions with a matching transactionId. If false or absent, replaces existing GL transactions for this reconciliation prior to inserting the provided GL transactions.
      - `data.transactions` (array, required)
        Array of transactions
      - `data.transactions.id` (string, required)
        Unique ERP Identification number
        Example: "TX12848472728"
      - `data.transactions.date` (string, required)
        Date transaction took place in ISO 8601 format
        Example: "2020-04-13"
      - `data.transactions.createDate` (string, required)
        Date transaction was entered into system in ISO 8601 format
        Example: "2020-04-13"
      - `data.transactions.accountingDate` (string)
        Posting date transaction is applied in ISO 8601 format
        Example: "2020-04-13"
      - `data.transactions.amount` (string, required)
        Amount associated with this transaction. The amount may include symbols that are parsed by the JS Intl.NumberFormat function using the information on the currency object property.
        Example: "15821.56"
      - `data.transactions.fxAmount` (string)
        Foreign amount associated with this transaction. The amount may include symbols that are parsed by the JS Intl.NumberFormat function using the information on the currency object property.
        Example: "15821.56"
      - `data.transactions.type` (string)
        Type of transaction
        Example: "Paycheck"
      - `data.transactions.posting` (boolean)
        Identifier whether the transaction is posted to the accounting balances
      - `data.transactions.reportingBook` (string)
        Reporting book mapped to transaction
        Example: "ACCRUAL"
      - `data.transactions.adjustmentBook` (string)
        Adjustment book mapped to transaction
        Example: "ADJ_BOOK1"
      - `data.transactions.generalRate` (string)
        Type of exchange rate applied to transaction
        Enum: "currentRate", "historicalRate", "averageRate"
      - `data.transactions.memo` (string)
        Memo added to transaction
        Example: "Example memo"
      - `data.transactions.currency` (object, required)
        Currency of transaction
      - `data.transactions.currency.code` (string, required)
        Corresponding ISO code to represent currency format
        Example: "USD"
      - `data.transactions.currency.name` (string)
        Name of currency
        Example: "US Dollars"
      - `data.transactions.currency.symbol` (string)
        Printed symbol associated with currency
        Example: "$"
      - `data.transactions.supplementalGroup` (object)
        Mapped subsidiary/location/legal entity associated with transaction
      - `data.transactions.supplementalGroup.id` (string, required)
        ID of supplementalGroup
        Example: "100"
      - `data.transactions.supplementalGroup.name` (string)
        Name of supplementalGroup
        Example: "CUBIT USA"
      - `data.transactions.entity` (array)
        Entity(ies) associated with transaction
      - `data.transactions.entity.id` (string, required)
        ID of entity
        Example: "1471"
      - `data.transactions.entity.type` (string, required)
        Type of entity
        Example: "Vendor"
      - `data.transactions.entity.name` (string)
        Name of entity
        Example: "AVI Consulting"
      - `data.transactions.department` (object)
        Department associated with transaction
      - `data.transactions.department.id` (string, required)
        ID of department
        Example: "4"
      - `data.transactions.department.name` (string)
        Name of department
        Example: "Engineering"
      - `data.transactions.project` (object)
        Project associated with transaction
      - `data.transactions.project.id` (string, required)
        ID of project
        Example: "100574"
      - `data.transactions.project.name` (string)
        Name of project
        Example: "Conceptual Design"
      - `data.transactions.class` (object)
        Class associated with transaction
      - `data.transactions.class.id` (string, required)
        ID of class
        Example: "10"
      - `data.transactions.class.name` (string)
        Name of class
        Example: "Accessories"
      - `data.transactions.locale` (string)
        Locale of balance. Defaults to en-US
        Example: "en-US"
      - `data.transactions.startDate` (string)
        Start date of transaction in ISO 8601 format
        Example: "2020-04-13"
      - `data.transactions.endDate` (string)
        End date of transaction in ISO 8601 format
        Example: "2020-04-13"
      - `data.transactions.usefulLife` (string)
        Useful life of transaction. Measured in months
        Example: "5"

## Response 200 fields (application/json):

  - `statusId` (string)
    Example: "615bcdc00000000000000302"

## Response 303 fields (application/json):

  - `data` (object)

  - `data.url` (string)
    The URL to the new location of the resource.

## Response 400 fields (application/json):

  - `body` (SubledgerBadRequest (object) or GLBadRequest (object)) — one of:
    - SubledgerBadRequest:
      - `message` (object)
        Reason(s) for the errors related to incorrect query keys or values that are out of bounds
      - `message.errors` (array)
      - `message.errors.field` (string)
        The field that caused the error
        Example: "reconciliationId"
      - `message.errors.message` (string)
        The error message
        Example: "reconciliationId is required"
      - `name` (string)
        BadRequest
        Example: "BadRequest"
      - `status` (integer)
        The HTTP status code.
        Example: 400
    - GLBadRequest:
      - `message` (object)
        Reason(s) for the errors related to incorrect query keys or values that are out of bounds
      - `message.errors` (array)
      - `message.errors.field` (string)
        The field that caused the error
        Example: "account"
      - `message.errors.message` (string)
        The error message
        Example: "account is required"
      - `name` (string)
        BadRequest
        Example: "BadRequest"
      - `status` (integer)
        The HTTP status code.
        Example: 400

## Response 401 fields (application/json):

  - `message` (string)
    Reason for the error such as incorrect service access, malformed, expired or deactivated token.
    Example: "Invalid token"

  - `name` (string)
    Unauthorized
    Example: "Unauthorized"

  - `status` (integer)
    The HTTP status code.
    Example: 401


