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"
}
]
}
]
}'
import { RootFiClient } from "rootfi-api";
const rootfi = new RootFiClient({ apiKey: "<api_key>" });
await rootfi.accounting.journalEntries.create({
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": 123,
"rootfi_deleted_at": null,
"rootfi_created_at": "2024-01-25T09:00:00Z",
"rootfi_updated_at": "2024-01-25T09:00:00Z",
"rootfi_company_id": 123,
"platform_id": "123456_1",
"platform_unique_id": "123456",
"account_id": "123456",
"amount": 100,
"currency_id": "123456",
"journal_entry_type": "Example Journal Entry Type",
"description": "Example Description",
"updated_at": "2024-01-25T09:00:00Z",
"currency_rate": 1,
"posted_date": "2024-01-25T09:00:00Z",
"document_number": "123456",
"journal_lines": [
{
"platform_id": "123456",
"journal_entry_id": "123456",
"account_id": "123456",
"contact_id": "123456",
"tax_id": "123456",
"tracking_category_ids": [
"123456"
],
"type": "DEBIT",
"description": "This is a description",
"net_amount": 100,
"tax_amount": 100,
"updated_at": "2024-01-22T05:07:31.000Z"
}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}Journal Entries
Create Journal Entry
Create a new Journal Entry.
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"
}
]
}
]
}'
import { RootFiClient } from "rootfi-api";
const rootfi = new RootFiClient({ apiKey: "<api_key>" });
await rootfi.accounting.journalEntries.create({
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": 123,
"rootfi_deleted_at": null,
"rootfi_created_at": "2024-01-25T09:00:00Z",
"rootfi_updated_at": "2024-01-25T09:00:00Z",
"rootfi_company_id": 123,
"platform_id": "123456_1",
"platform_unique_id": "123456",
"account_id": "123456",
"amount": 100,
"currency_id": "123456",
"journal_entry_type": "Example Journal Entry Type",
"description": "Example Description",
"updated_at": "2024-01-25T09:00:00Z",
"currency_rate": 1,
"posted_date": "2024-01-25T09:00:00Z",
"document_number": "123456",
"journal_lines": [
{
"platform_id": "123456",
"journal_entry_id": "123456",
"account_id": "123456",
"contact_id": "123456",
"tax_id": "123456",
"tracking_category_ids": [
"123456"
],
"type": "DEBIT",
"description": "This is a description",
"net_amount": 100,
"tax_amount": 100,
"updated_at": "2024-01-22T05:07:31.000Z"
}
]
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<string>"
}
}{
"error": {
"message": "<string>",
"code": "<string>",
"field": "<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"
}
]
}
]
}'
import { RootFiClient } from "rootfi-api";
const rootfi = new RootFiClient({ apiKey: "<api_key>" });
await rootfi.accounting.journalEntries.create({
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
Body
application/json