# Upsert order-depot restriction set

Create or update an order-depot restriction set. A unique ID is required to identify the set.
Calling this endpoint with an existing ID will update the set.

Endpoint: PUT /settings/order-depot-restriction-sets/{id}
Version: 1.28.1
Security: clientCredentials

## Security:

  - `clientCredentials` (unknown)
    oauth2

## Path parameters:

  - `id` (string, required)
    The unique identifier of an entity

## Header parameters:

  - `If-Match` (string)
    Weak Etag used for optimistic locking.

## Request fields (application/json):

  - `id` (string)
    Example: cb1fb12c-0abc-413c-a69d-63c62566685f

  - `name` (string, required)
    The name of the order-depot restriction set
    Example: Operationeel

  - `restrictions` (array, required)
    List of order-depot restrictions in this set

  - `restrictions.type` (string, required)
    Type of order-depot restriction:
- `ORDER_REQUIRES_DEPOT`
 - Orders with the given label can only be (un)loaded at depots with the given label
- `DEPOT_REQUIRES_ORDER`
 - At depots with the given label only orders with the given label can be (un)loaded
- `FORBIDDEN_COMBINATION`
 - Orders with the given label cannot be (un)loaded at depots with the given label
    Enum: "ORDER_REQUIRES_DEPOT", "DEPOT_REQUIRES_ORDER", "FORBIDDEN_COMBINATION"

  - `restrictions.order` (object, required)
    Label condition applied to an order.

  - `restrictions.order.label` (string, required)
    Example: frozen

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

  - `restrictions.depot` (object, required)
    Label condition applied to a depot.

## Response 201:

  - `201` (unknown)
    order-depot restriction 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"

## Response 204:

  - `204` (unknown)
    order-depot restriction set updated successfully

## Response 204 headers:

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

## 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

## Response 412:

  - `412` (unknown)
    This status is returned when an entity is updated with an outdated version in the If-Match header.

## Response 412 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.

