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

# Pre Confirm Reservation

POST https://api.npretail.app/{tenant}/{environment}/{company}/ticket/reservation/{token}/pre-confirm

Extends the lifespan of a provisional reservation identified by a token. Clients use this endpoint to keep the reservation active for a longer period before confirming it, preventing the tickets from expiring and being released back into the system. This action is typically taken when you want to extend the reservation's lifespan just before starting the payment process.

Reference: https://docs.navipartner.com/apis/api-reference/ticketing/service-reservations/pre-confirm-reservation

## 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)
- `token` (string, required) — A unique token that identifies a ticket reservation

### Query parameters

- `includeTicketNumbers` (boolean, optional) — Indicates whether ticket numbers should be included in reservation responses. Tickets are normally included only when the reservation is confirmed. If `true`, ticket numbers are returned regardless of reservation status. When a reservation is updated, any previously disclosed ticket numbers are removed. This affects ticket numbers only; `pinCode` and `ticketHolder` are returned only once the reservation is confirmed.

## Response

### 200

- `token` (string, required) — A unique token that identifies a ticket reservation
- `reservationStatus` (enum, required) — The status of the reservation
  - Allowed values: `registered`, `confirmed`, `alreadyConfirmed`, `canceled`, `expired`, `reserved`, `optional`
- `expiresAt` (datetime, optional) — The date and time when the token expires and reservation is no longer valid

## Examples

**Response**

```json
{
  "token": "ABC123456DEF789GHI",
  "reservationStatus": "registered",
  "expiresAt": "2024-10-11T12:13:00Z"
}
```

**SDK Code**

```python
import requests

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

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

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

print(response.json())
```

```javascript
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/reservation/ABC123456DEF789GHI/pre-confirm';
const options = {method: 'POST', 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 main

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

func main() {

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

	req, _ := http.NewRequest("POST", 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
require 'uri'
require 'net/http'

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

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

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

```java
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./ticket/reservation/ABC123456DEF789GHI/pre-confirm")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php
<?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./ticket/reservation/ABC123456DEF789GHI/pre-confirm', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./ticket/reservation/ABC123456DEF789GHI/pre-confirm");
var request = new RestRequest(Method.POST);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift
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/reservation/ABC123456DEF789GHI/pre-confirm")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```