Track a Courier Parcel
Track a Courier Parcel
URL: |
https://api.trademe.co.nz/v1/MyTradeMe/CourierParcels.{file_format} |
HTTP Method: |
POST |
Requires Authentication? |
Yes |
Permission Required: |
MyTradeMeWrite: Maintain your watchlist, answer questions and post comments. |
Supported Formats: |
XML, JSON |
Rate Limited? |
Yes |
URL parameters
file_format |
Enumeration (required) |
The format of the response.
|
|
xml |
Serialize responses into XML.
|
json |
Serialize responses into JSON.
|
|
POST Data
<CourierParcelTrackingRequest>
Parcel |
<CourierParcel> (required) |
Parcel to be tracked
|
CourierCompany |
String (required) |
The courier company. Commonly used values include: CourierPost, Fastway, New Zealand Couriers, Post Haste, GoSweetSpot, Castle Parcels
|
AccountNumber |
String (optional) |
Optional account number specific to the courier
|
TrackingReference |
String (required) |
The tracking reference specific to the courier company
|
AuctionSoldIds |
Collection of Integer (required) |
The list of purchase IDs (auction sold IDs) that where shipped with this parcel
|
|
Returns
<TrackParcelResponse>
Details of whether the operation was successful.
Success |
Boolean |
Indicates whether the operation was successful.
|
Description |
String or null |
The description of the error, if the operation failed.
|
Code |
Enumeration |
More information as to the result of the operation
|
|
OK |
0 |
Parcel was successfully accepted into the system
|
ParcelAlreadyExists |
1 |
A duplicate parcel already exists in the system
|
TrackingReferenceEmpty |
2 |
Tracking reference is empty
|
TrackingReferenceTooLong |
3 |
Tracking reference is too long
|
AccountNumberTooLong |
4 |
Account number is too long
|
MemberIsNotSeller |
5 |
This member did not create one or more of the supplied listing reference ids
|
InvalidAuctionSoldIds |
6 |
One or more of the sold listing ids do not exist
|
AuctionSoldIdsEmpty |
7 |
Need to specify at least one auction sold id
|
AuctionSoldIdsArentForTheSameBuyer |
8 |
All auctions must be for the same buyer
|
CourierCompanyNotSpecified |
9 |
Courier company is not specified
|
|
CourierParcelId |
Integer |
The id of the newly tracked parcel
|
<CourierParcelTrackingRequest xmlns="http://api.trademe.co.nz/v1">
<Parcel>
<CourierCompany>ABC</CourierCompany>
<AccountNumber>ABC</AccountNumber>
<TrackingReference>ABC</TrackingReference>
<AuctionSoldIds>
<Id>123</Id>
<Id>123</Id>
</AuctionSoldIds>
</Parcel>
</CourierParcelTrackingRequest>
{
"Parcel": {
"CourierCompany": "ABC",
"AccountNumber": "ABC",
"TrackingReference": "ABC",
"AuctionSoldIds": [
123,
123
]
}
}
<TrackParcelResponse xmlns="http://api.trademe.co.nz/v1">
<Success>false</Success>
<Description>ABC</Description>
<Code>OK</Code>
<CourierParcelId>123</CourierParcelId>
</TrackParcelResponse>
{
"Success": false,
"Description": "ABC",
"Code": 0,
"CourierParcelId": 123
}