Update a specific product collection with Id :collectionId
PUT https://services.leadconnectorhq.com/products/collections/{collectionId}
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
collectionId
string
default:"65d71377c326ea78e1c47df5"
required
MongoId of the collection
Body
altId
string
default:"6578278e879ad2646715ba9c"
required
Account Id
altType
string
default:"LOCATION"
required
The type of alt. For now it is only LOCATION Posibles valores: ‘account’
name
string
default:"Best Sellers"
Name of the Product Collection
slug
string
default:"best-sellers"
Slug of the Product Collection which helps in navigation
image
string
default:"http://example.com/watermark.png"
The URL of the image that is going to be displayed as the collection Thumbnail
The metadata information which will be displayed in SEO previews
Respuestas
200 - Successful response
status
boolean
default:"True"
required
Status of api action
message
string
default:"Successfully created"
Success message
{
"status": true,
"message": "Successfully created"
}
422 - Unprocessable Entity
Ejemplo
curl -X PUT 'https://services.leadconnectorhq.com/products/collections/YOUR_collectionId' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"altId": "6578278e879ad2646715ba9c",
"altType": "LOCATION",
"name": "Best Sellers",
"slug": "best-sellers",
"image": "http://example.com/watermark.png"
}'
const response = await fetch('https://services.leadconnectorhq.com/products/collections/YOUR_collectionId', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"altId": "6578278e879ad2646715ba9c", "altType": "LOCATION", "name": "Best Sellers", "slug": "best-sellers", "image": "http://example.com/watermark.png"}),
});
const data = await response.json();
import os, requests
response = requests.request(
'PUT',
'https://services.leadconnectorhq.com/products/collections/YOUR_collectionId',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"altId": "6578278e879ad2646715ba9c", "altType": "LOCATION", "name": "Best Sellers", "slug": "best-sellers", "image": "http://example.com/watermark.png"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/products/collections/YOUR_collectionId');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'altId': '6578278e879ad2646715ba9c', 'altType': 'LOCATION', 'name': 'Best Sellers', 'slug': 'best-sellers', 'image': 'http://example.com/watermark.png'}),
]);
$data = json_decode(curl_exec($ch), true);