06. Internal Use Inventory
Interface
It allows you:
to insert new documents (master&details in one json file)
to view and print inventory documents (master&details in one json file)
This document is used for:
usage (out) of raw material for production
internal usage (out) of goods (sampling, inventory minus etc)
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
Internal Use Inventory (Master and Details)
API Method
List headers and details:
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/full/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Available filter parameters:
Organization
DocumentNo
MovementDate
BPartner
Warehouse
Return: JSON object with next format:
{
"data": [
{
"Organization": "Organization F.O",
"Created": "2013-03-08 19:11:36+0200",
"CreatedBy": "AdminTitular",
"Updated": "2013-03-08 19:13:24+0200",
"UpdatedBy": "AdminTitular",
"DocumentNo": "1000500",
"DocType": "Internal Use Inventory",
"WorkOrderReference": "WO 12345",
"Description": "Test Case - 005 (check costs with LC on FIFO+ORG)",
"MovementDate": "2013-03-08 00:00:00+0200",
"BPartner": null,
"BPartnerName": null,
"Warehouse": "Warehouse-2 F.O",
"TrxOrganization": null,
"Activity": null,
"Project": "ABC",
"DocumentStatus": "Completed",
"DocumentAction": "Close",
"lines": [
{
"Organization": "Organization F.O",
"Created": "2013-03-08 19:12:29+0200",
"CreatedBy": "AdminTitular",
"Updated": "2013-03-08 19:13:05+0200",
"UpdatedBy": "AdminTitular",
"Line": 10,
"Product": "T005-NA-FIFO-ORG",
"Locator": "W2FO-000",
"ProductName": "T005-NA-FIFO-ORG",
"Description": null,
"QtyEntered": 7,
"UOM": "Each",
"Charge": "Diverse"
}
]
}
],
"totalRows": 1
}
Create header and details:
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/full/create/{version}?accessToken={access_token}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Organization F.O",
"DocumentNo": null,
"DocType": "Internal Use Inventory",
"WorkOrderReference": "WO 12345",
"Description": "Test Case - 005 (check costs with LC on FIFO+ORG)",
"MovementDate": "2013-03-08 00:00:00+0200",
"BPartner": null,
"Warehouse": "Warehouse-2 F.O",
"TrxOrganization": null,
"Activity": null,
"Project": "ABC",
"DocumentAction": "Complete",
"lines": [
{
"Product": "T005-NA-FIFO-ORG",
"Description": null,
"QtyEntered": 7,
"Charge": "Diverse"
}
]
}
List header only:
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Available filter parameters:
Organization
DocumentNo
MovementDate
BPartner
Warehouse
Return: JSON object with next format:
{
"data": [
{
"Organization": "Organization F.O",
"Created": "2013-03-08 19:11:36+0200",
"CreatedBy": "AdminTitular",
"Updated": "2013-03-08 19:13:24+0200",
"UpdatedBy": "AdminTitular",
"DocumentNo": "1000500",
"DocType": "Internal Use Inventory",
"WorkOrderReference": "WO 12345",
"Description": "Test Case - 005 (check costs with LC on FIFO+ORG)",
"MovementDate": "2013-03-08 00:00:00+0200",
"BPartner": null,
"BPartnerName": null,
"Warehouse": "Warehouse-2 F.O",
"TrxOrganization": null,
"Activity": null,
"Project": "ABC",
"DocumentStatus": "Completed",
"DocumentAction": "Close"
}
],
"totalRows": 1
}
Create header only:
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/create/{version}?accessToken={access_token}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Organization F.O",
"DocumentNo": null,
"DocType": "Internal Use Inventory",
"WorkOrderReference": "WO 12345",
"Description": "Test Case - 005 (check costs with LC on FIFO+ORG)",
"MovementDate": "2013-03-08 00:00:00+0200",
"BPartner": null,
"Warehouse": "Warehouse-2 F.O",
"TrxOrganization": null,
"Activity": null,
"Project": "ABC",
"DocumentAction": "Complete"
}
Update header only:
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/update/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Organization F.O",
"DocumentNo": "1000500",
"DocType": "Internal Use Inventory",
"WorkOrderReference": "WO 12345",
"Description": "Test Case - 005 (check costs with LC on FIFO+ORG)",
"MovementDate": "2013-03-08 00:00:00+0200",
"BPartner": null,
"Warehouse": "Warehouse-2 F.O",
"TrxOrganization": null,
"Activity": null,
"Project": "ABC",
"DocumentAction": "Complete"
}
Delete header (automatically deletes also details):
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/delete/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: POST
Return: 'Deleted' for success or error message (start with "ERROR: ")
Process header:
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/process/{version}?accessToken={access_token}&DocumentNo={document_no}&DocumentAction={document_action}
Method: POST
Return: Document status for success or error message (start with "ERROR: ")
List details:
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/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": "Organization F.O",
"Created": "2013-03-08 19:12:29+0200",
"CreatedBy": "AdminTitular",
"Updated": "2013-03-08 19:13:05+0200",
"UpdatedBy": "AdminTitular",
"Line": 10,
"Product": "T005-NA-FIFO-ORG",
"Locator": "W2FO-000",
"ProductName": "T005-NA-FIFO-ORG",
"Description": null,
"QtyEntered": 7,
"UOM": "Each",
"Charge": "Diverse"
}
],
"totalRows": 1
}
Create detail:
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/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": "T005-NA-FIFO-ORG",
"Description": null,
"QtyEntered": 7,
"Charge": "Diverse"
}
Update detail:
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/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": "T005-NA-FIFO-ORG",
"Description": null,
"QtyEntered": 7,
"Charge": "Diverse"
}
Delete detail:
URL: https://api.socratecloud.com/webapi/rest/internal_use_inventory/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/internal_use_inventory/print/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: GET
Return: PDF file