It allows you:
to view and print your receipts
to create new receipts
to update, delete existing receipts
Prerequisites:
In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:
to have an Organization active
to have an Role active
Columns that can be used as filters:
Organization
OrderNo
OrderReference
DocumentNo
BPartner
LastModified (UTC time format ISO 8601: yyyy-MM-dd HH:mm:ss Z from M_InOut). The sign used for comparison is ”>” (exclusive). Use this filter to get all the receipts modified after the date/time value sent in this parameter.
eg: LastModified=2014-06-13 12:40:00 +0300 if you are in Romania or LastModified=2014-06-13%2012:40:00%20%2b0300
Actions can be done:
list
create master
create line
create full
Receipt fields (Master and Details)
API Method
URL: https://api.socratecloud.com/webapi/rest/receipt/full/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2014-01-28 10:53:05+0200",
"CreatedBy": "Admin",
"Updated": "2014-01-28 10:54:18+0200",
"UpdatedBy": "Admin",
"DocumentNo": "1000500",
"DocType": "Nota de receptie",
"OrderNo": "800401",
"OrderReference": null,
"Description": null,
"Date": "2014-01-24 00:00:00+0200",
"BPartner": "F01",
"BPartnerName": "Furnizor01",
"BPartnerLocation": "Brasov",
"Warehouse": "Demo",
"SalesRep": "Admin",
"ReturnTransaction": false,
"ReturnSourceReceiptNo": null,
"DocumentStatus": "Completed",
"DocumentAction": null,
"lines": [
{
"Organization": "Demo SRL",
"Created": "2014-01-28 10:53:22+0200",
"CreatedBy": "Admin",
"Updated": "2014-01-28 10:56:06+0200",
"UpdatedBy": "Admin",
"Line": 10,
"Product": "Porumb",
"ProductName": "Porumb",
"Description": null,
"QtyEntered": 1,
"UOM": "Kilogram"
}
]
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/receipt/create/{version}?accessToken={access_token}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"DocumentNo": 123123132,
"DocType": "Receptie Fara Conf",
"Description": "Description",
"Date": "2018-05-29 00:00:00+0300",
"BPartner": "ABC SRL",
"BPartnerLocation": "ADEA",
"Warehouse": "Standard",
"SalesRep": "AdminTitular",
"DocumentAction": null,
"OrgTrx_ID": null,
"OrgTrx": "SRL",
"Employee_ID": 1005692,
"Employee": null,
"Project_ID": null,
"Project": "#",
"ProjectPhase_ID": 1000337,
"ProjectPhase": null,
"Activity_ID": null,
"Activity": "Programare",
"Campaign_ID": null,
"Campaign": "BlackFriday 2014",
"User1_ID": 1000711,
"User1": null,
"User2_ID": null,
"User2": null,
"Asset_ID": 1002566,
"Asset": null,
"MatchRequirementR": "Purchase Order"
}
URL: https://api.socratecloud.com/webapi/rest/receipt/line/create/{version}?accessToken={access_token}&DocumentNo={receipt_doc_no}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Line": 10,
"OrderNo": "804300",
"OrderLineNo": 10,
"Product": "Teraflu", // If OrderNo and OrderLineNo are completed, the product must be the same as the product from selected OrderLine
"Description": "line description",
"QtyEntered": 3,
"UOM": "Each"
}
URL: https://api.socratecloud.com/webapi/rest/receipt/full/create/{version}?accessToken={access_token}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"DocumentNo": 12312312,
"DocType": "Receptie Fara Conf",
"Description": "Description",
"Date": "2018-05-29 00:00:00+0300",
"BPartner": "ABC SRL",
"BPartnerLocation": "ADEA",
"Warehouse": "Standard",
"SalesRep": "AdminTitular",
"DocumentAction": "Complete",
"OrgTrx_ID": null,
"OrgTrx": "SRL",
"Employee_ID": 1005692,
"Employee": null,
"Project_ID": null,
"Project": "#",
"ProjectPhase_ID": 1000337,
"ProjectPhase": null,
"Activity_ID": null,
"Activity": "Programare",
"Campaign_ID": null,
"Campaign": "BlackFriday 2014",
"User1_ID": 1000711,
"User1": null,
"User2_ID": null,
"User2": null,
"Asset_ID": 1002566,
"Asset": null,
"MatchRequirementR": "Purchase Order"
"lines": [
{
"Line": 10,
"OrderNo": "804300",
"OrderLineNo": 10,
"Product": "Teraflu", // If OrderNo and OrderLineNo are completed, the product must be the same as the product from selected OrderLine
"Description": "line description",
"QtyEntered": 3,
"UOM": "Each"
}
]
}
URL: https://api.socratecloud.com/webapi/rest/receipt/update/{version}?accessToken={access_token}&DocumenNo={document_no}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"DocumentNo": 123123132,
"DocType": "Receptie Fara Conf",
"Description": "Description",
"Date": "2018-05-29 00:00:00+0300",
"BPartner": "ABC SRL",
"BPartnerLocation": "ADEA",
"Warehouse": "Standard",
"SalesRep": "AdminTitular",
"DocumentAction": null,
"OrgTrx_ID": null,
"OrgTrx": "SRL",
"Employee_ID": 1005692,
"Employee": null,
"Project_ID": null,
"Project": "#",
"ProjectPhase_ID": 1000337,
"ProjectPhase": null,
"Activity_ID": null,
"Activity": "Programare",
"Campaign_ID": null,
"Campaign": "BlackFriday 2014",
"User1_ID": 1000711,
"User1": null,
"User2_ID": null,
"User2": null,
"Asset_ID": 1002566,
"Asset": null,
"MatchRequirementR": "Purchase Order"
}
URL: https://api.socratecloud.com/webapi/rest/receipt/line/update/{version}?accessToken={access_token}&DocumentNo={receipt_doc_no}&Line={line_no}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Line": 10,
"OrderNo": "804300", // NOT UPDATABLE !!! (business logic reason)
"OrderLineNo": 10, // NOT UPDATABLE !!! (business logic reason)
"Product": "Teraflu", // NOT UPDATABLE !!! (business logic reason)
"Description": "line description",
"QtyEntered": 3,
"UOM": "Each"
}
URL: https://api.socratecloud.com/webapi/rest/receipt/delete/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: POST
Return: 'Deleted' for success or error message (start with "ERROR: ")
URL: https://api.socratecloud.com/webapi/rest/receipt/line/delete/{version}?accessToken={access_token}&DocumentNo={document_no}&Line={line_no}
Method: POST
Return: 'Deleted' for success or error message (start with "ERROR: ")
URL: https://api.socratecloud.com/webapi/rest/receipt/print{version}?accessToken={access_token}&DocumentNo={document_no}
Method: GET
Return: PDF file