# Inspection

## BetweenTimeInspection&#x20;

Applies if the current time does not belong to the start and end parameters range. If the rule is not set, it is allowed to buy the product at all times.

| Field    | Type                                                                                           | Required | Description                                                                    |
| -------- | ---------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------ |
| start    | Time (HH:MM)                                                                                   | Yes      | Start time when a product can be purchased (hours:minutes)                     |
| end      | Time (HH:MM)                                                                                   | Yes      | End time when a product can be purchase (hours:minutes)                        |
| timezone | Timezone UTC                                                                                   | Yes      | Time zone in UTC format                                                        |
| action   | [**InspectionType**](/general/data-object-description/inspection.md#enum-type-possible-values) | Yes      | <p>Take a purchase check or disable the product in the</p><p>shopping card</p> |

#### Example

*Product adding to shopping card is allowed only if current time between 10:00 and 22:00. Otherwise adding restricted.*

```javascript
{
    "action" : "RESTRICT",
    "start" : "10:00",
    "end": "22:00",
    "timezone" : "Europe/Tallinn",
    "type": "BETWEEN_TIME"
}
```

## MinTimeInspection

Applies if the current time is less than the set time value. If the rule is not set, it is allowed to buy the product at all times.

| Field    | Type                                                                                           | Required | Description                                                                    |
| -------- | ---------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------ |
| time     | Time (HH:MM)                                                                                   | Yes      | Time (hours:minutes)                                                           |
| timezone | Timezone UTC                                                                                   | Yes      | Time zone in UTC format                                                        |
| action   | [**InspectionType**](/general/data-object-description/inspection.md#enum-type-possible-values) | Yes      | <p>Take a purchase check or disable the product in the</p><p>shopping card</p> |

## MaxTimeInspection

Applies if the current time is greater than the set time value. If the rule is not set, it is allowed to buy the product at all times.

| Field    | Type                                                                                           | Required | Description                                                                    |
| -------- | ---------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------ |
| time     | Time (HH:MM)                                                                                   | Yes      | Time                                                                           |
| timezone | Timezone UTC                                                                                   | Yes      | Time zone                                                                      |
| action   | [**InspectionType**](/general/data-object-description/inspection.md#enum-type-possible-values) | Yes      | <p>Take a purchase check or disable the product in the</p><p>shopping card</p> |

## MinAgeInspection

Applies if rule is set.

| Field  | Type                                                                                           | Required | Description                                                                    |
| ------ | ---------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------ |
| age    | Integer                                                                                        | Yes      | Age                                                                            |
| action | [**InspectionType**](/general/data-object-description/inspection.md#enum-type-possible-values) | Yes      | <p>Take a purchase check or disable the product in the</p><p>shopping card</p> |

#### Example

*Customer should be at least 18 years old to allow product purchase.*&#x20;

```javascript
{
    "action" : "INSPECT",
    "age" : 18,
    "type" : "MIN_AGE"
}
```

## MinAmountInspection

Applies when product quantity is less than amount.

| Field  | Type                                                                                           | Required | Description                                                                    |
| ------ | ---------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------ |
| amount | Double                                                                                         | Yes      | Product quantity                                                               |
| action | [**InspectionType**](/general/data-object-description/inspection.md#enum-type-possible-values) | Yes      | <p>Take a purchase check or disable the product in the</p><p>shopping card</p> |

## MaxAmountInspection

Applies when product quantity is greater than amount.

| Field  | Type                                                                                           | Required | Description                                                                    |
| ------ | ---------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------ |
| amount | Double                                                                                         | Yes      | Product quantity                                                               |
| action | [**InspectionType**](/general/data-object-description/inspection.md#enum-type-possible-values) | Yes      | <p>Take a purchase check or disable the product in the</p><p>shopping card</p> |

## Enum type possible values

| AdditionType |                                                           |
| ------------ | --------------------------------------------------------- |
| INSPECT      | Allow adding to shopping card but inspect before purchase |
| RESTRICT     | Restrict adding to shopping cart.                         |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.smarts.ee/general/data-object-description/inspection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
