List Exceptions of a Product - Venddor API

List Product Option Exceptions

This endpoint allows you to retrieve all option exceptions for a specific product. Option exceptions define rules for which combinations of product options are not available.

Base URL: https://your-store-url.com/api

What are Product Option Exceptions?

Product option exceptions define invalid combinations of product options. For example, if a T-shirt comes in multiple colors and sizes, but the "Small" size is not available in "Red", you would create an exception for this combination.

Endpoint Details

GET /api/exceptions/?product_id={id}

This request returns all option exceptions for the specified product.

Query Parameters

Parameter Type Description
product_id* integer The unique identifier of the product

Example Request

GET /api/exceptions/?product_id=12

Response Example

[
  {
    "exception_id": "1",
    "product_id": "12",
    "combination": {
      "3": "12",
      "4": "17",
      "17": "-1"
    }
  },
  {
    "exception_id": "4",
    "product_id": "12",
    "combination": {
      "3": "13",
      "4": "17",
      "17": "-2"
    }
  },
  {
    "exception_id": "5",
    "product_id": "12",
    "combination": {
      "3": "16",
      "4": "-1",
      "17": "-2"
    }
  }
]

Response Fields

Field Type Description
exception_id string Unique identifier of the exception
product_id string ID of the product that this exception belongs to
combination object Object representing the invalid combination of product options.

The keys are option IDs and the values are variant IDs or special values:
-1 — Any variant of this option
-2 — No variant of this option
Tip: To understand the meaning of the option and variant IDs in the combination object, first retrieve the product options using GET /api/options/?product_id={id}.

Understanding Combination Values

In the combination object:

Example Interpretation

Let's interpret the first exception in the example response:

{
  "3": "12",
  "4": "17",
  "17": "-1"
}

This might mean: "The Small size (variant ID 12 of option ID 3) is not available in Black/White color (variant ID 17 of option ID 4) with any variant of option ID 17 (which could be a material option)."