Products
Duplicate product
Developer API operation for POST /dev/v1/products//duplicate.
POST
/
dev
/
v1
/
products
/
{id}
/
duplicate
Duplicate product
curl --request POST \
--url https://api.shoppex.io/dev/v1/products/{id}/duplicate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/products/{id}/duplicate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/products/{id}/duplicate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/products/{id}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/products/{id}/duplicate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {}
}{
"data": {
"id": "prod_db_2",
"uniqid": "prod_copy",
"shop_id": "shop_1",
"slug": "original-product-copy",
"type": "DYNAMIC",
"subtype": null,
"title": "Original Product (Copy)",
"currency": "USD",
"price": 19.99,
"price_display": 19.99,
"description": "Product description",
"description_tabs": [
{
"title": "Features",
"content": "<p>Instant delivery, 24/7 support.</p>"
}
],
"gateways": [
"PAYPAL"
],
"custom_fields": [],
"delivery_instructions": null,
"quantity_min": 1,
"quantity_max": -1,
"quantity_warning": 0,
"stock": 0,
"stock_delimiter": "\n",
"unlisted": false,
"private": false,
"on_hold": false,
"sort_priority": 0,
"crypto_confirmations": 1,
"max_risk_level": 0,
"block_vpn_proxies": false,
"delivery_text": "",
"delivery_time": null,
"service_text": "",
"dynamic_webhook": null,
"watermark_enabled": true,
"image_id": null,
"image_url": null,
"variants": [],
"created_at": 1711969200,
"updated_at": 1711969200
}
}Previous
List product serialsReturns unlinked inventory serials for a base serial product that does not use variants. Each serial item includes its `id`, and that `id` is the value you pass inside `serial_ids` when calling `DELETE /dev/v1/products/{id}/serials`. Use the variant serial routes only when the product inventory is tracked per variant.
Next
⌘I
Duplicate product
curl --request POST \
--url https://api.shoppex.io/dev/v1/products/{id}/duplicate \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.shoppex.io/dev/v1/products/{id}/duplicate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/products/{id}/duplicate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/products/{id}/duplicate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/products/{id}/duplicate"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"data": {}
}{
"data": {
"id": "prod_db_2",
"uniqid": "prod_copy",
"shop_id": "shop_1",
"slug": "original-product-copy",
"type": "DYNAMIC",
"subtype": null,
"title": "Original Product (Copy)",
"currency": "USD",
"price": 19.99,
"price_display": 19.99,
"description": "Product description",
"description_tabs": [
{
"title": "Features",
"content": "<p>Instant delivery, 24/7 support.</p>"
}
],
"gateways": [
"PAYPAL"
],
"custom_fields": [],
"delivery_instructions": null,
"quantity_min": 1,
"quantity_max": -1,
"quantity_warning": 0,
"stock": 0,
"stock_delimiter": "\n",
"unlisted": false,
"private": false,
"on_hold": false,
"sort_priority": 0,
"crypto_confirmations": 1,
"max_risk_level": 0,
"block_vpn_proxies": false,
"delivery_text": "",
"delivery_time": null,
"service_text": "",
"dynamic_webhook": null,
"watermark_enabled": true,
"image_id": null,
"image_url": null,
"variants": [],
"created_at": 1711969200,
"updated_at": 1711969200
}
}