To update an existing option combination, send a PUT request to the endpoint with the combination hash in the URL.
PUT /api/combinations/2822626827
Include the combination details in the HTTP request body according to the specified Content-Type. None of the fields are required.
combination field directly with a PUT request. To change the actual combination of options, you need to delete the current combination and create a new one.
| Parameter | Type | Required | Description |
|---|---|---|---|
product_code |
string | No | SKU or product code for this combination |
amount |
string | No | Quantity of items in stock for this combination |
position |
string | No | Position of this combination in the list (0 is first) |
{
"product_code": "Product 34214",
"amount": "42",
"position": "0"
}
This request changes the product code to "Product 34214", sets the inventory amount to 42 units, and positions this combination at the top of the combinations list.
{
"combination_hash": "2822626827"
}
| Status Code | Description |
|---|---|
200 OK |
Combination was updated successfully |
400 Bad Request |
Invalid request parameters |
404 Not Found |
Combination with the specified hash does not exist |