Atualizar Produto
curl --request PATCH \
--url https://api.selltrust.com.br/api/v1/product/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"category_id": "<string>",
"title": "<string>",
"description": "<string>",
"images": [
{}
],
"hide_product": true,
"chat_enabled": true,
"chat_welcome_message": "<string>",
"pricing": {},
"min_quantity": 123,
"inventory_amount": 123,
"instructions": "<string>",
"license_keys": [
{}
],
"parent_id": "<string>"
}
'import requests
url = "https://api.selltrust.com.br/api/v1/product/{id}"
payload = {
"category_id": "<string>",
"title": "<string>",
"description": "<string>",
"images": [{}],
"hide_product": True,
"chat_enabled": True,
"chat_welcome_message": "<string>",
"pricing": {},
"min_quantity": 123,
"inventory_amount": 123,
"instructions": "<string>",
"license_keys": [{}],
"parent_id": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category_id: '<string>',
title: '<string>',
description: '<string>',
images: [{}],
hide_product: true,
chat_enabled: true,
chat_welcome_message: '<string>',
pricing: {},
min_quantity: 123,
inventory_amount: 123,
instructions: '<string>',
license_keys: [{}],
parent_id: '<string>'
})
};
fetch('https://api.selltrust.com.br/api/v1/product/{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.selltrust.com.br/api/v1/product/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'category_id' => '<string>',
'title' => '<string>',
'description' => '<string>',
'images' => [
[
]
],
'hide_product' => true,
'chat_enabled' => true,
'chat_welcome_message' => '<string>',
'pricing' => [
],
'min_quantity' => 123,
'inventory_amount' => 123,
'instructions' => '<string>',
'license_keys' => [
[
]
],
'parent_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$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.selltrust.com.br/api/v1/product/{id}"
payload := strings.NewReader("{\n \"category_id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ],\n \"hide_product\": true,\n \"chat_enabled\": true,\n \"chat_welcome_message\": \"<string>\",\n \"pricing\": {},\n \"min_quantity\": 123,\n \"inventory_amount\": 123,\n \"instructions\": \"<string>\",\n \"license_keys\": [\n {}\n ],\n \"parent_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://api.selltrust.com.br/api/v1/product/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"category_id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ],\n \"hide_product\": true,\n \"chat_enabled\": true,\n \"chat_welcome_message\": \"<string>\",\n \"pricing\": {},\n \"min_quantity\": 123,\n \"inventory_amount\": 123,\n \"instructions\": \"<string>\",\n \"license_keys\": [\n {}\n ],\n \"parent_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.selltrust.com.br/api/v1/product/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"category_id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ],\n \"hide_product\": true,\n \"chat_enabled\": true,\n \"chat_welcome_message\": \"<string>\",\n \"pricing\": {},\n \"min_quantity\": 123,\n \"inventory_amount\": 123,\n \"instructions\": \"<string>\",\n \"license_keys\": [\n {}\n ],\n \"parent_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "uuid-do-produto",
"store_id": "uuid-da-loja",
"category_id": "uuid-da-categoria",
"title": "Meu Produto Atualizado",
"slug": "meu-produto-atualizado",
"description": "<p>Detalhes...</p>",
"images": [],
"hide_product": false,
"is_bundle": false,
"price": 99.9,
"comparison_price": null,
"min_quantity": null,
"inventory_amount": 20,
"parent_id": null,
"sales_count": 0,
"chat_enabled": true,
"chat_welcome_message": "Olá!",
"instructions": null,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
Produtos
Atualizar Produto
PATCH
/
api
/
v1
/
product
/
{id}
Atualizar Produto
curl --request PATCH \
--url https://api.selltrust.com.br/api/v1/product/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"category_id": "<string>",
"title": "<string>",
"description": "<string>",
"images": [
{}
],
"hide_product": true,
"chat_enabled": true,
"chat_welcome_message": "<string>",
"pricing": {},
"min_quantity": 123,
"inventory_amount": 123,
"instructions": "<string>",
"license_keys": [
{}
],
"parent_id": "<string>"
}
'import requests
url = "https://api.selltrust.com.br/api/v1/product/{id}"
payload = {
"category_id": "<string>",
"title": "<string>",
"description": "<string>",
"images": [{}],
"hide_product": True,
"chat_enabled": True,
"chat_welcome_message": "<string>",
"pricing": {},
"min_quantity": 123,
"inventory_amount": 123,
"instructions": "<string>",
"license_keys": [{}],
"parent_id": "<string>"
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category_id: '<string>',
title: '<string>',
description: '<string>',
images: [{}],
hide_product: true,
chat_enabled: true,
chat_welcome_message: '<string>',
pricing: {},
min_quantity: 123,
inventory_amount: 123,
instructions: '<string>',
license_keys: [{}],
parent_id: '<string>'
})
};
fetch('https://api.selltrust.com.br/api/v1/product/{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.selltrust.com.br/api/v1/product/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'category_id' => '<string>',
'title' => '<string>',
'description' => '<string>',
'images' => [
[
]
],
'hide_product' => true,
'chat_enabled' => true,
'chat_welcome_message' => '<string>',
'pricing' => [
],
'min_quantity' => 123,
'inventory_amount' => 123,
'instructions' => '<string>',
'license_keys' => [
[
]
],
'parent_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: application/json"
],
]);
$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.selltrust.com.br/api/v1/product/{id}"
payload := strings.NewReader("{\n \"category_id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ],\n \"hide_product\": true,\n \"chat_enabled\": true,\n \"chat_welcome_message\": \"<string>\",\n \"pricing\": {},\n \"min_quantity\": 123,\n \"inventory_amount\": 123,\n \"instructions\": \"<string>\",\n \"license_keys\": [\n {}\n ],\n \"parent_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://api.selltrust.com.br/api/v1/product/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"category_id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ],\n \"hide_product\": true,\n \"chat_enabled\": true,\n \"chat_welcome_message\": \"<string>\",\n \"pricing\": {},\n \"min_quantity\": 123,\n \"inventory_amount\": 123,\n \"instructions\": \"<string>\",\n \"license_keys\": [\n {}\n ],\n \"parent_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.selltrust.com.br/api/v1/product/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"category_id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ],\n \"hide_product\": true,\n \"chat_enabled\": true,\n \"chat_welcome_message\": \"<string>\",\n \"pricing\": {},\n \"min_quantity\": 123,\n \"inventory_amount\": 123,\n \"instructions\": \"<string>\",\n \"license_keys\": [\n {}\n ],\n \"parent_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "uuid-do-produto",
"store_id": "uuid-da-loja",
"category_id": "uuid-da-categoria",
"title": "Meu Produto Atualizado",
"slug": "meu-produto-atualizado",
"description": "<p>Detalhes...</p>",
"images": [],
"hide_product": false,
"is_bundle": false,
"price": 99.9,
"comparison_price": null,
"min_quantity": null,
"inventory_amount": 20,
"parent_id": null,
"sales_count": 0,
"chat_enabled": true,
"chat_welcome_message": "Olá!",
"instructions": null,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
Altera propriedades parciais de um produto existente.
string
required
Token de acesso no formato
Bearer <seu_token>.string
ID da categoria (UUID).
string
Título do produto.
string
Descrição do produto.
array
Lista de imagens do produto.
boolean
Define se o produto está oculto na loja.
boolean
Habilita o chat no produto.
string
Mensagem automática de boas-vindas do chat.
object
Objeto contendo
price e opcionalmente comparison. Válido apenas para produtos simples.number
Quantidade mínima por pedido. Válido apenas para produtos simples.
number
Quantidade em estoque. Válido apenas para produtos simples.
string
Instruções adicionais após a compra. Válido apenas para produtos simples.
array
Lista de chaves de licença (strings). Válido apenas para produtos simples.
string
ID do produto Combo pai.
{
"id": "uuid-do-produto",
"store_id": "uuid-da-loja",
"category_id": "uuid-da-categoria",
"title": "Meu Produto Atualizado",
"slug": "meu-produto-atualizado",
"description": "<p>Detalhes...</p>",
"images": [],
"hide_product": false,
"is_bundle": false,
"price": 99.9,
"comparison_price": null,
"min_quantity": null,
"inventory_amount": 20,
"parent_id": null,
"sales_count": 0,
"chat_enabled": true,
"chat_welcome_message": "Olá!",
"instructions": null,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
⌘I
