General Ledger Transactions

General Ledger Transactions endpoints for the Accounting API Unified API

10.24.40
Run In Postman
|Full reference

A General Ledger Transaction is a posted entry in the general ledger, regardless of its origin — invoice posting, bill posting, payment, manual journal, payroll, etc. The source_type field discriminates the origin. Read-only by design: clients write through the originating resource (invoices, bills, payments, journal-entries).

The General Ledger Transactions model

idstring

A unique identifier for an object.

source_typestring or null
required
Enum:otherinvoicebillcredit_note

The originating transaction type that produced this posting in the general ledger. Discriminates whether the entry came from an invoice, a bill, a payment, a manual journal, etc. This is the key field that distinguishes general-ledger-transactions from journal-entries (which only covers manually-captured entries). May be null when the upstream connector did not return an origin discriminator (e.g. Xero's single-record endpoint strips SourceType for every record; certain historical records also omit it). To recover a populated value, query the list endpoint.

source_idstring or null

Identifier of the originating document in the vendor system. For example, when source_type is 'invoice', this is the id of the invoice that produced this posting. Use this id together with source_type to fetch the source document via its dedicated unified resource.

posted_atstring

The date on which the transaction was posted to the general ledger. This is the accounting date — it is what determines the period the transaction belongs to and can be earlier than the creation date for backdated postings.

referencestring or null

Optional reference identifier for the transaction.

numberstring or null

Sequential number auto-assigned by the vendor system to the transaction (e.g. Xero JournalNumber). Unique per company.

General Ledger Transactions example
{}

List General Ledger Transactions

get
https://unify.apideck.com/accounting/general-ledger-transactions

List General Ledger Transactions

Authorizations:

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstringnon-empty
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

x-apideck-company-idstring

The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

cursorstring or null

Cursor to start from. You can find cursors for next/previous pages in the meta.cursors property of the response.

limitinteger[ 1 .. 200 ]
Default:20

Number of results to return. Minimum 1, Maximum 200, Default 20

filterobjectfilter[source_type]=source_type

Apply filters

sortobjectsort[by]=posted_at

Apply sorting

pass_throughobjectpass_through[example_downstream_property]=example_downstream_property

Optional unmapped key/values that will be passed through to downstream as query parameters. Ie: ?pass_through[search]=leads becomes ?search=leads

fieldsstring or null

The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.

Responses

200GeneralLedgerTransactions
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
Access Financials
Access Financials
Request
Acumatica
Acumatica
Request
AFAS Software
AFAS Software
Request
Alegra
Alegra
Request
banqUP
banqUP
Request
Campfire
Campfire
Request
Clear Books
Clear Books
Request
DATEV Unternehmen Online
DATEV Unternehmen Online
Request
Digits
Digits
Request
Dualentry
Dualentry
Request
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
Fortnox
Fortnox
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
MYOB Acumatica
MYOB Acumatica
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Pennylane
Pennylane
Request
Procountor
Procountor
Request
QuickBooks
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
Sage Intacct
Sage Intacct
Request
Sage Intacct REST
Sage Intacct REST
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
Spiris
Spiris
Request
Stripe
Stripe
Request
Visma eAccounting
Visma eAccounting
Request
Visma Netvisor
Visma Netvisor
Request
Wafeq
Wafeq
Request
Wave
Wave
Request
Workday
Workday
Request
Xero
Xero
Request
Yuki
Yuki
Request
Zoho Books
Zoho Books
Request

Request example

import { Apideck } from "@apideck/unify";

const apideck = new Apideck({
  consumerId: "test-consumer",
  appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
  apiKey: process.env["APIDECK_API_KEY"] ?? "",
});

async function run() {
  const result = await apideck.accounting.generalLedgerTransactions.list({
    serviceId: "salesforce",
    companyId: "12345",
    filter: {
      sourceType: "invoice",
      updatedSince: new Date("2024-09-30T07:43:32.000Z"),
    },
    sort: {
      by: "posted_at",
      direction: "desc",
    },
    passThrough: {
      "search": "San Francisco",
    },
    fields: "id,updated_at",
  });

  for await (const page of result) {
    console.log(page);
  }
}

run();

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "xero",
  "resource": "general-ledger-transactions",
  "operation": "all",
  "data": [
    {
      "id": "12345",
      "source_type": "invoice",
      "source_id": "12345",
      "posted_at": "2020-09-30T07:43:32.000Z",
      "reference": "INV-2024-001",
      "number": "JNL-001",
      "currency": "USD",
      "currency_rate": 0.69,
      "memo": "Year-end adjustment for inventory revaluation",
      "line_items": [
        {
          "id": "12345",
          "description": "Sales revenue from Q3 batch",
          "net_amount": 27500,
          "type": "debit",
          "tax_amount": 0,
          "tax_rate": {
            "id": "123456",
            "code": "N-T",
            "name": "GST on Purchases",
            "rate": 10
          },
          "tracking_categories": [
            {
              "id": "123456",
              "code": "100",
              "name": "New York",
              "parent_id": "123456",
              "parent_name": "New York"
            }
          ],
          "ledger_account": {
            "id": "123456",
            "name": "Bank account",
            "nominal_code": "N091",
            "code": "453",
            "parent_id": "123456",
            "display_id": "123456"
          },
          "line_number": 1
        },
        {
          "id": "12345",
          "description": "Sales revenue from Q3 batch",
          "net_amount": 27500,
          "type": "debit",
          "tax_amount": 0,
          "tax_rate": {
            "id": "123456",
            "code": "N-T",
            "name": "GST on Purchases",
            "rate": 10
          },
          "tracking_categories": [
            {
              "id": "123456",
              "code": "100",
              "name": "New York",
              "parent_id": "123456",
              "parent_name": "New York"
            }
          ],
          "ledger_account": {
            "id": "123456",
            "name": "Bank account",
            "nominal_code": "N091",
            "code": "453",
            "parent_id": "123456",
            "display_id": "123456"
          },
          "line_number": 1
        }
      ],
      "custom_fields": [
        {
          "id": "2389328923893298",
          "name": "employee_level",
          "description": "Employee Level",
          "value": "Uses Salesforce and Marketo"
        }
      ],
      "updated_by": "12345",
      "created_by": "12345",
      "updated_at": "2020-09-30T07:43:32.000Z",
      "created_at": "2020-09-30T07:43:32.000Z",
      "custom_mappings": {}
    }
  ],
  "meta": {
    "items_on_page": 50,
    "cursors": {
      "previous": "em9oby1jcm06OnBhZ2U6OjE=",
      "current": "em9oby1jcm06OnBhZ2U6OjI=",
      "next": "em9oby1jcm06OnBhZ2U6OjM="
    }
  },
  "links": {
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D",
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM"
  },
  "_raw": {}
}

Get General Ledger Transaction

get
https://unify.apideck.com/accounting/general-ledger-transactions/{id}

Get General Ledger Transaction

Authorizations:

Path parameters

idstring
required

ID of the record you are acting upon.

Header parameters

x-apideck-consumer-idstring
required

ID of the consumer which you want to get or push data from

x-apideck-app-idstringnon-empty
required

The ID of your Unify application

x-apideck-service-idstring

Provide the service id you want to call (e.g., pipedrive). Only needed when a consumer has activated multiple integrations for a Unified API.

x-apideck-company-idstring

The ID of the company to scope requests to. For connectors that support multi-company, this overrides the default company configured in connection settings.

Query parameters

rawboolean
Default:false

Include raw response. Mostly used for debugging purposes

fieldsstring or null

The 'fields' parameter allows API users to specify the fields they want to include in the API response. If this parameter is not present, the API will return all available fields. If this parameter is present, only the fields specified in the comma-separated string will be included in the response. Nested properties can also be requested by using a dot notation.

Example: fields=name,email,addresses.city

In the example above, the response will only include the fields "name", "email" and "addresses.city". If any other fields are available, they will be excluded.

Responses

200GeneralLedgerTransaction
400Bad Request
401Unauthorized
402Payment Required
404The specified resource was not found
422Unprocessable
Access Financials
Access Financials
Request
Acumatica
Acumatica
Request
AFAS Software
AFAS Software
Request
Alegra
Alegra
Request
banqUP
banqUP
Request
Campfire
Campfire
Request
Clear Books
Clear Books
Request
DATEV Unternehmen Online
DATEV Unternehmen Online
Request
Digits
Digits
Request
Dualentry
Dualentry
Request
Exact Online
Exact Online
Request
Exact Online NL
Exact Online NL
Request
Exact Online UK
Exact Online UK
Request
Fortnox
Fortnox
Request
FreeAgent
FreeAgent
Request
FreshBooks
FreshBooks
Request
Holded
Holded
Request
Intuit Enterprise Suite
Intuit Enterprise Suite
Request
Kashflow
Kashflow
Request
Microsoft Dynamics 365 Business Central
Microsoft Dynamics 365 Business Central
Request
Moneybird
Moneybird
Request
MRI Software
MRI Software
Request
MYOB
MYOB
Request
MYOB Acumatica
MYOB Acumatica
Request
NetSuite
NetSuite
Request
Odoo
Odoo
Request
Pennylane
Pennylane
Request
Procountor
Procountor
Request
QuickBooks
QuickBooks
Request
QuickBooks Desktop
QuickBooks Desktop
Request
Rillet
Rillet
Request
Sage Business Cloud Accounting
Sage Business Cloud Accounting
Request
Sage Intacct
Sage Intacct
Request
Sage Intacct REST
Sage Intacct REST
Request
SAP S/4HANA Cloud
SAP S/4HANA Cloud
Request
Spiris
Spiris
Request
Stripe
Stripe
Request
Visma eAccounting
Visma eAccounting
Request
Visma Netvisor
Visma Netvisor
Request
Wafeq
Wafeq
Request
Wave
Wave
Request
Workday
Workday
Request
Xero
Xero
Request
Yuki
Yuki
Request
Zoho Books
Zoho Books
Request

Request example

import { Apideck } from "@apideck/unify";

const apideck = new Apideck({
  consumerId: "test-consumer",
  appId: "dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX",
  apiKey: process.env["APIDECK_API_KEY"] ?? "",
});

async function run() {
  const result = await apideck.accounting.generalLedgerTransactions.get({
    id: "<id>",
    serviceId: "salesforce",
    companyId: "12345",
    fields: "id,updated_at",
  });

  console.log(result);
}

run();

Response example

{
  "status_code": 200,
  "status": "OK",
  "service": "xero",
  "resource": "general-ledger-transactions",
  "operation": "one",
  "data": {
    "id": "12345",
    "source_type": "invoice",
    "source_id": "12345",
    "posted_at": "2020-09-30T07:43:32.000Z",
    "reference": "INV-2024-001",
    "number": "JNL-001",
    "currency": "USD",
    "currency_rate": 0.69,
    "memo": "Year-end adjustment for inventory revaluation",
    "line_items": [
      {
        "id": "12345",
        "description": "Sales revenue from Q3 batch",
        "net_amount": 27500,
        "type": "debit",
        "tax_amount": 0,
        "tax_rate": {
          "id": "123456",
          "code": "N-T",
          "name": "GST on Purchases",
          "rate": 10
        },
        "tracking_categories": [
          {
            "id": "123456",
            "code": "100",
            "name": "New York",
            "parent_id": "123456",
            "parent_name": "New York"
          }
        ],
        "ledger_account": {
          "id": "123456",
          "name": "Bank account",
          "nominal_code": "N091",
          "code": "453",
          "parent_id": "123456",
          "display_id": "123456"
        },
        "line_number": 1
      },
      {
        "id": "12345",
        "description": "Sales revenue from Q3 batch",
        "net_amount": 27500,
        "type": "debit",
        "tax_amount": 0,
        "tax_rate": {
          "id": "123456",
          "code": "N-T",
          "name": "GST on Purchases",
          "rate": 10
        },
        "tracking_categories": [
          {
            "id": "123456",
            "code": "100",
            "name": "New York",
            "parent_id": "123456",
            "parent_name": "New York"
          }
        ],
        "ledger_account": {
          "id": "123456",
          "name": "Bank account",
          "nominal_code": "N091",
          "code": "453",
          "parent_id": "123456",
          "display_id": "123456"
        },
        "line_number": 1
      }
    ],
    "custom_fields": [
      {
        "id": "2389328923893298",
        "name": "employee_level",
        "description": "Employee Level",
        "value": "Uses Salesforce and Marketo"
      }
    ],
    "updated_by": "12345",
    "created_by": "12345",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "created_at": "2020-09-30T07:43:32.000Z",
    "custom_mappings": {}
  },
  "_raw": {}
}