Create Product Variant
curl --request POST \
--url https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants \
--header 'Content-Type: application/json' \
--header 'X-Authorization: <api-key>' \
--data '
{
"name": "Classic Brown Dress Shoes - Size 12",
"external_id": "564400c7-7a6b-4f29-b6a5-7bb580b2992c",
"sku": "SHOES-US44-M-Brwn",
"weight_grams": 440,
"barcode": 712345000019,
"price": {
"amount": 50000,
"currency_code": "USD"
},
"images": [
"https://example.com/example.jpg"
],
"options": [
{
"position": 1,
"value": "Red"
}
],
"logistics_information": {
"origin_country_code": "US",
"origin_region_code": "CA",
"default_hs_code": "1234567890",
"requires_shipping": true,
"cost": {
"amount": 50000,
"currency_code": "USD"
},
"destination_country_hs_codes": [
{
"destination_country_code": "US",
"hs_code": "1234567890"
}
]
},
"dimensions": {
"depth": 8.5,
"width": 6,
"height": 2.25
},
"locale_data": [
{
"locale": "fr-CA",
"name": "Chaussures Habillées Marron Classiques - Taille 12"
}
]
}
'import requests
url = "https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants"
payload = {
"name": "Classic Brown Dress Shoes - Size 12",
"external_id": "564400c7-7a6b-4f29-b6a5-7bb580b2992c",
"sku": "SHOES-US44-M-Brwn",
"weight_grams": 440,
"barcode": 712345000019,
"price": {
"amount": 50000,
"currency_code": "USD"
},
"images": ["https://example.com/example.jpg"],
"options": [
{
"position": 1,
"value": "Red"
}
],
"logistics_information": {
"origin_country_code": "US",
"origin_region_code": "CA",
"default_hs_code": "1234567890",
"requires_shipping": True,
"cost": {
"amount": 50000,
"currency_code": "USD"
},
"destination_country_hs_codes": [
{
"destination_country_code": "US",
"hs_code": "1234567890"
}
]
},
"dimensions": {
"depth": 8.5,
"width": 6,
"height": 2.25
},
"locale_data": [
{
"locale": "fr-CA",
"name": "Chaussures Habillées Marron Classiques - Taille 12"
}
]
}
headers = {
"X-Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Classic Brown Dress Shoes - Size 12',
external_id: '564400c7-7a6b-4f29-b6a5-7bb580b2992c',
sku: 'SHOES-US44-M-Brwn',
weight_grams: 440,
barcode: 712345000019,
price: {amount: 50000, currency_code: 'USD'},
images: ['https://example.com/example.jpg'],
options: [{position: 1, value: 'Red'}],
logistics_information: {
origin_country_code: 'US',
origin_region_code: 'CA',
default_hs_code: '1234567890',
requires_shipping: true,
cost: {amount: 50000, currency_code: 'USD'},
destination_country_hs_codes: [{destination_country_code: 'US', hs_code: '1234567890'}]
},
dimensions: {depth: 8.5, width: 6, height: 2.25},
locale_data: [{locale: 'fr-CA', name: 'Chaussures Habillées Marron Classiques - Taille 12'}]
})
};
fetch('https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Classic Brown Dress Shoes - Size 12',
'external_id' => '564400c7-7a6b-4f29-b6a5-7bb580b2992c',
'sku' => 'SHOES-US44-M-Brwn',
'weight_grams' => 440,
'barcode' => 712345000019,
'price' => [
'amount' => 50000,
'currency_code' => 'USD'
],
'images' => [
'https://example.com/example.jpg'
],
'options' => [
[
'position' => 1,
'value' => 'Red'
]
],
'logistics_information' => [
'origin_country_code' => 'US',
'origin_region_code' => 'CA',
'default_hs_code' => '1234567890',
'requires_shipping' => true,
'cost' => [
'amount' => 50000,
'currency_code' => 'USD'
],
'destination_country_hs_codes' => [
[
'destination_country_code' => 'US',
'hs_code' => '1234567890'
]
]
],
'dimensions' => [
'depth' => 8.5,
'width' => 6,
'height' => 2.25
],
'locale_data' => [
[
'locale' => 'fr-CA',
'name' => 'Chaussures Habillées Marron Classiques - Taille 12'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants"
payload := strings.NewReader("{\n \"name\": \"Classic Brown Dress Shoes - Size 12\",\n \"external_id\": \"564400c7-7a6b-4f29-b6a5-7bb580b2992c\",\n \"sku\": \"SHOES-US44-M-Brwn\",\n \"weight_grams\": 440,\n \"barcode\": 712345000019,\n \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"images\": [\n \"https://example.com/example.jpg\"\n ],\n \"options\": [\n {\n \"position\": 1,\n \"value\": \"Red\"\n }\n ],\n \"logistics_information\": {\n \"origin_country_code\": \"US\",\n \"origin_region_code\": \"CA\",\n \"default_hs_code\": \"1234567890\",\n \"requires_shipping\": true,\n \"cost\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"destination_country_hs_codes\": [\n {\n \"destination_country_code\": \"US\",\n \"hs_code\": \"1234567890\"\n }\n ]\n },\n \"dimensions\": {\n \"depth\": 8.5,\n \"width\": 6,\n \"height\": 2.25\n },\n \"locale_data\": [\n {\n \"locale\": \"fr-CA\",\n \"name\": \"Chaussures Habillées Marron Classiques - Taille 12\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Classic Brown Dress Shoes - Size 12\",\n \"external_id\": \"564400c7-7a6b-4f29-b6a5-7bb580b2992c\",\n \"sku\": \"SHOES-US44-M-Brwn\",\n \"weight_grams\": 440,\n \"barcode\": 712345000019,\n \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"images\": [\n \"https://example.com/example.jpg\"\n ],\n \"options\": [\n {\n \"position\": 1,\n \"value\": \"Red\"\n }\n ],\n \"logistics_information\": {\n \"origin_country_code\": \"US\",\n \"origin_region_code\": \"CA\",\n \"default_hs_code\": \"1234567890\",\n \"requires_shipping\": true,\n \"cost\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"destination_country_hs_codes\": [\n {\n \"destination_country_code\": \"US\",\n \"hs_code\": \"1234567890\"\n }\n ]\n },\n \"dimensions\": {\n \"depth\": 8.5,\n \"width\": 6,\n \"height\": 2.25\n },\n \"locale_data\": [\n {\n \"locale\": \"fr-CA\",\n \"name\": \"Chaussures Habillées Marron Classiques - Taille 12\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Classic Brown Dress Shoes - Size 12\",\n \"external_id\": \"564400c7-7a6b-4f29-b6a5-7bb580b2992c\",\n \"sku\": \"SHOES-US44-M-Brwn\",\n \"weight_grams\": 440,\n \"barcode\": 712345000019,\n \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"images\": [\n \"https://example.com/example.jpg\"\n ],\n \"options\": [\n {\n \"position\": 1,\n \"value\": \"Red\"\n }\n ],\n \"logistics_information\": {\n \"origin_country_code\": \"US\",\n \"origin_region_code\": \"CA\",\n \"default_hs_code\": \"1234567890\",\n \"requires_shipping\": true,\n \"cost\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"destination_country_hs_codes\": [\n {\n \"destination_country_code\": \"US\",\n \"hs_code\": \"1234567890\"\n }\n ]\n },\n \"dimensions\": {\n \"depth\": 8.5,\n \"width\": 6,\n \"height\": 2.25\n },\n \"locale_data\": [\n {\n \"locale\": \"fr-CA\",\n \"name\": \"Chaussures Habillées Marron Classiques - Taille 12\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"product_variant": {
"id": 810772,
"external_id": "564400c7-7a6b-4f29-b6a5-7bb580b2992c",
"sku": "SHOES-US44-M-Brwn",
"name": "Classic Brown Dress Shoes - Size 12",
"weight_grams": 500,
"barcode": "1234asdf324",
"product": {
"id": 810772,
"external_id": "564400c7-7a6b-4f29-b6a5-7bb580b2992c",
"sku": "SHOES-US44-M-Brwn",
"name": "<string>"
},
"price": {
"amount": 50000,
"currency_code": "USD"
},
"images": [
"https://example.com/example.jpg"
],
"inventories": [
{
"id": 127302,
"available_count": 10,
"location": {
"id": 182973,
"external_id": "564400c7-7a6b-4f29-b6a5-7bb580b2992c",
"name": "<string>"
}
}
],
"options": [
{
"position": 1,
"value": "Red"
}
],
"logistics_information": {
"origin_country_code": "US",
"origin_region_code": "CA",
"default_hs_code": "1234567890",
"requires_shipping": true,
"cost": {
"amount": 50000,
"currency_code": "USD"
},
"destination_country_hs_codes": [
{
"destination_country_code": "US",
"hs_code": "1234567890"
}
]
},
"dimensions": {
"depth": 8.5,
"width": 6,
"height": 2.25
}
}
}"<unknown>"Products
Create Product Variant
Create a new product variant.
POST
/
products
/
{productId}
/
product-variants
Create Product Variant
curl --request POST \
--url https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants \
--header 'Content-Type: application/json' \
--header 'X-Authorization: <api-key>' \
--data '
{
"name": "Classic Brown Dress Shoes - Size 12",
"external_id": "564400c7-7a6b-4f29-b6a5-7bb580b2992c",
"sku": "SHOES-US44-M-Brwn",
"weight_grams": 440,
"barcode": 712345000019,
"price": {
"amount": 50000,
"currency_code": "USD"
},
"images": [
"https://example.com/example.jpg"
],
"options": [
{
"position": 1,
"value": "Red"
}
],
"logistics_information": {
"origin_country_code": "US",
"origin_region_code": "CA",
"default_hs_code": "1234567890",
"requires_shipping": true,
"cost": {
"amount": 50000,
"currency_code": "USD"
},
"destination_country_hs_codes": [
{
"destination_country_code": "US",
"hs_code": "1234567890"
}
]
},
"dimensions": {
"depth": 8.5,
"width": 6,
"height": 2.25
},
"locale_data": [
{
"locale": "fr-CA",
"name": "Chaussures Habillées Marron Classiques - Taille 12"
}
]
}
'import requests
url = "https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants"
payload = {
"name": "Classic Brown Dress Shoes - Size 12",
"external_id": "564400c7-7a6b-4f29-b6a5-7bb580b2992c",
"sku": "SHOES-US44-M-Brwn",
"weight_grams": 440,
"barcode": 712345000019,
"price": {
"amount": 50000,
"currency_code": "USD"
},
"images": ["https://example.com/example.jpg"],
"options": [
{
"position": 1,
"value": "Red"
}
],
"logistics_information": {
"origin_country_code": "US",
"origin_region_code": "CA",
"default_hs_code": "1234567890",
"requires_shipping": True,
"cost": {
"amount": 50000,
"currency_code": "USD"
},
"destination_country_hs_codes": [
{
"destination_country_code": "US",
"hs_code": "1234567890"
}
]
},
"dimensions": {
"depth": 8.5,
"width": 6,
"height": 2.25
},
"locale_data": [
{
"locale": "fr-CA",
"name": "Chaussures Habillées Marron Classiques - Taille 12"
}
]
}
headers = {
"X-Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Classic Brown Dress Shoes - Size 12',
external_id: '564400c7-7a6b-4f29-b6a5-7bb580b2992c',
sku: 'SHOES-US44-M-Brwn',
weight_grams: 440,
barcode: 712345000019,
price: {amount: 50000, currency_code: 'USD'},
images: ['https://example.com/example.jpg'],
options: [{position: 1, value: 'Red'}],
logistics_information: {
origin_country_code: 'US',
origin_region_code: 'CA',
default_hs_code: '1234567890',
requires_shipping: true,
cost: {amount: 50000, currency_code: 'USD'},
destination_country_hs_codes: [{destination_country_code: 'US', hs_code: '1234567890'}]
},
dimensions: {depth: 8.5, width: 6, height: 2.25},
locale_data: [{locale: 'fr-CA', name: 'Chaussures Habillées Marron Classiques - Taille 12'}]
})
};
fetch('https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Classic Brown Dress Shoes - Size 12',
'external_id' => '564400c7-7a6b-4f29-b6a5-7bb580b2992c',
'sku' => 'SHOES-US44-M-Brwn',
'weight_grams' => 440,
'barcode' => 712345000019,
'price' => [
'amount' => 50000,
'currency_code' => 'USD'
],
'images' => [
'https://example.com/example.jpg'
],
'options' => [
[
'position' => 1,
'value' => 'Red'
]
],
'logistics_information' => [
'origin_country_code' => 'US',
'origin_region_code' => 'CA',
'default_hs_code' => '1234567890',
'requires_shipping' => true,
'cost' => [
'amount' => 50000,
'currency_code' => 'USD'
],
'destination_country_hs_codes' => [
[
'destination_country_code' => 'US',
'hs_code' => '1234567890'
]
]
],
'dimensions' => [
'depth' => 8.5,
'width' => 6,
'height' => 2.25
],
'locale_data' => [
[
'locale' => 'fr-CA',
'name' => 'Chaussures Habillées Marron Classiques - Taille 12'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants"
payload := strings.NewReader("{\n \"name\": \"Classic Brown Dress Shoes - Size 12\",\n \"external_id\": \"564400c7-7a6b-4f29-b6a5-7bb580b2992c\",\n \"sku\": \"SHOES-US44-M-Brwn\",\n \"weight_grams\": 440,\n \"barcode\": 712345000019,\n \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"images\": [\n \"https://example.com/example.jpg\"\n ],\n \"options\": [\n {\n \"position\": 1,\n \"value\": \"Red\"\n }\n ],\n \"logistics_information\": {\n \"origin_country_code\": \"US\",\n \"origin_region_code\": \"CA\",\n \"default_hs_code\": \"1234567890\",\n \"requires_shipping\": true,\n \"cost\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"destination_country_hs_codes\": [\n {\n \"destination_country_code\": \"US\",\n \"hs_code\": \"1234567890\"\n }\n ]\n },\n \"dimensions\": {\n \"depth\": 8.5,\n \"width\": 6,\n \"height\": 2.25\n },\n \"locale_data\": [\n {\n \"locale\": \"fr-CA\",\n \"name\": \"Chaussures Habillées Marron Classiques - Taille 12\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Classic Brown Dress Shoes - Size 12\",\n \"external_id\": \"564400c7-7a6b-4f29-b6a5-7bb580b2992c\",\n \"sku\": \"SHOES-US44-M-Brwn\",\n \"weight_grams\": 440,\n \"barcode\": 712345000019,\n \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"images\": [\n \"https://example.com/example.jpg\"\n ],\n \"options\": [\n {\n \"position\": 1,\n \"value\": \"Red\"\n }\n ],\n \"logistics_information\": {\n \"origin_country_code\": \"US\",\n \"origin_region_code\": \"CA\",\n \"default_hs_code\": \"1234567890\",\n \"requires_shipping\": true,\n \"cost\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"destination_country_hs_codes\": [\n {\n \"destination_country_code\": \"US\",\n \"hs_code\": \"1234567890\"\n }\n ]\n },\n \"dimensions\": {\n \"depth\": 8.5,\n \"width\": 6,\n \"height\": 2.25\n },\n \"locale_data\": [\n {\n \"locale\": \"fr-CA\",\n \"name\": \"Chaussures Habillées Marron Classiques - Taille 12\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/2026-10/products/{productId}/product-variants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Classic Brown Dress Shoes - Size 12\",\n \"external_id\": \"564400c7-7a6b-4f29-b6a5-7bb580b2992c\",\n \"sku\": \"SHOES-US44-M-Brwn\",\n \"weight_grams\": 440,\n \"barcode\": 712345000019,\n \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"images\": [\n \"https://example.com/example.jpg\"\n ],\n \"options\": [\n {\n \"position\": 1,\n \"value\": \"Red\"\n }\n ],\n \"logistics_information\": {\n \"origin_country_code\": \"US\",\n \"origin_region_code\": \"CA\",\n \"default_hs_code\": \"1234567890\",\n \"requires_shipping\": true,\n \"cost\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\n \"destination_country_hs_codes\": [\n {\n \"destination_country_code\": \"US\",\n \"hs_code\": \"1234567890\"\n }\n ]\n },\n \"dimensions\": {\n \"depth\": 8.5,\n \"width\": 6,\n \"height\": 2.25\n },\n \"locale_data\": [\n {\n \"locale\": \"fr-CA\",\n \"name\": \"Chaussures Habillées Marron Classiques - Taille 12\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"product_variant": {
"id": 810772,
"external_id": "564400c7-7a6b-4f29-b6a5-7bb580b2992c",
"sku": "SHOES-US44-M-Brwn",
"name": "Classic Brown Dress Shoes - Size 12",
"weight_grams": 500,
"barcode": "1234asdf324",
"product": {
"id": 810772,
"external_id": "564400c7-7a6b-4f29-b6a5-7bb580b2992c",
"sku": "SHOES-US44-M-Brwn",
"name": "<string>"
},
"price": {
"amount": 50000,
"currency_code": "USD"
},
"images": [
"https://example.com/example.jpg"
],
"inventories": [
{
"id": 127302,
"available_count": 10,
"location": {
"id": 182973,
"external_id": "564400c7-7a6b-4f29-b6a5-7bb580b2992c",
"name": "<string>"
}
}
],
"options": [
{
"position": 1,
"value": "Red"
}
],
"logistics_information": {
"origin_country_code": "US",
"origin_region_code": "CA",
"default_hs_code": "1234567890",
"requires_shipping": true,
"cost": {
"amount": 50000,
"currency_code": "USD"
},
"destination_country_hs_codes": [
{
"destination_country_code": "US",
"hs_code": "1234567890"
}
]
},
"dimensions": {
"depth": 8.5,
"width": 6,
"height": 2.25
}
}
}"<unknown>"Body
application/json