Duplicate a product
curl --request POST \
--url https://app.readyforcommerce.com/api/v1/orgs/{orgId}/catalog/products/{productId}/duplicate \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.readyforcommerce.com/api/v1/orgs/{orgId}/catalog/products/{productId}/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://app.readyforcommerce.com/api/v1/orgs/{orgId}/catalog/products/{productId}/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;
}const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.readyforcommerce.com/api/v1/orgs/{orgId}/catalog/products/{productId}/duplicate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"slug": "<string>",
"status": "draft",
"condition": "new",
"productType": "<string>",
"descriptionHtml": "<string>",
"metaTitle": "<string>",
"metaDescription": "<string>",
"version": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"type": "user",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"updatedBy": {
"type": "user",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123,
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123
}
]
}
],
"variants": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"optionValueIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"identifiers": [
{
"type": "sku",
"value": "<string>",
"label": "<string>"
}
],
"currency": "AED",
"price": "<string>",
"compareAt": "<string>",
"map": "<string>",
"msrp": "<string>",
"onHandCost": "<string>",
"supplierCost": "<string>",
"fallbackCost": "<string>",
"productWeight": {
"value": 1,
"unit": "g"
},
"productLength": {
"value": 1,
"unit": "mm"
},
"productWidth": {
"value": 1,
"unit": "mm"
},
"productHeight": {
"value": 1,
"unit": "mm"
},
"shippingWeight": {
"value": 1,
"unit": "g"
},
"shippingLength": {
"value": 1,
"unit": "mm"
},
"shippingWidth": {
"value": 1,
"unit": "mm"
},
"shippingHeight": {
"value": 1,
"unit": "mm"
},
"countryOfOrigin": "<string>",
"hsCode": "<string>",
"trackInventory": true,
"onHandStock": 1073741823,
"supplierStock": 1073741823,
"fallbackStock": 1073741823,
"createdBy": {
"type": "user",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"updatedBy": {
"type": "user",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
]
}{
"type": "<string>",
"status": 123,
"code": "catalog.slug_taken",
"requestId": "<string>",
"title": "<string>",
"params": {},
"errors": [
{
"location": "<string>",
"pointer": "<string>",
"code": "<string>",
"params": {}
}
]
}Products
Duplicate a product
Copies a product as a new draft, its title followed by (Copy), then (Copy 2) and so on, with its description, its options and its variants with their prices, costs, measures and stock settings but without their identifiers, to start a similar product from one that exists.
POST
/
api
/
v1
/
orgs
/
{orgId}
/
catalog
/
products
/
{productId}
/
duplicate
Duplicate a product
curl --request POST \
--url https://app.readyforcommerce.com/api/v1/orgs/{orgId}/catalog/products/{productId}/duplicate \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.readyforcommerce.com/api/v1/orgs/{orgId}/catalog/products/{productId}/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://app.readyforcommerce.com/api/v1/orgs/{orgId}/catalog/products/{productId}/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;
}const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.readyforcommerce.com/api/v1/orgs/{orgId}/catalog/products/{productId}/duplicate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"slug": "<string>",
"status": "draft",
"condition": "new",
"productType": "<string>",
"descriptionHtml": "<string>",
"metaTitle": "<string>",
"metaDescription": "<string>",
"version": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"type": "user",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"updatedBy": {
"type": "user",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"options": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123,
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"position": 123
}
]
}
],
"variants": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"optionValueIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"identifiers": [
{
"type": "sku",
"value": "<string>",
"label": "<string>"
}
],
"currency": "AED",
"price": "<string>",
"compareAt": "<string>",
"map": "<string>",
"msrp": "<string>",
"onHandCost": "<string>",
"supplierCost": "<string>",
"fallbackCost": "<string>",
"productWeight": {
"value": 1,
"unit": "g"
},
"productLength": {
"value": 1,
"unit": "mm"
},
"productWidth": {
"value": 1,
"unit": "mm"
},
"productHeight": {
"value": 1,
"unit": "mm"
},
"shippingWeight": {
"value": 1,
"unit": "g"
},
"shippingLength": {
"value": 1,
"unit": "mm"
},
"shippingWidth": {
"value": 1,
"unit": "mm"
},
"shippingHeight": {
"value": 1,
"unit": "mm"
},
"countryOfOrigin": "<string>",
"hsCode": "<string>",
"trackInventory": true,
"onHandStock": 1073741823,
"supplierStock": 1073741823,
"fallbackStock": 1073741823,
"createdBy": {
"type": "user",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"updatedBy": {
"type": "user",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}
]
}{
"type": "<string>",
"status": 123,
"code": "catalog.slug_taken",
"requestId": "<string>",
"title": "<string>",
"params": {},
"errors": [
{
"location": "<string>",
"pointer": "<string>",
"code": "<string>",
"params": {}
}
]
}Authorizations
Response
Created
Was this page helpful?