# Get a conditional by Id This endpoint allows you to get the information about a given conditional. Endpoint: GET /conditionals/{id} Version: 1.6.1 Security: clientCredentials ## Path parameters: - `id` (string, required) The generated identifier of an entity instance ## Response 200 fields (application/json): - `id` (string) A generated identifier for a conditional. The identifier is returned in both the Location header and (optional) response body when creating the Conditional. Example: "624ec196-4c5c-4fb4-bb43-9ffd8a6b8844" - `name` (string) A short name for the Conditional Example: "a name" - `description` (string) A description for the conditional, helpful in determining the why or what. Example: "a description" - `conditions` (object, required) The rules that will determine whether this conditional is applicable to an order or not. At least one conditional needs to be provided. The different top-level conditions are combined with AND logic, ie: they all need to match for an order to match this conditional. - `conditions.locations` (array) Use this condition to target orders based on their site_location, by providing the Location's business ID in the list. When providing multiple references, only one of the Locations needs to be present on the Order. Example: ["locationA"] - `conditions.temporals` (array) This is a time-based condition for targeting orders. Each temporal condition provided will look for orders where at least one timeFrame (either absolute or windowed) overlaps with this range. Should the order contain timeframes without an end_at, the default period of two weeks will be used to determine whether the timeframe overlaps with the temporal condition. When providing multiple temporal conditions, only one of them needs to match the order's timeframe. - `conditions.temporals.start_at` (string, required) The ISO-8601 formatted start date of the interval. Example: "2021-01-01T10:15:30Z" - `conditions.temporals.end_at` (string, required) The ISO-8601 formatted end date of the interval. Example: "2021-01-01T10:15:30Z" - `conditions.categories` (array) When providing filters on categories of multiple types, each type needs to match for an order to match the condition. - `conditions.categories.entity_type` (string, required) The entity type for which this category needs to be present. within a conditional, only LOCATION and ORDER entities are supported. When using the LOCATION entity type, all orders linked to this location will be targeted. - `conditions.categories.categories` (array, required) A list of categories (defined by their code), of which one needs to be present on the specified entity for the order to match. Example: ["my-category"] - `conditions.clients` (array) A list of references to Companies (identified by their business id). When any company is present on an order's (_optional_) transport request, the order matches the condition. Example: ["company-id"] - `effects` (object, required) At least one property has to be filled. - `effects.stop_time` (string) An ISO-formatted Duration, see [wikipedia ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) and [RFC-3339](https://datatracker.ietf.org/doc/html/rfc3339) - `effects.time_windows` (array) - `effects.time_windows.open_time` (string, required) Time supports 00:00-23:59h - `effects.time_windows.open_day` (string, required) Corresponding to the days of the week, starting on Monday. Enum: "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY" - `effects.time_windows.close_time` (string, required) Time supports 00:00-23:59h - `effects.time_windows.close_day` (string, required) Corresponding to the days of the week, starting on Monday. Enum: "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY" - `effects.time_windows.cost` (number) The cost of a time window can be use to steer the optimization, where it wil prefer a lower cost. It's recommended to use integer values as decimal precision is not guaranteed. - `effects.requirements` (object) Requirements that have to be fulfilled by the executor of an order at this location. - `effects.requirements.tags` (array) Properties that MUST be present on the executor. Example: ["tagX"] - `effects.requirements.forbidden_tags` (array) Properties that MUST NOT be present on the executor. Example: ["tagY"] ## Response 404 fields (application/problem+json): - `type` (string) 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://api.conundra.eu/problem/constraint-violation" - `title` (string) 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: Service Unavailable Example: "Invalid ..." - `status` (integer) The HTTP status code generated by the origin server for this occurrence of the problem. Example: 400 - `detail` (string) A human readable explanation specific to this occurrence of the problem. Example: "string" - `instance` (string) An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. Example: "https://api.conundra.eu/orderbook/v1/orders/deliveries/chilled" - `violations` (array) - `violations.field` (string) A reference to the field in the request that triggered this violation. Example: "class.field" - `violations.message` (string) A message explaining the violation in the referenced field. Example: "a violation message"