12. TrakIT API‎ > ‎Shipment‎ > ‎

Update WO Header

The below API is used to update work order header fields.


Request: POST

Signature: /api/mobile/UpdateWOHeader?Token={Login_Token}


Body:


{
"WoNum":"WORK_ORDER_ID",
"Header":
[
    {
    "Code":"HEADER_CODE",
    "Value":"FIELD_VALUE",
    "ApplyToAll":BOOLEAN_VALUE,
    "Validate":BOOLEAN_VALUE
    }
]
}

Sample CASE 1: /api/mobile/UpdateWOHeader?Token=VomYEMiECFFyAQ3==

{
"WoNum":"111",
"Header":
[
    {
    "Code":"CC",
    "Value":"Logistic Pvt. Ltd."
    },
    {
    "Code":"CN",
    "Value":"CSIU200082",
    "Validate":false
    },
    {
    "Code":"CO",
    "Value":"Coffee",
    "ApplyToAll":true
    }
]
}

Response:

{
"Code": 1,
"Info": "WO Header updated successfully",
"RowsAffected": 0,
"Scalar": null,
"Identity": 0,
"RetInfo": null
}



Sample CASE 2: /api/mobile/UpdateWOHeader?Token=VomYEMiECFFyAQ3==

{
"WoNum":"18457",
"Header":
[
    {
    "Code":"DL",
    "Value":["TBi6d779ptmQXVSEjxQ=","TBi6d779efYbTBmdr7I=","TBi6d779wFsPW_alCas="],
    "Operation":"Add"
    }
]
}

Response:

{
"Code": 1,
"Info": "WO Header updated successfully",
"RowsAffected": 0,
"Scalar": null,
"Identity": 0,
"RetInfo": null
}



Things to know about this API:

  1. Token - You can use Login API to get token displayed under Info

  2. These fields are mandatory while sending request body:

    • Code
    • Value

  3. Below are the Header Fields and their Code:

    Header Field  Code
    Contractual Customer  CC
    Shipper SR
    Receiver RC
    Carrier CR
    Bond Agent BA
    Clearing Agent CA
    Transporter  TR
    Return Transporter  RT
    Depot list  DL
    Country of Origin CY
    Final Destination FD
    Cargo Type CG
    Shipment Type ST
    Shipper Container SC
    Commodity CO
    Container Number CN
    Manifest LD
    Container Type CT
    Weight CW
    Volume VL
    Seal Number SN
    Vertical VE

  4. ApplyToAll determine whether the value is applicable to single work order or complete shipment. It's default value will be true.This attribute will be applied on:

    • Carrier
    • Commodity
    • Vertical
    • Country of Origin
    • Final Destination
    • Container Type
    • Weight
    • Volume
    • Shipper Container
    • Bond Agent
    • Clearing Agent
    • Transporter
    • Return Transporter

  5. Validate(only in case of updating Container Number) will be by default true.

  6. Depot List is accepting array. ["Origin Depot","Destination Depot 1","Destination Depot 2"].
    First depot in the list will be considered as Origin Depot and the last will be Destination Depot. If you send only 1 depot in the array, it will update Origin and Destination depot with the same depot.

  7. Operation (only in case of updating Depot List). These are the below options:

  8. Option Description
    Add It will append the depots to the existing depot list.
    You can use Depot List API to get the list of depots and pass DepotID as array under value
    Delete It will delete the depots which you are sending in Value.
    You can use Get WO Depot List API  to get the list of depots and pass WODepotID as array under value
    Reset It will replace the existing depots and will update the depot list with the one that you are sending. This option can also be used to re-order the depots sequence.
    You can use Depot List API to get the list of depots and pass DepotID as array under value


  9. References:

  10. Header Field API URL
    Contractual Customer You can use Get Wo Header Values API to get the list of entities and pass EntName under value
    Shipper
    Receiver
    Bond Agent
    Clearing Agent
    Transporter
    Return Transporter
    Container Type
    Country of Origin You can use Get Country List API to get the list of countries and pass GeoName under value
    Final Destination
Comments