Website logo

Update Courier Parcel by Id

Update an existing Courier Parcel by Id

URL: https://api.trademe.co.nz/v1/MyTradeMe/CourierParcels/{courierParcelId}.{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

courierParcelId Integer (required)

Id of the existing parcel

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

<UpdateParcelResponse>

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 updated in our system

ParcelNotFound 1

The specified parcel does not exist

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 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

Example XML Request (switch to JSON)

<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>

Example JSON Request (switch to XML)

{
  "Parcel": {
    "CourierCompany": "ABC",
    "AccountNumber": "ABC",
    "TrackingReference": "ABC",
    "AuctionSoldIds": [
      123,
      123
    ]
  }
}

Example XML Response (switch to JSON)

<UpdateParcelResponse xmlns="http://api.trademe.co.nz/v1">
  <Success>false</Success>
  <Description>ABC</Description>
  <Code>OK</Code>
</UpdateParcelResponse>

Example JSON Response (switch to XML)

{
  "Success": false,
  "Description": "ABC",
  "Code": 0
}