Generates a delimiter for a product variant. Identify the product, then pass the pricing method and the delimiter to use.
Before you begin#
- The API token needs
ProductVariant_Generate_Delimiter, 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 product’s
Product_ID,Edit_Product,Product_CodeorProduct_SKU.
Example requests#
Generate a delimiter#
Uses pricing method 0 and an underscore as the delimiter.
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "ProductVariant_Generate_Delimiter",
"Product_ID": "{{Product_ID}}",
"Pricing_Method": 0,
"Delimiter": "_"
}
Request parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
product_idEdit_ProductProduct_CodeProduct_SKU |
Number String String String |
ID Number of product Product code string Product code string Product SKU string |
|
pricing_method |
String | Yes | Required. The pricing method. One of master, specific or sum (or 0, 1, 2). |
delimiter |
String | No | The delimiter for the product variant |
Example response#
{
"success": 1
}
Response parameters#
| Parameter | Type | Description |
|---|---|---|
success |
Boolean | Boolean value indicating if the API request was successful |
Related functions#
| Function | Use it to |
|---|---|
ProductVariant_Insert |
Create a product variant |
ProductVariant_Update |
Change a product variant |
ProductVariantList_Load_Query |
Load a product’s variants |
ProductKit_Generate_Variants |
Generate variants for a kit product |
Try in Postman#
In the Miva: JSON API: Authenticated collection, open Products > ProductVariant_Generate_Delimiter. See Set Up Postman.