Recommendation Resource
Content
Create or Update Product Recommendations
PUT /api/products/1.json
- PUT /api/products/1.json will create or update the product recommendations from the parameters passed.
Example:
$ curl -s \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u APP_API_KEY:APP_API_PASSWORD \ -X PUT \ -d \ '{ "product": { "recommended_product_code_1": "product-code-1", "recommended_product_description_1": "Lorem ipsum dolor sit amet.", "recommended_product_code_2": "product-code-2", "recommended_product_description_2": "Consectetur adipisicing elit.", "recommended_product_code_3": "product-code-3", "recommended_product_description_3": "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", "recommended_product_code_30": "product-code-30", "recommended_product_description_30 ": "Ut enim ad minim veniam, quis nostrud exercitation." } }' \ https://shop_subdomain.versacommerce.de/api/products/1.json
Status: 201 Created { "product": { "recommended_product_code_1": "product-code-1", "recommended_product_description_1": "Lorem ipsum dolor sit amet.", "recommended_product_code_2": "product-code-2", "recommended_product_description_2": "Consectetur adipisicing elit.", "recommended_product_code_3": "product-code-3", "recommended_product_description_3": "Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", "recommended_product_code_30": "product-code-30", "recommended_product_description_30 ": "Ut enim ad minim veniam, quis nostrud exercitation." } }
See the Get Product endpoint for more info about the output.
Delete Product Recommendations
PUT /api/products/1.json
- PUT /api/products/1.json will delete the product recommendations from the parameters passed.
Example:
$ curl -s \ -H 'Accept: application/json' \ -H 'Content-Type: application/json' \ -u APP_API_KEY:APP_API_PASSWORD \ -X PUT \ -d \ '{ "product": { "recommended_product_code_1": "", "recommended_product_code_2": "", "recommended_product_code_3": "", "recommended_product_code_30": "", } }' \ https://shop_subdomain.versacommerce.de/api/products/1.json
Status: 200 OK { "product": { "recommended_product_code_1": null, "recommended_product_code_2": null, "recommended_product_code_3": null, "recommended_product_code_30": null } }
See the Get Product endpoint for more info about the output.