# Conditional activation

## Get conditional activation

<mark style="color:green;">`POST`</mark> `https://api.zapiet.com/v1.0/:checkoutMethod/conditional_activation`

This endpoint will return a list of conditional activations.

#### Path Parameters

| Name                                             | Type   | Description                                                                                               |
| ------------------------------------------------ | ------ | --------------------------------------------------------------------------------------------------------- |
| checkoutMethod<mark style="color:red;">\*</mark> | string | The checkout method you would like to validate against. Valid values are; pickup, delivery, and shipping. |

#### Query Parameters

| Name                                   | Type   | Description                             |
| -------------------------------------- | ------ | --------------------------------------- |
| shop<mark style="color:red;">\*</mark> | string | The merchant's myshopify.com store url. |

#### Request Body

| Name                                                                  | Type    | Description                                                                                                                       |
| --------------------------------------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------- |
| shoppingCart.items<mark style="color:red;">\*</mark>                  | array   | The contents of the customer's shopping cart. If no value is provided we will not check inventory levels or product availability. |
| shoppingCart.original\_total\_price<mark style="color:red;">\*</mark> | numeric |                                                                                                                                   |
| shopppingCart.total\_weight<mark style="color:red;">\*</mark>         | numeric |                                                                                                                                   |
| shoppingCart.items.\*.tags                                            | string  |                                                                                                                                   |
| shoppingCart.items.\*.vendor                                          | string  |                                                                                                                                   |
| shoppingCart.items.\*.product\_type                                   | string  |                                                                                                                                   |
| shoppingCart.items.\*.collections                                     | string  |                                                                                                                                   |

{% tabs %}
{% tab title="200 Conditions successfully retrieved." %}

```javascript
{
    "weight_price": {
        "enabled": true,
        "valid": true,
        "condition": "price",
        "operator": "morethan",
        "value": 0
    },
    "property_based": {
        "enabled": false,
        "valid": true
    },
    "hide_checkout_method": false,
    "valid_shopping_cart": true
}
```

{% endtab %}
{% endtabs %}

### Conditions available

{% tabs %}
{% tab title="Request" %}

```javascript
{
    "shoppingCart": {
        "original_total_price": 599,
        "total_weight": 10000,
        "items": [
            {
                "collections": "Adidas Shoes",
                "vendor": "Adidas",
                "product_type": "Sneaker",
                "tags": "Adidas, Pickup Only"
            },
            {
                "collections": "New Balance Shoes",
                "vendor": "New Balance",
                "product_type": "Sneaker",
                "tags": "New Balance, Pickup Only"
            }
        ]
    }
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
    "weight_price": {
        "enabled": true,
        "valid": true,
        "condition": "price",
        "operator": "morethan",
        "value": 0
    },
    "property_based": {
        "enabled": false,
        "valid": true
    },
    "hide_checkout_method": false,
    "valid_shopping_cart": true
}
```

{% endtab %}
{% endtabs %}
