UPDATE OUTSOURCED JOB

Description: This API is used by the server to receive new data to update outsourced jobs. Server can receive multiple data updates.


A. URL:

http://ctsgtest.com/api/outsource/update/receive/
 

B. Method:

POST
 

C. Parameters:

  1. Parameter:
    jobs
    Description:
    The new values for the job(s). Must include JobID and TrackingID in the JSON.
    Type:
    JSON-formatted String
    JSON Values:
    TrackingID : the identity of the job on database. Usually the job ID.
    JobID : the job's ID on outsourced server.
    collectAddress : the collect address for the parcel.
    collectRegion : the collect region for the parcel.
    parcelDescription : the description of the parcell.
    jobName : the name of the job.

    Example:
    [{"JobID":"PSTM1000","TrackingID":"PSTM1000","jobName":"new_name A", "parcelDescription":"parcel_description A","collectAddress":"ZZ","collectRegion":"Danger"},{"JobID":"PSTM1001","TrackingID":"PSTM1001","jobName":"new_name B", "parcelDescription":"parcel_description B","collectAddress":"ZZ","collectRegion":"Danger"}]
  2. Parameter:
    id
    Example:
    193
    Type:
    String
    Description:
    the ID of the user making the API call
  3. Parameter:
    key
    Example:
    123
    Type:
    String
    Description:
    the API key of the user making the API call
  4. Parameter:
    hash
    Example:
    16d042ea4e74b6a48be3775b68fd8ce6
    Type:
    String
    Description:
    Secret code that is generated with the API call.
    It is an MD5 encryption of the string concatenation from the values of: APIKey + APISecret + UserID.

D. Response example:

{ "STATUS": "SUCCESS", "MESSAGE": "JOBS UPDATED IN DATABASE", "DATA": [ { "status": "SUCCESS", "id": "PSTM1000" }, { "status": "SUCCESS", "id": "PSTM1001" } ] }
{
    "STATUS": "SUCCESS",
    "MESSAGE": "JOBS UPDATED IN DATABASE",
    "DATA": [
        {
            "status": "SUCCESS",
            "id": "PSTM1000"
        },
        {
            "status": "SUCCESS",
            "id": "PSTM1001"
        }
    ]
}
							

E. Example of API Call:

POST Receive Update

Result