ParcelTrack API icon

ParcelTrack API

(0 reviews)

Remove

Resource URL

UAT:

https://api.uat.nzpost.co.nz/tracking/2.0/subscriptions/remove/
Production:
https://api.nzpost.co.nz/tracking/2.0/subscriptions/remove/

Resource Description

Two methods are available to use to unsubscribe. If the subscription was created by calling the "Subscriptions" resource, then a subscription id was returned and can be used with this "Remove" resource to unsubscribe. If the subscription to tracking events was created via the CourierPost web site, then a subscription id will not be available and the r "Unsubscribe" resource should be called that uses the tracking reference and endpoint to identify the subscription to be removed.

Resource Information

AttributeDetail
Response FormatJSON
Requires AuthenticationYes
Rate Limited15 calls per second. If rate limit is exceeded, calls will be queued. Calls unprocessed for over 60 seconds will time out.

Contains the access token. The access token is provided upon registering to use the API. See 'Getting Started'.
Example: Authorization: Bearer {access_token}

Request Message Fields

FieldDescriptionMandExample
subscriptionidThe unique subscription identifier supplied upon creation of a new subscriptionYes4F37E5C6-2DCE-4433-8EA4-0A513454D2EE

Sample Request

https://api.nzpost.co.nz/tracking/2.0/subscriptions/remove?subscriptionid=4F37E5C6-2DCE-4433-8EA4-0A513454D2EE

Response Parameters

Field NameDescriptionMandExample
resultsnull--
successReturns bolean indicating success or failure of subscription creationYesTrue
codeCode that indicates state of POSTYes200
messageDetails regarding any errors encountered.NoSee Error List section for details

Error Types

Note that some error messages are customised for the request, i.e. error code 400 usually will describe what is wrong with the request

CodeMessageValueExample
200SuccessNumber
400Invalid requestNumber1002
403ForbiddenStringUser unauthorised
409Invalid requestStringDuplicate subscription found for Ticket Number 7963061234567801CDY001AS and Email xyza447@gmail.comz
500System unavailableStringSystem unavailable

Error Messages

CodeMessage
200001Partial results returned, not all system(s) have responded
200002All sources responded, data may be incomplete
400001Parameter(s) missing
400002Invalid parameter(s)
400003Non mutually exclusive parameters detected
401001Unauthorised access, please contact administrator
500001General Exception
500002System(s) offline

Sample Responses

Sample success response:


{
   "results": {"subscription_id": "4f37e5c6-2dce-4433-8ea4-0a513454d2ee"},
   "success": true,
   "code": 200,
   "message": "Completed successfully"
}

Sample failure response:


{
   "results": {},
   "success": false,
   "code": 400,
   "message": "No subscription could be found for subscription id 4f37e5c6-2dce-4433-8ea4-0a513454d2e1"
}

Reviews