curl --request PUT \
--url https://api.loopreturns.com/api/v1/products/{id} \
--header 'Content-Type: application/json' \
--header 'X-Authorization: <api-key>' \
--data '
{
"sales_channel": "<string>",
"name": "<string>",
"source": "<string>",
"external_id": "<string>",
"sku": "<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",
"options": [
{
"position": 123,
"values": [
"<string>"
],
"name": "<string>"
}
],
"images": [
"<string>"
],
"tags": [
"<string>"
],
"is_gift_card": true
}
'import requests
url = "https://api.loopreturns.com/api/v1/products/{id}"
payload = {
"sales_channel": "<string>",
"name": "<string>",
"source": "<string>",
"external_id": "<string>",
"sku": "<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",
"options": [
{
"position": 123,
"values": ["<string>"],
"name": "<string>"
}
],
"images": ["<string>"],
"tags": ["<string>"],
"is_gift_card": True
}
headers = {
"X-Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sales_channel: '<string>',
name: '<string>',
source: '<string>',
external_id: '<string>',
sku: '<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',
options: [{position: 123, values: ['<string>'], name: '<string>'}],
images: ['<string>'],
tags: ['<string>'],
is_gift_card: true
})
};
fetch('https://api.loopreturns.com/api/v1/products/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'sales_channel' => '<string>',
'name' => '<string>',
'source' => '<string>',
'external_id' => '<string>',
'sku' => '<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',
'options' => [
[
'position' => 123,
'values' => [
'<string>'
],
'name' => '<string>'
]
],
'images' => [
'<string>'
],
'tags' => [
'<string>'
],
'is_gift_card' => true
]),
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/{id}"
payload := strings.NewReader("{\n \"sales_channel\": \"<string>\",\n \"name\": \"<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 \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\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}")
req, _ := http.NewRequest("PUT", 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.put("https://api.loopreturns.com/api/v1/products/{id}")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sales_channel\": \"<string>\",\n \"name\": \"<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 \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sales_channel\": \"<string>\",\n \"name\": \"<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 \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\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}"
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>"
}{
"message": "<string>"
}Update Product
Update a product.
curl --request PUT \
--url https://api.loopreturns.com/api/v1/products/{id} \
--header 'Content-Type: application/json' \
--header 'X-Authorization: <api-key>' \
--data '
{
"sales_channel": "<string>",
"name": "<string>",
"source": "<string>",
"external_id": "<string>",
"sku": "<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",
"options": [
{
"position": 123,
"values": [
"<string>"
],
"name": "<string>"
}
],
"images": [
"<string>"
],
"tags": [
"<string>"
],
"is_gift_card": true
}
'import requests
url = "https://api.loopreturns.com/api/v1/products/{id}"
payload = {
"sales_channel": "<string>",
"name": "<string>",
"source": "<string>",
"external_id": "<string>",
"sku": "<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",
"options": [
{
"position": 123,
"values": ["<string>"],
"name": "<string>"
}
],
"images": ["<string>"],
"tags": ["<string>"],
"is_gift_card": True
}
headers = {
"X-Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Authorization': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sales_channel: '<string>',
name: '<string>',
source: '<string>',
external_id: '<string>',
sku: '<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',
options: [{position: 123, values: ['<string>'], name: '<string>'}],
images: ['<string>'],
tags: ['<string>'],
is_gift_card: true
})
};
fetch('https://api.loopreturns.com/api/v1/products/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'sales_channel' => '<string>',
'name' => '<string>',
'source' => '<string>',
'external_id' => '<string>',
'sku' => '<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',
'options' => [
[
'position' => 123,
'values' => [
'<string>'
],
'name' => '<string>'
]
],
'images' => [
'<string>'
],
'tags' => [
'<string>'
],
'is_gift_card' => true
]),
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/{id}"
payload := strings.NewReader("{\n \"sales_channel\": \"<string>\",\n \"name\": \"<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 \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\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}")
req, _ := http.NewRequest("PUT", 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.put("https://api.loopreturns.com/api/v1/products/{id}")
.header("X-Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sales_channel\": \"<string>\",\n \"name\": \"<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 \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\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}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.loopreturns.com/api/v1/products/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sales_channel\": \"<string>\",\n \"name\": \"<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 \"price\": {\n \"amount\": 50000,\n \"currency_code\": \"USD\"\n },\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}"
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>"
}{
"message": "<string>"
}Authorizations
API Scope: "Product (write)"
Path Parameters
The product's unique identifier.
Body
If a channel with this name is not already associated with the shop, it will be used to create a new channel.
255255255The 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"
255"SHOES-US44-M-Brwn"
The weight of the product in grams.
440
The barcode of the product.
255712345000019
65000255255The 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" }"2023-04-25T13:25:00-05:00"
The value must be equal to or greater than created_at.
"2023-04-25T13:45:00-05:00"
The provided array will overwrite the existing set of options.
Show child attributes
Show child attributes
The provided array will overwrite the existing set of images.
1The provided array will overwrite the existing set of tags.
1 - 255Whether the product is a gift card.
false
Response
OK
Show child attributes
Show child attributes