Set a configurable product's variant axes
curl --request PUT \
--url https://wisepim.com/api/public/v1/products/{product_id}/variant-axes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"attribute_codes": [
"<string>"
]
}
'import requests
url = "https://wisepim.com/api/public/v1/products/{product_id}/variant-axes"
payload = { "attribute_codes": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({attribute_codes: ['<string>']})
};
fetch('https://wisepim.com/api/public/v1/products/{product_id}/variant-axes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"product_id": 123,
"source": "<string>",
"axes": [
{
"attribute_id": 123,
"code": "<string>",
"label": "<string>",
"position": 123,
"values": [
"<string>"
]
}
],
"incomplete_variant_ids": [
123
],
"duplicate_variant_ids": [
[
123
]
],
"warnings": [
"<string>"
]
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>",
"detail": [
{}
]
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}Set variant axes
PUT /products//variant-axes: choose a configurable product’s variant axes by attribute code, overriding its family. Requires products:write.
PUT
/
api
/
public
/
v1
/
products
/
{product_id}
/
variant-axes
Set a configurable product's variant axes
curl --request PUT \
--url https://wisepim.com/api/public/v1/products/{product_id}/variant-axes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"attribute_codes": [
"<string>"
]
}
'import requests
url = "https://wisepim.com/api/public/v1/products/{product_id}/variant-axes"
payload = { "attribute_codes": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({attribute_codes: ['<string>']})
};
fetch('https://wisepim.com/api/public/v1/products/{product_id}/variant-axes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"product_id": 123,
"source": "<string>",
"axes": [
{
"attribute_id": 123,
"code": "<string>",
"label": "<string>",
"position": 123,
"values": [
"<string>"
]
}
],
"incomplete_variant_ids": [
123
],
"duplicate_variant_ids": [
[
123
]
],
"warnings": [
"<string>"
]
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>",
"detail": [
{}
]
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}Authorizations
Use a project API key from Settings > API Access. Send it as Authorization: Bearer wpk_.... See authentication and scopes for setup and permissions.
Headers
Body
application/json
Response
OK

