POST api/UpdateTracking_V1

Update tracking info

Request Information

URI Parameters

None.

Body Parameters

The request is presented bellow

WS_Repository.Models.Requests.Tracking.UpdateTrackingRequest
NameDescriptionTypeAdditional information
WS_Key

(Mandatory) Webservice Key provided by 2ship support - it is the Carrier WS Key if the WSKeyLevel = Carrier or the User WS Key if the WSKeyLevel = User

string

None.

WSKeyLevel

Update Tracking Login Type

WS_Repository.Models.Requests.Tracking.UpdateTrackingLoginType

None.

CarrierId

(Optional Mandatory if the WSKeyLevel = User) The carrier id that tracking number belong too!

integer

None.

TrackingNumber

(Mandatory) The tracking Number to update Tracking

string

None.

TrackingInfo

(Mandatory) Tracking info to be added to package/shipment

WS_Repository.Models.Requests.Tracking.TrackingUpdateInfo

None.

Request Formats

application/json, text/json

Sample:
{
  "WS_Key": "sample string 1",
  "WSKeyLevel": 0,
  "CarrierId": 2,
  "TrackingNumber": "sample string 3",
  "TrackingInfo": {
    "EstimatedDeliveryDate": "2021-03-08T00:23:54.5119972-05:00",
    "DeliveryDate": "2021-03-08T00:23:54.5119972-05:00",
    "SignatureBase64String": "sample string 1",
    "SignedBy": "sample string 2",
    "Event": {
      "ScanDateTime": "2021-03-08T00:23:54.5129622-05:00",
      "Status": 0,
      "Description": "sample string 2",
      "ScanCountry": "sample string 3",
      "ScanState": "sample string 4",
      "ScanCity": "sample string 5",
      "ScanPostal": "sample string 6"
    }
  }
}

application/xml, text/xml

Sample:
<UpdateTrackingRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Requests.Tracking">
  <CarrierId>2</CarrierId>
  <TrackingInfo>
    <DeliveryDate>2021-03-08T00:23:54.5119972-05:00</DeliveryDate>
    <EstimatedDeliveryDate>2021-03-08T00:23:54.5119972-05:00</EstimatedDeliveryDate>
    <Event>
      <Description>sample string 2</Description>
      <ScanCity>sample string 5</ScanCity>
      <ScanCountry>sample string 3</ScanCountry>
      <ScanDateTime>2021-03-08T00:23:54.5129622-05:00</ScanDateTime>
      <ScanPostal>sample string 6</ScanPostal>
      <ScanState>sample string 4</ScanState>
      <Status>PickedUp</Status>
    </Event>
    <SignatureBase64String>sample string 1</SignatureBase64String>
    <SignedBy>sample string 2</SignedBy>
  </TrackingInfo>
  <TrackingNumber>sample string 3</TrackingNumber>
  <WSKeyLevel>Carrier</WSKeyLevel>
  <WS_Key>sample string 1</WS_Key>
</UpdateTrackingRequest>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'WS_Repository.Models.Requests.Tracking.UpdateTrackingRequest'.

Response Information

Resource Description

WS_Repository.Models.Responses.Tracking.UpdateTrackingResponse
NameDescriptionTypeAdditional information
Success

indicates if the Update was done

boolean

None.

Error

Error message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "Success": true,
  "Error": "sample string 2"
}

application/xml, text/xml

Sample:
<UpdateTrackingResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.Tracking">
  <Error>sample string 2</Error>
  <Success>true</Success>
</UpdateTrackingResponse>