> This page is for API Reference.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.navipartner.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.navipartner.com/_mcp/server.

# Asset History

GET https://api.npretail.app/{tenant}/{environment}/{company}/attractionWallet/assetHistory/{assetId}

Get the history of an asset in a wallet.

Reference: https://docs.navipartner.com/apis/api-reference/attraction-wallet/service-attraction-wallet/asset-history

## Authentication

- `x-np-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `tenant` (string, required) — Your Entra Tenant ID. [More details.](/paths#1-tenant)
- `environment` (string, required) — Your Business Central Environment. [More details.](/paths#2-environment)
- `company` (string, required) — Your Business Central Company. [More details.](/paths#3-company)
- `assetId` (UUID, required) — A globally unique identifier for the asset being referenced (e.g., a ticketId, couponId, voucherId, or memberCardId).

## Response

### 200

- `id` (UUID, required) — A unique identifier for this asset line within the wallet. This identifier is independent of the specific type of asset it represents, ensuring consistency and uniqueness across different asset types.
- `type` (enum, required) — Specifies the type of asset being referenced (e.g., "ticket").
  - Allowed values: `ticket`, `coupon`, `voucher`, `membership`
- `assetId` (UUID, required) — A globally unique identifier for the asset being referenced (e.g., a ticketId, couponId, voucherId, or memberCardId).
- `itemNo` (string, required) — The item number associated with the asset.
- `description` (string, required) — A human-readable description of the asset.
- `referenceNumber` (string, required) — The reference number associated with the asset.
- `transactionId` (UUID, required) — A globally unique identifier for the transaction associated with the asset.
- `history` (list of AssetHistoryEntry, required)

## Types

### AssetHistoryEntry

- `entryNo` (integer, required) — The internal entry number associated with the asset.
- `supersededByEntryNo` (integer, required) — The internal entry number of the asset that superseded this asset.
- `expiryDatetime` (string, required) — The expiry datetime of the asset in ISO 8601 format.
- `walletId` (UUID, required) — A globally unique identifier for the wallet.
- `walletReferenceNumber` (string, required) — The visual reference number associated with the wallet.
- `walletExpirationDate` (string, required) — The expiry datetime of the wallet in ISO 8601 format. Use an empty string if not applicable.
- `createdAt` (string, required) — The datetime when the asset was created in ISO 8601 format.
- `modifiedAt` (string, required) — The datetime when the asset was last updated in ISO 8601 format.

## Examples

**Response**

```json
{
  "id": "2c3a84c7-059f-41d3-8033-0d94e08d4b13",
  "type": "ticket",
  "assetId": "3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14",
  "itemNo": "31005",
  "description": "General Admission",
  "referenceNumber": "ATF-BIL010665L-3",
  "transactionId": "2c3a84c7-059f-41d3-8033-0d94e08d4b13",
  "history": [
    {
      "entryNo": 772,
      "supersededByEntryNo": 0,
      "expiryDatetime": "2026-12-31T23:59:59Z",
      "walletId": "a2cbd5bc-5cf4-ef11-b3a1-a1084fe21c78",
      "walletReferenceNumber": "141234529930210327",
      "walletExpirationDate": "2026-12-31T23:59:59Z",
      "createdAt": "2024-12-31T13:59:59Z",
      "modifiedAt": "2024-12-31T17:59:59Z"
    }
  ]
}
```

**SDK Code**

```python AssetHistory
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/assetHistory/2c3a84c7-059f-41d3-8033-0d94e08d4b13"

headers = {"x-np-api-key": "<NaviPartner API Key>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript AssetHistory
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/assetHistory/2c3a84c7-059f-41d3-8033-0d94e08d4b13';
const options = {method: 'GET', headers: {'x-np-api-key': '<NaviPartner API Key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go AssetHistory
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/assetHistory/2c3a84c7-059f-41d3-8033-0d94e08d4b13"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-np-api-key", "<NaviPartner API Key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby AssetHistory
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/assetHistory/2c3a84c7-059f-41d3-8033-0d94e08d4b13")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-np-api-key"] = '<NaviPartner API Key>'

response = http.request(request)
puts response.read_body
```

```java AssetHistory
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/assetHistory/2c3a84c7-059f-41d3-8033-0d94e08d4b13")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php AssetHistory
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/assetHistory/2c3a84c7-059f-41d3-8033-0d94e08d4b13', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

echo $response->getBody();
```

```csharp AssetHistory
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/assetHistory/2c3a84c7-059f-41d3-8033-0d94e08d4b13");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift AssetHistory
import Foundation

let headers = ["x-np-api-key": "<NaviPartner API Key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/assetHistory/2c3a84c7-059f-41d3-8033-0d94e08d4b13")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```