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) Carrier ID defines the carrier associated to the tracking number.

integer

None.

TrackingNumber

(Mandatory) The tracking Number to update Tracking

string

None.

StartDate

(Optional) The start date period to search for the tracking number - by default it is set to 45 days before current date time

date

None.

EndDate

(Optional) The end date period to search for the tracking number - by default it is to current date time

date

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",
  "StartDate": "2021-07-30T10:08:46.9116563-04:00",
  "EndDate": "2021-07-30T10:08:46.9116563-04:00",
  "TrackingInfo": {
    "EstimatedDeliveryDate": "2021-07-30T10:08:46.9116563-04:00",
    "DeliveryDate": "2021-07-30T10:08:46.9116563-04:00",
    "SignatureBase64String": "sample string 1",
    "SignedBy": "sample string 2",
    "Event": {
      "ScanDateTime": "2021-07-30T10:08:46.9126215-04: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>
  <EndDate>2021-07-30T10:08:46.9116563-04:00</EndDate>
  <StartDate>2021-07-30T10:08:46.9116563-04:00</StartDate>
  <TrackingInfo>
    <DeliveryDate>2021-07-30T10:08:46.9116563-04:00</DeliveryDate>
    <EstimatedDeliveryDate>2021-07-30T10:08:46.9116563-04:00</EstimatedDeliveryDate>
    <Event>
      <Description>sample string 2</Description>
      <ScanCity>sample string 5</ScanCity>
      <ScanCountry>sample string 3</ScanCountry>
      <ScanDateTime>2021-07-30T10:08:46.9126215-04: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>