Skip to content

ProductVariantList_Load_Product#


Description#

This function allows you to load variant products and their parts. Variants in Miva are the different attribute combinations, typically used to track inventory at the attribute level.

Request Body Parameters#

Parameter
Type Description
product_id
Edit_Product
Product_Code
Product_SKU
Number
String
String
String
ID Number of product
Product code string
Product code string
Product SKU string
Include_Default_Variant Boolean Boolean Value to include the default variant
Limits Object limits the results to variants that include attributes/options defined
Exclusions Object limits the results to variants that do not include attributes/options defined

Limits Object#

Limits the results to variants that include attributes/options defined.

Parameter
Type Description
attr_id Number Attribute ID
attmpat_id Number Attribute Template Id
option_id Number Option ID

Exclusions Object#

Limits the results to variants that do not include attributes/options defined.

Parameter
Type Description
attr_id Number Attribute ID
attmpat_id Number Attribute Template Id
option_id Number Option ID

Response Parameters#

Parameter
Type Description
product_id Number Product ID
variant_id Number Variant ID
Parts Object Parts which make up the variant. Unless the variant is a kit, each variant will have a single part. The part is the non-active product used to store pricing and inventory data.
Dimensions Object Dimensions is an object containing the different combination of attributes which make up this variant.

Parts Object#

Parts which make up the variant. Unless the variant is a kit, each variant will have a single part. The part is the non-active product used to store pricing and inventory data.

Parameter
Type Description
product_id Number Product ID
product_code String Part Product Code
product_name String Part Product Name
quantity Number Part Quantity

Dimensions Object#

Dimensions is an object containing the different combinations of attributes which make up this variant.

Parameter
Type Description
attr_id Number Attribute ID
attmpat_id Number Attribute Template Id
option_id Number Option ID
option_code String Option Code

Example Request#

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "ProductVariantList_Load_Product",
    "Product_Code": "tshirt"
}

Example Response#

{
  "success": 1,
  "data": [
    {
      "product_id": 16,
      "variant_id": 15,
      "parts": [
        {
          "product_id": 20,
          "product_code": "tshirt_medium_red",
          "product_name": "T-Shirt size:medium color:red",
          "quantity": 1
        }
      ],
      "dimensions": [
        {
          "attr_id": 3,
          "attmpat_id": 0,
          "option_id": 9,
          "option_code": "medium"
        },
        {
          "attr_id": 5,
          "attmpat_id": 0,
          "option_id": 12,
          "option_code": "red"
        }
      ]
    },
    ...
  ]
}