Retrieving the Security Hash

The URL of the Order Status page generated by the parcelLab system contains a parameter with a security hash. This allows our system to detect that the viewer of the page is in fact the recipient.

Get Security Hash

Details of how the tracking-securityhash endpoint can be used to retrieve the security hash for a tracking in the parcelLab system are described below.

GET Security Hash

You can retrieve the security hash using this endpoint. To use this API, you need your parcelLab user ID and token, which you add as the Basic Auth username and password.

The details of the Get Security Hash API are described in the following section.

API Details

GET https://api.parcellab.com/tracking-securityhash?orderNo=x

Query Parameters

Name
Type
Description

orderNo

string

The orderNo field supplied when the tracking was created.

Name
Type
Description

user

number

parcelLab user ID

token

string

parcelLab API token

content-type

string

'application/json'

Responses

  • 200 - security hash successfully retrieved

  • 401 - invalid credentials, or credentials not authorized to access security hash for this tracking

  • 404 - could not find any trackings matching this query

An example successful response is displayed below to show the format for retrieving checkpoints. This contains the parcelLab internal tracking _id, and the _ids of any other trackings in that order listed in _context. The securityHash itself is returned and when it is validUntil, which is 90 days since tracking creation.

{
    "_id": "5e0000000000000000000001",
    "_context": ["5e0000000000000000000002"],
    "securityHash": "abcde12345",
    "validUntil": "2020-02-20T20:20:20.200Z"
}

Alternative Request Patterns

The request in the previous section shows the recommended access pattern via the &orderNo= parameter.

The following request patterns are also supported:

  • &courier=&trackingNo= using the courier and tracking_number fields provided when creating the tracking.

  • &xid= using the xid field provided when creating the tracking.

  • &tid= using the parcelLab internal tracking ID, retrieved from /search for example.

Using the Security Hash

To use the security hash, append it to the URL of any website running our tracking plugin as &s=<securityHash>. For more information on the plugin, please refer to the documentation on parcelLab's Order Status page.

Order Status Page Configuration

Last updated

Was this helpful?