API to set the display priority of products in a store
POST https://services.leadconnectorhq.com/products/store/{storeId}/priority
Autorización
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.
Path parameters
storeId
string
default:"3SwdhCu3svxI8AKsPJt6"
required
Products related to the store
Body
altId
string
default:"6578278e879ad2646715ba9c"
required
Account Id or Agency Id
Posibles valores: ‘account’
Array of products with their display priorities
Respuestas
200 - Successfully updated display priorities
Ejemplo
curl -X POST 'https://services.leadconnectorhq.com/products/store/YOUR_storeId/priority' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"products": [
[]
]
}'
const response = await fetch('https://services.leadconnectorhq.com/products/store/YOUR_storeId/priority', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "account", "products": [[]]}),
});
const data = await response.json();
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/store/YOUR_storeId/priority',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "products": [[]]},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/products/store/YOUR_storeId/priority');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'account', 'products': [[]]}),
]);
$data = json_decode(curl_exec($ch), true);