curl --request POST \
--url https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"voucherSetId": 2030,
"quantity": 2
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{voucherSetId: 2030, quantity: 2}]})
};
fetch('https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch"
payload = { "items": [
{
"voucherSetId": 2030,
"quantity": 2
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"voucherSetId\": 2030,\n \"quantity\": 2\n }\n ]\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch"
payload := strings.NewReader("{\n \"items\": [\n {\n \"voucherSetId\": 2030,\n \"quantity\": 2\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch",
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([
'items' => [
[
'voucherSetId' => 2030,
'quantity' => 2
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": 16017,
"resource": "redemption-batch",
"itemCount": 2,
"actor": {
"type": "api-key",
"id": 12017,
"label": "Production integration"
},
"createdAt": "2026-10-22T08:31:00Z",
"items": [
{
"id": 6043,
"resource": "redemption",
"status": "completed",
"channel": "api",
"providerPartnerId": 1030,
"voucherSetId": 2030,
"voucherSetRevisionNo": 2,
"voucherId": 5056,
"voucherSet": {
"id": 2030,
"name": {
"de": "5 € Fahrguthaben",
"en": "€5 ride credit"
},
"providerDisplayName": {
"de": "Acme Scooters",
"en": "Acme Scooters"
}
},
"issued": {
"kind": "code",
"code": "ACME5-AAAA-0001",
"link": "https://acme-scooters.example.com/r?c=ACME5-AAAA-0001"
},
"validFrom": null,
"validUntil": "2026-12-31T22:59:59Z",
"redemptionEntity": {
"id": 9017,
"resource": "redemption-entity",
"refId": "customer:48213",
"_links": {
"self": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-entities/9017",
"type": "application/json"
}
}
},
"redemptionLink": null,
"batchId": 16017,
"metadata": {
"redemptionReason": "new-customer-bonus"
},
"actor": {
"type": "api-key",
"id": 12017,
"label": "Production integration"
},
"idempotencyKey": "bonus:42",
"legacyRef": null,
"redeemedAt": "2026-10-21T17:42:10.120Z",
"voidedAt": null,
"voidedBy": null,
"voidReason": null,
"_links": {
"self": {
"href": "https://api.voucher.allride.io/consumer/v1/redemptions/6043",
"type": "application/json"
},
"voucherSet": {
"href": "https://api.voucher.allride.io/consumer/v1/catalog/voucher-sets/2030",
"type": "application/json"
},
"redemptionEntity": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-entities/9017",
"type": "application/json"
},
"batch": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-batches/16017",
"type": "application/json"
}
}
},
{
"id": 6056,
"resource": "redemption",
"status": "completed",
"channel": "api",
"providerPartnerId": 1030,
"voucherSetId": 2030,
"voucherSetRevisionNo": 2,
"voucherId": 5069,
"voucherSet": {
"id": 2030,
"name": {
"de": "5 € Fahrguthaben",
"en": "€5 ride credit"
},
"providerDisplayName": {
"de": "Acme Scooters",
"en": "Acme Scooters"
}
},
"issued": {
"kind": "code",
"code": "ACME5-AAAA-0002",
"link": "https://acme-scooters.example.com/r?c=ACME5-AAAA-0002"
},
"validFrom": null,
"validUntil": "2026-12-31T22:59:59Z",
"redemptionEntity": {
"id": 9017,
"resource": "redemption-entity",
"refId": "customer:48213",
"_links": {
"self": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-entities/9017",
"type": "application/json"
}
}
},
"redemptionLink": null,
"batchId": 16017,
"metadata": {
"redemptionReason": "new-customer-bonus"
},
"actor": {
"type": "api-key",
"id": 12017,
"label": "Production integration"
},
"idempotencyKey": "bonus:42",
"legacyRef": null,
"redeemedAt": "2026-10-21T17:42:10.120Z",
"voidedAt": null,
"voidedBy": null,
"voidReason": null,
"_links": {
"self": {
"href": "https://api.voucher.allride.io/consumer/v1/redemptions/6056",
"type": "application/json"
},
"voucherSet": {
"href": "https://api.voucher.allride.io/consumer/v1/catalog/voucher-sets/2030",
"type": "application/json"
},
"redemptionEntity": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-entities/9017",
"type": "application/json"
},
"batch": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-batches/16017",
"type": "application/json"
}
}
}
],
"_links": {
"self": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-batches/16017",
"type": "application/json"
}
}
}
}Redeem several vouchers in one request
Redeems up to 10 vouchers in one all-or-nothing transaction. Each item needs quantity distinct claimable vouchers; a multi-use voucher counts once per batch, so quantity above 1 on a set whose only stock is one shared code fails with 409 voucher-set-depleted. A failing item rolls back the whole batch and more.validationErrors[].property is items[<index>]. One Idempotency-Key covers the batch and is stored on every redemption. See Redeeming vouchers.
Required permissions: create-consumer-redemptions · API keys: allowed
curl --request POST \
--url https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"voucherSetId": 2030,
"quantity": 2
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({items: [{voucherSetId: 2030, quantity: 2}]})
};
fetch('https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch"
payload = { "items": [
{
"voucherSetId": 2030,
"quantity": 2
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"voucherSetId\": 2030,\n \"quantity\": 2\n }\n ]\n}")
.asString();package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch"
payload := strings.NewReader("{\n \"items\": [\n {\n \"voucherSetId\": 2030,\n \"quantity\": 2\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.voucher-staging.allride.io/consumer/v1/redemptions:batch",
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([
'items' => [
[
'voucherSetId' => 2030,
'quantity' => 2
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": 16017,
"resource": "redemption-batch",
"itemCount": 2,
"actor": {
"type": "api-key",
"id": 12017,
"label": "Production integration"
},
"createdAt": "2026-10-22T08:31:00Z",
"items": [
{
"id": 6043,
"resource": "redemption",
"status": "completed",
"channel": "api",
"providerPartnerId": 1030,
"voucherSetId": 2030,
"voucherSetRevisionNo": 2,
"voucherId": 5056,
"voucherSet": {
"id": 2030,
"name": {
"de": "5 € Fahrguthaben",
"en": "€5 ride credit"
},
"providerDisplayName": {
"de": "Acme Scooters",
"en": "Acme Scooters"
}
},
"issued": {
"kind": "code",
"code": "ACME5-AAAA-0001",
"link": "https://acme-scooters.example.com/r?c=ACME5-AAAA-0001"
},
"validFrom": null,
"validUntil": "2026-12-31T22:59:59Z",
"redemptionEntity": {
"id": 9017,
"resource": "redemption-entity",
"refId": "customer:48213",
"_links": {
"self": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-entities/9017",
"type": "application/json"
}
}
},
"redemptionLink": null,
"batchId": 16017,
"metadata": {
"redemptionReason": "new-customer-bonus"
},
"actor": {
"type": "api-key",
"id": 12017,
"label": "Production integration"
},
"idempotencyKey": "bonus:42",
"legacyRef": null,
"redeemedAt": "2026-10-21T17:42:10.120Z",
"voidedAt": null,
"voidedBy": null,
"voidReason": null,
"_links": {
"self": {
"href": "https://api.voucher.allride.io/consumer/v1/redemptions/6043",
"type": "application/json"
},
"voucherSet": {
"href": "https://api.voucher.allride.io/consumer/v1/catalog/voucher-sets/2030",
"type": "application/json"
},
"redemptionEntity": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-entities/9017",
"type": "application/json"
},
"batch": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-batches/16017",
"type": "application/json"
}
}
},
{
"id": 6056,
"resource": "redemption",
"status": "completed",
"channel": "api",
"providerPartnerId": 1030,
"voucherSetId": 2030,
"voucherSetRevisionNo": 2,
"voucherId": 5069,
"voucherSet": {
"id": 2030,
"name": {
"de": "5 € Fahrguthaben",
"en": "€5 ride credit"
},
"providerDisplayName": {
"de": "Acme Scooters",
"en": "Acme Scooters"
}
},
"issued": {
"kind": "code",
"code": "ACME5-AAAA-0002",
"link": "https://acme-scooters.example.com/r?c=ACME5-AAAA-0002"
},
"validFrom": null,
"validUntil": "2026-12-31T22:59:59Z",
"redemptionEntity": {
"id": 9017,
"resource": "redemption-entity",
"refId": "customer:48213",
"_links": {
"self": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-entities/9017",
"type": "application/json"
}
}
},
"redemptionLink": null,
"batchId": 16017,
"metadata": {
"redemptionReason": "new-customer-bonus"
},
"actor": {
"type": "api-key",
"id": 12017,
"label": "Production integration"
},
"idempotencyKey": "bonus:42",
"legacyRef": null,
"redeemedAt": "2026-10-21T17:42:10.120Z",
"voidedAt": null,
"voidedBy": null,
"voidReason": null,
"_links": {
"self": {
"href": "https://api.voucher.allride.io/consumer/v1/redemptions/6056",
"type": "application/json"
},
"voucherSet": {
"href": "https://api.voucher.allride.io/consumer/v1/catalog/voucher-sets/2030",
"type": "application/json"
},
"redemptionEntity": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-entities/9017",
"type": "application/json"
},
"batch": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-batches/16017",
"type": "application/json"
}
}
}
],
"_links": {
"self": {
"href": "https://api.voucher.allride.io/consumer/v1/redemption-batches/16017",
"type": "application/json"
}
}
}
}Authorizations
Your API key in Authorization: Bearer <key>. Use vk_test_… keys against the sandbox and vk_live_… keys against production.
Headers
Optional key (1-255 printable ASCII characters, no spaces; a UUID is ideal) that makes this POST safe to retry: the same key with the same request replays the stored response for 24 hours. See Idempotency.
1 - 255^[\x21-\x7E]{1,255}$Body
All-or-nothing batch of up to 10 vouchers.
1-10 items; the sum of quantity is at most 10.
1 - 10 elementsShow child attributes
Show child attributes
An existing redemption entity for every redemption.
0 <= x <= 18446744073709552000Inline entity for every redemption.
Show child attributes
Show child attributes
Copied to every redemption.
{ "orderId": "8812", "channel": "app" }
Response
Created
Single-object envelope around a RedemptionBatch.
The result of a batch redemption.
Show child attributes
Show child attributes