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

# Get Wallet

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

Get a wallet by its ID.

When `activeAssetsOnly=true`, assets that can no longer be used are left out of `assets`.
This covers assets that have been revoked, spent, replaced, or that have passed their
validity. Assets that are not usable *yet*, such as a ticket valid from a future date or a
membership card awaiting activation, are still returned. The wallet itself is always
returned, even when every one of its assets is left out.

The asset list is meant for display. An application acting on an asset should validate it
at the point of use.

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

## 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)
- `walletId` (UUID, required) — A globally unique identifier for the wallet.

### Query parameters

- `withDetails` (boolean, optional) — Indicates whether the asset details should be included in the response.
- `activeAssetsOnly` (boolean, optional) — When `true`, assets that can no longer be used are left out of `assets`. Defaults to `false`.
- `languageCode` (string, optional) — The language code for localization of item description purposes.

## Response

### 200

- `description` (string, required) — A human-readable description of the wallet.
- `expiryDatetime` (string, required) — The expiry datetime of the wallet in ISO 8601 format. Use an empty string if not applicable.
- `lastPrintedAt` (string, required) — The datetime when the wallet was last printed in ISO 8601 format. Use an empty string if not applicable.
- `printCount` (integer, required) — The number of times the wallet has been printed.
- `referenceNumber` (string, required) — The visual reference number associated with the wallet.
- `walletId` (UUID, required) — A globally unique identifier for the wallet.
- `assets` (list of AssetDetails, optional)
- `externalReferenceNumber` (string, optional) — The first external reference on the wallet that is neither blocked nor expired. `null` when there is none.
- `originatesFromDescription` (string, optional) — The item description from which the wallet originates.
- `originatesFromItemNo` (string, optional) — The item number from which the wallet originates.

## Types

### AssetDetails

An asset held in a wallet. `type` says which kind it is, and the matching details object is filled in when `withDetails=true`.

- `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.
- `isSuperseded` (boolean, required) — Indicates whether the asset ownership has been superseded. If the asset has been added to a different wallet, this value is true.
- `expiryDatetime` (string, optional) — The expiry datetime of the asset in ISO 8601 format.
- `ticketDetails` (TicketDetails, optional) — Details of a ticket.
- `couponDetails` (Coupon, optional) — Only present when `withDetails=true` and the asset is a coupon. The same object `Get Coupon` returns. An archived coupon reports status `CONSUMED`. An empty object when the coupon cannot be found.

### TicketDetails

Details of a ticket.

- `validFrom` (datetime, required) — The date and time when the ticket becomes valid.
- `validUntil` (datetime, required) — The date and time when the ticket expires.
- `issuedAt` (datetime, required) — The date and time when the ticket was issued
- `blocked` (boolean, required)
- `accessHistory` (list of TicketAccessHistory, required)
- `unitPrice` (double, optional)
- `unitPriceInclVat` (double, optional)
- `currencyCode` (string, optional)
- `content` (list of TicketContent, optional)

### Coupon

Represents a coupon with a specific value and type.

- `id` (UUID, required) — The unique system identifier for the coupon.
- `no` (string, required) — The internal coupon number from the number series.
- `couponType` (string, required) — The type of coupon, which carries the setup in NP Retail.
- `description` (string, required) — A short description of the coupon.
- `referenceNo` (string, required) — A unique, human-readable reference number, often used for barcodes.
- `status` (enum, required) — The current status of the coupon.
  - Allowed values: `ACTIVE`, `CONSUMED`
- `discountType` (enum, required) — The type of discount the coupon provides.
  - Allowed values: `AMOUNT`, `PERCENTAGE`
- `maxUsesPerSale` (integer, required) — The maximum number of times this coupon can be used in a single sale.
- `issueDate` (date, required) — The date the coupon was first issued.
- `discountAmount` (double, optional) — The fixed discount amount, if applicable.
- `discountPercent` (double, optional) — The discount as a percentage, if applicable.
- `maxDiscountAmount` (double, optional) — The maximum discount amount that can be applied.
- `validFrom` (datetime, optional) — The date and time from which the coupon is valid.
- `validUntil` (datetime, optional) — The date and time when the coupon expires.
- `customerNo` (string, optional) — The customer number this coupon is assigned to, if any.
- `remainingQuantity` (double, optional) — The remaining times the coupon can be used, if applicable.

### TicketAccessHistory

Details of the access history for a ticket

- `admissionCode` (string, required) — A unique code that identifies a specific admission.
- `firstAdmissionAt` (datetime, optional)

### TicketContent

Details of the ticket content

- `admissionDetails` (AdmissionDetails, required) — Details of the admission for a specific reservation
- `scheduleDetails` (ScheduleDetailsTicket, required) — Used for the ticket content

### AdmissionDetails

Details of the admission for a specific reservation

- `capacityControl` (enum, required) — Indicates the type of capacity control that applies. `none` means capacity is not tracked. `sales` means capacity is decremented by ticket sales. `admitted` means capacity is decremented by admitted entries. `full` means capacity tracks both admissions and departures.
  - Allowed values: `none`, `sales`, `admitted`, `full`
- `code` (string, required) — A unique code that identifies a specific admission.
- `default` (boolean, required) — Indicates if this admission is the default admission when there are multiple admission defined.
- `description` (Descriptions, required) — Descriptive information about a ticket item. The source of these fields are configurable.
- `included` (enum, required) — Indicates if the admission is mandatory or optional. `mandatory` implies that the admission can not be deselected. `optionalNotSelected` implies that you must opt-in to include the admission, while `optionalAndSelected` implies that the admission is optional and selected and you can opt-out. You opt-in or opt-out by including or excluding the admission in the reservation request.
  - Allowed values: `mandatory`, `optionalNotSelected`, `optionalAndSelected`
- `scheduleDetails` (ScheduleDetails, optional) — Details of the schedule for a specific reservation or ticket.

### ScheduleDetailsTicket

Used for the ticket content

- `code` (string, required)
- `duration` (integer, required)
- `endDate` (date, required)
- `endTime` (string, required)
- `externalNumber` (integer, required) — The ID of a specific time slot for a specific admission
- `startDate` (date, required)
- `startTime` (string, required)
- `type` (enum, required) — The types of events that can occur for a ticket.
  - Allowed values: `initialEntry`, `reservation`, `admitted`, `departed`, `consumed`, `canceledAdmission`, `payment`, `prePaid`, `postPaid`, `canceledReservation`, `requested`, `unknown`
- `arrivalFromTime` (string, optional) — The earliest time a customer can arrive for the time slot.
- `arrivalUntilTime` (string, optional) — The latest time a customer can arrive for the time slot.
- `description` (string, optional)

### Descriptions

Descriptive information about a ticket item. The source of these fields are configurable.

- `title` (string, optional)
- `subtitle` (string, optional)
- `name` (string, optional)
- `description` (string, optional)
- `fullDescription` (string, optional)

### ScheduleDetails

Details of the schedule for a specific reservation or ticket.

- `code` (string, required)
- `duration` (integer, required)
- `endDate` (date, required)
- `endTime` (string, required)
- `externalNumber` (integer, required) — The ID of a specific time slot for a specific admission
- `startDate` (date, required)
- `startTime` (string, required)
- `arrivalFromTime` (string, optional) — The earliest time a customer can arrive for the time slot.
- `arrivalUntilTime` (string, optional) — The latest time a customer can arrive for the time slot.
- `description` (string, optional)
- `type` (enum, optional) — The types of events that can occur for a ticket.
  - Allowed values: `initialEntry`, `reservation`, `admitted`, `departed`, `consumed`, `canceledAdmission`, `payment`, `prePaid`, `postPaid`, `canceledReservation`, `requested`, `unknown`

## Examples

**Response**

```json
{
  "description": "My wallet holds my tickets, coupons and vouchers for the event.",
  "expiryDatetime": "2026-12-31T23:59:59Z",
  "lastPrintedAt": "2026-12-31T23:59:59Z",
  "printCount": 1,
  "referenceNumber": "141234529930210327",
  "walletId": "a2cbd5bc-5cf4-ef11-b3a1-a1084fe21c78",
  "assets": [
    {
      "id": "2c3a84c7-059f-41d3-8033-0d94e08d4b13",
      "type": "ticket",
      "assetId": "3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14",
      "itemNo": "31005",
      "description": "General Admission",
      "referenceNumber": "ATF-BIL010665L-3",
      "isSuperseded": false,
      "expiryDatetime": "2026-12-31T23:59:59Z",
      "ticketDetails": {
        "validFrom": "2024-10-15T12:00:00Z",
        "validUntil": "2024-10-15T23:59:59Z",
        "issuedAt": "2024-10-15T12:13:00Z",
        "blocked": false,
        "accessHistory": [
          {
            "admissionCode": "CASTLE",
            "firstAdmissionAt": "2025-01-31T09:12:00Z"
          }
        ],
        "unitPrice": 80,
        "unitPriceInclVat": 100,
        "currencyCode": "DKK",
        "content": [
          {
            "admissionDetails": {
              "capacityControl": "sales",
              "code": "CASTLE",
              "default": true,
              "description": {
                "title": "Castle Museum Entrance",
                "subtitle": "Adult Castle Ticket",
                "name": "Explore the Castle",
                "description": "<b>Access</b> to the castle exhibit",
                "fullDescription": "<p>Experience the grandeur of the castle's architecture and marvel at its intricate details.  Walk through beautifully decorated rooms and admire the stunning artwork and furniture on display.</p>"
              },
              "included": "mandatory"
            },
            "scheduleDetails": {
              "code": "MORNING",
              "duration": 10800,
              "endDate": "2024-10-15",
              "endTime": "12:00",
              "externalNumber": 452,
              "startDate": "2024-10-15",
              "startTime": "09:00",
              "type": "initialEntry",
              "arrivalFromTime": "08:30",
              "arrivalUntilTime": "10:00",
              "description": "Morning schedule"
            }
          }
        ]
      }
    },
    {
      "id": "7e8f90ab-cdef-1234-5678-90abcdef1234",
      "type": "membership",
      "assetId": "5f6d17fa-38a2-64a6-bd4c-3f17a20f7e16",
      "itemNo": "320100",
      "description": "Membership Card",
      "referenceNumber": "CARD-FWGEASWFJFD",
      "isSuperseded": false,
      "expiryDatetime": "2026-12-31T23:59:59Z"
    }
  ],
  "externalReferenceNumber": "151234529930210327",
  "originatesFromDescription": "Family Fun Pack",
  "originatesFromItemNo": "70009"
}
```

**SDK Code**

```python Get Wallet with details
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/a2cbd5bc-5cf4-ef11-b3a1-a1084fe21c78"

querystring = {"withDetails":"true","activeAssetsOnly":"true","languageCode":"ENU"}

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

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

print(response.json())
```

```javascript Get Wallet with details
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/a2cbd5bc-5cf4-ef11-b3a1-a1084fe21c78?withDetails=true&activeAssetsOnly=true&languageCode=ENU';
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 Get Wallet with details
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/a2cbd5bc-5cf4-ef11-b3a1-a1084fe21c78?withDetails=true&activeAssetsOnly=true&languageCode=ENU"

	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 Get Wallet with details
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/a2cbd5bc-5cf4-ef11-b3a1-a1084fe21c78?withDetails=true&activeAssetsOnly=true&languageCode=ENU")

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 Get Wallet with details
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/a2cbd5bc-5cf4-ef11-b3a1-a1084fe21c78?withDetails=true&activeAssetsOnly=true&languageCode=ENU")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php Get Wallet with details
<?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/a2cbd5bc-5cf4-ef11-b3a1-a1084fe21c78?withDetails=true&activeAssetsOnly=true&languageCode=ENU', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp Get Wallet with details
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet/a2cbd5bc-5cf4-ef11-b3a1-a1084fe21c78?withDetails=true&activeAssetsOnly=true&languageCode=ENU");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift Get Wallet with details
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/a2cbd5bc-5cf4-ef11-b3a1-a1084fe21c78?withDetails=true&activeAssetsOnly=true&languageCode=ENU")! 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()
```