Bulk API to insert Product records. This API endpoint accepts POST requests with JSON data containing a list of Product / Content records wrapped in a dictionary:
POST /v1/products
{"data": [product_1, product_2, product_3]}
Each product is uniquely identified by its product_id. If a record with the same product_id
already exists in the dataset, the existing one will be replaced by the insertion (no
partial update is allowed at this time). We recommend limiting your calls to around 100
records at a time to avoid memory issues or timeout risks.
This API validates the inserted records against the API schema; any schema error will cause
the whole request to fail (status_code=422), and none of the records will be inserted. You
should check the response.errors field to see if there are any errors. For example,
the response below means there are no errors (status_code=200):
{
"message": "success",
"data": {
"task_id": "{task_id}"
}
}
A common source of errors when uploading Product records is that the custom attributes’ data
types are not consistent with the data types of the existing records. In such cases,
you can check the individual error message in the data array. For example, if there is an
error regarding the second record you tried to insert, the response might look like:
{
"errors": true, // there are errors. please check!
"data": [
"data.0.custom_attributes.designer is invalid. Its data type is not consistent with other records",
"data.0.product_id is invalid. The attribute expected to be of type 'string', but 'array' is given.",
"data.0.created_at is invalid. The attribute should match 'date-time' format."
]
}
Miso has the built-in support for majority of Western European languages, including English, French, German,
Spanish, Italian, Dutch, Russian, and Ukrainian, as well as, major Asian languages, including Mandarin
(both Simplified and Traditional), Japanese, and Korean.
In Dojo, you can choose the Primary Language for your product catalog (default is English).
However, you can also have more than one language in your product catalog that is
beyond your primary languages using the i18n_$LN fields (replace $LN with the two-letter language code of your choice),
and let Miso apply the language-specific preprocessing for you, such as tokenization, stemming, elision
removal, folding, decompounding, and traditional to simplified Chinese conversion.
For example, you may have a product called “Arizona, Green Tea with Ginseng & Honey” in your catalog, and you also sell it in your Spanish, French, and Chinese sites, and want your customers to be able to search for this product in their native languages.
In this case, your product records will like the following sample record, where English is the primary language of
the record, and i18n_es, i18n_fr, i18n_zh fields contain product details in their corresponding languages.
{
"product_id": "arizona-ginseng-honey",
// the primary language is English
"title": "Arizona, Green Tea with Ginseng & Honey",
// ... other product details in English
"i18n_es": {
"title": "AriZona, Té verde con ginseng y miel"
// ... other product details in Spanish
},
"i18n_fr": {
"title": "AriZona - Thé Vert Aromatisé au Miel"
// ... other product details in French
},
"i18n_zh": {
"title": "美國ARIZONA亞歷桑納 - 蜂蜜人蔘綠茶"
// ... other product details in Chinese
}
}
In this way, your customer can find this product with any of the following search queries without additional configuration:
arizona green teaarizona te verdearizona the vertarizona 綠茶The similar concept applies to Autocomplete as well. You can specify a language parameter
in the requests to Autocomplete API, and the autocomplete results for the specific language
will be returned.
Your secret API key is used to access every Miso API endpoint. You should secure this key and only use it on a backend server. Never leave this key in your client-side JavaScript code. If the private key is compromised, you can revoke it in Dojo and get a new one.
Specify your secret key in the api_key query parameter. For example:
POST /v1/users?api_key=039c501ac8dfcac91c6f05601cee876e1cc07e17