It allows you:
to insert new GL Journal
to process existent GL Journal (Change Document Action: Complete, Void, Reverse - Correct)
to view GL Journal document data
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
DocumentNo
PostingType
DocType
GLCategory
Actions can be done:
list
full list
create (GLJournalBatchNo parameter is optional)
full create (GLJournalBatchNo parameter is optional)
update
process
Mandatory Parameters when updating line:
DocumentNo
GL Journal fields:
Method: GET
Parameters: Organization, DocumentNo, PostingType, DocType, GLCategory are optional.
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2014-01-08 10:14:08+0200",
"CreatedBy": "Admin",
"Updated": "2014-01-08 10:14:08+0200",
"UpdatedBy": "Admin",
"AccountingSchema": "Titular UN/32 Leu (new)",
"GLJournalBatchNo": "100",
"DocumentNo": "101",
"Description": "Jurnal 1",
"PostingType": "Actual",
"DocType": "Jurnal Centralizator",
"GLCategory": "Note Contabile",
"DocumentDate": "2014-01-06 00:00:00+0200",
"AccountingDate": "2014-01-06 00:00:00+0200",
"Currency": "EUR",
"ConversionType": "S",
"DocumentStatus": "Drafted",
"DocumentAction": "Complete",
"IsTaxDeclaration": "true",
"BPartnerName": "Tert Test"
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/full/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Parameters: Organization, DocumentNo, PostingType, DocType, GLCategory are optional.
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2014-01-08 10:14:08+0200",
"CreatedBy": "Admin",
"Updated": "2014-01-08 10:14:08+0200",
"UpdatedBy": "Admin",
"AccountingSchema": "Titular UN/32 Leu (new)",
"GLJournalBatchNo": "100",
"DocumentNo": "101",
"Description": "Jurnal 1",
"PostingType": "Actual",
"DocType": "Jurnal Centralizator",
"GLCategory": "Note Contabile",
"DocumentDate": "2014-01-06 00:00:00+0200",
"AccountingDate": "2014-01-06 00:00:00+0200",
"Currency": "EUR",
"ConversionType": "S",
"DocumentStatus": "Drafted",
"DocumentAction": "Complete",
"IsTaxDeclaration": "true",
"BPartnerName": "Tert Test",
"lines": [
{
"Organization": "Demo SRL",
"Created": "2014-01-08 10:14:08+0200",
"CreatedBy": "Admin",
"Updated": "2014-01-08 10:14: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/create/{version}?accessToken={access_token}
Method: POST
Parameter GLJournalBatchNo is optional.
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Description": "Jurnal 1",
"PostingType": "Actual",
"DocType": "Jurnal Centralizator",
"GLCategory": "Note Contabile",
"DocumentDate": "2014-01-06 00:00:00+0200",
"AccountingDate": "2014-01-06 00:00:00+0200",
"Currency": "EUR",
"ConversionType": "S",
"IsTaxDeclaration": "true",
"BPartnerName": "Tert Test"
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/full/create/{version}?accessToken={access_token}
Method: POST
Parameter GLJournalBatchNo is optional.
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Description": "Jurnal 1",
"PostingType": "Actual",
"DocType": "Jurnal Centralizator",
"GLCategory": "Note Contabile",
"DocumentDate": "2014-01-06 00:00:00+0200",
"AccountingDate": "2014-01-06 00:00:00+0200",
"Currency": "EUR",
"ConversionType": "S",
"IsTaxDeclaration": "true",
"BPartnerName": "Tert Test",
"lines": [
{
"Organization": "Demo SRL",
"Created": "2014-01-08 10:14:08+0200",
"CreatedBy": "Admin",
"Updated": "2014-01-08 10:14: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"
}
]
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/update/{version}?accessToken={access_token}&DocumentNo={gl_journal_documentno}
Method: POST
Parameter DocumentNo is mandatory.
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Description": "Jurnal 1",
"PostingType": "Actual",
"DocType": "Jurnal Centralizator",
"GLCategory": "Note Contabile",
"DocumentDate": "2014-01-06 00:00:00+0200",
"AccountingDate": "2014-01-06 00:00:00+0200",
"Currency": "EUR",
"ConversionType": "S",
"IsTaxDeclaration": "true",
"BPartnerName": "Tert Test"
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/process/{version}?accessToken={access_token}&DocumentNo={document_no}&DocumentAction={document_action}
Method: POST
Parameters DocumentNo and DocumentAction are mandatory.
Return: Document status for success or error message (start with "ERROR: ")