POST https://services.leadconnectorhq.com/products/bulk-update/edit
Autorización
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
string
default:"2021-07-28"
required
Versión de la API.
Body
string
default:"6578278e879ad2646715ba9c"
required
Account Id or Agency Id
string
required
Posibles valores: ‘account’
object[]
required
Array of products to update. Note: The total count includes all prices within each product.
Show cada item
Show cada item
string
default:"64a1b2c3d4e5f67890123456"
required
Product ID
string
default:"Premium Product"
Product name
string
Product description
string
default:"https://example.com/product-image.jpg"
Product image
boolean
default:"True"
Product availability in store
object[]
Array of price variants for the product
Show cada item
Show cada item
string
default:"64a1b2c3d4e5f67890123456"
required
Price ID
string
default:"Standard Plan"
Price name
number
default:"99.99"
Price amount
string
default:"USD"
Price currency
number
default:"129.99"
Compare at price
number
default:"100"
Available quantity
boolean
default:"True"
Track inventory
boolean
default:"False"
Allow out of stock purchases
string
default:"SKU-001"
SKU
number
default:"7"
Trial period in days
number
default:"12"
Total billing cycles
number
default:"25"
Setup fee
object
Shipping options
object
Recurring details
string[]
Collection IDs
boolean
default:"True"
Enable product label
boolean
default:"True"
Enable taxes
object
SEO metadata for the product
string
default:"premium-product"
Product URL slug
string
default:"64a1b2c3d4e5f67890123460"
Automatic tax category ID
boolean
default:"False"
Tax inclusive pricing
object[]
Product taxes
object[]
Product media
object
Product label
Respuestas
201 - Products and prices updated successfully
201 - Products and prices updated successfully
400 - Bad Request
400 - Bad Request
{}
401 - Unauthorized
401 - Unauthorized
{}
422 - Unprocessable Entity
422 - Unprocessable Entity
{}
Ejemplo
curl -X POST 'https://services.leadconnectorhq.com/products/bulk-update/edit' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "account",
"products": [
{
"_id": "64a1b2c3d4e5f67890123456",
"name": "Premium Product",
"description": "A high-quality premium product with excellent features and durability",
"image": "https://example.com/product-image.jpg",
"availableInStore": true,
"prices": [
{}
],
"collectionIds": [
"64a1b2c3d4e5f67890123458",
"64a1b2c3d4e5f67890123459"
],
"isLabelEnabled": true,
"isTaxesEnabled": true,
"slug": "premium-product",
"automaticTaxCategoryId": "64a1b2c3d4e5f67890123460",
"taxInclusive": false,
"taxes": [
{}
],
"medias": [
{}
],
"label": {}
}
]
}'
const response = await fetch('https://services.leadconnectorhq.com/products/bulk-update/edit', {
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": [{"_id": "64a1b2c3d4e5f67890123456", "name": "Premium Product", "description": "A high-quality premium product with excellent features and durability", "image": "https://example.com/product-image.jpg", "availableInStore": true, "prices": [{}], "collectionIds": ["64a1b2c3d4e5f67890123458", "64a1b2c3d4e5f67890123459"], "isLabelEnabled": true, "isTaxesEnabled": true, "slug": "premium-product", "automaticTaxCategoryId": "64a1b2c3d4e5f67890123460", "taxInclusive": false, "taxes": [{}], "medias": [{}], "label": {}}]}),
});
const data = await response.json();
import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/products/bulk-update/edit',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "account", "products": [{"_id": "64a1b2c3d4e5f67890123456", "name": "Premium Product", "description": "A high-quality premium product with excellent features and durability", "image": "https://example.com/product-image.jpg", "availableInStore": true, "prices": [{}], "collectionIds": ["64a1b2c3d4e5f67890123458", "64a1b2c3d4e5f67890123459"], "isLabelEnabled": true, "isTaxesEnabled": true, "slug": "premium-product", "automaticTaxCategoryId": "64a1b2c3d4e5f67890123460", "taxInclusive": false, "taxes": [{}], "medias": [{}], "label": {}}]},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/products/bulk-update/edit');
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': [{'_id': '64a1b2c3d4e5f67890123456', 'name': 'Premium Product', 'description': 'A high-quality premium product with excellent features and durability', 'image': 'https://example.com/product-image.jpg', 'availableInStore': true, 'prices': [{}], 'collectionIds': ['64a1b2c3d4e5f67890123458', '64a1b2c3d4e5f67890123459'], 'isLabelEnabled': true, 'isTaxesEnabled': true, 'slug': 'premium-product', 'automaticTaxCategoryId': '64a1b2c3d4e5f67890123460', 'taxInclusive': false, 'taxes': [{}], 'medias': [{}], 'label': {}}]}),
]);
$data = json_decode(curl_exec($ch), true);

