It allows you:
to insert new lines (one by one) into an existing requisition
to update or delete requisition lines (one by one)
to view requisition lines
Prerequisites:
In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:
to have an open requisition (document status: Draft)
to have an active Sales Representative (User with linked Business Partner)
Columns that can be used as filters:
DocumentNo
Line (LineNo)
Product (Value)
Product_ID (M_Product_ID)
SalesRep (Value)
SalesRep_ID (AD_User_ID)
BPartner (Value)
BPartner_ID (C_BPartner_ID)
Project (Value)
ProjectPhase (Name)
ProjectTask (Name)
Activity (Value)
Employee (Value)
Asset (Value)
OrderLine_ID (C_OrderLine_ID)
Mandatory Parameters when inserting lines:
DocumentNo (from Requisition Master)
Actions can be done:
list
insert
update
delete
{
"data": [
{
"Organization": "Fidelio Farm",
"Created": "2019-06-26 07:59:32+0300",
"CreatedBy": "1000002",
"Updated": "2020-06-12 22:22:59+0300",
"UpdatedBy": "100",
"SourceDocNo": "902172",
"Active": true,
"Processed": false,
"Line": 10,
"LineNetAmt": 500,
"SalesRep": "Alin Cruceru",
"SalesRep_ID": 1012786,
"ProductSalesRep": null,
"ProductSalesRep_ID": null,
"Product": "00087GH",
"ProductName": "GheFalco Timar",
"Product_ID": 1000501,
"ProductCategory": "R_Materiale Categorie",
"Charge": null,
"Charge_ID": null,
"UOM": "Each",
"Internal": true,
"QtyEntered": 5,
"PriceActual": 100,
"Qty": 5,
"QtyRequired": null,
"QtyRequisitionOrdered": 0,
"QtyRemaining": 5,
"QtyReceived": 0,
"InvoicedQty": 0,
"QtyAllocated": 0,
"QtyIssued": 0,
"QtyIssuedRemaining": 5,
"Description": "description",
"BPartner": "Macheta",
"BPartner_ID": 1000003,
"LastVoidedCOF_ID": null,
"OrderLine_ID": null,
"RfQLine_ID": null,
"MovementLine_ID": null,
"DateLastInvoice": null,
"Project": "112233",
"Project_ID": 1006065,
"ProjectPhase": "f1",
"ProjectPhase_ID": 1003655,
"ProjectTask": "23",
"ProjectTask_ID": 1000512,
"Activity": "Programare",
"TrxOrganization": "A016",
"Campaign": "BlackFriday 2014",
"Employee": "*Roxana Florescu",
"Employee_ID": 1000372,
"Asset": "C1 - G8 Instrument REF + ACC",
"Asset_ID": 1001110,
"MeanOfConveyance": "B-137-CRL",
"FixedSafetyStock": null,
"InventorySecurityTime": null,
"ReorderTime": null,
"AVCAvgConsumption": null,
"OrderMin": null,
"QtyOrdered": null,
"QtyReserved": null,
"OrderPackQty": null,
"AvgConsumption": null,
"ConsumptionMonth1": null,
"ConsumptionMonth2": null,
"ConsumptionMonth3": null
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/requisition/line/create/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: POST
Return: line no for success or error message (start with "ERROR: ")
{
"Organization": "Fidelio Farm",
"Active": true,
"Line": 10,
"SalesRep": "Alin Cruceru",
"SalesRep_ID": 1012786,
"Product": "00087GH",
"Charge": null,
"Charge_ID": null,
"Internal": true,
"QtyEntered": 5,
"PriceActual": 100,
"Description": "description",
"BPartner": "Macheta",
"BPartner_ID": 1000003,
"Project": "112233",
"ProjectPhase": "f1",
"ProjectTask": "23",
"Activity": "Programare",
"TrxOrganization": "A016",
"Campaign": "BlackFriday 2014",
"Employee": "*Roxana Florescu",
"Employee_ID": 1000372,
"Asset": "C1 - G8 Instrument REF + ACC",
"Asset_ID": 1001110,
"InventorySecurityTime": null,
"ReorderTime": null,
"AVCAvgConsumption": null,
"OrderMin": null,
"QtyOrdered": null,
"QtyReserved": null,
"OrderPackQty": null,
"AvgConsumption": null,
"ConsumptionMonth1": null,
"ConsumptionMonth2": null,
"ConsumptionMonth3": null
}
Data format:
URL: https://api.socratecloud.com/webapi/rest/requisition/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:
{
"Organization": "Fidelio Farm",
"Active": true,
"Line": 10,
"SalesRep": "Alin Cruceru",
"SalesRep_ID": 1012786,
"Product": "00087GH",
"Charge": null,
"Charge_ID": null,
"Internal": true,
"QtyEntered": 5,
"PriceActual": 100,
"Description": "description",
"BPartner": "Macheta",
"BPartner_ID": 1000003,
"Project": "112233",
"ProjectPhase": "f1",
"ProjectTask": "23",
"Activity": "Programare",
"TrxOrganization": "A016",
"Campaign": "BlackFriday 2014",
"Employee": "*Roxana Florescu",
"Employee_ID": 1000372,
"Asset": "C1 - G8 Instrument REF + ACC",
"Asset_ID": 1001110,
"InventorySecurityTime": null,
"ReorderTime": null,
"AVCAvgConsumption": null,
"OrderMin": null,
"QtyOrdered": null,
"QtyReserved": null,
"OrderPackQty": null,
"AvgConsumption": null,
"ConsumptionMonth1": null,
"ConsumptionMonth2": null,
"ConsumptionMonth3": null
}
URL: https://api.socratecloud.com/webapi/rest/requisition/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/requisition/line/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}&DocumentNo={requisition_doc_no}
Method: GET
Return: JSON object with next format: