# Constraint `Constraints` can do different things, depending on the context they're used in: - In the context of a `Location`, access to the location is only allowed if the given constraint applies. - In the context of a `Trip`, constraints can be used to define constraints that have to be met during the trip, e.g. if the temperature in a refrigerated trailer has to stay below a given maximum during the trip. - In the context of a `Shipment`, constraints can be used to e.g. define minimum or maximum temperatures for shipments, or date time constraints for delivery. Since OTM5.2 the _timeWindowConstraint_ is supported which allows you to give (optionally) both the start and end time of the window between which something needs to occur. This replaces the old style where you had to use an _and_ constraint in combination with the _startDateTimeConstraint_ and _endDateTimeConstraint_. Since the new solution is shorter and simpler the _startDateTimeConstraint_ and _endDateTimeConstraint_ are **deprecated**. Note that constraints can be nested and combined using the `andConstraint`, `orConstraint` and `notConstraint`. ## Get a specific Constraint by its UUID - [GET /api/v5/constraints/{UUID}](https://otm-api-spec.redocly.app/api/5.7/otm/constraint/paths/~1api~1v5~1constraints~1%7Buuid%7D/get.md) ## Deletes a Constraint - [DELETE /api/v5/constraints/{UUID}](https://otm-api-spec.redocly.app/api/5.7/otm/constraint/paths/~1api~1v5~1constraints~1%7Buuid%7D/delete.md) ## Adds a new Constraint - [PUT /api/v5/constraints](https://otm-api-spec.redocly.app/api/5.7/otm/constraint/paths/~1api~1v5~1constraints/put.md)