Function Description
Here are a few example requests, with different product-types.
Standard Product Request
This is a standard product request with as few attributes as possible
[ { "product": { "sku": "24-WG21-blue", "name": "Crown Summit Backpack", "price": 2.00, "attribute_set_id": 4 } } ]
Configurable Product Request
Replace ATTRIBUTE_ID OPTION_ID and THE ENTITY_ID (S), you have to link the same number of products as the cartesian product of the option ids. The linked products (ENTITY_IDS) have to exist.
[ { "product": { "sku":"24-MB13", "name":"Hero Hoodie-L-Green-Two", "attribute_set_id":4, "price": 100.0, "status": 1, "visibility": 4, "weight": 3, "type_id":"configurable", "extension_attributes": { "website_ids":[1], "configurable_product_options": [ { "attribute_id": MATERIAL_ATTRIBUTE_ID, "label": "Material", "position": 1, "values": [ { "value_index": OPTION_METAL_ID } ] }, { "attribute_id": SIZE_ATTRIBUTE_ID, "label": "Size", "position": 2, "values": [ { "value_index": OPTION_XS_ID } ] } ], "configurable_product_links": [ PRODUCT_ENTITY_ID ] }, "product_links":[], "options":[], "custom_attributes": [ { "attribute_code":"url_key", "value":"hero-hoodie-l-green" } ] } } ]
Bundle Product Request
-
weight_type [ pacemaker column bundle_weight_type ]
-
0 = static
-
1 = dynamic
-
-
sku_type [ pacemaker column bundle_sku_type ]
-
0 = static
-
1 = dynamic
-
-
price_type [ pacemaker column bundle_price_type ]
-
0 = fixed
-
1 = percent
-
-
shipment_type [ pacemaker column bundle_shipment_type ]
-
0 = separately
-
1 = together
-
-
price_view [ pacemaker column bundle_price_view ]
-
0 = Price range
-
1 = As Low As
-
[ { "product": { "sku": "24-MB-bundle", "name": "Test Kleid", "attribute_set_id": 4, "price": 140, "status": 1, "visibility": 4, "type_id": "bundle", "weight": 2555, "extension_attributes": { "website_ids": [ 1 ], "bundle_product_options": [ { "option_id": 0, "position": 1, "sku": "bundle-option-sku", "title": "Sprite Stasis Ball", "type": "radio", "required": true, "product_links": [ { "sku": "24-MB01", "option_id": 1, "qty": 1, "position": 2, "is_default": true, "price": 0.0000, "can_change_quantity": 0 }, { "sku": "24-MB02", "option_id": 1, "qty": 1, "position": 1, "is_default": false, "price": 0.0000, "can_change_quantity": 0 } ] } ] }, "custom_attributes": [ { "attribute_code": "price_type", "value": 1 }, { "attribute_code": "price_view", "value": 1 }, { "attribute_code": "weight_type", "value": 1 }, { "attribute_code": "shipment_type", "value": 0 }, { "attribute_code": "sku_type", "value": 1 } ] } } ]
Linked Product Request
The linked product sku have to be the same as the product sku. Also the product and the linked product have to exist.
[ { "product": { "sku": "24-WG093-blue", "name": "Crown Summit Backpack", "price": 2.00, "attribute_set_id": 4, "product_links": [ { "sku": "TEST-SKU-009", "link_type": "related", "linked_product_sku": "24-WG093-blue", "position": 1 } ] } } ]
Stock Item Request
The following columns cannot be passed directly: deferred_stock_update, use_config_deferred_stock_update, enable_qty_increments, qty_increments, out_of_stock_qty, allow_backorders
[ { "product": { "id":2036, "sku":"24-MB05", "name":"Hero Hoodie-L-Green-Two", "attribute_set_id":4, "price": 100.0, "status": 1, "visibility": 4, "weight": 3, "type_id":"simple", "extension_attributes": { "website_ids":[1], "stock_item": { "item_id":2058, "product_id":2036, "stock_id":1, "qty":100, "is_in_stock":true, "is_qty_decimal":true, "use_config_min_qty":true, "min_qty":0, "use_config_min_sale_qty":1, "min_sale_qty":1, "use_config_max_sale_qty":true, "max_sale_qty":10000, "use_config_backorders":true, "backorders":0, "use_config_notify_stock_qty":true, "notify_stock_qty":1, "use_config_qty_increments":true, "qty_increments":null, "use_config_enable_qty_inc":true, "enable_qty_increments":null, "use_config_manage_stock":true, "manage_stock":true, "low_stock_date":"2023-08-16 08:04:28", "is_decimal_divided":true, "stock_status_changed_auto":1 } }, "product_links":[], "options":[] } } ]
Tier Price Request
-
customer_group_id
-
32000 = 'ALL GROUPS'
-
-
website_id
-
0 = 'All Websites'
-
[ { "product": { "id":2036, "sku":"24-MB05", "name":"Hero Hoodie-L-Green-Two", "attribute_set_id":4, "price": 100.0, "status": 1, "visibility": 4, "weight": 3, "type_id":"simple", "product_links":[], "options":[], "tier_prices": [ { "customer_group_id": 32000, "qty": 10, "value": 20, "extension_attributes": { "website_id": 0, "percentage_value": null } }, { "customer_group_id": 32000, "qty": 20, "value": 30, "extension_attributes": { "website_id": 0, "percentage_value": null } } ] } } ]
Media Gallery Product Request
The first media gallery entry is the base image and can have different types. The other images are additional images. The following columns cannot be passed directly: hide_from_product_page
[ { "product": { "id":2036, "sku":"24-MB05", "name":"Hero Hoodie-L-Green-Two", "attribute_set_id":4, "price": 100.0, "status": 1, "visibility": 4, "weight": 3, "type_id":"simple", "extension_attributes": { "website_ids":[1] }, "product_links":[], "options":[], "media_gallery_entries": [ { "id": 1250, "media_type": "image", "label": "wp02_red", "position": 1, "disabled": false, "types": [ "image", "small_image", "thumbnail", "swatch" ], "file": "\/w\/p\/wp02_red_1.jpg" }, { "id": 1251, "media_type": "image", "label": "Image", "position": 2, "disabled": true, "file": "\/w\/p\/wp02_red_2.jpg" }, { "id": 1252, "media_type": "image", "label": "Image", "position": 3, "disabled": false, "file": "\/w\/p\/wp02_red_3.jpg" } ] } } ]