Skip to main content
POST
/
accounting
/
journal_entries
curl --request POST \
  --url https://api.rootfi.dev/v3/accounting/journal_entries \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '{
  "company_id": 1,
  "data": [
    {
      "document_number": "ROOTFI01",
      "posted_date": "2021-09-28T15:00:00.000Z",
      "description": "Test Invoice",
      "currency_id": "GBP",
      "business_unit_id": "1",
      "journal_lines": [
        {
          "account_id": "123456",
          "type": "DEBIT",
          "net_amount": 100,
          "contact_id": "123456",
          "tax_id": "123456",
          "tracking_category_ids": [],
          "description": "Test Item"
        },
        {
          "account_id": "123456",
          "type": "CREDIT",
          "net_amount": 100,
          "contact_id": "123456",
          "tax_id": "123456",
          "tracking_category_ids": [],
          "description": "Test Item"
        }
      ]
    }
  ]
}'
{
  "data": {
    "rootfi_id": 157,
    "rootfi_created_at": "2024-01-22T05:07:31.465Z",
    "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
    "rootfi_company_id": 1089,
    "platform_id": "123456",
    "rootfi_deleted_at": "2023-11-07T05:31:56Z",
    "platform_unique_id": "<string>",
    "raw_data": {},
    "data_hash": "<string>",
    "account_id": "<string>",
    "amount": 123,
    "currency_id": "<string>",
    "journal_entry_type": "<string>",
    "description": "<string>",
    "updated_at": "<string>",
    "currency_rate": 123,
    "posted_date": "<string>",
    "document_number": "<string>",
    "journal_lines": [
      {
        "platform_id": "<string>",
        "journal_entry_id": "<string>",
        "net_amount": 100,
        "account_id": "<string>",
        "contact_id": "<string>",
        "tax_id": "<string>",
        "tracking_category_ids": [
          "<string>"
        ],
        "type": "DEBIT",
        "description": "<string>",
        "tax_amount": 123,
        "updated_at": "2023-11-07T05:31:56Z",
        "raw_data": {},
        "account": {
          "rootfi_id": 157,
          "rootfi_created_at": "2024-01-22T05:07:31.465Z",
          "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
          "rootfi_company_id": 1089,
          "platform_id": "123456",
          "rootfi_deleted_at": "2023-11-07T05:31:56Z",
          "platform_unique_id": "<string>",
          "raw_data": {},
          "data_hash": "<string>",
          "name": "<string>",
          "description": "<string>",
          "nominal_code": "<string>",
          "current_balance": 123,
          "updated_at": "<string>",
          "status": "<string>",
          "category": "ASSET",
          "sub_category": "<string>",
          "currency_id": "<string>",
          "parent_account_id": "<string>",
          "parent_account": {
            "rootfi_id": 157,
            "rootfi_created_at": "2024-01-22T05:07:31.465Z",
            "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
            "rootfi_company_id": 1089,
            "platform_id": "123456",
            "rootfi_deleted_at": "2023-11-07T05:31:56Z",
            "platform_unique_id": "<string>",
            "raw_data": {},
            "data_hash": "<string>",
            "name": "<string>",
            "description": "<string>",
            "nominal_code": "<string>",
            "current_balance": 123,
            "updated_at": "<string>",
            "status": "<string>",
            "category": "ASSET",
            "sub_category": "<string>",
            "currency_id": "<string>",
            "parent_account_id": "<string>"
          },
          "currency": {
            "rootfi_id": 157,
            "rootfi_created_at": "2024-01-22T05:07:31.465Z",
            "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
            "rootfi_company_id": 1089,
            "platform_id": "123456",
            "rootfi_deleted_at": "2023-11-07T05:31:56Z",
            "platform_unique_id": "<string>",
            "raw_data": {},
            "data_hash": "<string>",
            "name": "<string>",
            "code": "<string>",
            "symbol": "<string>",
            "is_base_currency": true,
            "exchange_rate": 123,
            "updated_at": "<string>"
          }
        },
        "contact": {
          "rootfi_id": 157,
          "rootfi_created_at": "2024-01-22T05:07:31.465Z",
          "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
          "rootfi_company_id": 1089,
          "platform_id": "123456",
          "rootfi_deleted_at": "2023-11-07T05:31:56Z",
          "platform_unique_id": "<string>",
          "raw_data": {},
          "data_hash": "<string>",
          "name": "<string>",
          "contact_name": "<string>",
          "contact_type": "CUSTOMER",
          "currency_id": "<string>",
          "tax_number": "<string>",
          "registration_number": "<string>",
          "status": "ACTIVE",
          "updated_at": "<string>",
          "external_links": [
            {
              "rootfi_id": 123,
              "platform_id": "<string>",
              "link": "<string>",
              "type": "EMAIL"
            }
          ],
          "phone_numbers": [
            {
              "rootfi_id": 123,
              "platform_id": "<string>",
              "number": "<string>",
              "type": "MOBILE"
            }
          ],
          "addresses": [
            {
              "rootfi_id": 123,
              "platform_id": "<string>",
              "street": "<string>",
              "locality": "<string>",
              "city": "<string>",
              "state": "<string>",
              "pincode": "<string>",
              "country": "<string>"
            }
          ]
        },
        "tax_rate": {
          "rootfi_id": 157,
          "rootfi_created_at": "2024-01-22T05:07:31.465Z",
          "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
          "rootfi_company_id": 1089,
          "platform_id": "123456",
          "rootfi_deleted_at": "2023-11-07T05:31:56Z",
          "platform_unique_id": "<string>",
          "raw_data": {},
          "data_hash": "<string>",
          "name": "<string>",
          "code": "<string>",
          "tax_type": "<string>",
          "effective_tax_rate": 123,
          "total_tax_rate": 123,
          "components": [
            {
              "name": "<string>",
              "rate": 123,
              "tax_agency": "<string>",
              "is_compound": true
            }
          ],
          "updated_at": "<string>"
        }
      }
    ],
    "currency": {
      "rootfi_id": 157,
      "rootfi_created_at": "2024-01-22T05:07:31.465Z",
      "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
      "rootfi_company_id": 1089,
      "platform_id": "123456",
      "rootfi_deleted_at": "2023-11-07T05:31:56Z",
      "platform_unique_id": "<string>",
      "raw_data": {},
      "data_hash": "<string>",
      "name": "<string>",
      "code": "<string>",
      "symbol": "<string>",
      "is_base_currency": true,
      "exchange_rate": 123,
      "updated_at": "<string>"
    },
    "account": {
      "rootfi_id": 157,
      "rootfi_created_at": "2024-01-22T05:07:31.465Z",
      "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
      "rootfi_company_id": 1089,
      "platform_id": "123456",
      "rootfi_deleted_at": "2023-11-07T05:31:56Z",
      "platform_unique_id": "<string>",
      "raw_data": {},
      "data_hash": "<string>",
      "name": "<string>",
      "description": "<string>",
      "nominal_code": "<string>",
      "current_balance": 123,
      "updated_at": "<string>",
      "status": "<string>",
      "category": "ASSET",
      "sub_category": "<string>",
      "currency_id": "<string>",
      "parent_account_id": "<string>",
      "parent_account": {
        "rootfi_id": 157,
        "rootfi_created_at": "2024-01-22T05:07:31.465Z",
        "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
        "rootfi_company_id": 1089,
        "platform_id": "123456",
        "rootfi_deleted_at": "2023-11-07T05:31:56Z",
        "platform_unique_id": "<string>",
        "raw_data": {},
        "data_hash": "<string>",
        "name": "<string>",
        "description": "<string>",
        "nominal_code": "<string>",
        "current_balance": 123,
        "updated_at": "<string>",
        "status": "<string>",
        "category": "ASSET",
        "sub_category": "<string>",
        "currency_id": "<string>",
        "parent_account_id": "<string>"
      },
      "currency": {
        "rootfi_id": 157,
        "rootfi_created_at": "2024-01-22T05:07:31.465Z",
        "rootfi_updated_at": "2024-01-22T05:07:31.000Z",
        "rootfi_company_id": 1089,
        "platform_id": "123456",
        "rootfi_deleted_at": "2023-11-07T05:31:56Z",
        "platform_unique_id": "<string>",
        "raw_data": {},
        "data_hash": "<string>",
        "name": "<string>",
        "code": "<string>",
        "symbol": "<string>",
        "is_base_currency": true,
        "exchange_rate": 123,
        "updated_at": "<string>"
      }
    }
  },
  "sync_id": "<string>"
}
The Journal Entries are basic records of a company’s financial transactions used to record the debits and credits of each transaction.
curl --request POST \
  --url https://api.rootfi.dev/v3/accounting/journal_entries \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '{
  "company_id": 1,
  "data": [
    {
      "document_number": "ROOTFI01",
      "posted_date": "2021-09-28T15:00:00.000Z",
      "description": "Test Invoice",
      "currency_id": "GBP",
      "business_unit_id": "1",
      "journal_lines": [
        {
          "account_id": "123456",
          "type": "DEBIT",
          "net_amount": 100,
          "contact_id": "123456",
          "tax_id": "123456",
          "tracking_category_ids": [],
          "description": "Test Item"
        },
        {
          "account_id": "123456",
          "type": "CREDIT",
          "net_amount": 100,
          "contact_id": "123456",
          "tax_id": "123456",
          "tracking_category_ids": [],
          "description": "Test Item"
        }
      ]
    }
  ]
}'

Authorizations

api_key
string
header
required

Body

application/json
company_id
integer
required

The ID of the company in the accounting platform

data
accountingCreateJournalEntryObject · object[]
required

The data of the JournalEntry to create

run_async
boolean | null

Run the request asynchronously

Response

data
accountingJournalEntryObject · object

The data of the created JournalEntry

sync_id
string | null

The sync id of the request