10. Expense Report

Interface

It allows you:

Prerequisites:

In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:

Columns that can be used as filters:

Actions can be done:

Expense Report fields (Master&Details)

A Expense Report in SocrateCloud has the following structure:

To update only master data, or a specific expense line see Expense Report Master, Expense Report Details chapters.

API Methods:

List:

URL: https://api.socratecloud.com/webapi/rest/expense_report/full/list/0?startRow={0}&endRow={100}&accessToken={access_token}

Method: GET

Available filter parameters:

Return: JSON object with next format:

{

    "Organization": "Test A SRL",

    "Created": "2020-06-05 13:19:51+0000",

    "CreatedBy": "TESTBEBE_Admin",

    "Updated": "2020-06-05 13:27:46+0000",

    "UpdatedBy": "Bebe-BIT 1",

    "DocType": "Decont",

    "DocumentNo": "1000315",

    "Description": "Decont din expense app",

    "ExpenseDate": "2020-06-04 00:00:00+0000",

    "StartDate": null,

    "EndDate": null,

    "BPartner_ID": 1000379,

    "BPartner": "Florin David",

    "BPartnerName": "Florin David",

    "Warehouse": "Depozit A-10",

    "Warehouse_ID": 1000006,

    "PriceList": "RON CMP cu TVA",

    "Currency": "RON",

    "TotalLines": 558.44,

    "DocumentStatus": "Completed",

    "DocumentAction": "Close",

    "TaskDocumentNo": null,

    "TimeExpense_ID": 1005265,

    "IsPaid": false,

    "lines": [

        {

            "Organization": "Test A SRL",

            "Created": "2020-06-05 13:19:51+0000",

            "CreatedBy": "TESTBEBE_Admin",

            "Updated": "2020-06-05 13:19:51+0000",

            "UpdatedBy": "TESTBEBE_Admin",

            "Active": true,

            "TimeExpenseLine_ID": 1004623,

            "Line": 10,

            "DateExpense": "2020-06-04 00:00:00+0000",

            "SourceDocNo": "PRL 3856",

            "Product": "CH-001",

            "SKU": "accommodation",

            "Product_ID": 1121556,

            "ProductName": "Accommodation",

            "Description": "Cazare",

            "QtyEntered": 1,

            "UOM": "Each",

            "Price": 234,

            "Amount": 234,

            "BPartner": "MILEXIM",

            "BPartnerName": "MILEXIM SRL",

            "BPartner_ID": 1000838,

            "User_ID": 1000873,

            "UserName": "Florin David",

            "VendorName": "FOND EXIM S.R.L.",

            "TaxID": "400350",

            "IsTimeReport": false,

            "IsInvoiced": false,

            "Project": "T01-2020 - proiect cu finanțare externă",

            "Project_ID": 1007503,

            "ProjectPhase": "T01-2020-PERSONAL",

            "ProjectPhase_ID": 1004068,

            "ProjectSubPhase": null,

            "ProjectSubPhase_ID": null,

            "Activity": "Activitate 0",

            "TrxOrganization": null,

            "Asset_ID": null,

            "AssetValue": null,

            "Summary": null,

            "InvoicePrice": 0

        },

        {

            "Organization": "Test A SRL",

            "Created": "2020-06-05 13:19:51+0000",

            "CreatedBy": "TESTBEBE_Admin",

            "Updated": "2020-06-05 13:19:51+0000",

            "UpdatedBy": "TESTBEBE_Admin",

            "Active": true,

            "TimeExpenseLine_ID": 1004624,

            "Line": 20,

            "DateExpense": "2020-06-04 00:00:00+0000",

            "SourceDocNo": "PRL 3856",

            "Product": "CH-004",

            "SKU": "protocol",

            "Product_ID": 1121559,

            "ProductName": "Protocol",

            "Description": "Masă ",

            "QtyEntered": 1,

            "UOM": "Each",

            "Price": 324.44,

            "Amount": 324.44,

            "BPartner": "MILEXIM",

            "BPartnerName": "MILEXIM SRL",

            "BPartner_ID": 1000838,

            "User_ID": 1000873,

            "UserName": "Florin David",

            "VendorName": "FOND EXIM S.R.L.",

            "TaxID": "400350",

            "IsTimeReport": false,

            "IsInvoiced": false,

            "Project": "T01-2020 - proiect cu finanțare externă",

            "Project_ID": 1007503,

            "ProjectPhase": "T01-2020-PERSONAL",

            "ProjectPhase_ID": 1004068,

            "ProjectSubPhase": null,

            "ProjectSubPhase_ID": null,

            "Activity": "Activitate 0",

            "TrxOrganization": null,

            "Asset_ID": null,

            "AssetValue": null,

            "Summary": null,

            "InvoicePrice": 0

        }

    ]

}

Create:

URL: https://api.socratecloud.com/webapi/rest/expense_report/full/create/{version}?accessToken={access_token}

Method: POST

Return: document no for success or error message (start with "ERROR: ")

Data format:

{

    "Organization":"Demo SRL",

    "DocType": "Decont",

    "DocumentNo":null,

    "Description":null,

    "ExpenseDate":"2014-07-22 00:00:00+0000",

    "BPartner":"EMPLCODE",

    "Warehouse":"DEP7",

    "PriceList":"EUR Prices",

    "DocumentAction":null,

    "lines": [

        {

            "Organization":"Demo SRL",

            "Active":true,

            "DateExpense":"2014-07-20 00:00:00+0000",

            "SourceDocNo":"1000042",

            "Product":"Prod1",

            "Description":null,

            "QtyEntered":5,

            "Price":null,

            "BPartner":null,

            "VendorName":null,

            "TaxID":null,

            "IsTimeReport":false,

            "IsInvoiced":false,

            "Project":"Test",

            "ProjectPhase":null,

            "ProjectSubPhase":null,

            "Activity":null

        }

    ]

}

Print:

URL: https://api.socratecloud.com/webapi/rest/expense_report/print/{version}?accessToken={access_token}&DocumentNo={document_no}

Method: GET

Return: PDF file