21. Accounts
Interface
It allows you:
to get the Accounts from the indicated Chart of Accounts.
to write new Account.
to update an existing Account.
to delete an Account - only if it s empty (not used)!
Columns that can be used as filters:
Chart of Account
Value
Name
Active
IsSummary
Account Type
Account Sign
Account Group
GAAP
Actions can be done:
list
create
update
delete
API Methods:
List:
URL: https://api.socratecloud.com/webapi/rest/account/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "*",
"Created": "2014-03-05 14:35:15+0200",
"CreatedBy": "ServiceDesk_Admin",
"Updated": "2014-03-05 14:35:15+0200",
"UpdatedBy": "ServiceDesk_Admin",
"Active": true,
"ChartOfAccount": "Planul de Conturi",
"Value": "9311",
"Name": "Costul produsului/proiectului",
"Description": "Costul produsului/proiectului",
"IsSummary": false,
"AccountType": "Memo",
"AccountSign": "Natural",
"AccountGroup": null,
"GAAP": null
}
],
"totalRows": 1
}
Create:
URL: https://api.socratecloud.com/webapi/rest/account/create/{version}?accessToken={access_token}
Method: POST
Return: account value for success or error message (start with "ERROR: ")
Data format:
{
"Active": true,
"ChartOfAccount": null,
"Value": "9311*",
"Name": "Costul produsului/proiectului",
"Description": "Costul produsului/proiectului",
"IsSummary": false,
"AccountType": "Memo",
"AccountSign": "Natural",
"AccountGroup": null,
"GAAP": null
}
Update:
URL: https://api.socratecloud.com/webapi/rest/account/update/{version}?accessToken={access_token}&ChartOfAccount={chart_of_account_name}&Value={account_value}
Method: POST
Return: product value for success or error message (start with "ERROR: ")
Data format:
{
"Active": false,
"Value": "9311*",
"Name": "Costul produsului/proiectului",
"Description": "Costul produsului/proiectului",
"IsSummary": false,
"AccountType": "Memo",
"AccountSign": "Natural",
"AccountGroup": null,
"GAAP": null
}
Delete:
URL: https://api.socratecloud.com/webapi/rest/account/delete/{version}?accessToken={access_token}&ChartOfAccount={chart_of_account_name}&Value={account_value}
Method: POST
Return: 'Deleted' for success or error message (start with "ERROR: ")