Created by potrace 1.16, written by Peter Selinger 2001-2019

Miva Developer Docs

Updates the parts of a product kit.


Updates the parts of a product kit. For one attribute option of the kit product, set which part products it includes and in what quantities.

Before you begin#

  • The API token needs ProductKit_Update_Parts, either assigned directly under Functions or through a group. See Create an API token.
  • Requests must be signed if the token requires it. See Make a signed request with HMAC.
  • You need the kit product’s ID, code or SKU, the attribute and option IDs, and the IDs of the part products.

Example requests#

Set the parts for a kit option#

For option 4 of attribute 9 on product 1, sets the parts to part 205 with a quantity of 1.

{
    "Store_Code": "{{Store_Code}}",
    "Miva_Request_Timestamp": "{{$timestamp}}",
    "Function": "ProductKit_Update_Parts",
    "Product_ID": 1,
    "Attribute_ID": 9,
    "AttributeTemplateAttribute_ID": 1,
    "Option_ID": 4,
    "Part_IDs": 205,
    "Quantities": 1
}

Request parameters#

Parameter Type Required 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
attribute_id Number Yes The id number of the attribute
AttributeTemplateattribute_id Number No The attribute template id of the product attribute
option_id Number Yes The option id number of the product
part_ids Array Yes Array of the id numbers of the product parts
quantities Array Yes Array of the part quantities, in the same order as part_ids

Example response#

{
    "success": 1
}

Response parameters#

Parameter Type Description
success Boolean Boolean value indicating if the api request was successful
Function Use it to
ProductKitList_Load_Query List a kit’s attribute options and their parts
ProductKit_Generate_Variants Generate the variants for a product kit
ProductKit_Variant_Count Count the variants in a product kit
AttributeAndOptionList_Load_Product Find a product’s attribute and option IDs
ProductList_Load_Query Find the IDs of part products

Try in Postman#

In the Miva: JSON API: Authenticated collection, open Products > ProductKit_Update_Parts. See Set Up Postman.