Front Accounting Simple API API Reference
This is a simple REST API as a Front Accounting module https://github.com/andresamayadiaz/FrontAccountingSimpleAPI.
API Endpoint
http://demo.saygoweb.com/frontaccounting/modules/api
Version: 2.4-1.7
bankaccounts
List Bank Accounts
successful operation
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "1",
"account_code": "1060",
"account_type": "0",
"bank_name": "Some Bank",
"bank_address": "string",
"bank_account_name": "Anne X Ample",
"bank_account_number": "12-3456-789123-00",
"bank_curr_code": "USD",
"dflt_curr_act": "0",
"bank_charge_act": "5690",
"last_reconciled_date": "2017-12-01",
"ending_reconcile_balance": "12.34",
"inactive": "0"
}
]
Add Bank Account
Bank Account to be added
Request Example
{
"id": "1",
"account_code": "1060",
"account_type": "0",
"bank_name": "Some Bank",
"bank_address": "string",
"bank_account_name": "Anne X Ample",
"bank_account_number": "12-3456-789123-00",
"bank_curr_code": "USD",
"dflt_curr_act": "0",
"bank_charge_act": "5690",
"last_reconciled_date": "2017-12-01",
"ending_reconcile_balance": "12.34",
"inactive": "0"
}
successful operation
Response Content-Types: application/json
Response Example (201 Created)
{
"account_code": "string"
}
Get Bank Account by id
ID of Bank Account to return
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "1",
"account_code": "1060",
"account_type": "0",
"bank_name": "Some Bank",
"bank_address": "string",
"bank_account_name": "Anne X Ample",
"bank_account_number": "12-3456-789123-00",
"bank_curr_code": "USD",
"dflt_curr_act": "0",
"bank_charge_act": "5690",
"last_reconciled_date": "2017-12-01",
"ending_reconcile_balance": "12.34",
"inactive": "0"
}
Update Bank Account
Bank Account to be updated
ID of Bank Account to update
Request Example
{
"id": "1",
"account_code": "1060",
"account_type": "0",
"bank_name": "Some Bank",
"bank_address": "string",
"bank_account_name": "Anne X Ample",
"bank_account_number": "12-3456-789123-00",
"bank_curr_code": "USD",
"dflt_curr_act": "0",
"bank_charge_act": "5690",
"last_reconciled_date": "2017-12-01",
"ending_reconcile_balance": "12.34",
"inactive": "0"
}
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"account_code": "string"
}
Delete Bank Account
ID of Bank Account to delete
successful operation
Response Content-Types: application/json
dimensions
List all Dimensions
Add Dimension
Dimension to be added
Request Example
{
"id": "1",
"reference": "PROJECT1",
"name": "Project 1: Building buildings",
"memo": "Some memo"
}
successful operation
Response Content-Types: application/json
Response Example (201 Created)
{
"id": "string"
}
Get Dimension by id
ID of Dimension to return
Update Dimension
Dimension to be updated
ID of Dimension to update
Request Example
{
"id": "1",
"reference": "PROJECT1",
"name": "Project 1: Building buildings",
"memo": "Some memo"
}
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "string"
}
Delete Dimension
ID of Dimension to delete
successful operation
Response Content-Types: application/json
exchangerates
List all ExchangeRates for a given currency
successful operation
failed precondition
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "1",
"currency": "USD",
"rateBuy": "1.12",
"rateSell": "1.12",
"date": "2018-06-26"
}
]
Response Example (412 Precondition Failed)
"object"
Add ExchangeRate
ExchangeRate to be added
Currency of ExchangeRate to return
Request Example
{
"id": "1",
"currency": "USD",
"rateBuy": "1.12",
"rateSell": "1.12",
"date": "2018-06-26"
}
successful operation
Response Content-Types: application/json
Response Example (201 Created)
{
"id": "string"
}
Get current exchange rate for the given currency
Currency of ExchangeRate to return
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "1",
"currency": "USD",
"rateBuy": "1.12",
"rateSell": "1.12",
"date": "2018-06-26"
}
Get ExchangeRate by id
Currency of ExchangeRate to return
ID of ExchangeRate to return
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "1",
"currency": "USD",
"rateBuy": "1.12",
"rateSell": "1.12",
"date": "2018-06-26"
}
Update ExchangeRate
ExchangeRate to be updated
Currency of ExchangeRate to return
ID of ExchangeRate to update
Request Example
{
"id": "1",
"currency": "USD",
"rateBuy": "1.12",
"rateSell": "1.12",
"date": "2018-06-26"
}
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "string"
}
Delete ExchangeRate
Currency of ExchangeRate to delete
ID of ExchangeRate to delete
successful operation
Response Content-Types: application/json
glaccounts
List all GL Accounts
Add GL Account
GL Account to be added
Request Example
{
"account_code": "1060",
"account_code2": "",
"account_name": "My Bank Savings Account",
"account_type": "",
"inactive": "0"
}
successful operation
Response Content-Types: application/json
Response Example (201 Created)
{
"account_code": "string"
}
Get GL Account by id
ID of GL Account to return
Update GL Account
GL Account to be updated
ID of GL Account to update
Request Example
{
"account_code": "1060",
"account_code2": "",
"account_name": "My Bank Savings Account",
"account_type": "",
"inactive": "0"
}
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"account_code": "string"
}
Delete GL Account
ID of GL Account to delete
successful operation
Response Content-Types: application/json
journal
List Journal Entries
filter start date
filter end date
reference to filter by
successful operation
Response Content-Types: application/json
Response Example (200 OK)
[
{
"id": "1",
"type": "10",
"journal_date": "2018-06-21",
"document_date": "2018-06-21",
"event_date": "2018-06-21",
"currency": "USD",
"document_ref": "INV123456",
"reference": "18 001"
}
]
Add Journal Entry
Journal Entry to be added
Request Example
{
"id": "1",
"type": "10",
"journal_date": "2018-06-21",
"document_date": "2018-06-21",
"event_date": "2018-06-21",
"currency": "USD",
"document_ref": "INV123456",
"reference": "18 001"
}
successful operation
Response Content-Types: application/json
Response Example (201 Created)
{
"account_code": "string"
}
Get Journal Entry by type and id
Type of Journal Entry to return
ID of Journal Entry to return
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"id": "1",
"type": "10",
"journal_date": "2018-06-21",
"document_date": "2018-06-21",
"event_date": "2018-06-21",
"currency": "USD",
"document_ref": "INV123456",
"reference": "18 001"
}
Void Journal Entry
Type of Journal Entry to void
ID of Journal Entry to void
successful operation
Response Content-Types: application/json
Update Journal Entry
Journal Entry to be updated
ID of Journal Entry to update
Request Example
{
"id": "1",
"type": "10",
"journal_date": "2018-06-21",
"document_date": "2018-06-21",
"event_date": "2018-06-21",
"currency": "USD",
"document_ref": "INV123456",
"reference": "18 001"
}
successful operation
Response Content-Types: application/json
Response Example (200 OK)
{
"account_code": "string"
}
sales
List Sales
Update Sale
Add Sale
Fetch Sale by id
Schema Definitions
BankAccount: object
A Bank Account
- id: integer
-
Unique id used to reference a Bank Account
- account_code: string
-
Account GL code
- account_type: integer
-
Type of the account
- bank_name: string
-
Name of the bank at which this account is held
- bank_address: string
-
Address of the Bank
- bank_account_name: string
-
Name of the account
- bank_account_number: string
-
Account number used by the Bank
- bank_curr_code: string
-
Currency of the account
- dflt_curr_act: boolean
-
True (1) if this account is the default account
- bank_charge_act: string
-
GL account to which bank charges are assigned
- last_reconciled_date: date
-
Date up to which this account was reconciled
- ending_reconcile_balance: number
-
Account balance at last reconcile
- inactive: boolean
-
True if this account is not active
Example
{
"id": "1",
"account_code": "1060",
"account_type": "0",
"bank_name": "Some Bank",
"bank_address": "string",
"bank_account_name": "Anne X Ample",
"bank_account_number": "12-3456-789123-00",
"bank_curr_code": "USD",
"dflt_curr_act": "0",
"bank_charge_act": "5690",
"last_reconciled_date": "2017-12-01",
"ending_reconcile_balance": "12.34",
"inactive": "0"
}
Dimension: object
A Dimension
- id: integer
-
Unique id used to reference a Dimension
- reference: string
-
Unique short human readable reference
- name: string
-
A longer human readable name
- memo: string
-
A longer memo
Example
{
"id": "1",
"reference": "PROJECT1",
"name": "Project 1: Building buildings",
"memo": "Some memo"
}
ExchangeRate: object
An ExchangeRate
- id: integer
-
Unique id used to reference an ExchangeRate
- currency: string
-
Standard currency code
- rateBuy: float
-
The 'buy' exchange rate
- rateSell: float
-
The 'sell' exchange rate, if not set the 'rateBuy' is used
- date: date
-
The effective date from which to use this exchange rate
Example
{
"id": "1",
"currency": "USD",
"rateBuy": "1.12",
"rateSell": "1.12",
"date": "2018-06-26"
}
GLAccount: object
A GLAccount
- account_code: string
-
Unique short human readable id used to reference a GLAccount
- account_code2: string
-
Secondary account code, may be blank
- account_name: string
-
A longer name for the account
- account_type: string
-
Type of the account
- inactive: int
-
Zero if account is active
Example
{
"account_code": "1060",
"account_code2": "",
"account_name": "My Bank Savings Account",
"account_type": "",
"inactive": "0"
}
JournalEntry: object
A single Journal Entry
- id: integer
-
Unique id used to reference a Journal Entry
- type: integer
-
Transaction type is the type of document this Journal Entry represents, e.g. Invoice, Delivery, GRN etc.
- journal_date: date
-
Date of Journal Entry
- document_date: date
-
Date of related document
- event_date: date
-
Date of related event
- currency: string
-
Currency
- document_ref: string
-
Reference of the related document
- reference: string
-
Reference for this Journal Entry
Example
{
"id": "1",
"type": "10",
"journal_date": "2018-06-21",
"document_date": "2018-06-21",
"event_date": "2018-06-21",
"currency": "USD",
"document_ref": "INV123456",
"reference": "18 001"
}