cURL
curl --request POST \
--url https://api.pricenow.dev/api/orders/{orderId}/cancel \
--header 'Content-Type: application/json' \
--header 'accept-language: <accept-language>' \
--header 'pratiq-channel-uuid: <pratiq-channel-uuid>' \
--data '
{
"orderItemIds": [
123
],
"reason": "<string>"
}
'import requests
url = "https://api.pricenow.dev/api/orders/{orderId}/cancel"
payload = {
"orderItemIds": [123],
"reason": "<string>"
}
headers = {
"accept-language": "<accept-language>",
"pratiq-channel-uuid": "<pratiq-channel-uuid>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'accept-language': '<accept-language>',
'pratiq-channel-uuid': '<pratiq-channel-uuid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({orderItemIds: [123], reason: '<string>'})
};
fetch('https://api.pricenow.dev/api/orders/{orderId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pricenow.dev/api/orders/{orderId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'orderItemIds' => [
123
],
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"accept-language: <accept-language>",
"pratiq-channel-uuid: <pratiq-channel-uuid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pricenow.dev/api/orders/{orderId}/cancel"
payload := strings.NewReader("{\n \"orderItemIds\": [\n 123\n ],\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "<accept-language>")
req.Header.Add("pratiq-channel-uuid", "<pratiq-channel-uuid>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pricenow.dev/api/orders/{orderId}/cancel")
.header("accept-language", "<accept-language>")
.header("pratiq-channel-uuid", "<pratiq-channel-uuid>")
.header("Content-Type", "application/json")
.body("{\n \"orderItemIds\": [\n 123\n ],\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pricenow.dev/api/orders/{orderId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = '<accept-language>'
request["pratiq-channel-uuid"] = '<pratiq-channel-uuid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderItemIds\": [\n 123\n ],\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"accountId": 123,
"purchasedAt": "2023-11-07T05:31:56Z",
"lastUpdateAt": "2023-11-07T05:31:56Z",
"referenceNumber": "<string>",
"currency": "<string>",
"listPriceGross": 123,
"listPriceNet": 123,
"promoCodeDiscount": 123,
"autoDiscountAmount": 123,
"totalDiscountGross": 123,
"totalDiscountNet": 123,
"donation": {
"type": "DONATION",
"amount": 123
},
"totalGross": 123,
"totalNet": 123,
"metadata": {
"weatherGuarantee": {}
}
}
}orders
Post apiorders cancel
Cancel an order. Only works for Order Items which have a “flex” insurance. The pratiq-channel-uuid header is required by shared customer authentication but is not used to filter order access. Access is scoped to the authenticated account and orders from WEB or CONSUMPTION sales channels.
POST
/
api
/
orders
/
{orderId}
/
cancel
cURL
curl --request POST \
--url https://api.pricenow.dev/api/orders/{orderId}/cancel \
--header 'Content-Type: application/json' \
--header 'accept-language: <accept-language>' \
--header 'pratiq-channel-uuid: <pratiq-channel-uuid>' \
--data '
{
"orderItemIds": [
123
],
"reason": "<string>"
}
'import requests
url = "https://api.pricenow.dev/api/orders/{orderId}/cancel"
payload = {
"orderItemIds": [123],
"reason": "<string>"
}
headers = {
"accept-language": "<accept-language>",
"pratiq-channel-uuid": "<pratiq-channel-uuid>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'accept-language': '<accept-language>',
'pratiq-channel-uuid': '<pratiq-channel-uuid>',
'Content-Type': 'application/json'
},
body: JSON.stringify({orderItemIds: [123], reason: '<string>'})
};
fetch('https://api.pricenow.dev/api/orders/{orderId}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pricenow.dev/api/orders/{orderId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'orderItemIds' => [
123
],
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"accept-language: <accept-language>",
"pratiq-channel-uuid: <pratiq-channel-uuid>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pricenow.dev/api/orders/{orderId}/cancel"
payload := strings.NewReader("{\n \"orderItemIds\": [\n 123\n ],\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("accept-language", "<accept-language>")
req.Header.Add("pratiq-channel-uuid", "<pratiq-channel-uuid>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pricenow.dev/api/orders/{orderId}/cancel")
.header("accept-language", "<accept-language>")
.header("pratiq-channel-uuid", "<pratiq-channel-uuid>")
.header("Content-Type", "application/json")
.body("{\n \"orderItemIds\": [\n 123\n ],\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pricenow.dev/api/orders/{orderId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept-language"] = '<accept-language>'
request["pratiq-channel-uuid"] = '<pratiq-channel-uuid>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"orderItemIds\": [\n 123\n ],\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"accountId": 123,
"purchasedAt": "2023-11-07T05:31:56Z",
"lastUpdateAt": "2023-11-07T05:31:56Z",
"referenceNumber": "<string>",
"currency": "<string>",
"listPriceGross": 123,
"listPriceNet": 123,
"promoCodeDiscount": 123,
"autoDiscountAmount": 123,
"totalDiscountGross": 123,
"totalDiscountNet": 123,
"donation": {
"type": "DONATION",
"amount": 123
},
"totalGross": 123,
"totalNet": 123,
"metadata": {
"weatherGuarantee": {}
}
}
}Headers
Language of the response
Available options:
en, de, fr, it Required by shared customer authentication. Ignored for customer order access filtering; access is scoped to the authenticated account and orders from WEB or CONSUMPTION sales channels.
Path Parameters
Response
200 - application/json
Successful response
Show child attributes
Show child attributes
⌘I

