Relate one product to another
curl --request POST \
--url https://wisepim.com/api/public/v1/product-relations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"relation_type": "<string>"
}
'import requests
url = "https://wisepim.com/api/public/v1/product-relations"
payload = { "relation_type": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({relation_type: '<string>'})
};
fetch('https://wisepim.com/api/public/v1/product-relations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"product": 123,
"related_product": 123,
"relation_type": "<string>",
"position": 123,
"quantity": 123,
"is_required": true
}{
"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>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}Create a product relation
POST /product-relations: relate one product to another by id or SKU. Requires product-relations:write.
POST
/
api
/
public
/
v1
/
product-relations
Relate one product to another
curl --request POST \
--url https://wisepim.com/api/public/v1/product-relations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"relation_type": "<string>"
}
'import requests
url = "https://wisepim.com/api/public/v1/product-relations"
payload = { "relation_type": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({relation_type: '<string>'})
};
fetch('https://wisepim.com/api/public/v1/product-relations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"product": 123,
"related_product": 123,
"relation_type": "<string>",
"position": 123,
"quantity": 123,
"is_required": true
}{
"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>"
}{
"error": "<string>",
"request_id": "<string>",
"code": "<string>"
}{
"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

