09. Material Movement
Interface
It allows you:
to insert new documents (master&details in one json file)
to view and print movement documents (master&details in one json file)
This document is used for:
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
DocumentNo
MovementDate
BPartner
Warehouse
Actions can be done:
list
create, update, delete
print
Material Movement (Master and Details)
API Method
List headers and details:
URL: https://api.socratecloud.com/webapi/rest/material_movement/full/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Available filter parameters:
Organization
DocumentNo
MovementDate
Warehouse
Return: JSON object with next format:
{
"data": [
{
"Organization": "Test A SRL",
"Created": "2014-03-07 18:47:57+0200",
"CreatedBy": "Demo",
"Updated": "2014-03-07 18:48:50+0200",
"UpdatedBy": "Demo",
"DocumentNo": "610000",
"DocType": "Material Movement",
"Description": null,
"MovementDate": "2014-03-07 00:00:00+0200",
"AccountingDate": "2015-10-22 00:00:00+0300",
"Warehouse": "A",
"WarehouseTo": "B",
"Locator": "A1",
"LocatorTo": "B1",
"TrxOrganization": "Test A SRL",
"TrxOrganizationTo": "Test A SRL",
"Activity": null,
"Project": null,
"Campaign": null,
"Asset": null,
"Employee": null,
"DocumentStatus": "Completed",
"DocumentAction": "Close",
"lines": [
{
"Organization": "Test A SRL",
"Created": "2014-03-07 18:48:22+0200",
"CreatedBy": "Demo",
"Updated": "2014-03-07 18:48:45+0200",
"UpdatedBy": "Demo",
"Line": 10,
"Product": "MFL-L003",
"ProductName": "L003 - marfa-fifo-lot",
"Locator": "A10-0",
"LocatorTo": "A11-0",
"Description": null,
"QtyEntered": 1,
"UOM": "Each",
"attributes": {
"BatchLot": "Lot01",
"GuaranteeDate": "2015-02-13 00:00:00+0200"
}
}
]
}
],
"totalRows": 1
}
Create header and details:
URL: https://api.socratecloud.com/webapi/rest/material_movement/full/create/{version}?accessToken={access_token}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "ABC SRL",
"DocumentNo": "611720",
"DocType": "Material Movement w.Conf",
"Description": null,
"MovementDate": "2015-10-22 00:00:00+0300",
"AccountingDate": "2015-10-22 00:00:00+0300",
"Warehouse": "A",
"WarehouseTo": "B",
"Locator": "A1",
"LocatorTo": "B1",
"TrxOrganization": "ABC SRL",
"TrxOrganizationTo": "COM",
"Activity": "Activitate 0",
"Project": "ABC Job",
"Campaign": "December",
"Asset": null,
"Employee": "Demo",
"DocumentAction": null,
"lines": [
{
"Product": "MFL-L003",
"Locator": "1000001",
"LocatorTo": "A10-0",
"Description": null,
"QtyEntered": 1,
"UOM": "Each",
"attributes": {
"BatchLot": "Lot01",
"GuaranteeDate": "2015-02-13 00:00:00+0200"
}
}
]
}
List header only:
URL: https://api.socratecloud.com/webapi/rest/material_movement/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Available filter parameters:
Organization
DocumentNo
MovementDate
Warehouse
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2015-10-22 09:20:35+0300",
"CreatedBy": "Demo",
"Updated":"2015-10-22 09:20:35+0300",,
"UpdatedBy": "Demo",
"DocumentNo": "611720",
"DocType": "Material Movement",
"Description": null,
"MovementDate": "2015-10-22 00:00:00+0300",
"AccountingDate": "2015-10-22 00:00:00+0300",
"Warehouse": "A",
"WarehouseTo": "B",
"Locator": "A1",
"LocatorTo": "B1",
"TrxOrganization": "Abc",
"TrxOrganizationTo": "Acd",
"Activity": "Activitate 0",
"Project": "ABC Job",
"Campaign": "December",
"Asset": "Activitate 0",
"Employee": "Demo",
"DocumentStatus": "Drafted",
"DocumentAction": "Complete",
}
],
"totalRows": 1
}
Create header only:
URL: https://api.socratecloud.com/webapi/rest/material_movement/create/{version}?accessToken={access_token}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Demo SRL",
"DocumentNo": "611720",
"DocType": "Material Movement w.Conf",
"Description": null,
"MovementDate": "2015-10-22 00:00:00+0300",
"AccountingDate": "2015-10-22 00:00:00+0300",
"Warehouse": "A",
"WarehouseTo": "B",
"Locator": "A1",
"LocatorTo": "B1",
"TrxOrganization": "ABC SRL",
"TrxOrganizationTo": "COM",
"Activity": "Activitate 0",
"Project": "ABC Job",
"Campaign": "December",
"Asset": null,
"Employee": "Demo",
"DocumentAction": null
}
Update header only:
URL: https://api.socratecloud.com/webapi/rest/material_movement/update/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"DocType": "Material Movement",
"Description": null,
"MovementDate": "2015-10-22 00:00:00+0300",
"AccountingDate": "2015-10-22 00:00:00+0300",
"TrxOrganization": "ABC SRL",
"TrxOrganizationTo": "COM",
"Activity": "Activitate 0",
"Project": "ABC Job",
"Campaign": "December",
"Employee": "Demo",
"Asset": null,
"DocumentAction": null
}
Delete header (automatically deletes also details):
URL: https://api.socratecloud.com/webapi/rest/material_movement/delete/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: POST
Return: 'Deleted' for success or error message (start with "ERROR: ")
List details:
URL: https://api.socratecloud.com/webapi/rest/material_movement/line/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}&DocumentNo={document_no}
Method: GET
Available filter parameters:
Line
Product
Return: JSON object with next format:
{
"data": [
{
"Organization": "Demo SRL",
"Created": "2015-10-23 10:38:03+0300",
"CreatedBy": "Demo",
"Updated": "2015-10-23 10:38:03+0300",
"UpdatedBy": "Demo",
"Line": 10,
"Product": "ABC",
"ProductName": "Product ABC",
"Locator": "1000001",
"LocatorTo": "A10-0",
"Description": null,
"QtyEntered": 2,
"UOM": "Each",
"attributes": {
"BatchLot": "Lot01",
"GuaranteeDate": "2015-02-13 00:00:00+0200"
}
}
],
"totalRows": 1
}
Create detail:
URL: https://api.socratecloud.com/webapi/rest/material_movement/line/create/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: POST
Return: line no for success or error message (start with "ERROR: ")
Data format:
{
"Product": "MFL-L003",
"Locator": "1000001",
"LocatorTo": "A10-0",
"Description": null,
"QtyEntered": 2,
"UOM": "Each",
"attributes": {
"BatchLot": "Lot01",
"GuaranteeDate": "2015-02-13 00:00:00+0200"
}
}
Update detail:
URL: https://api.socratecloud.com/webapi/rest/material_movement/line/update/{version}?accessToken={access_token}&DocumentNo={document_no}&Line={line_no}
Method: POST
Return: line no for success or error message (start with "ERROR: ")
Data format:
{
"Product": "MFL-L003",
"Locator": "1000001",
"LocatorTo": "A10-0",
"Description": null,
"QtyEntered": 2,
"UOM": "Each",
"attributes": {
"BatchLot": "Lot01",
"GuaranteeDate": "2015-02-13 00:00:00+0200"
}
}
Delete detail:
URL: https://api.socratecloud.com/webapi/rest/material_movement/line/delete/{version}?accessToken={access_token}&DocumentNo={document_no}&Line={line_no}
Method: POST
Return: 'Deleted' for success or error message (start with "ERROR: ")
Print:
URL: https://api.socratecloud.com/webapi/rest/material_movement/print/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: GET
Return: PDF file