# Upsert depot set

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

Endpoint: PUT /locations/depot-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 depot set
    Example: Belgian Depots

  - `depots` (array, required)
    List of depots in this set

  - `depots.name` (string, required)
    Name of the depot
    Example: Depot Ghent

  - `depots.address` (object, required)
    Address information for the depot.
When geo_point is provided, address fields (address_line, city, zip_code, country_code) are optional.
When geo_point is omitted, address fields must be provided so that the address can be geo-coded.

  - `depots.address.address_line` (string)
    The part of the address that includes the street name, house number, bus number etc.
Required when omitting `geo_point`.
    Example: Voordries 41

  - `depots.address.city` (string)
    City name. Required when omitting `geo_point`.
    Example: Oosterzele

  - `depots.address.zip_code` (string)
    Postal code. Required when omitting `geo_point`.
    Example: 9860

  - `depots.address.country_code` (string)
    represents the ISO3166-1 alpha-2 two letter country codes
    Example: BE

  - `depots.address.geo_point` (object)

  - `depots.address.geo_point.latitude` (number, required)
    Example: 50.9514048

  - `depots.address.geo_point.longitude` (number, required)
    Example: 3.8067878

  - `depots.stop_time` (string)
    Stop time at the depot in ISO-8601 duration format
    Example: PT5M

  - `depots.labels` (array)
    Labels assigned to this depot, used in features such as order-depot restrictions to target depots with certain labels

## Response 201:

  - `201` (unknown)
    depot 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)
    depot 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.

