Request: POST
Signature: api/v1/createjob
This API Post request creates a complete job along with work orders. Token must be passed as a Header in the request.
Payload:
The JSON structure contains the details of the job as shown in the sample below.
The only mandatory field is WFID (Workflow ID) and WOList (must contain an array of work orders).
Validation on mandatory fields will occur based on workflow definition.
For fields CargoType, JobType contact Support for the codes.
Services in workorders refers to the Service IDs.
CusID, ShipperID, ReceiverID, OpID, TransID, BondAgentID, ClAgentID refers to the Entity ID.
{
"WFID": 123,
"TD": "1234TEST",
"Remarks": "Job level remarks",
"CusID": 123,
"ShipperID": 123,
"ReceiverID": 123,
"JobType": 1,
"CargoType": 1,
"IncoTerms": "FOB,CIF",
"WOList": [
{"Resp": "ADMIN",
"OpID": 345,
"TransID": 456,
"BondAgentID": 678,
"ClAgentID": 234,
"Priority": 3,
"ContNum": "ABCU1234567",
"TypeCode": "22G1",
"SealNum": "0987654321",
"Commodity": "Commodity",
"Weight": 1234.5,
"Remarks": "WO Remarks",
"CustRemarks": "WO Cust Remarks",
"Services": [4,6,8]
},
{"Resp": "ADMIN",
"OpID": 345,
"TransID": 456,
"BondAgentID": 678,
"ClAgentID": 234,
"Priority": 3,
"ContNum": "ABCU7654321",
"TypeCode": "22G1",
"SealNum": "123456789",
"Commodity": "Commodity",
"Weight": 2346.7,
"Remarks": "WO Remarks",
"CustRemarks": "WO Cust Remarks",
"Services": [4,6,8]
}
]
}
Return Value:
On success, Code will be returned as 1, and the ID of the job created will be returned in the Identity field.
{
"Code": 1,
"Info": "",
"RowsAffected": 0,
"Scalar": null,
"Identity": 12345,
"RetInfo": null
}