cURL
curl --request POST \
--url https://api.pricenow.dev/api/checkout/{checkoutId}/vouchers \
--header 'Content-Type: application/json' \
--header 'accept-language: <accept-language>' \
--header 'pratiq-channel-uuid: <pratiq-channel-uuid>' \
--data '
{
"voucherCode": "<string>"
}
'import requests
url = "https://api.pricenow.dev/api/checkout/{checkoutId}/vouchers"
payload = { "voucherCode": "<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({voucherCode: '<string>'})
};
fetch('https://api.pricenow.dev/api/checkout/{checkoutId}/vouchers', 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/checkout/{checkoutId}/vouchers",
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([
'voucherCode' => '<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/checkout/{checkoutId}/vouchers"
payload := strings.NewReader("{\n \"voucherCode\": \"<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/checkout/{checkoutId}/vouchers")
.header("accept-language", "<accept-language>")
.header("pratiq-channel-uuid", "<pratiq-channel-uuid>")
.header("Content-Type", "application/json")
.body("{\n \"voucherCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pricenow.dev/api/checkout/{checkoutId}/vouchers")
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 \"voucherCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uuid": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"lastUpdateAt": "2023-11-07T05:31:56Z",
"referenceNumber": "<string>",
"salesChannel": {
"uuid": "<string>",
"name": "<string>"
},
"checkoutConditions": {
"defaultValues": {},
"formDefinition": {},
"values": {}
},
"supportedPaymentMethods": [
{
"provider": "DATATRANS",
"supportsAlias": true,
"supportsRegistrationAndPayment": true
}
],
"items": [
{
"id": 123,
"parentItemId": 123,
"productVariant": {
"productId": 123,
"name": "<string>",
"id": 123,
"vatRate": 123,
"attributes": [
{
"name": "<string>",
"identifier": "<string>",
"value": "<string>",
"sortOrder": 123,
"metaInformation": {},
"translation": "<string>"
}
],
"translation": "<string>",
"product": {
"id": 123,
"sortOrder": 123,
"name": "<string>",
"translation": "<string>",
"identifier": "<string>",
"isSubscription": true,
"standalone": true,
"hasValidity": true,
"imageUrl": "<string>",
"merchant": {
"identifier": "<string>",
"timezone": "<string>"
},
"category": {
"id": 123,
"name": "<string>"
},
"slug": "<string>"
},
"availableMedia": [
{
"description": "<string>",
"name": "<string>",
"id": 123,
"priceComponents": [
{
"price": 123,
"productVariant": {
"id": 123,
"name": "<string>",
"translation": "<string>",
"vatRate": 123,
"productId": 123,
"attributes": [
{
"name": "<string>",
"identifier": "<string>",
"value": "<string>",
"sortOrder": 123,
"metaInformation": {},
"translation": "<string>"
}
]
}
}
]
}
]
},
"validity": {
"from": "<string>",
"to": "<string>"
},
"parentItem": "<unknown>",
"childItems": "<array>",
"listPriceGross": 123,
"listPriceNet": 123,
"promoCodeDiscount": 123,
"autoDiscount": {
"id": 123,
"displayName": "<string>",
"description": "<string>",
"discount": 123
},
"autoDiscountAmount": 123,
"totalDiscountGross": 123,
"totalDiscountNet": 123,
"totalGross": 123,
"totalNet": 123,
"vatRate": 123,
"displayPrice": true,
"isDeletable": true,
"requiresPersonalization": true,
"requiresValidation": true,
"requiresMedium": true,
"isConfirmationRequired": true,
"isFlexTicket": true,
"isMaxOneTicketPerPerson": true,
"isUniqueItem": true,
"supportsWeatherGuarantee": true,
"hasWeatherGuarantee": true,
"personFieldsDefinition": {}
}
],
"currency": "<string>",
"listPriceGross": 123,
"listPriceNet": 123,
"promoCodes": [
{
"id": 123,
"code": "<string>",
"displayName": "<string>",
"description": "<string>",
"discount": 123,
"valid": true,
"totalAmount": 123
}
],
"promoCodeDiscount": 123,
"subscriptionConfiguration": {
"startsOn": "2023-11-07T05:31:56Z",
"nextBillingDate": "2023-11-07T05:31:56Z",
"hasPickup": true,
"startConfiguration": "CURRENT_DAY",
"minimalRunPeriods": 123,
"renewal": {
"period": "DAYS",
"day": null,
"month": null,
"daysAmount": 123
}
},
"autoDiscounts": [
{
"id": 123,
"displayName": "<string>",
"description": "<string>",
"discount": 123
}
],
"autoDiscountAmount": 123,
"totalDiscountGross": 123,
"totalDiscountNet": 123,
"totalSubscriptionGross": 123,
"totalSubscriptionNet": 123,
"donation": {
"type": "DONATION",
"amount": 123
},
"totalGross": 123,
"totalNet": 123,
"requiresOwner": true,
"requiresBillingAddress": true,
"requiresShippingAddress": true,
"billingAddress": {
"id": 123,
"addressLine1": "<string>",
"addressLine2": "<string>",
"zip": "<string>",
"city": "<string>",
"state": "<string>",
"countryCode": "<string>",
"purpose": []
},
"shippingAddress": {
"id": 123,
"addressLine1": "<string>",
"addressLine2": "<string>",
"zip": "<string>",
"city": "<string>",
"state": "<string>",
"countryCode": "<string>",
"purpose": []
},
"paymentMethod": {
"provider": "EGUMA",
"type": "voucher",
"id": 123,
"isDefault": true,
"code": "<string>"
},
"vouchers": [
{
"code": "<string>",
"amount": 123
}
],
"canUsePromoCodes": true,
"canUseVouchers": true,
"metadata": {
"weatherGuarantee": {}
}
}
}checkout
Post apicheckout vouchers
Add a voucher code to a checkout
POST
/
api
/
checkout
/
{checkoutId}
/
vouchers
cURL
curl --request POST \
--url https://api.pricenow.dev/api/checkout/{checkoutId}/vouchers \
--header 'Content-Type: application/json' \
--header 'accept-language: <accept-language>' \
--header 'pratiq-channel-uuid: <pratiq-channel-uuid>' \
--data '
{
"voucherCode": "<string>"
}
'import requests
url = "https://api.pricenow.dev/api/checkout/{checkoutId}/vouchers"
payload = { "voucherCode": "<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({voucherCode: '<string>'})
};
fetch('https://api.pricenow.dev/api/checkout/{checkoutId}/vouchers', 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/checkout/{checkoutId}/vouchers",
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([
'voucherCode' => '<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/checkout/{checkoutId}/vouchers"
payload := strings.NewReader("{\n \"voucherCode\": \"<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/checkout/{checkoutId}/vouchers")
.header("accept-language", "<accept-language>")
.header("pratiq-channel-uuid", "<pratiq-channel-uuid>")
.header("Content-Type", "application/json")
.body("{\n \"voucherCode\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pricenow.dev/api/checkout/{checkoutId}/vouchers")
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 \"voucherCode\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"uuid": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"lastUpdateAt": "2023-11-07T05:31:56Z",
"referenceNumber": "<string>",
"salesChannel": {
"uuid": "<string>",
"name": "<string>"
},
"checkoutConditions": {
"defaultValues": {},
"formDefinition": {},
"values": {}
},
"supportedPaymentMethods": [
{
"provider": "DATATRANS",
"supportsAlias": true,
"supportsRegistrationAndPayment": true
}
],
"items": [
{
"id": 123,
"parentItemId": 123,
"productVariant": {
"productId": 123,
"name": "<string>",
"id": 123,
"vatRate": 123,
"attributes": [
{
"name": "<string>",
"identifier": "<string>",
"value": "<string>",
"sortOrder": 123,
"metaInformation": {},
"translation": "<string>"
}
],
"translation": "<string>",
"product": {
"id": 123,
"sortOrder": 123,
"name": "<string>",
"translation": "<string>",
"identifier": "<string>",
"isSubscription": true,
"standalone": true,
"hasValidity": true,
"imageUrl": "<string>",
"merchant": {
"identifier": "<string>",
"timezone": "<string>"
},
"category": {
"id": 123,
"name": "<string>"
},
"slug": "<string>"
},
"availableMedia": [
{
"description": "<string>",
"name": "<string>",
"id": 123,
"priceComponents": [
{
"price": 123,
"productVariant": {
"id": 123,
"name": "<string>",
"translation": "<string>",
"vatRate": 123,
"productId": 123,
"attributes": [
{
"name": "<string>",
"identifier": "<string>",
"value": "<string>",
"sortOrder": 123,
"metaInformation": {},
"translation": "<string>"
}
]
}
}
]
}
]
},
"validity": {
"from": "<string>",
"to": "<string>"
},
"parentItem": "<unknown>",
"childItems": "<array>",
"listPriceGross": 123,
"listPriceNet": 123,
"promoCodeDiscount": 123,
"autoDiscount": {
"id": 123,
"displayName": "<string>",
"description": "<string>",
"discount": 123
},
"autoDiscountAmount": 123,
"totalDiscountGross": 123,
"totalDiscountNet": 123,
"totalGross": 123,
"totalNet": 123,
"vatRate": 123,
"displayPrice": true,
"isDeletable": true,
"requiresPersonalization": true,
"requiresValidation": true,
"requiresMedium": true,
"isConfirmationRequired": true,
"isFlexTicket": true,
"isMaxOneTicketPerPerson": true,
"isUniqueItem": true,
"supportsWeatherGuarantee": true,
"hasWeatherGuarantee": true,
"personFieldsDefinition": {}
}
],
"currency": "<string>",
"listPriceGross": 123,
"listPriceNet": 123,
"promoCodes": [
{
"id": 123,
"code": "<string>",
"displayName": "<string>",
"description": "<string>",
"discount": 123,
"valid": true,
"totalAmount": 123
}
],
"promoCodeDiscount": 123,
"subscriptionConfiguration": {
"startsOn": "2023-11-07T05:31:56Z",
"nextBillingDate": "2023-11-07T05:31:56Z",
"hasPickup": true,
"startConfiguration": "CURRENT_DAY",
"minimalRunPeriods": 123,
"renewal": {
"period": "DAYS",
"day": null,
"month": null,
"daysAmount": 123
}
},
"autoDiscounts": [
{
"id": 123,
"displayName": "<string>",
"description": "<string>",
"discount": 123
}
],
"autoDiscountAmount": 123,
"totalDiscountGross": 123,
"totalDiscountNet": 123,
"totalSubscriptionGross": 123,
"totalSubscriptionNet": 123,
"donation": {
"type": "DONATION",
"amount": 123
},
"totalGross": 123,
"totalNet": 123,
"requiresOwner": true,
"requiresBillingAddress": true,
"requiresShippingAddress": true,
"billingAddress": {
"id": 123,
"addressLine1": "<string>",
"addressLine2": "<string>",
"zip": "<string>",
"city": "<string>",
"state": "<string>",
"countryCode": "<string>",
"purpose": []
},
"shippingAddress": {
"id": 123,
"addressLine1": "<string>",
"addressLine2": "<string>",
"zip": "<string>",
"city": "<string>",
"state": "<string>",
"countryCode": "<string>",
"purpose": []
},
"paymentMethod": {
"provider": "EGUMA",
"type": "voucher",
"id": 123,
"isDefault": true,
"code": "<string>"
},
"vouchers": [
{
"code": "<string>",
"amount": 123
}
],
"canUsePromoCodes": true,
"canUseVouchers": true,
"metadata": {
"weatherGuarantee": {}
}
}
}Headers
Language of the response
Available options:
en, de, fr, it UUID of the sales channel
Path Parameters
Body
application/json
Response
200 - application/json
Successful response
Show child attributes
Show child attributes
⌘I

