curl --request POST \
--url https://api.loopreturns.com/api/v1/products \
--header 'Content-Type: application/json' \
--header 'X-Authorization: <api-key>' \
--data '
{
"name": "<string>",
"sales_channel": "<string>",
"source": "<string>",
"external_id": "<string>",
"sku": "<string>",
"weight_grams": 123,
"barcode": "<string>",
"description": "<string>",
"type": "<string>",
"vendor": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"options": [
{
"position": 123,
"values": [
"<string>"
],
"name": "<string>"
}
],
"images": [
"<string>"
],
"tags": [
"<string>"
],
"is_gift_card": true,
"locale_data": [
{
"locale": "<string>",
"name": "<string>",
"description": "<string>",
"options": [
{
"position": 123,
"name": "<string>",
"values": {}
}
]
}
]
}
'import requests
url = "https://api.loopreturns.com/api/v1/products"
payload = {
"name": "<string>",
"sales_channel": "<string>",
"source": "<string>",
"external_id": "<string>",
"sku": "<string>",
"weight_grams": 123,
"barcode": "<string>",
"description": "<string>",
"type": "<string>",
"vendor": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"options": [
{
"position": 123,
"values": ["<string>"],
"name": "<string>"
}
],
"images": ["<string>"],
"tags": ["<string>"],
"is_gift_card": True,
"locale_data": [
{
"locale": "<string>",
"name": "<string>",
"description": "<string>",
"options": [
{
"position": 123,
"name": "<string>",
"values": {}
}
]
}
]
}
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: '<string>',
sales_channel: '<string>',
source: '<string>',
external_id: '<string>',
sku: '<string>',
weight_grams: 123,
barcode: '<string>',
description: '<string>',
type: '<string>',
vendor: '<string>',
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z',
options: [{position: 123, values: ['<string>'], name: '<string>'}],
images: ['<string>'],
tags: ['<string>'],
is_gift_card: true,
locale_data: [
{
locale: '<string>',
name: '<string>',
description: '<string>',
options: [{position: 123, name: '<string>', values: {}}]
}
]
})
};
fetch('https://api.loopreturns.com/api/v1/products', 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/v1/products",
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' => '<string>',
'sales_channel' => '<string>',
'source' => '<string>',
'external_id' => '<string>',
'sku' => '<string>',
'weight_grams' => 123,
'barcode' => '<string>',
'description' => '<string>',
'type' => '<string>',
'vendor' => '<string>',
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z',
'options' => [
[
'position' => 123,
'values' => [
'<string>'
],
'name' => '<string>'
]
],
'images' => [
'<string>'
],
'tags' => [
'<string>'
],
'is_gift_card' => true,
'locale_data' => [
[
'locale' => '<string>',
'name' => '<string>',
'description' => '<string>',
'options' => [
[
'position' => 123,
'name' => '<string>',
'values' => [
]
]
]
]
]
]),
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/v1/products"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"sales_channel\": \"<string>\",\n \"source\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sku\": \"<string>\",\n \"weight_grams\": 123,\n \"barcode\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"vendor\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"options\": [\n {\n \"position\": 123,\n \"values\": [\n \"<string>\"\n ],\n \"name\": \"<string>\"\n }\n ],\n \"images\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"is_gift_card\": true,\n \"locale_data\": [\n {\n \"locale\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"options\": [\n {\n \"position\": 123,\n \"name\": \"<string>\",\n \"values\": {}\n }\n ]\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/v1/products")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"sales_channel\": \"<string>\",\n \"source\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sku\": \"<string>\",\n \"weight_grams\": 123,\n \"barcode\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"vendor\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"options\": [\n {\n \"position\": 123,\n \"values\": [\n \"<string>\"\n ],\n \"name\": \"<string>\"\n }\n ],\n \"images\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"is_gift_card\": true,\n \"locale_data\": [\n {\n \"locale\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"options\": [\n {\n \"position\": 123,\n \"name\": \"<string>\",\n \"values\": {}\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/products")
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\": \"<string>\",\n \"sales_channel\": \"<string>\",\n \"source\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sku\": \"<string>\",\n \"weight_grams\": 123,\n \"barcode\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"vendor\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"options\": [\n {\n \"position\": 123,\n \"values\": [\n \"<string>\"\n ],\n \"name\": \"<string>\"\n }\n ],\n \"images\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"is_gift_card\": true,\n \"locale_data\": [\n {\n \"locale\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"options\": [\n {\n \"position\": 123,\n \"name\": \"<string>\",\n \"values\": {}\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"product": {
"id": 2,
"external_id": "<string>",
"sales_channel": "<string>",
"sku": "<string>",
"name": "<string>",
"weight_grams": 123,
"barcode": "<string>",
"description": "<string>",
"type": "<string>",
"vendor": "<string>",
"price": {
"amount": 50000,
"currency_code": "USD"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"collections": [
{
"id": 2,
"external_id": "<string>",
"name": "<string>"
}
],
"options": [
{
"position": 123,
"values": [
"<string>"
],
"name": "<string>"
}
],
"images": [
"<string>"
],
"tags": [
"<string>"
],
"source": "<string>",
"default_variant_id": 123
}
}{
"errors": "<string>"
}Create Product
Create a new product.
curl --request POST \
--url https://api.loopreturns.com/api/v1/products \
--header 'Content-Type: application/json' \
--header 'X-Authorization: <api-key>' \
--data '
{
"name": "<string>",
"sales_channel": "<string>",
"source": "<string>",
"external_id": "<string>",
"sku": "<string>",
"weight_grams": 123,
"barcode": "<string>",
"description": "<string>",
"type": "<string>",
"vendor": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"options": [
{
"position": 123,
"values": [
"<string>"
],
"name": "<string>"
}
],
"images": [
"<string>"
],
"tags": [
"<string>"
],
"is_gift_card": true,
"locale_data": [
{
"locale": "<string>",
"name": "<string>",
"description": "<string>",
"options": [
{
"position": 123,
"name": "<string>",
"values": {}
}
]
}
]
}
'import requests
url = "https://api.loopreturns.com/api/v1/products"
payload = {
"name": "<string>",
"sales_channel": "<string>",
"source": "<string>",
"external_id": "<string>",
"sku": "<string>",
"weight_grams": 123,
"barcode": "<string>",
"description": "<string>",
"type": "<string>",
"vendor": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"options": [
{
"position": 123,
"values": ["<string>"],
"name": "<string>"
}
],
"images": ["<string>"],
"tags": ["<string>"],
"is_gift_card": True,
"locale_data": [
{
"locale": "<string>",
"name": "<string>",
"description": "<string>",
"options": [
{
"position": 123,
"name": "<string>",
"values": {}
}
]
}
]
}
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: '<string>',
sales_channel: '<string>',
source: '<string>',
external_id: '<string>',
sku: '<string>',
weight_grams: 123,
barcode: '<string>',
description: '<string>',
type: '<string>',
vendor: '<string>',
created_at: '2023-11-07T05:31:56Z',
updated_at: '2023-11-07T05:31:56Z',
options: [{position: 123, values: ['<string>'], name: '<string>'}],
images: ['<string>'],
tags: ['<string>'],
is_gift_card: true,
locale_data: [
{
locale: '<string>',
name: '<string>',
description: '<string>',
options: [{position: 123, name: '<string>', values: {}}]
}
]
})
};
fetch('https://api.loopreturns.com/api/v1/products', 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/v1/products",
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' => '<string>',
'sales_channel' => '<string>',
'source' => '<string>',
'external_id' => '<string>',
'sku' => '<string>',
'weight_grams' => 123,
'barcode' => '<string>',
'description' => '<string>',
'type' => '<string>',
'vendor' => '<string>',
'created_at' => '2023-11-07T05:31:56Z',
'updated_at' => '2023-11-07T05:31:56Z',
'options' => [
[
'position' => 123,
'values' => [
'<string>'
],
'name' => '<string>'
]
],
'images' => [
'<string>'
],
'tags' => [
'<string>'
],
'is_gift_card' => true,
'locale_data' => [
[
'locale' => '<string>',
'name' => '<string>',
'description' => '<string>',
'options' => [
[
'position' => 123,
'name' => '<string>',
'values' => [
]
]
]
]
]
]),
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/v1/products"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"sales_channel\": \"<string>\",\n \"source\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sku\": \"<string>\",\n \"weight_grams\": 123,\n \"barcode\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"vendor\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"options\": [\n {\n \"position\": 123,\n \"values\": [\n \"<string>\"\n ],\n \"name\": \"<string>\"\n }\n ],\n \"images\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"is_gift_card\": true,\n \"locale_data\": [\n {\n \"locale\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"options\": [\n {\n \"position\": 123,\n \"name\": \"<string>\",\n \"values\": {}\n }\n ]\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/v1/products")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"sales_channel\": \"<string>\",\n \"source\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sku\": \"<string>\",\n \"weight_grams\": 123,\n \"barcode\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"vendor\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"options\": [\n {\n \"position\": 123,\n \"values\": [\n \"<string>\"\n ],\n \"name\": \"<string>\"\n }\n ],\n \"images\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"is_gift_card\": true,\n \"locale_data\": [\n {\n \"locale\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"options\": [\n {\n \"position\": 123,\n \"name\": \"<string>\",\n \"values\": {}\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/products")
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\": \"<string>\",\n \"sales_channel\": \"<string>\",\n \"source\": \"<string>\",\n \"external_id\": \"<string>\",\n \"sku\": \"<string>\",\n \"weight_grams\": 123,\n \"barcode\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"vendor\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"options\": [\n {\n \"position\": 123,\n \"values\": [\n \"<string>\"\n ],\n \"name\": \"<string>\"\n }\n ],\n \"images\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"is_gift_card\": true,\n \"locale_data\": [\n {\n \"locale\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"options\": [\n {\n \"position\": 123,\n \"name\": \"<string>\",\n \"values\": {}\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"product": {
"id": 2,
"external_id": "<string>",
"sales_channel": "<string>",
"sku": "<string>",
"name": "<string>",
"weight_grams": 123,
"barcode": "<string>",
"description": "<string>",
"type": "<string>",
"vendor": "<string>",
"price": {
"amount": 50000,
"currency_code": "USD"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"collections": [
{
"id": 2,
"external_id": "<string>",
"name": "<string>"
}
],
"options": [
{
"position": 123,
"values": [
"<string>"
],
"name": "<string>"
}
],
"images": [
"<string>"
],
"tags": [
"<string>"
],
"source": "<string>",
"default_variant_id": 123
}
}{
"errors": "<string>"
}Authorizations
API Scope: "Product (write)"
Body
The name of the product.
255If a channel with this name is not already associated with the shop, it will be used to create a new channel.
255The ecommerce platform from which the product is available.
255"Shopify"
The provided external_id must be unique. If a non-unique external_id is provided, the API will respond with an error.
100"564400c7-7a6b-4f29-b6a5-7bb580b2992c"
The SKU of the product.
255"SHOES-US44-M-Brwn"
The weight of the product in grams.
The barcode of the product.
255The description of the product.
65000The "type" of the product. This is a single value used to classify and group similar products.
255"shoes"
The manufacturer or seller of the product.
255"Internal"
The price of the product in minor units, such as cents, with its corresponding currency.
Show child attributes
Show child attributes
{ "amount": 50000, "currency_code": "USD" }
{ "amount": 25000 }
{ "amount": 1500, "currency_code": "EUR" }
The date and time at which the product was created.
"2023-04-25T18:25:00.000Z"
The date and time at which the product was updated. The value must be equal or greater than created_at.
"2023-04-25T13:45:00-05:00"
An array of optional features or characteristics of the product that can be selected by the customer.
Show child attributes
Show child attributes
An array of URLs which reference images of the product.
1An array of tags used to classify and group products.
1 - 255Whether the product is a gift card.
false
Translated content for this product, one entry per locale. Locales must be unique within the array.
Show child attributes
Show child attributes
Response
OK
Show child attributes
Show child attributes