# Accounts
The accounts endpoint url is:
https://digitalpractice.io/api/v1.0/accounts
# Accounts GET Request
Account GET request will fetch a list of accounts associated with the company of the user who is currently authenticated. The structure of the list will be:
[
{
"id": 124,
"title": "Administration Overheads",
"description": "General account associated with admininstration duties in the office.",
"category": "ADMINISTRATIVE EXPENSES",
"openingBalance": null,
"active": true,
"allowBooking": true,
"uniqueId": "xxxxxxxxxxxx"
},
. . . . . // Other Results
]
# Accounts POST Request
When you want to create a new accounts record, you can send a POST request to the accounts end-point.
Accounts Payload Example:
{
"title": "Paternity Leave",
"description": "Time associated with paternity leave days.",
"category": "ADMINISTRATIVE EXPENSES",
"openingBalance": null,
"active": true,
"allowBooking": true
}
Field | Required/Optional | Json Key | Data Type |
---|---|---|---|
Title | Required | title | string |
Description | Required | description | string |
Category | Required | category | string/**fixed_options |
Opening Balance | Optional | openingBalance | string |
Active | Optional | active | string |
Allow Booking | Optional | allowBooking | string |
TIP
Please note string/fixed_options means you must provide one of the available fixed options below to make a successful post request or create a new record.
** Category fixed options
[
'INCOME',
'CASH EQUIVALENTS',
'COST OF SALES',
'OPERATING EXPENSES',
'ADMINISTRATIVE EXPENSES',
'INCOME TAX',
'CURRENT ASSETS',
'FIXED ASSETS',
'CURRENT LIABILITIES',
'FIXED LIABILITIES',
'OWNERS EQUITY',
]
Clients →