POST api/Tracking_V1

Track your shipment with 2ship

Request Information

URI Parameters

None.

Body Parameters

The request is presented below!

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

(Mandatory) Webservice Key provided by 2ship support

string

None.

CarrierId

(Mandatory) Carrier ID defines the carrier associated to the tracking number.

integer

None.

TrackingNumber

(Mandatory) The tracking Number to Track

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.

Request Formats

application/json, text/json

Sample:
{
  "WS_Key": "sample string 1",
  "CarrierId": 2,
  "TrackingNumber": "sample string 3",
  "StartDate": "2021-07-30T08:36:10.7997568-04:00",
  "EndDate": "2021-07-30T08:36:10.7997568-04:00"
}

application/xml, text/xml

Sample:
<TrackingRequest 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-30T08:36:10.7997568-04:00</EndDate>
  <StartDate>2021-07-30T08:36:10.7997568-04:00</StartDate>
  <TrackingNumber>sample string 3</TrackingNumber>
  <WS_Key>sample string 1</WS_Key>
</TrackingRequest>

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.TrackingRequest'.

Response Information

Resource Description

WS_Repository.Models.Responses.Tracking.TrackingResponse
NameDescriptionTypeAdditional information
TrackingStatusCode

The Status Code of your shipment

string

None.

TrackingStatusDescription

The status Description of your shipment

string

None.

EstimatedDeliveryDate

Estimated delivery date if not delivered alrready

date

None.

DeliveryDate

Delivery date, if the shipment was delivered

date

None.

TrackingStatus

The status of your shipment (ex: Delivered, In Transit etc)

string

None.

SignatureBase64String

if is not empty it contains the base64 string of the signature image

string

None.

SignedBy

Signed By

string

None.

Events

List Of Tracking Events

Collection of WS_Repository.Models.Responses.Tracking.TrackingEvents

None.

OrderNo

Shipment Order Number

string

None.

TrackingNumber

Shipment Master Tracking Number

string

None.

ShipmentReference

Shipment Reference

string

None.

ShipmentPONumber

Shipment PO #

string

None.

Response Formats

application/json, text/json

Sample:
{
  "TrackingStatusCode": "sample string 1",
  "TrackingStatusDescription": "sample string 2",
  "EstimatedDeliveryDate": "2021-07-30T08:36:10.8017034-04:00",
  "DeliveryDate": "2021-07-30T08:36:10.8017034-04:00",
  "TrackingStatus": "sample string 5",
  "SignatureBase64String": "sample string 6",
  "SignedBy": "sample string 7",
  "Events": [
    {
      "ScanDate": "2021-07-30T08:36:10.8017034-04:00",
      "Status": 0,
      "Description": "sample string 2"
    },
    {
      "ScanDate": "2021-07-30T08:36:10.8017034-04:00",
      "Status": 0,
      "Description": "sample string 2"
    }
  ],
  "OrderNo": "sample string 8",
  "TrackingNumber": "sample string 9",
  "ShipmentReference": "sample string 10",
  "ShipmentPONumber": "sample string 11"
}

application/xml, text/xml

Sample:
<TrackingResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WS_Repository.Models.Responses.Tracking">
  <DeliveryDate>2021-07-30T08:36:10.8017034-04:00</DeliveryDate>
  <EstimatedDeliveryDate>2021-07-30T08:36:10.8017034-04:00</EstimatedDeliveryDate>
  <Events>
    <TrackingEvents>
      <Description>sample string 2</Description>
      <ScanDate>2021-07-30T08:36:10.8017034-04:00</ScanDate>
      <Status>PickedUp</Status>
    </TrackingEvents>
    <TrackingEvents>
      <Description>sample string 2</Description>
      <ScanDate>2021-07-30T08:36:10.8017034-04:00</ScanDate>
      <Status>PickedUp</Status>
    </TrackingEvents>
  </Events>
  <OrderNo>sample string 8</OrderNo>
  <ShipmentPONumber>sample string 11</ShipmentPONumber>
  <ShipmentReference>sample string 10</ShipmentReference>
  <SignatureBase64String>sample string 6</SignatureBase64String>
  <SignedBy>sample string 7</SignedBy>
  <TrackingNumber>sample string 9</TrackingNumber>
  <TrackingStatus>sample string 5</TrackingStatus>
  <TrackingStatusCode>sample string 1</TrackingStatusCode>
  <TrackingStatusDescription>sample string 2</TrackingStatusDescription>
</TrackingResponse>