Vehicle - Filters

The Admin interface handles web service calls from the Admin web gui. The base url for this is at:

/api/vehicle-admin

A JSON file with OpenAPI data about all vehicle-related admin APIs can be downloaded here.

Get Filter

Gets details about a specific filter:

GET /v1/filters/{id}

Gets details about a specific filter

Parameters
  • id (integer) – The id of the filter

Status Codes

where id is the ID of the filter whose data are needed.

Returns a Json positive response and the details of the specified filter:

{
  ID: 1,                                                      // Int
  Guid: '7c9bbcc8-0020-434c-91c4-93dfd15efe40',               // Guid
  ValueType: 3,                                               // Int
  Key: 'filter-1',                                            // String
  IsRequired: true,                                           // Boolean
  Labels:"{"en":"English name",...}",                         // String
  ValidValues:"[1,2,3,...]",                                  // String (nullable)
  ValidValueLabels:"{"1":{"en":"English label",...},...}"     // String (nullable)
}

The ValueType field can be one of the values specified into the AdditionalValueTypes enumeration.

The value of the Key property can be one of the value described in Movement Authority Filters.

The Labels field is a stringified Json containing pairs “language code”:”localized value”.

The ValidValues and ValidValueLabels fields can assume a different form depending on the ValueType value. ValidValueLabels is valorized only for enumeration and multienumeration types.

Please see Reservation Filters for further explaination.

Get Filter list

Gets the list of all filters (it’s a Paged List APIs, as explained in the introduction):

GET /v1/filters/list

Gets the list of the filters

Status Codes

Returns a paginated list of all filters:

[
  {
    ID: 1,                                                      // Int
    Guid: '7c9bbcc8-0020-434c-91c4-93dfd15efe40',               // Guid
    ValueType: 3,                                               // Int
    Key: 'filter-1',                                            // String
    IsRequired: true,                                           // Boolean
    Labels:"{"en":"English name",...}",                         // String
    ValidValues:"[1,2,3,...]",                                  // String
    ValidValueLabels:"{"1":{"en":"English label",...},...}"     // String
  },
  ...
]

The ValueType field can be one of the values specified into the AdditionalValueTypes enumeration.

The value of the Key property can be one of the value described in Movement Authority Filters.

The Labels field is a stringified Json containing pairs “language code”:”localized value”.

The ValidValues and ValidValueLabels fields can assume a different form depending on the ValueType value. ValidValueLabels is valorized only for enumeration and multienumeration types.

Please see Reservation Filters for further explaination.

Edit existing filter

Persists edits about an existing filter:

POST /v1/filters

Persists edits about a existing filter

Status Codes

The body of the request is:

{
  ID: 1,                                              // Int
  IsRequired: true,                                   // Boolean (null=false)
  Labels: "{"en":"English name",...}"                 // String
}

The Labels field is must be a stringified Json containing pairs “language code”:”localized value”.

Possible error messages are:

err_InvalidElement

No ID was provided, no filter was found for the provided ID or an empty Labels field was provided