Criar Produto
curl --request POST \
--url https://api.selltrust.com.br/api/v1/product \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"category_id": "<string>",
"title": "<string>",
"description": "<string>",
"images": [
{}
],
"hide_product": true,
"is_bundle": 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"
payload = {
"category_id": "<string>",
"title": "<string>",
"description": "<string>",
"images": [{}],
"hide_product": True,
"is_bundle": 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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category_id: '<string>',
title: '<string>',
description: '<string>',
images: [{}],
hide_product: true,
is_bundle: 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', 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",
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([
'category_id' => '<string>',
'title' => '<string>',
'description' => '<string>',
'images' => [
[
]
],
'hide_product' => true,
'is_bundle' => 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"
payload := strings.NewReader("{\n \"category_id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ],\n \"hide_product\": true,\n \"is_bundle\": 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("POST", 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.post("https://api.selltrust.com.br/api/v1/product")
.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 \"is_bundle\": 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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"is_bundle\": 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",
"slug": "meu-produto",
"description": "<p>Detalhes...</p>",
"images": [],
"hide_product": false,
"is_bundle": false,
"price": 99.9,
"comparison_price": 129.9,
"min_quantity": null,
"inventory_amount": 10,
"parent_id": null,
"sales_count": 0,
"chat_enabled": false,
"chat_welcome_message": null,
"instructions": null,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
Produtos
Criar Produto
POST
/
api
/
v1
/
product
Criar Produto
curl --request POST \
--url https://api.selltrust.com.br/api/v1/product \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"category_id": "<string>",
"title": "<string>",
"description": "<string>",
"images": [
{}
],
"hide_product": true,
"is_bundle": 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"
payload = {
"category_id": "<string>",
"title": "<string>",
"description": "<string>",
"images": [{}],
"hide_product": True,
"is_bundle": 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.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
category_id: '<string>',
title: '<string>',
description: '<string>',
images: [{}],
hide_product: true,
is_bundle: 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', 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",
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([
'category_id' => '<string>',
'title' => '<string>',
'description' => '<string>',
'images' => [
[
]
],
'hide_product' => true,
'is_bundle' => 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"
payload := strings.NewReader("{\n \"category_id\": \"<string>\",\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"images\": [\n {}\n ],\n \"hide_product\": true,\n \"is_bundle\": 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("POST", 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.post("https://api.selltrust.com.br/api/v1/product")
.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 \"is_bundle\": 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")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.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 \"is_bundle\": 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",
"slug": "meu-produto",
"description": "<p>Detalhes...</p>",
"images": [],
"hide_product": false,
"is_bundle": false,
"price": 99.9,
"comparison_price": 129.9,
"min_quantity": null,
"inventory_amount": 10,
"parent_id": null,
"sales_count": 0,
"chat_enabled": false,
"chat_welcome_message": null,
"instructions": null,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
Cadastra um novo produto ou bundle.
Se
string
required
Token de acesso no formato
Bearer <seu_token>.string
required
ID da categoria (UUID).
string
required
Título do produto (entre 2 e 255 caracteres).
string
Descrição do produto (até 50.000 caracteres).
array
required
Lista de imagens do produto (máx 5). Cada imagem possui
name e extension.boolean
required
Define se o produto está oculto na loja.
boolean
required
Define se o produto é um combo (
true) ou simples (false).boolean
required
Habilita o chat no produto.
string
Mensagem automática de boas-vindas do chat.
is_bundle = false (Produto Simples), envie também:
object
Objeto contendo
price (número) e opcionalmente comparison (número).number
Quantidade mínima por pedido.
number
Quantidade em estoque.
string
Instruções adicionais após a compra.
array
Lista de chaves de licença (strings). Se enviado, sobressai o inventory_amount.
string
ID do produto Combo/Bundle pai (caso este produto seja uma variante).
{
"id": "uuid-do-produto",
"store_id": "uuid-da-loja",
"category_id": "uuid-da-categoria",
"title": "Meu Produto",
"slug": "meu-produto",
"description": "<p>Detalhes...</p>",
"images": [],
"hide_product": false,
"is_bundle": false,
"price": 99.9,
"comparison_price": 129.9,
"min_quantity": null,
"inventory_amount": 10,
"parent_id": null,
"sales_count": 0,
"chat_enabled": false,
"chat_welcome_message": null,
"instructions": null,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
⌘I
