It allows you:
to insert new lines (one by one) into an existing return order
to update, delete return order lines (one by one)
to view return order lines
Prerequisites:
In order to use this API Method for PUT there must be accomplished the following requirements in SocrateCloud:
to have an open Return Order (document status: Draft, In Progress)
to have products active with all the mandatory fields
the products selected on Return Order must have prices defined in the Price List selected on the Return Order
Columns that can be used as filters:
DocumentNo (ReturnOrderNo)
Line
Product
Employee
Project
ProjectPhase
Mandatory Parameters when inserting order lines:
ReturnOrderNo
Actions can be done:
list
insert
update
URL: https://api.socratecloud.com/webapi/rest/RMA/line/list/{version}?startRow={0}&endRow={100}&accessToken={access_token}&DocumentNo={return_order_doc_no}
Method: GET
Return: JSON object with next format:
{
"data": [
{
"Organization": "Rock Star Construct SRL",
"Created": "2018-09-13 15:25:09+0300",
"CreatedBy": "SuperUser",
"Updated": "2018-09-13 15:25:09+0300",
"UpdatedBy": "SuperUser",
"Active": true,
"Line": 10,
"Product": "PIATRA DE RAU",
"ProductName": "Piatra de rau",
"Description": null,
"QtyEntered": 10,
"UOM": "Each",
"ListPrice": 20,
"Discount": 0,
"PriceEntered": 20,
"LineNetAmt": 200,
"IsTaxIncluded": false,
"Tax": "19% ",
"TrxOrganization": null,
"Activity": null,
"Employee": null,
"Project": null,
"ProjectPhase": null,
"ProjectSubPhase": "A",
"BOMPrice": null,
"SecondaryQty": null,
"DropShip": false,
"Orig_OrderLine_ID": 1078482,
"Orig_InOutLine_ID": 1051085,
"Orig_Order_ID": 1068081
}
],
"totalRows": 1
}
URL: https://api.socratecloud.com/webapi/rest/RMA/line/create/{version}?accessToken={access_token}&DocumentNo={return_order_document_no}
Method: POST
Return: line no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Rock Star Construct SRL",
"Created": "2018-09-13 15:25:09+0300",
"CreatedBy": "SuperUser",
"Updated": "2018-09-13 15:25:09+0300",
"UpdatedBy": "SuperUser",
"Active": true,
"Line": 10,
"Product": "PIATRA DE RAU",
"ProductName": "Piatra de rau",
"Description": null,
"QtyEntered": 10,
"UOM": "Each",
"ListPrice": 20,
"Discount": 0,
"PriceEntered": 20,
"LineNetAmt": 200,
"IsTaxIncluded": false,
"Tax": "19% ",
"TrxOrganization": null,
"Activity": null,
"Employee": null,
"Project": null,
"ProjectPhase": null,
"ProjectSubPhase": "A",
"BOMPrice": null,
"SecondaryQty": null,
"DropShip": false,
"Orig_OrderLine_ID": 1078482,
"Orig_InOutLine_ID": 1051085,
"Orig_Order_ID": 1068081
}
URL: https://api.socratecloud.com/webapi/rest/RMA/line/update/{version}?accessToken={access_token}&DocumentNo={return_order_document_no}&Line={line_no}
Method: POST
Return: line no for success or error message (start with "ERROR: ")
Data format:
{
"Organization": "Rock Star Construct SRL",
"Created": "2018-09-13 15:25:09+0300",
"CreatedBy": "SuperUser",
"Updated": "2018-09-13 15:25:09+0300",
"UpdatedBy": "SuperUser",
"Active": true,
"Line": 10,
"Product": "PIATRA DE RAU",
"ProductName": "Piatra de rau",
"Description": null,
"QtyEntered": 10,
"UOM": "Each",
"ListPrice": 20,
"Discount": 0,
"PriceEntered": 20,
"LineNetAmt": 200,
"IsTaxIncluded": false,
"Tax": "19% ",
"TrxOrganization": null,
"Activity": null,
"Employee": null,
"Project": null,
"ProjectPhase": null,
"ProjectSubPhase": "A",
"BOMPrice": null,
"SecondaryQty": null,
"DropShip": false,
"Orig_OrderLine_ID": 1078482,
"Orig_InOutLine_ID": 1051085,
"Orig_Order_ID": 1068081
}