2.1 Shipment Confirmation
Interface
It allows you:
to view your shipment confirmation
to print the shipment related to this confirmation
to update shipment confirmation with the result of quantity delivered
In case when some lines of the confirmation are not present in the JSON for update then those lines will remain unchanged in the confirmation.
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
OrderNo
OrderReference
ShipmentNo
DocumentNo
BPartner
DocumentStatus
LastModified (UTC time format ISO 8601: yyyy-MM-dd HH:mm:ss Z from M_InOutConfirm). The sign used for comparison is ”>” (exclusive). Use this filter to get all the shipments confirmation modified after the date/time value sent in this parameter.
eg: LastModified=2014-06-13 12:40:00 +0300 if you are in Romania or LastModified=2014-06-13%2012:40:00%20%2b0300
Actions can be done:
list
print
update
Customer Shipment fields (Master and Details)
API Method
List:
URL: https://api.socratecloud.com/webapi/rest/shipment/confirmation/full/list/{version}?accessToken={access_token}
Method: GET
Return: JSON object with next format:
{
"data":[
{
"Organization":"Demo SRL",
"Created":"2014-07-01 09:12:03+0300",
"CreatedBy":"TestUser",
"Updated":"2014-07-03 14:58:04+0300",
"UpdatedBy":"TestUser",
"ShipmentNo":"551900",
"ShipDate": null,
"OrderNo":"53900",
"OrderReference":null,
"DocumentNo":"1002900",
"Description":null,
"IsReturn": false,
"Date":"2014-07-01 00:00:00+0300",
"BPartner":"Client 01",
"BPartnerName":"Client 01",
"BPartnerLocation":"STRADA",
"Warehouse":"PF",
"DocumentStatus":"Drafted",
"DocumentAction":"Complete",
"SalesRepName":"Popescu Ion",
"MeanOfConveyance_ID": 1002926,
"MeanOfConveyanceName":"BV-02-TMW",
"MOCSalesRepName":"Test rep",
"MOCSalesRepDescription":"Test rep",
"lines":[
{
"Organization":"Demo SRL",
"Created":"2014-07-01 09:12:04+0300",
"CreatedBy":"TestUser",
"Updated":"2014-07-03 14:58:18+0300",
"UpdatedBy":"TestUser",
"Line":10,
"Product":"some_product_code",
"ProductName":"some_product",
"Description":null,
"TargetQty":10,
"UOM":"Each",
"ConfirmedQty":10,
"ScrappedQty":0
}
]
}],
"totalRows":1
}
Update:
URL: https://api.socratecloud.com/webapi/rest/shipment/confirmation/full/update/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: POST
Return: document no for success or error message (start with "ERROR: ")
Data format:
{
"Description":null,
"DocumentAction":"Complete",
"MeanOfConveyance_ID":1002926,
"MeanOfConveyanceName":"BV-02-TMW",
"MOCSalesRepName":"Test rep",
"MOCSalesRepDescription":"Test rep",
"lines":[
{
"Line":10,
"ConfirmedQty":10,
"ScrappedQty":0
}
]
}
Process:
URL: https://api.socratecloud.com/webapi/rest/shipment/confirmation/process/{version}?accessToken={access_token}&DocumentNo={document_no}&DocumentAction={document_action}
Method: POST
Return: Document status for success or error message (start with "ERROR: ")
Print:
URL: https://api.socratecloud.com/webapi/rest/shipment/confirmation/print/{version}?accessToken={access_token}&DocumentNo={document_no}
Method: GET
Return: PDF file