Contents
On this page

Get Pricing Rule - Plugixa Car Parking

GET /plugixa-car-parking/v1/pricing-rules/{id}

Read one pricing rule.

Needs Plugixa Car Parking Pro. The WordPress user needs the plugixa_carparking_view capability (view records).

Request

GET https://your-site.example/wp-json/plugixa-car-parking/v1/pricing-rules/6

Path parameters

Name Type Description
id integer The pricing rule’s id

Responses

200 OK. data is the pricing rule.

{
  "success": true,
  "data": {
    "id": 6,
    "name": "Weekend surcharge",
    "priority": 10,
    "status": "active",
    "conditions": {
      "date_from": "",
      "date_to": "",
      "weekdays": [0, 6],
      "time_from": "",
      "time_to": "",
      "duration_min": null,
      "duration_max": null,
      "location_ids": [2],
      "space_type_ids": [],
      "customer_group_ids": []
    },
    "price_source": "rate",
    "alter_type": "inc_percent",
    "amount": 15.0,
    "billing_type": null,
    "created_by": 1,
    "modified_by": 1,
    "created_at": "2026-11-12 09:30:00",
    "modified_at": "2026-11-12 09:30:00",
    "deleted_at": null
  }
}
Field Type Meaning
data.id integer The rule’s id
data.name string Shown to the customer beside the price it changed
data.priority integer Matching rules are applied lowest first
data.status string active or inactive
data.alter_type string set, inc_value, dec_value, inc_percent or dec_percent
data.amount number The amount or percentage the change uses
data.price_source string rate (the price per billing unit) or initial (the fee charged once per booking)
data.billing_type string|null The one billing unit the rule is limited to, or null for every unit
data.conditions object When the rule applies. Every key is always present; see the conditions table on Create Pricing Rule
data.created_at string UTC datetime
data.modified_at string UTC datetime of the last change. Send it back on an update to have the change refused if somebody else saved first
data.deleted_at string|null null unless the record is in the trash

Errors

Status Code When
404 plugixa_carparking_not_found No pricing rule with that id, or it is in the trash.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share