Contents
On this page

List Pricing Rules - Plugixa Car Rental

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

List pricing rules, one page at a time.

Needs Plugixa Car Rental Pro with the Pricing rules app on. The user needs the plugixa_car_rental_view capability.

Request

GET https://your-site.example/wp-json/plugixa-car-rental/v1/pricing-rules?orderby=priority&order=asc

Query parameters

This list takes the list parameters every paged list accepts. search matches name. orderby accepts id, name, priority, amount, status, created_at, modified_at.

Filters, as described in Filtering lists: status (in, ne, empty, not_empty), adjustment (in, ne, empty, not_empty), created_at and modified_at (dates).

Responses

200 OK. data is one page of pricing rules.

{
  "success": true,
  "data": [
    {
      "id": 3,
      "name": "Weekend in Paris",
      "priority": 10,
      "adjustment": "percent",
      "amount": 15.0,
      "stop": false,
      "conditions": {
        "model_ids": [],
        "location_ids": [
          1
        ],
        "date_from": "",
        "date_to": "",
        "weekdays": [
          6,
          7
        ],
        "min_days": 0,
        "max_days": 0,
        "min_lead_days": 0,
        "max_lead_days": 0
      },
      "status": "published",
      "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": 4,
    "pages": 1
  }
}
Field Type Meaning
data[].id integer The rule’s id
data[].name string Shown to customers on the price line it adds
data[].priority integer Rules run lowest first, 0 to 9999
data[].adjustment string percent, fixed or set
data[].amount number Percentage, amount added per day, or the day’s new price
data[].stop boolean Whether later rules are skipped on a day this rule applies to
data[].conditions object When the rule applies. See the request body
data[].status string published or unpublished. Only a published rule applies
meta.total integer Pricing Rules matching the search and filters, before paging
meta.pages integer Number of pages at this per_page

Each day of a rental starts at the rate plan’s daily rate. The published rules whose conditions fit are then applied in priority order, each to the result of the one before, and a day never goes below 0. A rule with stop ends the run for that day. Each rule that changed the price adds one line to the quote. See Pricing rules.

Errors

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share