> For the complete documentation index, see [llms.txt](https://developer.smarts.ee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.smarts.ee/general/data-object-description/inspection.md).

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