Contents
On this page

Get Space Type - Plugixa Car Parking

GET /plugixa-car-parking/v1/space-types/{id}

Read one space type.

The signed-in user needs the plugixa_carparking_view capability (read records).

Request

GET https://your-site.example/wp-json/plugixa-car-parking/v1/space-types/2

Path parameters

Name Type Description
id integer The space type’s id

Responses

200 OK. data is the space type.

{
  "success": true,
  "data": {
    "id": 2,
    "language_code": null,
    "translation_group": null,
    "name": "Covered car space",
    "slug": "covered-car-space",
    "description": "<p>Under cover, on level -1.</p>",
    "icon": "car",
    "color": "#1976d2",
    "width": 2.5,
    "length": 5,
    "dimension_unit": "m",
    "features": { "covered": true },
    "display_order": 1,
    "status": "active",
    "created_by": 1,
    "modified_by": 1,
    "created_at": "2026-11-12 09:30:00",
    "modified_at": "2026-11-12 10:05:00",
    "deleted_at": null
  }
}
Field Type Meaning
data.id integer The space type’s id
data.name string Name shown to customers
data.slug string Unique across the site
data.description string|null HTML
data.width, data.length number|null Dimensions, in dimension_unit
data.features object|null Your own key/value pairs
data.display_order integer Position in lists
data.status string active or inactive
data.modified_at string UTC datetime of the last change. Send it back on an update to detect conflicts

The prices are read separately, with Space Type Prices.

Errors

Status Code When
404 plugixa_carparking_not_found No space type 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/space-types/2" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/space-types/2');
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/space-types/2', {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share