shop.product.getInfo

Returns information about a products.

Parameters

  • id GET

    Product ID.

  • format GET Optional

    Sets response format. Available options: json (default), xml.

Return value

Product array with the following keys:

  • id int
  • name string
  • summary string
  • meta_title string TITLE tag value.
  • meta_keywords string Value of the 'keywords' meta tag.
  • meta_description string Value of the 'description' meta tag.
  • description string
  • contact_id int ID of the user who has added the product.
  • create_datetime datetime.
  • edit_datetime datetime.
  • status int Product status: -1 (unpublished), 0 (hidden), 1 (published).
  • type_id int.
  • image_id int Main image ID.
  • video_url string.
  • sku_id int Main product variant ID.
  • url int Editable part of the product page URL.
  • rating float Average product rating as it was rated by customers.
  • price float Price in the decimal(15,4) format.
  • compare_price float Strike-through price in the decimal(15,4) format.
  • currency string Product currency in the ISO 4217 format.
  • min_price float Lowest product variant price in the decimal(15,4) format.
  • max_price float Highest product variant price in the decimal(15,4) format.
  • tax_id int ID of the selected tax rule, or 0 if no rule is selected.
  • count float|null Total stock quantity of all product variants in the decimal(15,3) format or null if some product variants’ quantity is infinite.
  • count_denominator int Available precision for stock quantities. Acceptable values: 1 (whole pieces), 10 (precision to tenths), 100 (precision to hundredths), 1000 (precision to thousandths).
  • order_multiplicity_factor float Add-to-cart step (multiplicity factor) in the decimal(15,3) format.
  • stock_unit_id int ID of the selected stock quantity unit.
  • base_unit_id int ID of the selected base quantity unit.
  • stock_base_ratio float Conversion ratio between the stock unit and the base quantity unit.
  • order_count_min float Minimum orderable product quantity in the decimal(15,3) format.
  • order_count_step float Quantity adjustment value with “+/-” buttons in the decimal(15,3) format.
  • cross_selling int Cross-selling products display mode: 0 (disabled), 1 (enabled to show in accordance with the product type settings), 2 (enabled to show manually selected recommended products).
  • upselling int Upselling products display mode: 0 (disabled), 1 (enabled to show in accordance with the product type settings), 2 (enabled to show manually selected recommended products).
  • rating_count int Number of product ratings submitted by customers.
  • total_sales float Total amount of product sales, expressed in the main store currency, in the decimal(15,4) format.
  • category_id int Main category ID.
  • badge string One of default image badges’ IDs or HTML code of a custom badge.
  • sku_type int Product variants selection mode — 0 (by SKU names), 1 (by feature values).
  • sku_count int Total number of the product’s variants.
  • image_url string Main product image thumbnail’s URL with the '750x0' size, if available.
  • skus array Product variants data array. Each variant’s sub-array contains values with the following keys:
  • skus[]['id'] int.
  • skus[]['sku'] int SKU code.
  • skus[]['sort'] int.
  • skus[]['name'] string SKU name.
  • skus[]['image_id'] int Selected image ID.
  • skus[]['price'] float Price in the decimal(15,4) format.
  • skus[]['purchase_price'] float Purchase price in the decimal(15,4) format.
  • skus[]['compare_price'] float Strike-through price in the decimal(15,4) format.
  • skus[]['count'] float|null Total stock quantity in the decimal(15,3) format or null in case of infinite quantity on some stocks.
  • skus[]['available'] int Flag (0 or 1) denoting the variant’s availability for purchase.
  • skus[]['stock_base_ratio'] float Conversion ratio between the stock unit and the base quantity unit.
  • skus[]['order_count_min'] float Minimum orderable product quantity in the decimal(15,3) format.
  • skus[]['order_count_step'] float float Quantity adjustment value with “+/-” buttons in the decimal(15,3) format.
  • skus[]['status'] int Visibility in the storefront.
  • skus[]['file_name'] string Attached file’s name.
  • skus[]['file_size'] int Attached file’s size in bytes.
  • skus[]['file_description'] string Attached file’s description.
  • skus[]['stocks'][''] array Variant’s stock quantities data array with the following keys:
  • skus[]['stocks'][]['id'] int.
  • skus[]['stocks'][]['count'] float|null Variant’s quantity on a specific stock in the decimal(15,3) format or null in case of infinite quantity.
  • categories array Product categories data array with the following keys:
  • categories[]['id'] int Category ID.
  • categories[]['depth'] int Category nesting depth starting with 0.
  • categories[]['parent_id'] int ID of category’s parent category or 0 if there is no parent category.
  • categories[]['name'] string Category name.
  • categories[]['meta_title'] string Value of the <TITLE> tag.
  • categories[]['meta_keywords'] string Value of the keywords meta tag.
  • categories[]['meta_description'] string Value of the description meta tag.
  • categories[]['type'] int Category type: 0 (static), 1 (dynamic).
  • categories[]['url'] string Category’s editable URL part used in the storefront.
  • categories[]['full_url'] string Category’s relative URL including the URLs of its parent categories.
  • categories[]['count'] int Number of products for which the current category is selected as the main category. Not used for dynamic categories.
  • categories[]['description'] string Category description.
  • categories[]['conditions'] string Description of product selection rules for dynamic categories. Not used for static categories.
  • categories[]['create_datetime'] datetime Category’s creation date and time.
  • categories[]['edit_datetime'] datetime Category’s last editing date and time.
  • categories[]['filter'] string Information about product filter setup, in the form of filter field identifiers separated by commas. As identifiers can be used numeric IDs of product features, and the 'price' string for the filter by price. The sort order of the field identifiers corresponds to the sort order of filter fields.
  • categories[]['sort_products'] string Default product sorting rule.
  • categories[]['include_sub_categories'] int Flag denoting whether products included in the category’s sub-categories must also be displayed in the current category: 0 (no), 1 (yes).
  • categories[]['status'] int Category visibility status: 0 (hidden), 1 (visible).
  • images array Product images data array with the following keys:
  • images[]['id'] int.
  • images[]['upload_datetime'] datetime.
  • images[]['sort'] int.
  • images[]['width'] int Width in pixels.
  • images[]['height'] int Height in pixels.
  • images[]['size'] int File size in bytes.
  • images[]['original_filename'] string Original name of the uploaded image file.
  • images[]['ext'] string File name extension.
  • images[]['url_thumb'] string Image thumbnail URL with the '200x0' size.
  • features array Product features data array with the following keys:
  • features['...'] mixed Feature value.

Example

https://demo1.webasyst.com/api.php/shop.product.getInfo?