It allows you:
to insert lines (one by one) into an existing GL Journal
to view GL Journal lines
Prerequisites:
In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:
to have an active Organization - see API Organizations
to have an active Calendar and periods - need manual maintenance!
to have an active Accounting Scheema - need manual maintenance!
Columns that can be used as filters:
Organization
GLJournalNo
LineNo
Actions can be done:
list
create
update
Mandatory Parameters when inserting lines:
GLJournalNo
Mandatory Parameters when updating lines:
GLJournalNo
LineNo
GL Journal Lines fields
URL: https://api.socratecloud.com/webapi/rest/gl_journal/line/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2014-11-07 13:05:08+0200",
"CreatedBy": "Admin",
"Updated": "2014-11-07 13:05:08+0200",
"UpdatedBy": "Admin",
"GLJournalNo": "2500",
"LineNo": 10,
"Description": null,
"Account": "1012",
"AccountName": "Capital subscris varsat",
"Product": null,
"ProductName": null,
"BPartner": null,
"BPartnerName": null,
"Project": null,
"Activity": null,
"TrxOrganization": "Demo srl",
"SourceDebit": 1,
"SourceCredit": 0,
"Currency": "RON",
"ConversionType": "S",
"Rate": 1,
"Debit": 1,
"Credit": 0,
"IsTaxBaseAmt": "true",
"TaxName": "0% Export CDD",
"User1_ID": 12345,
"User1": "User1 Value",
"User1Name": "User1 Name",
"User2_ID": 765432,
"User2": "User2 Value",
"User2Name": "User2 Name"
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/line/create/{version}?accessToken={access_token}&GLJournalNo={gl_journal_documentno}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"LineNo": 20,
"Description": null,
"Account": "1012",
"Product": null,
"BPartner": "U1",
"Project": null,
"Activity": null,
"TrxOrganization": "Demo srl",
"SourceDebit": 1,
"SourceCredit": 0,
"Currency": "RON",
"Rate": 1,
"Debit": 1,
"Credit": 0,
"IsTaxBaseAmt": "true",
"TaxName": "0% Export CDD",
"User1_ID": 12345,
"User1": "User1 Value",
"User1Name": "User1 Name",
"User2_ID": 765432,
"User2": "User2 Value",
"User2Name": "User2 Name"
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/line/update/{version}?accessToken={access_token}&GLJournalNo={gl_journal_documentno}&LineNo={gl_journal_linetno}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"LineNo": 20,
"Description": "test",
"Account": "1012",
"Product": null,
"BPartner": "U1",
"Project": null,
"Activity": null,
"TrxOrganization": "Demo srl",
"SourceDebit": 1,
"SourceCredit": 0,
"Currency": "EUR",
"Rate": 1,
"Debit": 1,
"Credit": 0,
"IsTaxBaseAmt": "true",
"TaxName": "0% Export CDD",
"User1_ID": 12345,
"User1": "User1 Value",
"User1Name": "User1 Name",
"User2_ID": 765432,
"User2": "User2 Value",
"User2Name": "User2 Name"
}