Ledger Transaction Posting

ID: UC-SPB-LDRTRN-W001
Complexity: Intermediate
Description: Search ledger transactions, retrieve details, post to external ERP, and update posting status in General Ledger
Scenario: A business user or automation sequence needs to identify pending ledger transactions, retrieve their full details, post them to an external system (like SAP or Oracle), and finally record the external posting information back into Nakisa General Ledger for audit and tracking.
Business Value: Ensures data consistency between Nakisa and external ERP systems, provides a clear audit trail of financial postings, and automates the tracking of transaction life cycles.

Prerequisites

  • Valid API key for General Ledger API

  • Access to General Ledger API environment

  • Understanding of ledger transaction structures

  • External ERP system access for posting

Steps

1. Search Ledger Transactions

Identify ledger transactions that need to be processed based on creation date or status

Endpoint: POST /api/v1/general-ledger/ledger-transactions/search

HTTP Request

curl -X POST 'https://{base-url}/data/api/v1/general-ledger/ledger-transactions/search?size=10' 
  -H 'x-api-key: YOUR_API_KEY' 
  -H 'Content-Type: application/json' 
  -d '{
  "createdAtGreaterThanOrEqual": "2025-12-02T10:15:22Z"
}'

Expected Response: HTTP 200 with a paginated list of ledger transactions containing IDs

Notes: Use filters like ‘createdAtGreaterThanOrEqual’ to find recent transactions. Save the returned transaction IDs for subsequent steps.

2. Retrieve Transaction Details

Fetch the complete details for a specific ledger transaction, including its line items

Endpoint: GET /api/v1/general-ledger/ledger-transactions/{id}

HTTP Request

curl -X GET 'https://{base-url}/data/api/v1/general-ledger/ledger-transactions/{id}' 
  -H 'x-api-key: YOUR_API_KEY' 
  -H 'Content-Type: application/json'

Expected Response: HTTP 200 with full ledger transaction details and associated entries

Notes: Replace {id} with the transaction ID obtained from Step 1. The response contains all necessary fields for posting to the ERP.

3. External Posting (Manual/External)

Post the transaction data retrieved in Step 2 to your external ERP system (e.g., SAP, Oracle)

Endpoint: EXTERNAL_STEP

HTTP Request

# Perform this step in your ERP interface or middleware system using data from Step 2

Expected Response: Successful posting in the external system with a generated document number

Notes: Nakisa does not provide an API for direct posting to external ERPs. This step is performed by the client application or user.

4. Update External Posting Info

Record the external document number and posting status back into General Ledger for the transaction

Endpoint: PUT /api/v1/general-ledger/ledger-transactions/external-info

HTTP Request

curl -X PUT 'https://{base-url}/data/api/v1/general-ledger/ledger-transactions/external-info' 
  -H 'x-api-key: YOUR_API_KEY' 
  -H 'Content-Type: application/json' 
  -d '{
    "externalPostingStatus": {
        "documentNumber": "190110905910002031",
        "objType": "BKPFF",
        "objKey": "190110905910002031",
        "objSys": "Q8SCLNT312",
        "status": {
          "name": "DONE"
        }
    },
    "ledgerTransactionId": 10191653
}'

Expected Response: HTTP 200 with the updated transaction status

Notes: Ensure the ‘ledgerTransactionId’ matches the ID from previous steps. This provides visibility of the external reference within Nakisa.

Best Practices

  • Always fetch the latest transaction details (Step 2) before attempting an external posting

  • Implement idempotent posting logic in your middleware to avoid duplicate entries in the ERP

  • Record external references as soon as possible after a successful posting for accurate audits

  • Log the full request and response of Step 4 for troubleshooting posting synchronization issues