It allows you:
to create new records for import of expense time
to update an existing record
to delete an existing record
to list all records
Prerequisites:
In order to use this API Method for POST there must be accomplished the following requirements in SocrateCloud:
to have an Organization active
to have Business Partners (Employees) active
to have a Price List active
to have a Warehouse active
to have Business Partners (Clients) active - optional
Columns that can be used as filters:
Organization
DocumentNo
BPartner
DocumentType
PriceList
Warehouse
Client
Product
SKU
Processed
Imported
TimeExpense_ID(integer)
Language (eg: ”ro_RO”, ”en_EN”, ”bg_BG” etc) - if null or unprovided, then English is the base language for all fields.
IsReceipt
IsSimplifiedInvoice
Actions can be done:
list
create
update
delete
Mandatory fields for create or modify document:
Organization
DateReport
DateExpense
BPartner(Employee)
Product or SKU
Qty
ExpenseAmt
URL: https://api.socratecloud.com/webapi/rest/expensetime_import/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Available filter parameters:
Organization
DocumentNo
TimeExpense_ID
BPartner
PriceList
Warehouse
Client
Product
DocumentType
Processed
Imported
Language (eg: ”ro_RO”, ”en_EN”, ”bg_BG” etc) - if null or unprovided, then English is the base language for Product Name.
{
"data": [
{
"TimeExpense_ID": 1000380,
"Organization": "Demo SRL",
"Created": "2020-04-15 12:50:55+0300",
"CreatedBy": "AdminTitular",
"Updated": "2020-04-15 12:50:55+0300",
"UpdatedBy": "AdminTitular",
"DocumentNo": "Postman4",
"DateReport": "2020-04-15 00:00:00+0300",
"Description": "Description",
"BPartner": "abcd",
"PriceList": "P1 RON CU TVA inclus",
"Currency": "RON",
"Warehouse": "Standard",
"UserKey": null,
"VendorName": "VendorName",
"DateExpense": "2020-04-16 00:00:00+0300",
"TaxID": "TaxID",
"LineDocumentNo": "10",
"Client": "rh",
"DocType" : "Time Expense",
"Activity": null,
"Project": "test flux",
"ProjectPhaseName": null,
"ProjectTaskName": null,
"Product": "AE",
"ProductName" : "AE Name",
"SKU": null,
"Qty": 10,
"ExpenseAmt": 10,
"DescriptionLine": null,
"Note": null,
"Processed": false,
"Imported": null,
"IsReceipt": false,
"IsSimplifiedInvoice": false,
"SBSAttachmentList": [
"ac7b0dd0-9433-11ea-9152-5be940d8151a",
"ac7b0dd0-9433-11ea-9152-5be940d8151b"
],
"ResourceID": 123456,
"ResourceValue": "Resource For Test - Value",
"ResourceName": "Resource For Test - Name"
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/expensetime_import/create/{version}?accessToken={access_token}
Method: POST
{
"Organization": "Test A SRL",
"Warehouse": "A10",
"DocumentNo": "1000015",
"DateReport": "2020-04-06 00:00:00+0000",
"DateExpense": "2020-04-06 00:00:00+0000",
"Description": "some document description",
"BPartner": "Dan Melinte",
"PriceList": "RON CMP",
"Currency": "RON",
"LineDocumentNo": "10",
"UserKey": null,
"DocType" : "Time Expense",
"VendorName": null,
"TaxID": null,
"Client": "ABC",
"Activity": "A000",
"Project": "T01-2020",
"ProjectPhaseName": "T01-2020-PERSONAL",
"ProjectTaskName": null,
"Product": "SRV-001",
"SKU": "DIVSRV",
"Qty": 2,
"ExpenseAmt": 50,
"DescriptionLine": "some line description",
"Note": "other notes",
"IsReceipt": false,
"IsSimplifiedInvoice": false,
"SBSAttachmentList": [
"ac7b0dd0-9433-11ea-9152-5be940d8151a",
"ac7b0dd0-9433-11ea-9152-5be940d8151b"
],
"ResourceID": 123456,
"ResourceValue": "Resource For Test - Value",
"ResourceName": "Resource For Test - Name"
}
URL: https://api.socratecloud.com/webapi/rest/expensetime_import/update/{version}?accessToken={access_token}
Mandatory parameters:
DocumentNo or
TimeExpense_ID
Method: POST
{
"Organization": "Test A SRL",
"Warehouse": "A10",
"DocumentNo": "1000015",
"DateReport": "2020-04-06 00:00:00+0000",
"DateExpense": "2020-04-06 00:00:00+0000",
"Description": "some document description",
"BPartner": "Dan Melinte",
"PriceList": "RON CMP",
"Currency": "RON",
"LineDocumentNo": "10",
"DocType" : "Time Expense",
"UserKey": null,
"VendorName": null,
"TaxID": null,
"Client": "ABC",
"Activity": "A000",
"Project": "T01-2020",
"ProjectPhaseName": "T01-2020-PERSONAL",
"ProjectTaskName": null,
"Product": "SRV-001",
"SKU": "DIVSRV",
"Qty": 2,
"ExpenseAmt": 50,
"DescriptionLine": "some line description",
"Note": "other notes",
"IsReceipt": false,
"IsSimplifiedInvoice": false,
"SBSAttachmentList": [
"ac7b0dd0-9433-11ea-9152-5be940d8151a",
"ac7b0dd0-9433-11ea-9152-5be940d8151b"
],
"ResourceID": 123456,
"ResourceValue": "Resource For Test - Value",
"ResourceName": "Resource For Test - Name"
}
URL: https://api.socratecloud.com/webapi/rest/expensetime_import/delete/{version}?accessToken={access_token}
Mandatory parameters:
DocumentNo or
TimeExpense_ID