18. Production
Interface
It allows you:
to view production data - ordered Movement Date, Created and production ID
to create and process production data (assembly or disassembly)
Columns that can be used as filters:
Organization
Organization_ID
DocType
DocType_ID
MovementDate
Created
DocumentNo
DocStatus
Processed
Actions can be done:
list full
create assembly
create disassembly
API Methods:
List Full:
URL: https://api.socratecloud.com/webapi/rest/production/full/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "DEMO SRL",
"Organization_ID": 1005272,
"Created": "2022-08-16 16:56:30+0000",
"CreatedBy": "DEMO_Admin",
"Updated": "2022-08-16 16:56:31+0000",
"UpdatedBy": "DEMO_Admin",
"DocType": "Material Production",
"DocType_ID": 1005954,
"DocStatus": "CO",
"Name": "BA_012",
"DocumentNo": "BA 1000012",
"MovementDate": "2022-08-03 00:00:00+0000",
"PriceList": "Achizitie RON",
"PriceList_ID": 1002246,
"Currency": "RON",
"Currency_ID": 346,
"IsAssemblage": true,
"IsCreated": false,
"Processed": true,
"Description": "RFC 1074719 ",
"OrganizationTrx": "SERVICE",
"OrganizationTrx_ID": 1005354,
"Employee": "DEMO",
"Employee_ID": 1022001,
"Project": "OBER01",
"Project_ID": 1020787,
"Activity": "Interventie TEST 1",
"Activity_ID": 1000161,
"Campaign": "Campanie testare API",
"Campaign_ID": 1000482,
"User1": "Patrimoniul privat",
"User1_ID": 1053278,
"User2": null,
"User2_ID": null,
"Asset": "LIVRABIL 8",
"Asset_ID": 1005690,
"Production_ID": 1003471,
"plans": [
{
"Line": 10,
"Locator_ID": 1003898,
"Locator": "Standard",
"Charge_ID": null,
"Charge": null,
"Product_ID": null,
"ProductName": "SEMIFABRICAT cu BA",
"ProductValue": "SM_BA",
"attributes": {
"BatchLot": null,
"GuaranteeDate": null
},
"QtyEntered": 5,
"Description": "some description",
"Cost": null,
"lines": [
{
"Organization": "DEMO SRL",
"Organization_ID": 1005272,
"Created": "2022-08-16 16:56:30+0000",
"CreatedBy": "DEMO_Admin",
"Updated": "2022-08-16 16:56:30+0000",
"UpdatedBy": "DEMO_Admin",
"Active": true,
"Line": 10,
"Locator": "Standard",
"Locator_ID": 1003898,
"ProductValue": "MP_1",
"ProductName": "MATERIE PRIMA 1",
"Product_ID": 1132724,
"QtyEntered": 5,
"MovementQty": -5,
"Charge": null,
"Charge_ID": null,
"Description": null,
"PriceCost": 100,
"CostAmt": -500,
"IsInProduction": null,
"PriceEntered": null,
"attributes": {
"BatchLot": null,
"GuaranteeDate": null
}
},
{
"Organization": "DEMO SRL",
"Organization_ID": 1005272,
"Created": "2022-08-16 16:56:30+0000",
"CreatedBy": "DEMO_Admin",
"Updated": "2022-08-16 16:56:31+0000",
"UpdatedBy": "DEMO_Admin",
"Active": true,
"Line": 20,
"Locator": "Standard",
"Locator_ID": 1003898,
"ProductValue": "MP_2",
"ProductName": "MATERIE PRIMA 2",
"Product_ID": 1132725,
"QtyEntered": 6.25,
"MovementQty": -6.25,
"Charge": null,
"Charge_ID": null,
"Description": null,
"PriceCost": 80,
"CostAmt": -500,
"IsInProduction": null,
"PriceEntered": null,
"attributes": {
"BatchLot": null,
"GuaranteeDate": null
}
},
{
"Organization": "DEMO SRL",
"Organization_ID": 1005272,
"Created": "2022-08-16 16:56:30+0000",
"CreatedBy": "DEMO_Admin",
"Updated": "2022-08-17 04:00:05+0000",
"UpdatedBy": "System",
"Active": true,
"Line": 30,
"Locator": "Standard",
"Locator_ID": 1003898,
"ProductValue": "SM_BA",
"ProductName": "SEMIFABRICAT cu BA",
"Product_ID": 1132726,
"QtyEntered": 5,
"MovementQty": 5,
"Charge": null,
"Charge_ID": null,
"Description": null,
"PriceCost": 100,
"CostAmt": 500,
"IsInProduction": null,
"PriceEntered": null,
"attributes": {
"BatchLot": null,
"GuaranteeDate": null
}
}
]
}
]
}
],
"totalRows": 1
}
Create assembly:
URL: https://api.socratecloud.com/webapi/rest/production/full/create/assembly/{version}?generateProduction=true&documentAction={documentAction}&accessToken={token}
Method: POST
Parameters:
documentAction: default null, specify the document action (CO, VO, etc.)
generateProduction: default false, specify if the Generate Production process should be run, the process is used to generate the material receipt through which the stock receipt for the final product is registered
Constraints:
Mandatory Org
Mandatory DocType
Mandatory Locator (taken from context if not given)
Mandatory QtyEntered
Mandatory Product
If Cost is not given, the Current Costs process will be run to automatically infer the product cost. If Cost is given then the IsManual Cost checkbox is automatically set.
Return: JSON object with next format:
{
"data" : {documentNo}
"id": {production ID}
}
Data format:
{
"Organization_ID": 1000720,
"Organization": "Org name",
"DocType_ID": 1234567,
"DocType": "Material Production",
"DocumentNo": "Production DocumentNo",
"Name": "Production name",
"MovementDate": "2022-07-29 00:00:00+0200",
"PriceList_ID": 1000322,
"PriceList": "Price list name",
"Description": "Test description",
"project_id": 1002574,
"Project": "Project value",
"activity_id": 1000136,
"Activity": "Activity value",
"campaign_id": 1000465,
"campaign": "Campaign name",
"asset_id": 1004749,
"asset": "Asset name",
"OrganizationTrx_ID": 1000720,
"OrganizationTrx": "Org Trx Name",
"employee_id": 1006356,
"employee": "Employee name",
"user1_id": 1043000,
"user1": "User1 name",
"user2_id": 1004336,
"User2": "User2 name",
"plans": [
{
"Locator_ID": 1000132,
"Line": 10,
"Charge_ID": 1923523,
"Charge": "Charge name",
"Product_ID": 1234567,
"ProductValue": "Product value",
"QtyEntered": 10,
"Description": "Test description plan",
"Cost": 100,
"lines": {
"Charge_ID": 1923523,
"Charge": "Charge name",
"Product_ID": 1234567,
"ProductValue": "Product value",
"QtyEntered": 12,
"PriceEntered": 100.50,
"Description": "My description"
}
}
]
}
Create disassembly:
URL: https://api.socratecloud.com/webapi/rest/production/full/create/disassembly/{version}?generateProduction=true&documentAction={documentAction}&accessToken={token}
Method: POST
Parameters:
documentAction: default null, specify the document action (CO, VO, etc.)
generateProduction: default false, specify if the Generate Production process should be run, the process is used to generate the material receipt through which the stock receipt for the final product is registered
Constraints:
Mandatory Org
Mandatory DocType
Mandatory Locator (taken from context if not given)
Mandatory QtyEntered
Mandatory Product
Mandatory PriceEntered ( <> 0)
Return: JSON object with next format:
{
"data" : {documentNo}
"id": {production ID}
}
Data format:
{
"Organization_ID": 1000720,
"Organization": "Org name",
"DocType_ID": 1234567,
"DocType": "Material Production",
"DocumentNo": "Production DocumentNo",
"Name": "Production name",
"MovementDate": "2022-07-29 00:00:00+0200",
"PriceList_ID": 1000322,
"PriceList": "Price list name",
"Description": "Test description",
"project_id": 1002574,
"Project": "Project value",
"activity_id": 1000136,
"Activity": "Activity value",
"campaign_id": 1000465,
"campaign": "Campaign name",
"asset_id": 1004749,
"asset": "Asset name",
"OrganizationTrx_ID": 1000720,
"OrganizationTrx": "Org Trx Name",
"employee_id": 1006356,
"employee": "Employee name",
"user1_id": 1043000,
"user1": "User1 name",
"user2_id": 1004336,
"User2": "User2 name",
"plans": [
{
"Locator_ID": 1000132,
"Line": 10,
"Charge_ID": 1923523,
"Charge": "Charge name",
"Product_ID": 1234567,
"ProductValue": "Product value",
"QtyEntered": 10,
"Description": "Test description plan",
"lines": {
"Charge_ID": 1923523,
"Charge": "Charge name",
"Product_ID": 1234567,
"ProductValue": "Product value",
"QtyEntered": 12,
"PriceEntered": 100.50,
"Description": "My description"
}
}
]
}
Update:
URL: https://api.socratecloud.com/webapi/rest/production/update/{version}?DocumentNo={document number}&Production_ID={Production ID}generateProduction=true&documentAction={documentAction}&accessToken={token}
Method: POST
Parameters:
documentAction: default null, specify the document action (CO, VO, etc.)
DocumentNo: document number of the production
Production_ID: ID of the production document
generateProduction: default false, specify if the Generate Production process should be run, the process is used to generate the material receipt through which the stock receipt for the final product is registered
Constraints:
Cannot update Organisation
Return: JSON object with next format:
{
"data" : {documentNo}
"id": {production ID}
}
Data format:
{
"DocType_ID": 1234567,
"DocType": "Material Production",
"DocumentNo": "Production DocumentNo",
"Name": "Production name",
"MovementDate": "2022-07-29 00:00:00+0200",
"PriceList_ID": 1000322,
"PriceList": "Price list name",
"Description": "Test description",
"Project_id": 1002574,
"Project": "Project value",
"Activity_id": 1000136,
"Activity": "Activity value",
"Campaign_id": 1000465,
"Campaign": "Campaign name",
"Asset_id": 1004749,
"Asset": "Asset name",
"OrganizationTrx_ID": 1000720,
"OrganizationTrx": "Org Trx Name",
"Employee_id": 1006356,
"Employee": "Employee name",
"User1_id": 1043000,
"User1": "User1 name",
"User2_id": 1004336,
"User2": "User2 name"
}