Contents
On this page

List Pricing Rules - Plugixa Car Parking

GET /plugixa-car-parking/v1/pricing-rules

List pricing rules, one page at a time. Every active rule that matches a booking changes its price.

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?status__in=active&orderby=priority&order=asc

Query parameters

The list parameters every paged list accepts. search matches the name. orderby accepts id, name, priority, status, amount, created_at and modified_at; anything else sorts by id. view=trash lists trashed pricing rules only.

Filterable fields: status, price_source, alter_type and billing_type (in, ne, empty, not_empty), priority and amount (number comparisons), and created_at and modified_at (date comparisons). For example alter_type__in=dec_percent,dec_value. See Filtering lists for the syntax.

Responses

200 OK. data is one page of pricing rules.

{
  "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
    }
  ],
  "meta": {
    "total": 3,
    "pages": 1
  }
}
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
meta.total integer Pricing Rules matching the search and filters, before paging
meta.pages integer Number of pages at this per_page

Errors

Status Code When
400 plugixa_carparking_unknown_filter A filter names a field this list cannot filter on.
400 plugixa_carparking_unknown_operator A filter uses an operator that does not work on that field.
400 plugixa_carparking_missing_value A filter has no value.
400 plugixa_carparking_invalid_date A date filter has a value that is not a date.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-car-parking/v1/pricing-rules?status__in=active&orderby=priority&order=asc" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$query = http_build_query(['status__in' => 'active', 'orderby' => 'priority', 'order' => 'asc']);
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/pricing-rules?' . $query);
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 query = new URLSearchParams({ status__in: 'active', orderby: 'priority', order: 'asc' });
const response = await fetch(`https://your-site.example/wp-json/plugixa-car-parking/v1/pricing-rules?${query}`, {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data, meta } = await response.json();

Quick Links

Share