Contents
On this page

Currency Statistics - Plugixa Multi Currency for WooCommerce

GET /plugixa-multi-currency/v1/pro/switch-stats

The Currency statistics screen. Only daily counts are stored, never anything about a shopper. See Currency statistics.

Needs a user with the plugixa_multi_currency_view capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; see Capabilities.

Note. Pro only: on the free plugin this route answers 404 rest_no_route.

Request

GET https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/switch-stats?days=30

Query parameters

Field Type Required Description
days integer No The last N days, today included, 1 to 366. Defaults to 30.

Responses

200 OK.

{
  "success": true,
  "data": {
    "days": 30,
    "base_currency": "USD",
    "currencies": [
      {
        "currency": "EUR",
        "switches": 261,
        "orders": 21,
        "chosen_orders": 11,
        "revenue_base": "1422.83",
        "conversion": 4.2
      },
      "..."
    ],
    "sources": [
      {
        "source": "manual",
        "switches": 378,
        "orders": 10
      },
      {
        "source": "url",
        "switches": 95,
        "orders": 4
      },
      {
        "source": "detected",
        "switches": 411,
        "orders": 28
      },
      "..."
    ],
    "daily": [
      {
        "date": "2026-10-22",
        "switches": 23,
        "orders": 1
      },
      "..."
    ]
  }
}
Field Type Meaning
currencies object[] Per currency, most switches first: switches to it, orders placed in it, chosen_orders (orders whose currency the shopper chose), revenue_base and conversion, chosen_orders per 100 switches, null with no switch
sources object[] Per source of the order currency: manual (a switcher), url (a currency URL), checkout (the checkout country), detected (language, address or geolocation), default (the store currency)
daily object[] One line per day of the period, in your site’s time zone, days with nothing included

Errors

Status Code When
401 / 403 rest_forbidden The caller lacks the capability: Sorry, you are not allowed to do that.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/switch-stats?days=30" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-store.example/wp-json/plugixa-multi-currency/v1/pro/switch-stats?days=30');
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-store.example/wp-json/plugixa-multi-currency/v1/pro/switch-stats?days=30', {
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share