Skip to main content

Intercompany Transactions API

The Intercompany Transactions API provides endpoints for managing transactions between related companies within a consolidation group, including reconciliation and matching status updates.

Base Path

/api/v1/intercompany-transactions
All endpoints require authentication with a valid session token.

Intercompany Transaction Concepts

Intercompany transactions track business activities between related companies:
  • From Company - The seller, lender, or service provider
  • To Company - The buyer, borrower, or service recipient
  • Transaction Type - Sale, loan, service, dividend, etc.
  • Matching Status - Matched, partially matched, unmatched, variance approved
  • Journal Entry Links - Links to JEs in both companies for reconciliation

Transaction Types

  • Sale - Goods sold from one company to another
  • Service - Services provided between companies
  • Loan - Intercompany loans and financing
  • Dividend - Dividends paid between parent and subsidiary
  • Royalty - Royalty payments for IP usage
  • ManagementFee - Management or administrative fees
  • Other - Other intercompany transactions

Matching Status

  • Unmatched - No corresponding entry found in counterparty
  • Matched - Perfectly matched with counterparty entry
  • PartiallyMatched - Matched but with variances
  • VarianceApproved - Variance documented and approved

List Intercompany Transactions

Retrieve a paginated list with comprehensive filtering.
GET /api/v1/intercompany-transactions
curl -X GET "https://your-instance.accountability.app/api/v1/intercompany-transactions?companyId={companyId}&matchingStatus=Unmatched" \
  -H "Authorization: Bearer your-session-token"
fromCompanyId
string
Filter by from company UUID
toCompanyId
string
Filter by to company UUID
companyId
string
Filter by either from or to company UUID
transactionType
enum
Filter by type: Sale, Service, Loan, Dividend, Royalty, ManagementFee, Other
matchingStatus
enum
Filter by status: Unmatched, Matched, PartiallyMatched, VarianceApproved
startDate
string
Filter by transaction date start (ISO 8601: YYYY-MM-DD)
endDate
string
Filter by transaction date end (ISO 8601: YYYY-MM-DD)
requiresElimination
boolean
Filter transactions requiring elimination during consolidation
unmatched
boolean
Quick filter for unmatched transactions only
limit
integer
default:"50"
Maximum items per page
offset
integer
default:"0"
Number of items to skip
{
  "transactions": [
    {
      "id": "ict_123e4567-e89b-12d3-a456-426614174000",
      "fromCompanyId": "comp_seller_123",
      "toCompanyId": "comp_buyer_123",
      "transactionType": "Sale",
      "transactionDate": "2025-03-15",
      "amount": { "value": "50000.00", "currency": "USD" },
      "description": "Equipment sale - Invoice #INV-2025-0315",
      "matchingStatus": "Matched",
      "fromJournalEntryId": "je_seller_001",
      "toJournalEntryId": "je_buyer_001",
      "varianceAmount": null,
      "varianceExplanation": null,
      "requiresElimination": true,
      "eliminatedInRunId": null,
      "createdAt": "2025-03-15T10:00:00Z",
      "updatedAt": "2025-03-15T14:30:00Z"
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}

Get Intercompany Transaction

Retrieve a single transaction by ID.
GET /api/v1/intercompany-transactions/{id}
curl -X GET "https://your-instance.accountability.app/api/v1/intercompany-transactions/{transactionId}" \
  -H "Authorization: Bearer your-session-token"
id
string
required
Intercompany transaction UUID

Create Intercompany Transaction

Create a new intercompany transaction with optional journal entry links.
POST /api/v1/intercompany-transactions
curl -X POST "https://your-instance.accountability.app/api/v1/intercompany-transactions" \
  -H "Authorization: Bearer your-session-token" \
  -H "Content-Type: application/json" \
  -d '{
    "organizationId": "org_123e4567-e89b-12d3-a456-426614174000",
    "fromCompanyId": "comp_seller_123",
    "toCompanyId": "comp_buyer_123",
    "transactionType": "Sale",
    "transactionDate": "2025-03-15",
    "amount": { "value": "50000.00", "currency": "USD" },
    "description": "Equipment sale - Invoice #INV-2025-0315",
    "fromJournalEntryId": "je_seller_001",
    "toJournalEntryId": "je_buyer_001"
  }'
organizationId
string
required
Organization UUID
fromCompanyId
string
required
From company UUID (seller/lender)
toCompanyId
string
required
To company UUID (buyer/borrower)
transactionType
enum
required
Transaction type: Sale, Service, Loan, Dividend, Royalty, ManagementFee, Other
transactionDate
string
required
Transaction date (ISO 8601: YYYY-MM-DD)
amount
MonetaryAmount
required
Transaction amount with currency
  • value (string): Amount
  • currency (string): ISO 4217 code
description
string
Optional transaction description
fromJournalEntryId
string
Optional from company journal entry UUID (can link during creation or later)
toJournalEntryId
string
Optional to company journal entry UUID

Update Intercompany Transaction

Update an existing transaction. Only provided fields are updated.
PUT /api/v1/intercompany-transactions/{id}
curl -X PUT "https://your-instance.accountability.app/api/v1/intercompany-transactions/{transactionId}" \
  -H "Authorization: Bearer your-session-token" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Updated description",
    "amount": { "value": "50500.00", "currency": "USD" },
    "varianceAmount": { "value": "500.00", "currency": "USD" },
    "varianceExplanation": "Shipping charges included"
  }'
Only certain fields can be updated depending on the transaction’s matching status and elimination status.

Delete Intercompany Transaction

Delete a transaction. Matched or eliminated transactions may not be deleted.
DELETE /api/v1/intercompany-transactions/{id}
curl -X DELETE "https://your-instance.accountability.app/api/v1/intercompany-transactions/{transactionId}" \
  -H "Authorization: Bearer your-session-token"
Transactions that have been matched or eliminated in consolidation runs cannot be deleted.

Update Matching Status

Update the matching status during reconciliation.
POST /api/v1/intercompany-transactions/{id}/matching-status
curl -X POST "https://your-instance.accountability.app/api/v1/intercompany-transactions/{transactionId}/matching-status" \
  -H "Authorization: Bearer your-session-token" \
  -H "Content-Type: application/json" \
  -d '{
    "matchingStatus": "PartiallyMatched",
    "varianceExplanation": "Timing difference: payment recorded in different period"
  }'
matchingStatus
enum
required
New matching status: Unmatched, Matched, PartiallyMatched, VarianceApproved
varianceExplanation
string
Explanation for variance (required for PartiallyMatched or VarianceApproved)

Link From Journal Entry

Link a journal entry to the ‘from’ (seller/lender) side.
POST /api/v1/intercompany-transactions/{id}/link-from-journal-entry
curl -X POST "https://your-instance.accountability.app/api/v1/intercompany-transactions/{transactionId}/link-from-journal-entry" \
  -H "Authorization: Bearer your-session-token" \
  -H "Content-Type: application/json" \
  -d '{
    "journalEntryId": "je_seller_001"
  }'
journalEntryId
string
required
Journal entry UUID from the from company

Link To Journal Entry

Link a journal entry to the ‘to’ (buyer/borrower) side.
POST /api/v1/intercompany-transactions/{id}/link-to-journal-entry
curl -X POST "https://your-instance.accountability.app/api/v1/intercompany-transactions/{transactionId}/link-to-journal-entry" \
  -H "Authorization: Bearer your-session-token" \
  -H "Content-Type: application/json" \
  -d '{
    "journalEntryId": "je_buyer_001"
  }'
journalEntryId
string
required
Journal entry UUID from the to company

Reconciliation Workflow

1

Identify Unmatched Transactions

Query for unmatched transactions:
GET /api/v1/intercompany-transactions?unmatched=true
2

Link Journal Entries

Link the corresponding journal entries from both companies:
POST /api/v1/intercompany-transactions/{id}/link-from-journal-entry
POST /api/v1/intercompany-transactions/{id}/link-to-journal-entry
3

Update Matching Status

If amounts match perfectly, mark as Matched:
POST /api/v1/intercompany-transactions/{id}/matching-status
{ "matchingStatus": "Matched" }
If variances exist, document them:
POST /api/v1/intercompany-transactions/{id}/matching-status
{
  "matchingStatus": "PartiallyMatched",
  "varianceExplanation": "Timing difference"
}
4

Approve Variances

For documented variances, approve after review:
POST /api/v1/intercompany-transactions/{id}/matching-status
{ "matchingStatus": "VarianceApproved" }

Error Responses

{
  "_tag": "IntercompanyTransactionNotFoundError",
  "intercompanyTransactionId": "ict_123e4567-e89b-12d3-a456-426614174000",
  "message": "Intercompany transaction not found"
}
{
  "_tag": "IntercompanyTransactionCannotBeDeletedError",
  "intercompanyTransactionId": "ict_123e4567-e89b-12d3-a456-426614174000",
  "reason": "Transaction has been eliminated in consolidation run",
  "message": "Cannot delete transaction that has been eliminated in consolidation"
}
{
  "_tag": "SameCompanyIntercompanyError",
  "companyId": "comp_123e4567-e89b-12d3-a456-426614174000",
  "message": "Intercompany transactions must be between different companies"
}

Build docs developers (and LLMs) love