It allows you:
to insert new GL Journal Batch (master document)
to process existent GL Journal Batch (Change Document Action: Complete, Void, Reverse)
to view GL Journal Batch master 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
full create
update
process
GL Journal Batch fields (Master Document)
Note: We recommend to attend the following steps:
1. Create GL Journal Batch first with DocumentAction=null → the result will be an GL Journal Batch with DocumentStatus='Draft', for eg: DocumentNo: 1234
2. Create GL Journal into the GL Journal Batch no: 1234
3. Create Lines into the GL Journal - we recomend to always insert two lines and only two per each GL Journal, one for Debit and one for Credit. For another lines, insert a new GL Journal in the same GL Journal Batch.
4. Process GL Journal Batch no: 1234 using process method by sending the following parameters: Document Number and Document Action.
URL: https://api.socratecloud.com/webapi/rest/gl_journal/batch/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2014-01-08 10:13:14+0200",
"CreatedBy": "Admin",
"Updated": "2014-01-08 10:13:14+0200",
"UpdatedBy": "Admin",
"DocumentNo": "100",
"Description": "Jurnal test",
"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",
"DocumentStatus": "Drafted",
"DocumentAction": "Drafted"
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/batch/full/list/{version}?accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2014-01-08 10:13:14+0200",
"CreatedBy": "Admin",
"Updated": "2014-01-08 10:13:14+0200",
"UpdatedBy": "Admin",
"DocumentNo": "100",
"Description": "Jurnal test",
"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",
"DocumentStatus": "Drafted",
"DocumentAction": "Complete",
"journals": [
{
"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:24:09+0200",
"CreatedBy": "Admin",
"Updated": "2014-01-08 10:24:09+0200",
"UpdatedBy": "Admin",
"GLJournalNo": "101",
"LineNo": 10,
"Description": null,
"Account": "711",
"AccountName": "Variatia stocurilor",
"Product": null,
"ProductName": null,
"BPartner": null,
"BPartnerName": null,
"Project": null,
"Activity": null,
"TrxOrganization": "Demo SRL",
"SourceDebit": 100,
"SourceCredit": 0,
"Currency": "EUR",
"ConversionType": "S",
"Rate": 4.4947,
"Debit": 449.47,
"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"
},
{
"Organization": "Demo SRL",
"Created": "2014-01-08 10:24:59+0200",
"CreatedBy": "Admin",
"Updated": "2014-01-08 10:24:59+0200",
"UpdatedBy": "Admin",
"GLJournalNo": "101",
"LineNo": 20,
"Description": null,
"Account": "121",
"AccountName": "Profit si pierdere",
"Product": null,
"ProductName": null,
"BPartner": null,
"BPartnerName": null,
"Project": null,
"Activity": null,
"TrxOrganization": "Demo SRL",
"SourceDebit": 0,
"SourceCredit": 100,
"Currency": "EUR",
"ConversionType": "S",
"Rate": 4.4947,
"Debit": 0,
"Credit": 449.47,
"IsTaxBaseAmt": "false",
"TaxName": "0% Export CDD",
"User1_ID": 345678,
"User1": "User1 Value2",
"User1Name": "User1 Name2",
"User2_ID": 543210,
"User2": "User2 Value2",
"User2Name": "User2 Name2"
}
]
}
]
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/batch/create/{version}?accessToken={access_token}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Description": "Jurnal test",
"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"
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/batch/full/create/{version}?accessToken={access_token}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"Description": "Jurnal test",
"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",
"journals": [
{
"Organization": "Demo SRL",
"AccountingSchema": "Titular UN/32 Leu (new)",
"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",
"Description": null,
"Account": "711",
"AccountName": "Variatia stocurilor",
"Product": null,
"ProductName": null,
"BPartner": null,
"BPartnerName": null,
"Project": null,
"Activity": null,
"TrxOrganization": "Demo SRL",
"SourceDebit": 100,
"SourceCredit": 0,
"Currency": "EUR",
"ConversionType": "S",
"Rate": 4.4947,
"Debit": 449.47,
"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"
},
{
"Organization": "Demo SRL",
"Description": null,
"Account": "121",
"AccountName": "Profit si pierdere",
"Product": null,
"ProductName": null,
"BPartner": null,
"BPartnerName": null,
"Project": null,
"Activity": null,
"TrxOrganization": "Demo SRL",
"SourceDebit": 0,
"SourceCredit": 100,
"Currency": "EUR",
"ConversionType": "S",
"Rate": 4.4947,
"Debit": 0,
"Credit": 449.47,
"IsTaxBaseAmt": "false",
"TaxName": "0% Export CDD",
"User1_ID": 345678,
"User1": "User1 Value2",
"User1Name": "User1 Name2",
"User2_ID": 543210,
"User2": "User2 Value2",
"User2Name": "User2 Name2"
}
]
}
]
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/batch/update/{version}?accessToken={access_token}&DocumentNo={journal batch_documentno}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"AccountingSchema": "Titular UN/32 Leu (new)",
"Description": "Jurnal test",
"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",
}
URL: https://api.socratecloud.com/webapi/rest/gl_journal/batch/process/{version}?accessToken={access_token}&DocumentNo={document_no}&DocumentAction={document_action}
Method: POST
Return: Document status for success or error message (start with "ERROR: ")