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

# Search Time Slots

GET https://api.npretail.app/{tenant}/{environment}/{company}/ticket/timeslots/search

Browse-oriented endpoint for calendar UIs: returns every time slot for an item across a date
range, with optional indicative pricing and current capacity. Designed for use cases like a
30-day calendar UI or a realtime capacity check across a date window.

This endpoint is **not** a replacement for [`getCapacity`](./getCapacity) — that endpoint
stays as the single-date, at-checkout call carrying `customerNumber` for personalized
pricing and authoritative capacity validation. Prices here are **indicative** —
`customerNumber` and `quantity` aren't accepted, so customer-specific pricing, price
ladders, and quantity discounts are not applied. Slot-level **dynamic pricing is**
applied and surfaces as `priceDelta` on each time slot. Price-list and package discounts
are returned as separate fields on each `datePrices` row (see "Per-unit math" below).
Capacity is accurate at the moment of the response but drifts as bookings come in.
Re-validate at the slot the customer actually picks.

## Date-range cap

The range cap is **62 days** (`toDate - fromDate + 1`). Larger ranges return `400`.

## Times are admission-local

All `*Date` / `*Time` fields on `timeSlots[]` are in the admission's local wall clock —
no timezone offset is attached to the slot fields. Do not parse them as UTC, and do not
compare them to the consumer's own clock. Each admission's
`admissions[].admissionLocalTime` carries the admission's wall clock at response time
(with offset) — compare slot times against that as the reference. Different admissions
in one response may sit in different time zones. `endDate` can differ from `startDate`
for slots that cross midnight.

## Per-unit math

`basePrice` (in `datePrices`) and `priceDelta` (on each time slot) are **per unit** and
carry no discounts. Combine them first, then apply the discount fields from the same
`datePrices` row. What to combine depends on the component shape:

  - **Single-admission ticket component** — pick a slot, then the per-unit price before
    discounts is `basePrice` (for that component and date) `+` the chosen slot's
    `priceDelta`.
  - **Multi-admission ticket component** — `basePrice` is carried **once**, on the
    default admission's `datePrices` row. A non-default admission's `priceDelta` is its
    **incremental** contribution, not a standalone price — do not add the base per
    admission. Per-unit price before discounts = `basePrice` (default admission's row,
    for the date) `+ Σ` chosen slot's `priceDelta` across the admissions the customer is
    buying.
  - **Non-admission component** (coupon, fee, etc.) — the per-unit price before discounts
    is the `basePrice` from its `datePrices` row for the date. No `priceDelta` applies;
    the component doesn't appear in `timeSlots[]`.

Then apply the row's discounts to that sum:

```
perUnit = (basePrice + priceDelta - packageDiscountAmount)
          × (1 - packageDiscountPct / 100)
          × (1 - priceListDiscountPct / 100)
```

Multiply by `items[].quantity` to get each component's contribution to the package
total, then sum across components.

**What the price fields carry:**

  - `basePrice` is the price-list price for the date (so it tracks scheduled price-list
    changes, e.g. seasonal pricing), or the price configured for the component on the
    package when the package overrides the price list.
  - `priceDelta` is the per-slot dynamic adjustment (fixed, relative, or percentage),
    computed against that base.
  - `priceListDiscountPct` is the line discount from the price list, in percent. It is the same number [`getCapacity`](./getCapacity) returns as
    `discountPct`.
  - `packageDiscountPct` and `packageDiscountAmount` are the discount configured on the
    package for this component — a percentage, or a per-unit amount.

**Only one discount applies at a time.** At most one of the three discount fields is
non-zero on a row:

  - A package discount takes the component out of price-list discounting, so
    `priceListDiscountPct` is `0` whenever a package discount is set.
  - A package configured with both a percentage and an amount gets neither. Both
    `package*` fields are `0`, and `priceListDiscountPct` applies as usual.
  - When the package sets its own unit price for the component, the price list is not
    consulted, so `priceListDiscountPct` is `0`.

## Capacity semantics

When `withCapacity=true`, each time slot carries a `capacityControl` field — one of `none`,
`sales`, `admitted`, or `full`. Branch on it:

  - `none` — capacity is not tracked for this slot. `maxCapacity` and `remainingCapacity`
    are **omitted**. Render as "Available" / "Unlimited" — there is no number to display.
  - Any other value — `maxCapacity` and `remainingCapacity` are both present.
    `remainingCapacity` of `0` means sold out. The numbers' semantics differ by mode (e.g.
    `sales` counts initial sales, `admitted` counts admitted entries) — interpret with
    `capacityControl` for accuracy across modes.

`capacityControl` is **per slot, not per admission** — the same admission may have
different effective modes on different slots.

Both numbers are the **requested ticket product's share** of the slot, so you can render
one against the other — a progress bar, "3 of 40 left" — without knowing how the share is
configured.

The share is set by **Percentage of Adm. Capacity** on the ticket's admission line and
defaults to 100, giving the product the admission's whole capacity. Configured lower, it
caps how far that product may sell into the slot. Every ceiling is measured against the
slot's total count, so a ticket sold through one product reduces the remaining figure for
all of them.

The [Time Slot Capacity Changed](/apis/api-reference/ticketing/webhooks/timeslot-capacity-changed)
webhook reports the admission's own figures under the same two field names, since it has
no ticket product in context. A slot with an admission capacity of 100, a product capped
at 40%, and 35 tickets sold on the slot:

|  | maxCapacity | remainingCapacity |
|---|---|---|
| This endpoint | 40 | 5 |
| Capacity webhook | 100 | 65 |

Do not combine figures from the two surfaces in one calculation.

## Closed slots

A slot carries `closed: true` when a configured calendar closes the slot's date. Any
calendar layer — admission calendars, schedule calendars, or the ticket base calendars
on the BOM item and admission — can trigger this. The response merges them into the
single flag; the specific closing calendar is not identified in the payload.

`closed` is a calendar signal, not a bookability signal. An absent `closed` means the
date is open per the calendars — it does not mean the slot can be reserved. For
bookability (sold-out, sales window, elapsed), use [`getCapacity`](./getCapacity) at
point-of-purchase.

## v1 inclusion scope

Only `mandatory` admissions are emitted in v1. Opt-in and opt-out admissions
(`optionalAndSelected`, `optionalNotSelected`) and their addon-experience pricing are
out of scope for v1.

## Decomposition

The input item is resolved into one or more components, and each ticket component carries
one or more admissions:

  - **Input item → components.** For a single ticket item, `items[]` has exactly one
    entry. For a package, `items[]` has one entry per underlying item in the package.
    Components are one of two kinds:
    - **Ticket components** — items configured as tickets. They appear in `items[]` with
      at least one entry in `admissions[]`, in `datePrices[]` with the default admission's
      code, and in `timeSlots[]`.
    - **Non-admission components** — items like coupons or fees that are part of the
      package but don't have admissions. They appear in `items[]` with an **empty**
      `admissions` array, and in `datePrices[]` with `admissionCode: ""` (blank). They
      never appear in `timeSlots[]` — there's no schedule to attach to.
  - **Ticket component → admissions.** Each ticket component's `admissions[]` lists every
    admission the ticket grants access to. A simple ticket grants one; a combo ticket
    grants several. See "v1 inclusion scope" for which admissions are emitted today.

## What this endpoint does not do

  - No `customerNumber` — use [`getCapacity`](./getCapacity) for personalized pricing.
  - No `quantity` — defaults to 1; the caller multiplies by `items[].quantity`.
  - No rolled-up `packagePrice` / `packageAvailable` — the caller composes from per-row data.
  - No timezone offsets on time fields (see above).
  - Slots whose sales window has ended are not filtered here — that's a
    [`getCapacity`](./getCapacity) concern at point-of-purchase. Cancelled slots and slots
    not marked visible-on-web are excluded.
  - Elapsed slots are not filtered — a `fromDate` in the past returns past slots.
    Compare each slot's `startDate`/`startTime` against the matching admission's
    `admissionLocalTime` to detect elapsed slots.

Consumers can pass `scheduleNumber` from a `timeSlots[]` row directly to
[`createReservation`](./createReservation) and to [`getCapacity`](./getCapacity) — same
field name, same value, no translation.

Reference: https://docs.navipartner.com/apis/api-reference/ticketing/service-capacity/search-time-slots

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

### Query parameters

- `itemNumber` (string, required) — An item or product number defined in the ticketing system
- `fromDate` (date, optional) — Start of the date range (inclusive), `YYYY-MM-DD`. Defaults to today.
- `toDate` (date, optional) — End of the date range (inclusive), `YYYY-MM-DD`. Defaults to `fromDate + 30 days`. The total span `toDate - fromDate + 1` may not exceed 62 days.
- `withPrice` (boolean, optional) — When `true`, the response includes the `datePrices` array (per-date `basePrice` and discount fields) and a `priceDelta` on each time slot. Defaults to `false`.
- `withCapacity` (boolean, optional) — When `true`, each time slot carries `capacityControl`; if that mode tracks capacity, `maxCapacity` and `remainingCapacity` are also present. Defaults to `false`.

## Response

### 200

The decomposed item structure, indicative pricing per date (when requested), and the list of slots in the date range.

- `itemNumber` (string, required) — An item or product number defined in the ticketing system
- `items` (list of TimeSlotItem, required)
- `timeSlots` (list of TimeSlot, required)
- `datePrices` (list of TimeSlotDatePrice, optional)

## Types

### TimeSlotItem

One component in the decomposition of the input item. For a non-package input there is a single entry; for a package there is one entry per underlying item in the package. Ticket components carry one or more entries in `admissions[]`; non-admission components (coupons, fees, etc.) carry an empty `admissions` array.

- `componentItemNumber` (string, required) — An item or product number defined in the ticketing system
- `quantity` (double, required) — How many of this component the package contains. Apply as a multiplier when summing the component's contribution to a package price (`quantity × per-unit price` — see "Per-unit math").
- `admissions` (list of TimeSlotItemAdmission, required)
- `variantCode` (string, optional) — Variant code of the underlying component item. Often empty.

### TimeSlot

A single bookable time slot. `scheduleNumber` is identical to the value used by [`createReservation`](./createReservation) and [`getCapacity`](./getCapacity) — pass it through unchanged when reserving.

- `scheduleNumber` (integer, required) — The ID of a specific time slot for a specific admission
- `componentItemNumber` (string, required) — An item or product number defined in the ticketing system
- `admissionCode` (string, required) — A unique code that identifies a specific admission.
- `scheduleCode` (string, required) — A unique code that identifies a specific admission schedule.
- `startDate` (date, required)
- `startTime` (string, required) — The time when time slot starts.
- `endDate` (date, required)
- `endTime` (string, required) — The time when time slot ends.
- `variantCode` (string, optional) — Variant code of the underlying component item. Often empty.
- `priceDelta` (double, optional) — Per-unit, per-slot price adjustment from dynamic pricing rules. Add to the matching `datePrices.basePrice` to get the per-unit price before discounts, then apply that row's discount fields to the sum.
- `capacityControl` (enum, optional) — Effective capacity-tracking mode for a single time slot. Per slot — not per admission — so the same admission may have different effective modes on different slots. - `none` — capacity is not tracked. `remainingCapacity` is omitted on the slot. - `sales` — capacity is decremented by ticket sales. - `admitted` — capacity is decremented by admitted entries. - `full` — capacity tracks both admissions and departures.
  - Allowed values: `none`, `sales`, `admitted`, `full`
- `maxCapacity` (integer, optional) — Capacity ceiling for the slot, as the requesting ticket product's share of it. Present whenever `capacityControl` tracks capacity, alongside `remainingCapacity` on the same scale. See "Capacity semantics" for how the share is configured and how it compares with the capacity webhook.
- `remainingCapacity` (integer, optional) — The remaining capacity for the schedule. Note that this number can be positive even when the schedule is not allocatable.
- `closed` (boolean, optional) — Present and set to `true` when a configured calendar closes this slot's date. Absent when open — there is no `false` form. This signals only calendar closure, not bookability: sold-out slots, slots outside their sales window, and elapsed slots do not carry it. Use [`getCapacity`](./getCapacity)'s `allocatable` for bookability.

### TimeSlotDatePrice

Per-unit base price and discounts for a component on a specific date. One row per component per date in the requested range: - **Ticket components** — `admissionCode` is the component's **default** admission. The row carries the item-level base price for the date; non-default admissions are omitted (their incremental cost surfaces only via `priceDelta` on the corresponding time slot). - **Non-admission components** (coupons, fees, etc.) — `admissionCode` is `""` (empty string). The row carries the configured price for the component on that date.

- `componentItemNumber` (string, required) — An item or product number defined in the ticketing system
- `admissionCode` (string, required) — A unique code that identifies a specific admission.
- `date` (date, required)
- `basePrice` (double, required) — Per-unit base price for the component on the given date, before any discount. For a ticket component this is the price-list price for the component's default admission, or the package's configured price for the component when set; non-default admissions are omitted from `datePrices[]`. For a non-admission component this is the configured price for the component itself. The per-slot dynamic adjustment surfaces separately as `priceDelta` on the matching time slot, and discounts as the discount fields on the same row.
- `currencyCode` (string, required) — ISO 4217 currency code of the prices in the response — the local currency of the tenant.
- `priceListDiscountPct` (double, required) — Line discount in percent from the price list. Not applied to `basePrice` or `priceDelta` — apply it last, to their sum. `0` when the package discounts the component or sets its own unit price for it. Same number as `discountPct` on [`getCapacity`](./getCapacity).
- `packageDiscountPct` (double, required) — Discount in percent configured on the package for this component. Not applied to `basePrice` or `priceDelta`. `0` when the package has no discount or uses an amount instead.
- `packageDiscountAmount` (double, required) — Per-unit discount amount configured on the package for this component. Not applied to `basePrice` or `priceDelta`. `0` when the package has no discount or uses a percentage instead.
- `variantCode` (string, optional) — Variant code of the underlying component item. Often empty.

### TimeSlotItemAdmission

One admission that belongs to a ticket component. In v1 only `mandatory` admissions are emitted.

- `admissionCode` (string, required) — A unique code that identifies a specific admission.
- `inclusion` (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`
- `default` (boolean, required) — Indicates if this admission is the default admission when there are multiple admission defined.
- `scheduleSelection` (enum, required) — How a schedule is auto-selected for this admission. This information assists the caller of reservation request how the server-side schedule-selection algorithm will behave when a schedule is not provided.
  - Allowed values: `noScheduleSelection`, `currentSchedule`, `nextAvailableSchedule`, `userSelectedSchedule`
- `admissionLocalTime` (string, required) — The admission's wall clock at response time, ISO 8601 with offset (e.g. `2026-08-18T15:32:11+02:00`). All admissions in one response share the same instant; values differ only by offset when admissions sit in different time zones. Compare slot `startDate`/`startTime`/`endDate`/`endTime` against this value rather than the consumer's own clock — slot times are the admission's wall clock, and elapsed slots are not filtered from the response.

## Examples

### Simple ticket item, no flags

A single ticket item with one mandatory admission across a short range. Establishes the basic shape — no `datePrices`, no `priceDelta`, no capacity fields.

**Response**

```json
{
  "itemNumber": "31001",
  "items": [
    {
      "componentItemNumber": "31001",
      "quantity": 1,
      "admissions": [
        {
          "admissionCode": "CASTLE",
          "inclusion": "mandatory",
          "default": true,
          "scheduleSelection": "nextAvailableSchedule",
          "admissionLocalTime": "2026-05-31T09:15:23+02:00"
        }
      ],
      "variantCode": ""
    }
  ],
  "timeSlots": [
    {
      "scheduleNumber": 12345,
      "componentItemNumber": "31001",
      "admissionCode": "CASTLE",
      "scheduleCode": "WEEKDAYS",
      "startDate": "2026-06-01",
      "startTime": "10:00:00",
      "endDate": "2026-06-01",
      "endTime": "11:00:00"
    },
    {
      "scheduleNumber": 12346,
      "componentItemNumber": "31001",
      "admissionCode": "CASTLE",
      "scheduleCode": "WEEKDAYS",
      "startDate": "2026-06-01",
      "startTime": "14:00:00",
      "endDate": "2026-06-01",
      "endTime": "15:00:00"
    },
    {
      "scheduleNumber": 12347,
      "componentItemNumber": "31001",
      "admissionCode": "CASTLE",
      "scheduleCode": "WEEKDAYS",
      "startDate": "2026-06-02",
      "startTime": "10:00:00",
      "endDate": "2026-06-02",
      "endTime": "11:00:00",
      "closed": true
    }
  ]
}
```

**SDK Code**

```python Simple ticket item, no flags
import requests

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

querystring = {"itemNumber":"31001","fromDate":"2026-06-01","toDate":"2026-06-02"}

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

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

print(response.json())
```

```javascript Simple ticket item, no flags
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-02';
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 Simple ticket item, no flags
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-02"

	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 Simple ticket item, no flags
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-02")

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 Simple ticket item, no flags
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./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-02")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php Simple ticket item, no flags
<?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./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-02', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp Simple ticket item, no flags
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-02");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift Simple ticket item, no flags
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./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-02")! 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()
```

### Simple ticket item with price and capacity

Same item with `withPrice=true&withCapacity=true`. `datePrices` carries the per-date base and a 5 % price-list discount, `priceDelta` is the per-slot adjustment, and `remainingCapacity` is omitted on the `none` slot. The morning slot comes to (200 - 20) × 0.95 = 171.00 per unit.

**Response**

```json
{
  "itemNumber": "31001",
  "items": [
    {
      "componentItemNumber": "31001",
      "quantity": 1,
      "admissions": [
        {
          "admissionCode": "CASTLE",
          "inclusion": "mandatory",
          "default": true,
          "scheduleSelection": "nextAvailableSchedule",
          "admissionLocalTime": "2026-05-31T09:15:23+02:00"
        }
      ],
      "variantCode": ""
    }
  ],
  "timeSlots": [
    {
      "scheduleNumber": 12345,
      "componentItemNumber": "31001",
      "admissionCode": "CASTLE",
      "scheduleCode": "WEEKDAYS",
      "startDate": "2026-06-01",
      "startTime": "10:00:00",
      "endDate": "2026-06-01",
      "endTime": "11:00:00",
      "priceDelta": -20,
      "capacityControl": "sales",
      "maxCapacity": 40,
      "remainingCapacity": 25
    },
    {
      "scheduleNumber": 12346,
      "componentItemNumber": "31001",
      "admissionCode": "CASTLE",
      "scheduleCode": "WEEKDAYS",
      "startDate": "2026-06-01",
      "startTime": "14:00:00",
      "endDate": "2026-06-01",
      "endTime": "15:00:00",
      "priceDelta": 0,
      "capacityControl": "none"
    }
  ],
  "datePrices": [
    {
      "componentItemNumber": "31001",
      "admissionCode": "CASTLE",
      "date": "2026-06-01",
      "basePrice": 200,
      "currencyCode": "DKK",
      "priceListDiscountPct": 5,
      "packageDiscountPct": 0,
      "packageDiscountAmount": 0
    }
  ]
}
```

**SDK Code**

```python Simple ticket item with price and capacity
import requests

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

querystring = {"itemNumber":"31001","fromDate":"2026-06-01","toDate":"2026-06-01","withPrice":"true","withCapacity":"true"}

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

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

print(response.json())
```

```javascript Simple ticket item with price and capacity
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true&withCapacity=true';
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 Simple ticket item with price and capacity
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true&withCapacity=true"

	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 Simple ticket item with price and capacity
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true&withCapacity=true")

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 Simple ticket item with price and capacity
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./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true&withCapacity=true")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php Simple ticket item with price and capacity
<?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./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true&withCapacity=true', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp Simple ticket item with price and capacity
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true&withCapacity=true");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift Simple ticket item with price and capacity
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./ticket/timeslots/search?itemNumber=31001&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true&withCapacity=true")! 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()
```

### Package with two tickets and a coupon

A package that decomposes into two ticket components and one non-admission component
(a coupon). The ticket components appear in `items[]`, `datePrices[]`, and `timeSlots[]`.
The coupon appears in `items[]` with an empty `admissions` array and in `datePrices[]`
with `admissionCode: ""` — it never appears in `timeSlots[]` because there's no
schedule attached. The package gives the castle ticket a 20.00 amount discount and the
garden ticket a 10 % discount, so `priceListDiscountPct` is `0` on both rows.

**Response**

```json
{
  "itemNumber": "70009",
  "items": [
    {
      "componentItemNumber": "31001",
      "quantity": 1,
      "admissions": [
        {
          "admissionCode": "CASTLE",
          "inclusion": "mandatory",
          "default": true,
          "scheduleSelection": "nextAvailableSchedule",
          "admissionLocalTime": "2026-05-31T09:15:23+02:00"
        }
      ],
      "variantCode": ""
    },
    {
      "componentItemNumber": "31002",
      "quantity": 1,
      "admissions": [
        {
          "admissionCode": "GARDEN",
          "inclusion": "mandatory",
          "default": true,
          "scheduleSelection": "nextAvailableSchedule",
          "admissionLocalTime": "2026-05-31T09:15:23+02:00"
        }
      ],
      "variantCode": ""
    },
    {
      "componentItemNumber": "10005",
      "quantity": 1,
      "admissions": [],
      "variantCode": ""
    }
  ],
  "timeSlots": [
    {
      "scheduleNumber": 12345,
      "componentItemNumber": "31001",
      "admissionCode": "CASTLE",
      "scheduleCode": "WEEKDAYS",
      "startDate": "2026-06-01",
      "startTime": "10:00:00",
      "endDate": "2026-06-01",
      "endTime": "11:00:00",
      "priceDelta": 0
    },
    {
      "scheduleNumber": 22001,
      "componentItemNumber": "31002",
      "admissionCode": "GARDEN",
      "scheduleCode": "ALLDAY",
      "startDate": "2026-06-01",
      "startTime": "09:00:00",
      "endDate": "2026-06-01",
      "endTime": "18:00:00",
      "priceDelta": 0
    }
  ],
  "datePrices": [
    {
      "componentItemNumber": "31001",
      "admissionCode": "CASTLE",
      "date": "2026-06-01",
      "basePrice": 200,
      "currencyCode": "DKK",
      "priceListDiscountPct": 0,
      "packageDiscountPct": 0,
      "packageDiscountAmount": 20
    },
    {
      "componentItemNumber": "31002",
      "admissionCode": "GARDEN",
      "date": "2026-06-01",
      "basePrice": 80,
      "currencyCode": "DKK",
      "priceListDiscountPct": 0,
      "packageDiscountPct": 10,
      "packageDiscountAmount": 0
    },
    {
      "componentItemNumber": "10005",
      "admissionCode": "",
      "date": "2026-06-01",
      "basePrice": 0,
      "currencyCode": "DKK",
      "priceListDiscountPct": 0,
      "packageDiscountPct": 0,
      "packageDiscountAmount": 0
    }
  ]
}
```

**SDK Code**

```python Package with two tickets and a coupon
import requests

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

querystring = {"itemNumber":"70009","fromDate":"2026-06-01","toDate":"2026-06-01","withPrice":"true"}

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

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

print(response.json())
```

```javascript Package with two tickets and a coupon
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=70009&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true';
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 Package with two tickets and a coupon
package main

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

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=70009&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true"

	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 Package with two tickets and a coupon
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=70009&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true")

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 Package with two tickets and a coupon
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./ticket/timeslots/search?itemNumber=70009&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php Package with two tickets and a coupon
<?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./ticket/timeslots/search?itemNumber=70009&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp Package with two tickets and a coupon
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/timeslots/search?itemNumber=70009&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true");
var request = new RestRequest(Method.GET);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift Package with two tickets and a coupon
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./ticket/timeslots/search?itemNumber=70009&fromDate=2026-06-01&toDate=2026-06-01&withPrice=true")! 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()
```