GET {HOST:URL}/glPost/{format}/{startDateString}/{endDateString}/{aggregateFlag}

This API requests the General Ledger (GL) summary records from the PostgreSQL database for a given GL date range, and writes GL journal entries to XML files.

URL Parameters

The API has the following URL parameters.
format
The format of the output. Values are xml and json.
startDateString
The start date of the GL date range within which the utility aggregates all journal entries from the GL daily summary records stored in your PostgreSQL database. Must be in the format (yyyy-mm-dd).
endDateString
The end date of the GL date range within which the utility aggregates all journal entries from the GL summary records stored in your PostgreSQL database. Must be in the format (yyyy-mm-dd).
aggregateFlag
If false, generates the posting in non-aggregate mode. Prints the GL journal entries in the requested date range without summing the journal amounts. Used with the exportFields property in the docker-compose.yaml file, which specifies the list of fields to export.

Examples

In the following examples, GL is configured as one of the following (lines wrap for legibility):
  • application.yaml
    volumes:
      - ./output:/tmp/output/ # Copy GL posting output files to this directory
    environment:
      glPosting.aggregateByFields: Account1,Account2,TxnType,GlCenter,Status,
      ConsumptionRecords,IsTaxIncluded,ExternalId,EventTypeArray,ProductOfferId,
      ProductOfferResourceId,City,PhoneNumber,CatalogItemId,CatalogItemExternalId
      glPosting.exportFields: Account1,Account2,TxnType,GlCenter,Status,Amount,
      ConsumptionRecords,IsTaxIncluded,InitiatorExternalId,ExternalId,EventTypeArray,
      ProductOfferId,ProductOfferResourceId,City,PhoneNumber,CatalogItemId,
      CatalogItemExternalId
      glPosting.numEntryPerFile: 1000 # Max journals entry per file
      glPosting.outputDir: /tmp/output # Name of the output directory
      glPosting.outputFile: /output_file_ # Name of the file followed by incremental 
      numbers if there are more files
    
  • Helm values file
    - name: glPosting.aggregateByFields
      value: Account1,Account2,TxnType,GlCenter,Status,ConsumptionRecords,
      IsTaxIncluded,InitiatorExternalId,ExternalId,EventTypeArray,
      ProductOfferId,ProductOfferResourceId,City,PhoneNumber,CatalogItemId,
      CatalogItemExternalId
    - name: glPosting.exportFields
      value: Account1,Account2,TxnType,GlCenter,Status,Amount,ConsumptionRecords,
      IsTaxIncluded,InitiatorExternalId,ExternalId,EventTypeArray,
      ProductOfferId,ProductOfferResourceId,City,PhoneNumber,CatalogItemId,CatalogItemExternalId
    - name: glPosting.numEntryPerFile
      value: "1000"
    - name: glPosting.outputDir
      value: /var/output # Name of the output directory
    - name: glPosting.outputFile
      value: /output_file_  # Name of the file followed by incremental numbers if there are 
      more files
    
The following example shows a request with the following parameters:
  • startDateString: 2023–07–01
  • endDateString: 2023–10–20
  • aggregateFlag: true
JSON Output:
{
    "StartDate" : "2023-07-01",
    "EndDate" : "2023-10-20",
    "JournalEntries" : {
        "JournalEntry" : [ {
            "amount" : 644194.11,
            "productofferid" : "3",
            "catalogitemid" : "3",
            "account2" : "BCC1",
            "istaxincluded" : false,
            "account1" : "ACC1",
            "txntype" : 10,
            "productofferresourceid" : "3",
            "eventtypearray" : "2"
         }, {
            "amount" : 8649880.00,
            "productofferid" : "3",
            "catalogitemid" : "3",
            "account2" : "ACC1",
            "istaxincluded" : false,
            "txntype" : 99,
            "productofferresourceid" : "3",
            "eventtypearray" : "2"
            } ]
         }
    }
}
The following example shows a request with the following parameters:
  • startDateString : 2019-04-01
  • endDateString: 2019-06-01
  • aggregateFlag: false
JSON Output:
{
    "StartDate" : "2023-07-01",
    "EndDate" : "2023-10-20",
    "JournalEntries" : {
        "JournalEntry" : [ {
            "amount" : 0.77,
            "productofferid" : "3",
            "catalogitemid" : "3",
            "account2" : "BCC1",
            "istaxincluded" : false,
            "account1" : "ACC1",
            "txntype" : 10,
            "productofferresourceid" : "3",
            "eventtypearray" : "2",
            "initiatorexternalid" : "11398259"
        }, {
            "amount" : 0.77,
            "productofferid" : "3",
            "catalogitemid" : "3",
            "account2" : "BCC1",
            "istaxincluded" : false,
            "account1" : "ACC1",
            "txntype" : 10,
            "productofferresourceid" : "3",
            "eventtypearray" : "2",
            "initiatorexternalid" : "11398317"
        }, {
            "amount" : 10.00,
            "productofferid" : "3",
            "catalogitemid" : "3",
            "account2" : "ACC1",
            "istaxincluded" : false,
            "txntype" : 99,
            "productofferresourceid" : "3",
            "eventtypearray" : "2",
            "initiatorexternalid" : "11398317"
        }, {
            "amount" : 0.77,
            "productofferid" : "3",
            "catalogitemid" : "3",
            "account2" : "BCC1",
            "istaxincluded" : false,
            "account1" : "ACC1",
            "txntype" : 10,
            "productofferresourceid" : "3",
            "eventtypearray" : "2",
            "initiatorexternalid" : "11398351"
        }, {
            ...
        } ]
     }
}