> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.navipartner.com/apis/api-reference/ota-channel-manager/getting-started/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.navipartner.com/_mcp/server. # Getting Started ## Overview The OTA Channel Manager API issues tickets and coupons on behalf of an external sales channel from a single order submission. `createOrder` and `replaceOrder` are **asynchronous**: they accept the order, return immediately with `status = Submitted`, and issuance is performed in the background. Partners then learn the outcome either by subscribing to the [`ota_cm_order_processed`](./orderProcessed) webhook or by polling `getOrder`. The walk-through below covers the recommended async flow end-to-end. #### 1 - Choose how you will be notified Before submitting your first order, decide how your integration learns that an order has settled. Pick **one** of: * **Webhook (recommended).** Subscribe to `ota_cm_order_processed`. The event fires once per order, when the order has reached a terminal state (`Issued`, `Draft`, or `Error`). The payload carries the `orderId`, the OTA Channel Manager's `buyFromOrderReference`, and the final `status` — enough to look the order up, reconcile it on your side, and decide on a follow-up action. The webhook also acts as a heartbeat: if you never see an event for an order you submitted, the order has not finished processing. * **Polling.** Call `getOrder` periodically until `status` is one of `Issued`, `Draft`, or `Error`. This works for environments where exposing an inbound HTTPS endpoint is hard, but consumes API quota and adds latency. Orders are picked up for processing on roughly a 60-second cadence, so an order can sit as `Submitted` for up to a minute before it starts moving; once it does, settling to a terminal state typically takes a few seconds. A polling cadence of 10–15 seconds is reasonable — faster than that adds load without buying you anything. You do not need to pick before each order — pick once for the integration. #### 2 - Submit the order Send the full order in a single call. The combination of `partnerId` and `sellToOrderReference` must be unique per partner. Include `paymentReference` if payment has already been captured; omit it if you intend to confirm payment in a second step (see step 4). ### Request POST [https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager](https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager) **`Submit an order for an individual ticket`** ```curl Submit an order for an individual ticket curl -X POST https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager \ -H "x-np-api-key: " \ -H "Content-Type: application/json" \ -d '{ "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "items": [ { "itemNumber": "31001", "visitDate": "2026-06-01", "visitTime": "10:30:00", "quantity": 2, "wallet": { "names": [ "Jane Doe", "John Doe" ], "externalReferenceNumbers": [ "JD-2026-001", "JOHN-2026-001" ] } } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU", "paymentReference": "PAY-987654" }' ``` **`Submit an order for an individual ticket`** ```python Submit an order for an individual ticket import requests url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager" payload = { "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "items": [ { "itemNumber": "31001", "visitDate": "2026-06-01", "visitTime": "10:30:00", "quantity": 2, "wallet": { "names": ["Jane Doe", "John Doe"], "externalReferenceNumbers": ["JD-2026-001", "JOHN-2026-001"] } } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU", "paymentReference": "PAY-987654" } headers = { "x-np-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` **`Submit an order for an individual ticket`** ```javascript Submit an order for an individual ticket const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager'; const options = { method: 'POST', headers: {'x-np-api-key': '', 'Content-Type': 'application/json'}, body: '{"partnerId":"21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e","sellToOrderReference":"PARTNER-ORDER-2026-00042","items":[{"itemNumber":"31001","visitDate":"2026-06-01","visitTime":"10:30:00","quantity":2,"wallet":{"names":["Jane Doe","John Doe"],"externalReferenceNumbers":["JD-2026-001","JOHN-2026-001"]}}],"sellToEmail":"guest@example.com","sellToName":"Jane Doe","sellToLanguage":"ENU","paymentReference":"PAY-987654"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` **`Submit an order for an individual ticket`** ```go Submit an order for an individual ticket package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager" payload := strings.NewReader("{\n \"partnerId\": \"21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e\",\n \"sellToOrderReference\": \"PARTNER-ORDER-2026-00042\",\n \"items\": [\n {\n \"itemNumber\": \"31001\",\n \"visitDate\": \"2026-06-01\",\n \"visitTime\": \"10:30:00\",\n \"quantity\": 2,\n \"wallet\": {\n \"names\": [\n \"Jane Doe\",\n \"John Doe\"\n ],\n \"externalReferenceNumbers\": [\n \"JD-2026-001\",\n \"JOHN-2026-001\"\n ]\n }\n }\n ],\n \"sellToEmail\": \"guest@example.com\",\n \"sellToName\": \"Jane Doe\",\n \"sellToLanguage\": \"ENU\",\n \"paymentReference\": \"PAY-987654\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-np-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)) } ``` **`Submit an order for an individual ticket`** ```ruby Submit an order for an individual ticket require 'uri' require 'net/http' url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-np-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"partnerId\": \"21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e\",\n \"sellToOrderReference\": \"PARTNER-ORDER-2026-00042\",\n \"items\": [\n {\n \"itemNumber\": \"31001\",\n \"visitDate\": \"2026-06-01\",\n \"visitTime\": \"10:30:00\",\n \"quantity\": 2,\n \"wallet\": {\n \"names\": [\n \"Jane Doe\",\n \"John Doe\"\n ],\n \"externalReferenceNumbers\": [\n \"JD-2026-001\",\n \"JOHN-2026-001\"\n ]\n }\n }\n ],\n \"sellToEmail\": \"guest@example.com\",\n \"sellToName\": \"Jane Doe\",\n \"sellToLanguage\": \"ENU\",\n \"paymentReference\": \"PAY-987654\"\n}" response = http.request(request) puts response.read_body ``` **`Submit an order for an individual ticket`** ```java Submit an order for an individual ticket import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager") .header("x-np-api-key", "") .header("Content-Type", "application/json") .body("{\n \"partnerId\": \"21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e\",\n \"sellToOrderReference\": \"PARTNER-ORDER-2026-00042\",\n \"items\": [\n {\n \"itemNumber\": \"31001\",\n \"visitDate\": \"2026-06-01\",\n \"visitTime\": \"10:30:00\",\n \"quantity\": 2,\n \"wallet\": {\n \"names\": [\n \"Jane Doe\",\n \"John Doe\"\n ],\n \"externalReferenceNumbers\": [\n \"JD-2026-001\",\n \"JOHN-2026-001\"\n ]\n }\n }\n ],\n \"sellToEmail\": \"guest@example.com\",\n \"sellToName\": \"Jane Doe\",\n \"sellToLanguage\": \"ENU\",\n \"paymentReference\": \"PAY-987654\"\n}") .asString(); ``` **`Submit an order for an individual ticket`** ```php Submit an order for an individual ticket request('POST', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager', [ 'body' => '{ "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "items": [ { "itemNumber": "31001", "visitDate": "2026-06-01", "visitTime": "10:30:00", "quantity": 2, "wallet": { "names": [ "Jane Doe", "John Doe" ], "externalReferenceNumbers": [ "JD-2026-001", "JOHN-2026-001" ] } } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU", "paymentReference": "PAY-987654" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-np-api-key' => '', ], ]); echo $response->getBody(); ``` **`Submit an order for an individual ticket`** ```csharp Submit an order for an individual ticket using RestSharp; var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager"); var request = new RestRequest(Method.POST); request.AddHeader("x-np-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"partnerId\": \"21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e\",\n \"sellToOrderReference\": \"PARTNER-ORDER-2026-00042\",\n \"items\": [\n {\n \"itemNumber\": \"31001\",\n \"visitDate\": \"2026-06-01\",\n \"visitTime\": \"10:30:00\",\n \"quantity\": 2,\n \"wallet\": {\n \"names\": [\n \"Jane Doe\",\n \"John Doe\"\n ],\n \"externalReferenceNumbers\": [\n \"JD-2026-001\",\n \"JOHN-2026-001\"\n ]\n }\n }\n ],\n \"sellToEmail\": \"guest@example.com\",\n \"sellToName\": \"Jane Doe\",\n \"sellToLanguage\": \"ENU\",\n \"paymentReference\": \"PAY-987654\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` **`Submit an order for an individual ticket`** ```swift Submit an order for an individual ticket import Foundation let headers = [ "x-np-api-key": "", "Content-Type": "application/json" ] let parameters = [ "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "items": [ [ "itemNumber": "31001", "visitDate": "2026-06-01", "visitTime": "10:30:00", "quantity": 2, "wallet": [ "names": ["Jane Doe", "John Doe"], "externalReferenceNumbers": ["JD-2026-001", "JOHN-2026-001"] ] ] ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU", "paymentReference": "PAY-987654" ] 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./channelManager")! 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() ``` The response carries `status = Submitted`, the assigned `orderId`, and the OTA Channel Manager's `buyFromOrderReference`. Items, wallets, and the manifest are empty — they will be populated once issuance settles. Capture the `orderId`; every subsequent call uses it. ### Response (201) ```json { "orderId": "9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8", "status": "Submitted", "statusMessage": "", "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "buyFromOrderReference": "CM-20260515093000-A1B2", "receivedAt": "2026-05-15T09:30:00Z", "items": [ { "lineNo": 100000, "itemNumber": "31001", "description": "Castle Admission", "isPackage": false, "quantity": 1, "visitDate": "2026-06-01", "visitTime": "10:30:00", "wallets": [ { "seqNo": 1, "assets": [ { "id": "2c3a84c7-059f-41d3-8033-0d94e08d4b13", "type": "ticket", "assetId": "3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14", "referenceNumber": "ATF-BIL010665L-3", "itemNumber": "31001", "description": "Castle Admission" } ], "walletId": "5a1c2b3d-4e5f-6071-8293-a4b5c6d7e8f9", "walletReferenceNumber": "141234529930210327", "externalReferenceNumber": "JD-2026-001", "name": "Jane Doe", "issuedAt": "2026-05-15T09:30:05Z", "unitPriceExclVat": 80, "unitPriceInclVat": 100, "currencyCode": "DKK", "manifestUrl": "https://manifests.npretail.app/wallets/manifest?mid=9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" } ], "sellToName": "Jane Doe", "sellToEmail": "guest@example.com", "sellToLanguage": "ENU" } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU", "paymentReference": "PAY-987654" } ``` #### 3 - Receive the completion How you wait depends on the choice in step 1. **Webhook subscribers** receive `ota_cm_order_processed` from your registered endpoint when the order reaches a terminal state. The payload is small by design — it carries `orderId`, `buyFromOrderReference`, and `status`. Call `getOrder` to fetch the full representation (wallets, ticket and coupon assets, prices, manifest URLs): ### Request GET [https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager/\{orderId}](https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager/\{orderId}) **`Get an issued order`** ```curl Get an issued order curl https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8 \ -H "x-np-api-key: " ``` **`Get an issued order`** ```python Get an issued order import requests url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" headers = {"x-np-api-key": ""} response = requests.get(url, headers=headers) print(response.json()) ``` **`Get an issued order`** ```javascript Get an issued order const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8'; const options = {method: 'GET', headers: {'x-np-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` **`Get an issued order`** ```go Get an issued order package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-np-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` **`Get an issued order`** ```ruby Get an issued order require 'uri' require 'net/http' url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-np-api-key"] = '' response = http.request(request) puts response.read_body ``` **`Get an issued order`** ```java Get an issued order import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8") .header("x-np-api-key", "") .asString(); ``` **`Get an issued order`** ```php Get an issued order request('GET', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8', [ 'headers' => [ 'x-np-api-key' => '', ], ]); echo $response->getBody(); ``` **`Get an issued order`** ```csharp Get an issued order using RestSharp; var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8"); var request = new RestRequest(Method.GET); request.AddHeader("x-np-api-key", ""); IRestResponse response = client.Execute(request); ``` **`Get an issued order`** ```swift Get an issued order import Foundation let headers = ["x-np-api-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8")! 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() ``` **Pollers** call the same endpoint at their chosen cadence and inspect `status`: ``` if status in [Submitted, Scheduled, Processing] → not done yet, wait and retry if status == Issued → success; tickets are in items[].wallets[].assets if status == Draft → success but awaiting payment; see step 4 if status == Error → failure; see step 5 ``` In both flows, the final response looks like this: ### Response (200) ```json { "orderId": "9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8", "status": "Issued", "statusMessage": "", "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "buyFromOrderReference": "CM-20260515093000-A1B2", "receivedAt": "2026-05-15T09:30:00Z", "items": [ { "lineNo": 100000, "itemNumber": "31001", "description": "Castle Admission", "isPackage": false, "quantity": 1, "visitDate": "2026-06-01", "visitTime": "10:30:00", "wallets": [ { "seqNo": 1, "assets": [ { "id": "2c3a84c7-059f-41d3-8033-0d94e08d4b13", "type": "ticket", "assetId": "3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14", "referenceNumber": "ATF-BIL010665L-3", "itemNumber": "31001", "description": "Castle Admission" } ], "walletId": "5a1c2b3d-4e5f-6071-8293-a4b5c6d7e8f9", "walletReferenceNumber": "141234529930210327", "externalReferenceNumber": "JD-2026-001", "name": "Jane Doe", "issuedAt": "2026-05-15T09:30:05Z", "unitPriceExclVat": 80, "unitPriceInclVat": 100, "currencyCode": "DKK", "manifestUrl": "https://manifests.npretail.app/wallets/manifest?mid=9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" } ], "sellToName": "Jane Doe", "sellToEmail": "guest@example.com", "sellToLanguage": "ENU" } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU", "paymentReference": "PAY-987654", "jobId": "TM-IMPORT-000123", "manifestUrl": "https://manifests.npretail.app/wallets/manifest?mid=9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" } ``` #### 4 - Confirm payment after the fact (optional) If you did not include `paymentReference` in `createOrder`, the order settles in `Draft`. Tickets and coupons have been minted but are not valid until confirmed. Send the reference with `confirmOrder` to move the order to `Issued` and make the assets valid: ### Request POST [https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager/\{orderId}/confirm](https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager/\{orderId}/confirm) **`Confirm a draft order`** ```curl Confirm a draft order curl -X POST https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8/confirm \ -H "x-np-api-key: " \ -H "Content-Type: application/json" \ -d '{ "paymentReference": "PAY-987654" }' ``` **`Confirm a draft order`** ```python Confirm a draft order import requests url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8/confirm" payload = { "paymentReference": "PAY-987654" } headers = { "x-np-api-key": "", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` **`Confirm a draft order`** ```javascript Confirm a draft order const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8/confirm'; const options = { method: 'POST', headers: {'x-np-api-key': '', 'Content-Type': 'application/json'}, body: '{"paymentReference":"PAY-987654"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` **`Confirm a draft order`** ```go Confirm a draft order package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8/confirm" payload := strings.NewReader("{\n \"paymentReference\": \"PAY-987654\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("x-np-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)) } ``` **`Confirm a draft order`** ```ruby Confirm a draft order require 'uri' require 'net/http' url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8/confirm") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["x-np-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"paymentReference\": \"PAY-987654\"\n}" response = http.request(request) puts response.read_body ``` **`Confirm a draft order`** ```java Confirm a draft order import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8/confirm") .header("x-np-api-key", "") .header("Content-Type", "application/json") .body("{\n \"paymentReference\": \"PAY-987654\"\n}") .asString(); ``` **`Confirm a draft order`** ```php Confirm a draft order request('POST', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8/confirm', [ 'body' => '{ "paymentReference": "PAY-987654" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-np-api-key' => '', ], ]); echo $response->getBody(); ``` **`Confirm a draft order`** ```csharp Confirm a draft order using RestSharp; var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8/confirm"); var request = new RestRequest(Method.POST); request.AddHeader("x-np-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"paymentReference\": \"PAY-987654\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` **`Confirm a draft order`** ```swift Confirm a draft order import Foundation let headers = [ "x-np-api-key": "", "Content-Type": "application/json" ] let parameters = ["paymentReference": "PAY-987654"] 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./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8/confirm")! 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() ``` `confirmOrder` is synchronous and idempotent — confirming an already-`Issued` order is a no-op. ### Response (200) ```json { "orderId": "9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8", "status": "Issued", "statusMessage": "", "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "buyFromOrderReference": "CM-20260515093000-A1B2", "receivedAt": "2026-05-15T09:30:00Z", "items": [ { "lineNo": 100000, "itemNumber": "31001", "description": "Castle Admission", "isPackage": false, "quantity": 1, "visitDate": "2026-06-01", "visitTime": "10:30:00", "wallets": [ { "seqNo": 1, "assets": [ { "id": "2c3a84c7-059f-41d3-8033-0d94e08d4b13", "type": "ticket", "assetId": "3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14", "referenceNumber": "ATF-BIL010665L-3", "itemNumber": "31001", "description": "Castle Admission" } ], "walletId": "5a1c2b3d-4e5f-6071-8293-a4b5c6d7e8f9", "walletReferenceNumber": "141234529930210327", "externalReferenceNumber": "JD-2026-001", "name": "Jane Doe", "issuedAt": "2026-05-15T09:30:05Z", "unitPriceExclVat": 80, "unitPriceInclVat": 100, "currencyCode": "DKK", "manifestUrl": "https://manifests.npretail.app/wallets/manifest?mid=9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" } ], "sellToName": "Jane Doe", "sellToEmail": "guest@example.com", "sellToLanguage": "ENU" } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU", "paymentReference": "PAY-987654", "jobId": "TM-IMPORT-000123", "manifestUrl": "https://manifests.npretail.app/wallets/manifest?mid=9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" } ``` #### 5 - Replace an order's contents Use `replaceOrder` to retry a failed order or to change a draft. `partnerId` and `sellToOrderReference` are immutable under `PUT`; all other header fields, plus the entire `items` array, are replaced. Any previously issued wallets, tickets, and coupons are destroyed and the order is re-submitted through the same async pipeline. Replacement is only allowed when the existing order is `Draft` or `Error`. ### Request PUT [https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager/\{orderId}](https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager/\{orderId}) **`Replace a draft order`** ```curl Replace a draft order curl -X PUT https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8 \ -H "x-np-api-key: " \ -H "Content-Type: application/json" \ -d '{ "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "items": [ { "itemNumber": "31001", "visitDate": "2026-06-01", "visitTime": "10:30:00", "quantity": 2, "wallet": { "names": [ "Jane Doe", "John Doe" ], "externalReferenceNumbers": [ "JD-2026-001", "JOHN-2026-001" ] } } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU" }' ``` **`Replace a draft order`** ```python Replace a draft order import requests url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" payload = { "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "items": [ { "itemNumber": "31001", "visitDate": "2026-06-01", "visitTime": "10:30:00", "quantity": 2, "wallet": { "names": ["Jane Doe", "John Doe"], "externalReferenceNumbers": ["JD-2026-001", "JOHN-2026-001"] } } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU" } headers = { "x-np-api-key": "", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.json()) ``` **`Replace a draft order`** ```javascript Replace a draft order const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8'; const options = { method: 'PUT', headers: {'x-np-api-key': '', 'Content-Type': 'application/json'}, body: '{"partnerId":"21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e","sellToOrderReference":"PARTNER-ORDER-2026-00042","items":[{"itemNumber":"31001","visitDate":"2026-06-01","visitTime":"10:30:00","quantity":2,"wallet":{"names":["Jane Doe","John Doe"],"externalReferenceNumbers":["JD-2026-001","JOHN-2026-001"]}}],"sellToEmail":"guest@example.com","sellToName":"Jane Doe","sellToLanguage":"ENU"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` **`Replace a draft order`** ```go Replace a draft order package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" payload := strings.NewReader("{\n \"partnerId\": \"21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e\",\n \"sellToOrderReference\": \"PARTNER-ORDER-2026-00042\",\n \"items\": [\n {\n \"itemNumber\": \"31001\",\n \"visitDate\": \"2026-06-01\",\n \"visitTime\": \"10:30:00\",\n \"quantity\": 2,\n \"wallet\": {\n \"names\": [\n \"Jane Doe\",\n \"John Doe\"\n ],\n \"externalReferenceNumbers\": [\n \"JD-2026-001\",\n \"JOHN-2026-001\"\n ]\n }\n }\n ],\n \"sellToEmail\": \"guest@example.com\",\n \"sellToName\": \"Jane Doe\",\n \"sellToLanguage\": \"ENU\"\n}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("x-np-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)) } ``` **`Replace a draft order`** ```ruby Replace a draft order require 'uri' require 'net/http' url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["x-np-api-key"] = '' request["Content-Type"] = 'application/json' request.body = "{\n \"partnerId\": \"21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e\",\n \"sellToOrderReference\": \"PARTNER-ORDER-2026-00042\",\n \"items\": [\n {\n \"itemNumber\": \"31001\",\n \"visitDate\": \"2026-06-01\",\n \"visitTime\": \"10:30:00\",\n \"quantity\": 2,\n \"wallet\": {\n \"names\": [\n \"Jane Doe\",\n \"John Doe\"\n ],\n \"externalReferenceNumbers\": [\n \"JD-2026-001\",\n \"JOHN-2026-001\"\n ]\n }\n }\n ],\n \"sellToEmail\": \"guest@example.com\",\n \"sellToName\": \"Jane Doe\",\n \"sellToLanguage\": \"ENU\"\n}" response = http.request(request) puts response.read_body ``` **`Replace a draft order`** ```java Replace a draft order import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.put("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8") .header("x-np-api-key", "") .header("Content-Type", "application/json") .body("{\n \"partnerId\": \"21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e\",\n \"sellToOrderReference\": \"PARTNER-ORDER-2026-00042\",\n \"items\": [\n {\n \"itemNumber\": \"31001\",\n \"visitDate\": \"2026-06-01\",\n \"visitTime\": \"10:30:00\",\n \"quantity\": 2,\n \"wallet\": {\n \"names\": [\n \"Jane Doe\",\n \"John Doe\"\n ],\n \"externalReferenceNumbers\": [\n \"JD-2026-001\",\n \"JOHN-2026-001\"\n ]\n }\n }\n ],\n \"sellToEmail\": \"guest@example.com\",\n \"sellToName\": \"Jane Doe\",\n \"sellToLanguage\": \"ENU\"\n}") .asString(); ``` **`Replace a draft order`** ```php Replace a draft order request('PUT', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8', [ 'body' => '{ "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "items": [ { "itemNumber": "31001", "visitDate": "2026-06-01", "visitTime": "10:30:00", "quantity": 2, "wallet": { "names": [ "Jane Doe", "John Doe" ], "externalReferenceNumbers": [ "JD-2026-001", "JOHN-2026-001" ] } } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU" }', 'headers' => [ 'Content-Type' => 'application/json', 'x-np-api-key' => '', ], ]); echo $response->getBody(); ``` **`Replace a draft order`** ```csharp Replace a draft order using RestSharp; var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8"); var request = new RestRequest(Method.PUT); request.AddHeader("x-np-api-key", ""); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"partnerId\": \"21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e\",\n \"sellToOrderReference\": \"PARTNER-ORDER-2026-00042\",\n \"items\": [\n {\n \"itemNumber\": \"31001\",\n \"visitDate\": \"2026-06-01\",\n \"visitTime\": \"10:30:00\",\n \"quantity\": 2,\n \"wallet\": {\n \"names\": [\n \"Jane Doe\",\n \"John Doe\"\n ],\n \"externalReferenceNumbers\": [\n \"JD-2026-001\",\n \"JOHN-2026-001\"\n ]\n }\n }\n ],\n \"sellToEmail\": \"guest@example.com\",\n \"sellToName\": \"Jane Doe\",\n \"sellToLanguage\": \"ENU\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` **`Replace a draft order`** ```swift Replace a draft order import Foundation let headers = [ "x-np-api-key": "", "Content-Type": "application/json" ] let parameters = [ "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "items": [ [ "itemNumber": "31001", "visitDate": "2026-06-01", "visitTime": "10:30:00", "quantity": 2, "wallet": [ "names": ["Jane Doe", "John Doe"], "externalReferenceNumbers": ["JD-2026-001", "JOHN-2026-001"] ] ] ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU" ] 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./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "PUT" 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() ``` ### Response (200) ```json { "orderId": "9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8", "status": "Submitted", "statusMessage": "", "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "buyFromOrderReference": "CM-20260515093000-A1B2", "receivedAt": "2026-05-15T09:30:00Z", "items": [ { "lineNo": 100000, "itemNumber": "31001", "description": "Castle Admission", "isPackage": false, "quantity": 1, "visitDate": "2026-06-01", "visitTime": "10:30:00", "wallets": [ { "seqNo": 1, "assets": [ { "id": "2c3a84c7-059f-41d3-8033-0d94e08d4b13", "type": "ticket", "assetId": "3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14", "referenceNumber": "ATF-BIL010665L-3", "itemNumber": "31001", "description": "Castle Admission" } ], "walletId": "5a1c2b3d-4e5f-6071-8293-a4b5c6d7e8f9", "walletReferenceNumber": "141234529930210327", "externalReferenceNumber": "JD-2026-001", "name": "Jane Doe", "issuedAt": "2026-05-15T09:30:05Z", "unitPriceExclVat": 80, "unitPriceInclVat": 100, "currencyCode": "DKK", "manifestUrl": "https://manifests.npretail.app/wallets/manifest?mid=9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" } ], "sellToName": "Jane Doe", "sellToEmail": "guest@example.com", "sellToLanguage": "ENU" } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU", "paymentReference": "PAY-987654" } ``` The response carries `status = Submitted` again — wait for the next webhook (or poll) to see the new terminal state. #### 6 - Cancel an order `DELETE /channelManager/:orderId` tears down the order's wallets, tickets, and coupons. The order row survives as `Cancelled` if it was previously `Issued` or `Cancelled`; it is removed outright if it was `Draft` or `Error`. Orders that are still in-flight (`Submitted`, `Scheduled`, `Processing`) cannot be cancelled — wait for them to settle. ### Request DELETE [https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager/\{orderId}](https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager/\{orderId}) **`Cancel an issued order`** ```curl Cancel an issued order curl -X DELETE https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8 \ -H "x-np-api-key: " ``` **`Cancel an issued order`** ```python Cancel an issued order import requests url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" headers = {"x-np-api-key": ""} response = requests.delete(url, headers=headers) print(response.json()) ``` **`Cancel an issued order`** ```javascript Cancel an issued order const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8'; const options = {method: 'DELETE', headers: {'x-np-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` **`Cancel an issued order`** ```go Cancel an issued order package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("x-np-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` **`Cancel an issued order`** ```ruby Cancel an issued order require 'uri' require 'net/http' url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["x-np-api-key"] = '' response = http.request(request) puts response.read_body ``` **`Cancel an issued order`** ```java Cancel an issued order import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.delete("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8") .header("x-np-api-key", "") .asString(); ``` **`Cancel an issued order`** ```php Cancel an issued order request('DELETE', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8', [ 'headers' => [ 'x-np-api-key' => '', ], ]); echo $response->getBody(); ``` **`Cancel an issued order`** ```csharp Cancel an issued order using RestSharp; var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8"); var request = new RestRequest(Method.DELETE); request.AddHeader("x-np-api-key", ""); IRestResponse response = client.Execute(request); ``` **`Cancel an issued order`** ```swift Cancel an issued order import Foundation let headers = ["x-np-api-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" 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() ``` ### Response (200) ```json { "orderId": "9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8", "status": "Issued", "statusMessage": "", "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "buyFromOrderReference": "CM-20260515093000-A1B2", "receivedAt": "2026-05-15T09:30:00Z", "items": [ { "lineNo": 100000, "itemNumber": "31001", "description": "Castle Admission", "isPackage": false, "quantity": 1, "visitDate": "2026-06-01", "visitTime": "10:30:00", "wallets": [ { "seqNo": 1, "assets": [ { "id": "2c3a84c7-059f-41d3-8033-0d94e08d4b13", "type": "ticket", "assetId": "3d4b95d8-16e0-42e4-9b2a-1d95f08d5c14", "referenceNumber": "ATF-BIL010665L-3", "itemNumber": "31001", "description": "Castle Admission" } ], "walletId": "5a1c2b3d-4e5f-6071-8293-a4b5c6d7e8f9", "walletReferenceNumber": "141234529930210327", "externalReferenceNumber": "JD-2026-001", "name": "Jane Doe", "issuedAt": "2026-05-15T09:30:05Z", "unitPriceExclVat": 80, "unitPriceInclVat": 100, "currencyCode": "DKK", "manifestUrl": "https://manifests.npretail.app/wallets/manifest?mid=9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" } ], "sellToName": "Jane Doe", "sellToEmail": "guest@example.com", "sellToLanguage": "ENU" } ], "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU", "paymentReference": "PAY-987654", "jobId": "TM-IMPORT-000123", "manifestUrl": "https://manifests.npretail.app/wallets/manifest?mid=9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" } ``` #### 7 - Look up orders by partner Use `listOrdersByPartner` to fetch orders for one partner, optionally filtered by status, `sellToOrderReference`, or a `receivedAt` window. The returned objects are compact summaries; follow up with `getOrder` to inspect items and wallets. Filtering on `status=Submitted,Scheduled,Processing` is a quick way to see what is still in-flight. ### Request GET [https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager/orders/\{partnerId}](https://api.npretail.app/\{tenant}/\{environment}/\{company}/channelManager/orders/\{partnerId}) **`List issued orders received in May`** ```curl List issued orders received in May curl -G https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/orders/21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e \ -H "x-np-api-key: " \ -d status=Issued \ --data-urlencode receivedAtFrom=2026-05-01T00:00:00Z \ --data-urlencode receivedAtTo=2026-05-31T23:59:59Z ``` **`List issued orders received in May`** ```python List issued orders received in May import requests url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/orders/21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e" querystring = {"status":"Issued","receivedAtFrom":"2026-05-01T00:00:00Z","receivedAtTo":"2026-05-31T23:59:59Z"} headers = {"x-np-api-key": ""} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` **`List issued orders received in May`** ```javascript List issued orders received in May const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/orders/21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e?status=Issued&receivedAtFrom=2026-05-01T00%3A00%3A00Z&receivedAtTo=2026-05-31T23%3A59%3A59Z'; const options = {method: 'GET', headers: {'x-np-api-key': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` **`List issued orders received in May`** ```go List issued orders received in May package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/orders/21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e?status=Issued&receivedAtFrom=2026-05-01T00%3A00%3A00Z&receivedAtTo=2026-05-31T23%3A59%3A59Z" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("x-np-api-key", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` **`List issued orders received in May`** ```ruby List issued orders received in May require 'uri' require 'net/http' url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/orders/21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e?status=Issued&receivedAtFrom=2026-05-01T00%3A00%3A00Z&receivedAtTo=2026-05-31T23%3A59%3A59Z") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["x-np-api-key"] = '' response = http.request(request) puts response.read_body ``` **`List issued orders received in May`** ```java List issued orders received in May import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/orders/21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e?status=Issued&receivedAtFrom=2026-05-01T00%3A00%3A00Z&receivedAtTo=2026-05-31T23%3A59%3A59Z") .header("x-np-api-key", "") .asString(); ``` **`List issued orders received in May`** ```php List issued orders received in May request('GET', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/orders/21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e?status=Issued&receivedAtFrom=2026-05-01T00%3A00%3A00Z&receivedAtTo=2026-05-31T23%3A59%3A59Z', [ 'headers' => [ 'x-np-api-key' => '', ], ]); echo $response->getBody(); ``` **`List issued orders received in May`** ```csharp List issued orders received in May using RestSharp; var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/orders/21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e?status=Issued&receivedAtFrom=2026-05-01T00%3A00%3A00Z&receivedAtTo=2026-05-31T23%3A59%3A59Z"); var request = new RestRequest(Method.GET); request.AddHeader("x-np-api-key", ""); IRestResponse response = client.Execute(request); ``` **`List issued orders received in May`** ```swift List issued orders received in May import Foundation let headers = ["x-np-api-key": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./channelManager/orders/21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e?status=Issued&receivedAtFrom=2026-05-01T00%3A00%3A00Z&receivedAtTo=2026-05-31T23%3A59%3A59Z")! 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() ``` ### Response (200) ```json [ { "orderId": "9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8", "partnerId": "21e8c1d2-3f4a-4c5b-9e6d-7f8a9b0c1d2e", "sellToOrderReference": "PARTNER-ORDER-2026-00042", "buyFromOrderReference": "CM-20260515093000-A1B2", "status": "Issued", "statusMessage": "", "receivedAt": "2026-05-15T09:30:00Z", "sellToEmail": "guest@example.com", "sellToName": "Jane Doe", "sellToLanguage": "ENU", "paymentReference": "PAY-987654", "jobId": "TM-IMPORT-000123", "manifestUrl": "https://manifests.npretail.app/wallets/manifest?mid=9c6b2f4e-2b71-4d23-9d6a-a3b4c5d6e7f8" } ] ``` > Documentation for NaviPartner's NP Retail, NP Attractions, NP Hospitality, NP Store Assistant and Entria products, plus their REST APIs, built on Microsoft Dynamics 365 Business Central.