Create a configurable product using bulk APIs
Step 4. Create the personalization option
Let’s add a text box to the product page that allows the customer to add his name (up to 15 characters) to the back of the shirt.
The product_sku
is the sku
of the configurable product. The sku
specified in the payload is a string that is appended to the product_sku
when a customer selects to purchase this item. Likewise, the price
supplied in the payload is added to the configurable product price.
Endpoint:
POST <host>/rest/default/async/bulk/V1/products/options
Payload:
1
2
3
4
5
6
7
8
9
10
11
12
13
[{
"option": {
"product_sku": "MS-Champ",
"title": "Add Your Name (Max 15 Characters)",
"type": "field",
"sort_order": 1,
"is_require": false,
"price": 10,
"price_type": "fixed",
"sku": "Personalized",
"max_characters": 15
}
}]
Response:
1
2
3
4
5
6
7
8
9
10
11
{
"bulk_uuid": "53ef1382-904a-4ba0-bb72-ebc5edd47da5",
"request_items": [
{
"id": 0,
"data_hash": null,
"status": "accepted"
}
],
"errors": false
}
Verify this step
-
Log in to the Luma website and select Catalog > Products. Click on the Champ Tee configurable product and expand the Customizable Options section.
-
On the Luma storefront page, search for
Champ
. Then click on the Champ Tee product.If the personalization option is not displayed, go to the Champ Tee configuration product page in Admin and set Stock Status to In Stock.
Congratulations! You’ve finished.
Related topic