Contents
On this page

Get Pricing Rule - Plugixa Chauffeur

GET /plugixa-chauffeur/v1/pricing-rules/{id}

Read one pricing rule.

Needs Plugixa Chauffeur Pro with an active licence. Needs a signed-in user with the plugixa_chauffeur_manage capability (administrators have it after activation).

Request

GET https://your-site.example/wp-json/plugixa-chauffeur/v1/pricing-rules/4

Path parameters

Name Type Description
id integer The pricing rule’s id

Responses

200 OK. data is the pricing rule.

{
  "success": true,
  "message": "",
  "data": {
    "id": "4",
    "name": "Weekend surcharge",
    "status": "active",
    "priority": 10,
    "conditions": {
      "service_types": [
        "distance",
        "hourly"
      ],
      "days_of_week": [
        0,
        6
      ]
    },
    "adjustment_type": "increase_percent",
    "adjustment_value": 15.0,
    "apply_to": "total",
    "stop_processing": false,
    "display_order": 0,
    "created_at": "2026-11-12 09:30:00"
  }
}
Field Type Meaning
data.id string The rule id, as a string
data.status string active or inactive. Only active rules run
data.priority integer Lower runs first
data.conditions object|array What a trip must match. An empty [] when the rule has no conditions
data.adjustment_type string set_value, increase_value, decrease_value, increase_percent or decrease_percent
data.adjustment_value number The amount or the percentage
data.apply_to string Stored, but the rule engine does not read it: rules always change the total
data.stop_processing boolean When the rule matches, no later rule runs
data.display_order integer Tie-breaker after priority

Errors

Status Code When
404 rest_error No pricing rule with that id.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-chauffeur/v1/pricing-rules/4" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-chauffeur/v1/pricing-rules/4');
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-chauffeur/v1/pricing-rules/4', {
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data } = await response.json();

Quick Links

Share