# Validation

## Validate cart for checkout method

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

This endpoint allows you to check if the customer's cart is eligible for a given checkout method.&#x20;

#### 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 | array | The customer's shopping cart. |

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

```javascript
{
    "productsEligible": true
}
```

{% endtab %}
{% endtabs %}

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

```javascript
{
    "shoppingCart": [
        {
            "variant_id": 9226255761451,
            "product_id": 852798275627,
            "quantity": 5
        },
        {
            "variant_id": 9226255761452,
            "product_id": 852798275628,
            "quantity": 2
        }
    ]
}
```

{% endtab %}

{% tab title="Response" %}

```javascript
{
	"productsEligible": true
}
```

{% endtab %}
{% endtabs %}
