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
CourierCompany String (required) CourierCompany
AccountNumber String (optional) AccountNumber
TrackingReference String (required) TrackingReference
AuctionSoldIds Collection of Integer (required) AuctionSoldIds

Returns

<UpdateParcelResponse>

Details of whether the operation was successful.

Success Boolean Success
Description String or null Description
Code Enumeration Code
OK 0 OK
ParcelNotFound 1 ParcelNotFound
TrackingReferenceEmpty 2 TrackingReferenceEmpty
TrackingReferenceTooLong 3 TrackingReferenceTooLong
AccountNumberTooLong 4 AccountNumberTooLong
MemberIsNotSeller 5 MemberIsNotSeller
InvalidAuctionSoldIds 6 InvalidAuctionSoldIds
AuctionSoldIdsEmpty 7 AuctionSoldIdsEmpty
AuctionSoldIdsArentForTheSameBuyer 8 AuctionSoldIdsArentForTheSameBuyer
CourierCompanyNotSpecified 9 CourierCompanyNotSpecified

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
}