Contents
On this page
Get Gift Card Ledger - Plugixa Car Wash
GET /plugixa-carwash/v1/gift-cards/{id}/ledger
List every movement on a gift card’s balance, newest first: spent on bookings, returned on cancellation, and adjusted by staff.
Needs Plugixa Car Wash Pro with the Gift cards app on, and the plugixa_carwash_view capability.
Note. The card is not looked up first: an id that does not exist answers
200with an empty list. The opening balance is not a ledger line.
Request
GET https://your-site.example/wp-json/plugixa-carwash/v1/gift-cards/11/ledger
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The gift card’s id |
Responses
200 OK. data is the ledger.
{
"success": true,
"data": [
{
"id": 31,
"booking_id": null,
"booking_number": null,
"amount": 10.0,
"note": "Goodwill top-up",
"created_at": "2026-11-12 10:40:00"
},
{
"id": 27,
"booking_id": 42,
"booking_number": "CW2026-0042",
"amount": -14.5,
"note": "CW2026-0042",
"created_at": "2026-11-08 14:02:00"
}
]
}
| Field | Type | Meaning |
|---|---|---|
data[].amount |
number |
Positive added, negative spent |
data[].booking_id |
integer|null |
The booking it was spent on or returned from |
data[].booking_number |
string|null |
That booking’s reference |
data[].note |
string |
Why |
data[].created_at |
string |
UTC datetime |
Errors
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-carwash/v1/gift-cards/11/ledger" \
-u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-carwash/v1/gift-cards/11/ledger');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = Buffer.from(`admin:${process.env.WP_APP_PASSWORD}`).toString('base64');
const response = await fetch('https://your-site.example/wp-json/plugixa-carwash/v1/gift-cards/11/ledger', {
headers: {
'Authorization': `Basic ${auth}`,
},
});
const { data } = await response.json();
Quick Links
Share