# Create order-vehicle preference set (deprecated)

Create a new order-vehicle preference set
Every rule must use the `INCLUDING` operator and specify a `fine`; requests using the `EXCLUDING`
operator or omitting `fine` are rejected with `400 Bad Request`.
Deprecated. Use `createOrderVehicleRestrictionSet` instead.

Endpoint: POST /settings/order-vehicle-preference-sets
Version: 1.28.1
Security: clientCredentials

## Security:

  - `clientCredentials` (unknown)
    oauth2

## Request fields (application/json):

  - `name` (string, required)
    The name of the order-vehicle preference set
    Example: Heavy goods require large trucks

  - `order_vehicle_preferences` (array, required)
    List of order-vehicle preferences in this set

  - `order_vehicle_preferences.order_label` (string)
    Deprecated. Use `order` instead. Label that identifies matching orders.
    Example: fragile

  - `order_vehicle_preferences.vehicle_label` (string)
    Deprecated. Use `vehicle` instead. Label that identifies matching vehicles.
    Example: careful-truck

  - `order_vehicle_preferences.order` (object)
    Deprecated. A label condition for order-vehicle preferences. Only the `INCLUDING` operator is supported;
`EXCLUDING` is available exclusively through the order-vehicle restrictions API.

  - `order_vehicle_preferences.order.label` (string, required)
    Example: fragile

  - `order_vehicle_preferences.order.operator` (string, required)
    Enum: "INCLUDING"

  - `order_vehicle_preferences.type` (string, required)
    Defines the relationship between the order label and vehicle label:
- `FORBIDDEN_COMBINATION`
 - Orders with the specified label are penalized when assigned to vehicles with the specified label.
- `ORDER_REQUIRES_VEHICLE`
 - Orders with the specified label require vehicles with the specified label; a fine is applied if assigned to a different vehicle.
- `VEHICLE_REQUIRES_ORDER`
 - Vehicles with the specified label require orders with the specified label; a fine is applied if assigned different orders.
    Enum: "ORDER_REQUIRES_VEHICLE", "FORBIDDEN_COMBINATION", "VEHICLE_REQUIRES_ORDER"

  - `order_vehicle_preferences.fine` (number, required)
    Violation cost applied when this preference is violated during planning. Higher values make violations less likely. Required on write; hard constraints (absent fine) are not supported by this deprecated API.
    Example: 42.5

## Response 201:

  - `201` (unknown)
    order-vehicle preference set created successfully

## Response 201 headers:

  - `ETag` (string)
    A weak Etag (ex `W/"<etag_value>"`) which contains the current version of the entity
    Example: W/"25"

  - `Location` (string)
    Location of the created resource

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/problem+json):

  - `type` (string, required)
    An absolute URI that identifies the problem type.  When dereferenced,
it SHOULD provide human-readable documentation for the problem type
(e.g., using HTML).
    Example: https://developer.conundra.eu/developer-portal/problem/#constraint-violation

  - `title` (string, required)
    A short, summary of the problem type. Written in english and readable
for engineers (usually not suited for non technical stakeholders and
not localized)
    Example: Bad Request

  - `status` (integer, required)
    The HTTP status code generated by the origin server for this occurrence
of the problem.
    Example: 400

  - `detail` (string, required)
    A human readable explanation specific to this occurrence of the
problem.
    Example: Bad request. See violations for more details.

  - `violations` (array)

  - `violations.field` (string)
    A reference to the field in the request that triggered this violation.
    Example: limit

  - `violations.message` (string, required)
    A message explaining the violation in the referenced field.
    Example: Limit must be strictly positive.

## Response 401:

  - `401` (unknown)
    Authentication required

