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

# Create Wallet

POST https://api.npretail.app/{tenant}/{environment}/{company}/attractionWallet
Content-Type: application/json

Create a new wallet. Note that in the `Create Wallet` and `Add to Wallet`, API calls, the assets may also be identified by their visual reference numbers. If the assetId does not interpret as a UUID, the system will attempt to resolve it as a visual reference number.

Reference: https://docs.navipartner.com/apis/api-reference/attraction-wallet/service-attraction-wallet/create-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)

### Body (application/json)

This endpoint expects a CreateWalletRequest.

- `name` (string, optional) — A human-readable description of the wallet.
- `tickets` (list of UUID, optional)
- `memberCards` (list of UUID, optional)
- `coupons` (list of UUID, optional)
- `vouchers` (list of UUID, optional)
- `externalReferenceNumbers` (list of string, optional)
- `originatesFromItemNo` (string, optional) — The item number from which the wallet originates.

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

**Request**

```json
{
  "name": "My wallet holds my tickets, coupons and vouchers for the event.",
  "tickets": [
    "3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14"
  ],
  "memberCards": [
    "5f6d17fa-38a2-64a6-bd4c-3f17a20f7e16"
  ],
  "coupons": [
    "7b8c9d0e-8f90-1abc-def1-234567890abc"
  ],
  "vouchers": [
    "9d0e1f2a-012b-3cde-f123-4567890abcde"
  ],
  "externalReferenceNumbers": [
    "john.doe@acme.com"
  ],
  "originatesFromItemNo": "70009"
}
```

**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"
    },
    {
      "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 CreateWalletRequest
import requests

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

payload = {
    "name": "My wallet holds my tickets, coupons and vouchers for the event.",
    "tickets": ["3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14"],
    "memberCards": ["5f6d17fa-38a2-64a6-bd4c-3f17a20f7e16"],
    "coupons": ["7b8c9d0e-8f90-1abc-def1-234567890abc"],
    "vouchers": ["9d0e1f2a-012b-3cde-f123-4567890abcde"],
    "externalReferenceNumbers": ["john.doe@acme.com"],
    "originatesFromItemNo": "70009"
}
headers = {
    "x-np-api-key": "<NaviPartner API Key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript CreateWalletRequest
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet';
const options = {
  method: 'POST',
  headers: {'x-np-api-key': '<NaviPartner API Key>', 'Content-Type': 'application/json'},
  body: '{"name":"My wallet holds my tickets, coupons and vouchers for the event.","tickets":["3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14"],"memberCards":["5f6d17fa-38a2-64a6-bd4c-3f17a20f7e16"],"coupons":["7b8c9d0e-8f90-1abc-def1-234567890abc"],"vouchers":["9d0e1f2a-012b-3cde-f123-4567890abcde"],"externalReferenceNumbers":["john.doe@acme.com"],"originatesFromItemNo":"70009"}'
};

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

```go CreateWalletRequest
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"name\": \"My wallet holds my tickets, coupons and vouchers for the event.\",\n  \"tickets\": [\n    \"3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14\"\n  ],\n  \"memberCards\": [\n    \"5f6d17fa-38a2-64a6-bd4c-3f17a20f7e16\"\n  ],\n  \"coupons\": [\n    \"7b8c9d0e-8f90-1abc-def1-234567890abc\"\n  ],\n  \"vouchers\": [\n    \"9d0e1f2a-012b-3cde-f123-4567890abcde\"\n  ],\n  \"externalReferenceNumbers\": [\n    \"john.doe@acme.com\"\n  ],\n  \"originatesFromItemNo\": \"70009\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-np-api-key", "<NaviPartner API Key>")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet")

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

request = Net::HTTP::Post.new(url)
request["x-np-api-key"] = '<NaviPartner API Key>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"name\": \"My wallet holds my tickets, coupons and vouchers for the event.\",\n  \"tickets\": [\n    \"3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14\"\n  ],\n  \"memberCards\": [\n    \"5f6d17fa-38a2-64a6-bd4c-3f17a20f7e16\"\n  ],\n  \"coupons\": [\n    \"7b8c9d0e-8f90-1abc-def1-234567890abc\"\n  ],\n  \"vouchers\": [\n    \"9d0e1f2a-012b-3cde-f123-4567890abcde\"\n  ],\n  \"externalReferenceNumbers\": [\n    \"john.doe@acme.com\"\n  ],\n  \"originatesFromItemNo\": \"70009\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .header("Content-Type", "application/json")
  .body("{\n  \"name\": \"My wallet holds my tickets, coupons and vouchers for the event.\",\n  \"tickets\": [\n    \"3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14\"\n  ],\n  \"memberCards\": [\n    \"5f6d17fa-38a2-64a6-bd4c-3f17a20f7e16\"\n  ],\n  \"coupons\": [\n    \"7b8c9d0e-8f90-1abc-def1-234567890abc\"\n  ],\n  \"vouchers\": [\n    \"9d0e1f2a-012b-3cde-f123-4567890abcde\"\n  ],\n  \"externalReferenceNumbers\": [\n    \"john.doe@acme.com\"\n  ],\n  \"originatesFromItemNo\": \"70009\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet', [
  'body' => '{
  "name": "My wallet holds my tickets, coupons and vouchers for the event.",
  "tickets": [
    "3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14"
  ],
  "memberCards": [
    "5f6d17fa-38a2-64a6-bd4c-3f17a20f7e16"
  ],
  "coupons": [
    "7b8c9d0e-8f90-1abc-def1-234567890abc"
  ],
  "vouchers": [
    "9d0e1f2a-012b-3cde-f123-4567890abcde"
  ],
  "externalReferenceNumbers": [
    "john.doe@acme.com"
  ],
  "originatesFromItemNo": "70009"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp CreateWalletRequest
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet");
var request = new RestRequest(Method.POST);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"name\": \"My wallet holds my tickets, coupons and vouchers for the event.\",\n  \"tickets\": [\n    \"3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14\"\n  ],\n  \"memberCards\": [\n    \"5f6d17fa-38a2-64a6-bd4c-3f17a20f7e16\"\n  ],\n  \"coupons\": [\n    \"7b8c9d0e-8f90-1abc-def1-234567890abc\"\n  ],\n  \"vouchers\": [\n    \"9d0e1f2a-012b-3cde-f123-4567890abcde\"\n  ],\n  \"externalReferenceNumbers\": [\n    \"john.doe@acme.com\"\n  ],\n  \"originatesFromItemNo\": \"70009\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift CreateWalletRequest
import Foundation

let headers = [
  "x-np-api-key": "<NaviPartner API Key>",
  "Content-Type": "application/json"
]
let parameters = [
  "name": "My wallet holds my tickets, coupons and vouchers for the event.",
  "tickets": ["3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14"],
  "memberCards": ["5f6d17fa-38a2-64a6-bd4c-3f17a20f7e16"],
  "coupons": ["7b8c9d0e-8f90-1abc-def1-234567890abc"],
  "vouchers": ["9d0e1f2a-012b-3cde-f123-4567890abcde"],
  "externalReferenceNumbers": ["john.doe@acme.com"],
  "originatesFromItemNo": "70009"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./attractionWallet")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```