Contents
On this page

Get Gift Card - Plugixa POS for WooCommerce

GET /plugixa-pos/v1/gift-cards/{id}

One card and its ledger.

Needs a user with the plugixa_pos_manage_settings capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; other roles only when you grant it.

Request

GET https://your-site.example/wp-json/plugixa-pos/v1/gift-cards/3

Path parameters

Name Type Description
id integer The gift card’s id

Responses

200 OK.

{
  "success": true,
  "data": {
    "id": 3,
    "code": "GCFB39G22VGVYD",
    "display": "GC-FB39-G22V-GVYD",
    "balance": "1.00",
    "initial": "25.00",
    "status": "active",
    "customer_id": null,
    "order_id": 3974,
    "expires_at": null,
    "expired": false,
    "created_at": "2026-10-10 15:54:23",
    "ledger": [
      {
        "type": "redeem",
        "amount": "-24.00",
        "balance_after": "1.00",
        "order_id": 4050,
        "note": "",
        "user": "Paul Girard",
        "created_at": "2026-10-16 10:49:08"
      },
      {
        "type": "issue",
        "amount": "25.00",
        "balance_after": "25.00",
        "order_id": 3974,
        "note": "",
        "user": "Emma Laurent",
        "created_at": "2026-10-10 15:54:23"
      }
    ]
  }
}
Field Type Meaning
data.id integer The card’s id
data.code string Code as stored, without dashes
data.display string Code as printed
data.balance string Balance
data.initial string Amount when sold
data.status string active or disabled
data.customer_id integer|null Customer, when known
data.order_id integer The sale that issued it
data.expires_at string|null Expiry date Y-m-d, null for none
data.expired boolean Past its expiry date
data.ledger object[] Every movement, newest first: type (issue, redeem, adjust…), amount, balance_after, order_id, note, user, created_at

Errors

Status Code When
404 plugixa_pos_not_found No gift card with that id.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-pos/v1/gift-cards/3" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/gift-cards/3');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/gift-cards/3', {
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share