> For the complete documentation index, see [llms.txt](https://docs.parcellab.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parcellab.com/docs/developers/v2/status-updates/configuration/retrieving-the-security-hash.md).

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

<details>

<summary><mark style="color:blue;">GET</mark> Security Hash</summary>

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

<mark style="color:blue;">`GET`</mark> `https://api.parcellab.com/tracking-securityhash?orderNo=x`

#### Query Parameters

| Name    | Type   | Description                                                 |
| ------- | ------ | ----------------------------------------------------------- |
| orderNo | string | The `orderNo` field supplied when the tracking was created. |

#### Header

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

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

</details>

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

{% content-ref url="/pages/YpKN39rf034jMoDyGH01" %}
[Order Status Page Configuration](/docs/developers/v2/status-updates/configuration.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.parcellab.com/docs/developers/v2/status-updates/configuration/retrieving-the-security-hash.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
