curl --request PATCH \
--url https://api.centralcart.io/v1/app/package/{package-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"category_id": 123,
"enabled": true,
"price": 123,
"compare_at_price": 123,
"expiry_days": 123,
"inventory_amount": 123,
"per_user_limit": true,
"min_amount": 123,
"image": "<string>",
"images": [
"<string>"
],
"parent_id": 123,
"commands": [
{
"command": "<string>",
"game_server_id": 123,
"offline_execute": true,
"schedule": 123,
"execute_once": true
}
],
"discord_actions": [
{
"parameters": {
"role_id": "<string>",
"channel_id": "<string>",
"message": "<string>"
}
}
],
"variables": [
123
],
"content": {
"title": "<string>",
"value": "<string>",
"is_plain": true,
"send_email": true
},
"license_keys": [
"<string>"
],
"license_key_format": {
"separator": "<string>",
"fields": [
"<string>"
]
},
"chat_delivery": {
"enabled": true,
"initial_message": "<string>"
}
}
'import requests
url = "https://api.centralcart.io/v1/app/package/{package-id}"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"category_id": 123,
"enabled": True,
"price": 123,
"compare_at_price": 123,
"expiry_days": 123,
"inventory_amount": 123,
"per_user_limit": True,
"min_amount": 123,
"image": "<string>",
"images": ["<string>"],
"parent_id": 123,
"commands": [
{
"command": "<string>",
"game_server_id": 123,
"offline_execute": True,
"schedule": 123,
"execute_once": True
}
],
"discord_actions": [{ "parameters": {
"role_id": "<string>",
"channel_id": "<string>",
"message": "<string>"
} }],
"variables": [123],
"content": {
"title": "<string>",
"value": "<string>",
"is_plain": True,
"send_email": True
},
"license_keys": ["<string>"],
"license_key_format": {
"separator": "<string>",
"fields": ["<string>"]
},
"chat_delivery": {
"enabled": True,
"initial_message": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
category_id: 123,
enabled: true,
price: 123,
compare_at_price: 123,
expiry_days: 123,
inventory_amount: 123,
per_user_limit: true,
min_amount: 123,
image: '<string>',
images: ['<string>'],
parent_id: 123,
commands: [
{
command: '<string>',
game_server_id: 123,
offline_execute: true,
schedule: 123,
execute_once: true
}
],
discord_actions: [
{parameters: {role_id: '<string>', channel_id: '<string>', message: '<string>'}}
],
variables: [123],
content: {title: '<string>', value: '<string>', is_plain: true, send_email: true},
license_keys: ['<string>'],
license_key_format: {separator: '<string>', fields: ['<string>']},
chat_delivery: {enabled: true, initial_message: '<string>'}
})
};
fetch('https://api.centralcart.io/v1/app/package/{package-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.centralcart.io/v1/app/package/{package-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([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'category_id' => 123,
'enabled' => true,
'price' => 123,
'compare_at_price' => 123,
'expiry_days' => 123,
'inventory_amount' => 123,
'per_user_limit' => true,
'min_amount' => 123,
'image' => '<string>',
'images' => [
'<string>'
],
'parent_id' => 123,
'commands' => [
[
'command' => '<string>',
'game_server_id' => 123,
'offline_execute' => true,
'schedule' => 123,
'execute_once' => true
]
],
'discord_actions' => [
[
'parameters' => [
'role_id' => '<string>',
'channel_id' => '<string>',
'message' => '<string>'
]
]
],
'variables' => [
123
],
'content' => [
'title' => '<string>',
'value' => '<string>',
'is_plain' => true,
'send_email' => true
],
'license_keys' => [
'<string>'
],
'license_key_format' => [
'separator' => '<string>',
'fields' => [
'<string>'
]
],
'chat_delivery' => [
'enabled' => true,
'initial_message' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.centralcart.io/v1/app/package/{package-id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"category_id\": 123,\n \"enabled\": true,\n \"price\": 123,\n \"compare_at_price\": 123,\n \"expiry_days\": 123,\n \"inventory_amount\": 123,\n \"per_user_limit\": true,\n \"min_amount\": 123,\n \"image\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"parent_id\": 123,\n \"commands\": [\n {\n \"command\": \"<string>\",\n \"game_server_id\": 123,\n \"offline_execute\": true,\n \"schedule\": 123,\n \"execute_once\": true\n }\n ],\n \"discord_actions\": [\n {\n \"parameters\": {\n \"role_id\": \"<string>\",\n \"channel_id\": \"<string>\",\n \"message\": \"<string>\"\n }\n }\n ],\n \"variables\": [\n 123\n ],\n \"content\": {\n \"title\": \"<string>\",\n \"value\": \"<string>\",\n \"is_plain\": true,\n \"send_email\": true\n },\n \"license_keys\": [\n \"<string>\"\n ],\n \"license_key_format\": {\n \"separator\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ]\n },\n \"chat_delivery\": {\n \"enabled\": true,\n \"initial_message\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.centralcart.io/v1/app/package/{package-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"category_id\": 123,\n \"enabled\": true,\n \"price\": 123,\n \"compare_at_price\": 123,\n \"expiry_days\": 123,\n \"inventory_amount\": 123,\n \"per_user_limit\": true,\n \"min_amount\": 123,\n \"image\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"parent_id\": 123,\n \"commands\": [\n {\n \"command\": \"<string>\",\n \"game_server_id\": 123,\n \"offline_execute\": true,\n \"schedule\": 123,\n \"execute_once\": true\n }\n ],\n \"discord_actions\": [\n {\n \"parameters\": {\n \"role_id\": \"<string>\",\n \"channel_id\": \"<string>\",\n \"message\": \"<string>\"\n }\n }\n ],\n \"variables\": [\n 123\n ],\n \"content\": {\n \"title\": \"<string>\",\n \"value\": \"<string>\",\n \"is_plain\": true,\n \"send_email\": true\n },\n \"license_keys\": [\n \"<string>\"\n ],\n \"license_key_format\": {\n \"separator\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ]\n },\n \"chat_delivery\": {\n \"enabled\": true,\n \"initial_message\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/app/package/{package-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"category_id\": 123,\n \"enabled\": true,\n \"price\": 123,\n \"compare_at_price\": 123,\n \"expiry_days\": 123,\n \"inventory_amount\": 123,\n \"per_user_limit\": true,\n \"min_amount\": 123,\n \"image\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"parent_id\": 123,\n \"commands\": [\n {\n \"command\": \"<string>\",\n \"game_server_id\": 123,\n \"offline_execute\": true,\n \"schedule\": 123,\n \"execute_once\": true\n }\n ],\n \"discord_actions\": [\n {\n \"parameters\": {\n \"role_id\": \"<string>\",\n \"channel_id\": \"<string>\",\n \"message\": \"<string>\"\n }\n }\n ],\n \"variables\": [\n 123\n ],\n \"content\": {\n \"title\": \"<string>\",\n \"value\": \"<string>\",\n \"is_plain\": true,\n \"send_email\": true\n },\n \"license_keys\": [\n \"<string>\"\n ],\n \"license_key_format\": {\n \"separator\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ]\n },\n \"chat_delivery\": {\n \"enabled\": true,\n \"initial_message\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 100214,
"store_id": 1,
"category_id": 15124,
"position": 1,
"enabled": true,
"name": "Pacote",
"slug": "package-100214",
"type": "MULTIPLE",
"price": 20,
"compare_at_price": null,
"expiry_days": null,
"inventory_amount": null,
"per_user_limit": false,
"description": "Descrição do pacote",
"image": "https://cdn.centralcart.io/stores/1/packages/264573df-588e-45e2-a623-69184f75e7d7.gif",
"images": [
"https://cdn.centralcart.io/stores/1/packages/264573df-588e-45e2-a623-69184f75e7d7.gif"
],
"icon": null,
"parent_id": null,
"is_variation_parent": false,
"download_key": null,
"min_amount": null,
"license_key_format": null,
"chat_delivery": null,
"price_display": "R$ 20,00",
"created_at": "2024-02-25T12:27:33.000-03:00",
"updated_at": "2026-04-09T13:43:55.610-03:00"
}Update Package
Atualiza detalhes do pacote. Todos os campos do corpo são opcionais.
curl --request PATCH \
--url https://api.centralcart.io/v1/app/package/{package-id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"category_id": 123,
"enabled": true,
"price": 123,
"compare_at_price": 123,
"expiry_days": 123,
"inventory_amount": 123,
"per_user_limit": true,
"min_amount": 123,
"image": "<string>",
"images": [
"<string>"
],
"parent_id": 123,
"commands": [
{
"command": "<string>",
"game_server_id": 123,
"offline_execute": true,
"schedule": 123,
"execute_once": true
}
],
"discord_actions": [
{
"parameters": {
"role_id": "<string>",
"channel_id": "<string>",
"message": "<string>"
}
}
],
"variables": [
123
],
"content": {
"title": "<string>",
"value": "<string>",
"is_plain": true,
"send_email": true
},
"license_keys": [
"<string>"
],
"license_key_format": {
"separator": "<string>",
"fields": [
"<string>"
]
},
"chat_delivery": {
"enabled": true,
"initial_message": "<string>"
}
}
'import requests
url = "https://api.centralcart.io/v1/app/package/{package-id}"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"category_id": 123,
"enabled": True,
"price": 123,
"compare_at_price": 123,
"expiry_days": 123,
"inventory_amount": 123,
"per_user_limit": True,
"min_amount": 123,
"image": "<string>",
"images": ["<string>"],
"parent_id": 123,
"commands": [
{
"command": "<string>",
"game_server_id": 123,
"offline_execute": True,
"schedule": 123,
"execute_once": True
}
],
"discord_actions": [{ "parameters": {
"role_id": "<string>",
"channel_id": "<string>",
"message": "<string>"
} }],
"variables": [123],
"content": {
"title": "<string>",
"value": "<string>",
"is_plain": True,
"send_email": True
},
"license_keys": ["<string>"],
"license_key_format": {
"separator": "<string>",
"fields": ["<string>"]
},
"chat_delivery": {
"enabled": True,
"initial_message": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
category_id: 123,
enabled: true,
price: 123,
compare_at_price: 123,
expiry_days: 123,
inventory_amount: 123,
per_user_limit: true,
min_amount: 123,
image: '<string>',
images: ['<string>'],
parent_id: 123,
commands: [
{
command: '<string>',
game_server_id: 123,
offline_execute: true,
schedule: 123,
execute_once: true
}
],
discord_actions: [
{parameters: {role_id: '<string>', channel_id: '<string>', message: '<string>'}}
],
variables: [123],
content: {title: '<string>', value: '<string>', is_plain: true, send_email: true},
license_keys: ['<string>'],
license_key_format: {separator: '<string>', fields: ['<string>']},
chat_delivery: {enabled: true, initial_message: '<string>'}
})
};
fetch('https://api.centralcart.io/v1/app/package/{package-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.centralcart.io/v1/app/package/{package-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([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'category_id' => 123,
'enabled' => true,
'price' => 123,
'compare_at_price' => 123,
'expiry_days' => 123,
'inventory_amount' => 123,
'per_user_limit' => true,
'min_amount' => 123,
'image' => '<string>',
'images' => [
'<string>'
],
'parent_id' => 123,
'commands' => [
[
'command' => '<string>',
'game_server_id' => 123,
'offline_execute' => true,
'schedule' => 123,
'execute_once' => true
]
],
'discord_actions' => [
[
'parameters' => [
'role_id' => '<string>',
'channel_id' => '<string>',
'message' => '<string>'
]
]
],
'variables' => [
123
],
'content' => [
'title' => '<string>',
'value' => '<string>',
'is_plain' => true,
'send_email' => true
],
'license_keys' => [
'<string>'
],
'license_key_format' => [
'separator' => '<string>',
'fields' => [
'<string>'
]
],
'chat_delivery' => [
'enabled' => true,
'initial_message' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.centralcart.io/v1/app/package/{package-id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"category_id\": 123,\n \"enabled\": true,\n \"price\": 123,\n \"compare_at_price\": 123,\n \"expiry_days\": 123,\n \"inventory_amount\": 123,\n \"per_user_limit\": true,\n \"min_amount\": 123,\n \"image\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"parent_id\": 123,\n \"commands\": [\n {\n \"command\": \"<string>\",\n \"game_server_id\": 123,\n \"offline_execute\": true,\n \"schedule\": 123,\n \"execute_once\": true\n }\n ],\n \"discord_actions\": [\n {\n \"parameters\": {\n \"role_id\": \"<string>\",\n \"channel_id\": \"<string>\",\n \"message\": \"<string>\"\n }\n }\n ],\n \"variables\": [\n 123\n ],\n \"content\": {\n \"title\": \"<string>\",\n \"value\": \"<string>\",\n \"is_plain\": true,\n \"send_email\": true\n },\n \"license_keys\": [\n \"<string>\"\n ],\n \"license_key_format\": {\n \"separator\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ]\n },\n \"chat_delivery\": {\n \"enabled\": true,\n \"initial_message\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.centralcart.io/v1/app/package/{package-id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"category_id\": 123,\n \"enabled\": true,\n \"price\": 123,\n \"compare_at_price\": 123,\n \"expiry_days\": 123,\n \"inventory_amount\": 123,\n \"per_user_limit\": true,\n \"min_amount\": 123,\n \"image\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"parent_id\": 123,\n \"commands\": [\n {\n \"command\": \"<string>\",\n \"game_server_id\": 123,\n \"offline_execute\": true,\n \"schedule\": 123,\n \"execute_once\": true\n }\n ],\n \"discord_actions\": [\n {\n \"parameters\": {\n \"role_id\": \"<string>\",\n \"channel_id\": \"<string>\",\n \"message\": \"<string>\"\n }\n }\n ],\n \"variables\": [\n 123\n ],\n \"content\": {\n \"title\": \"<string>\",\n \"value\": \"<string>\",\n \"is_plain\": true,\n \"send_email\": true\n },\n \"license_keys\": [\n \"<string>\"\n ],\n \"license_key_format\": {\n \"separator\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ]\n },\n \"chat_delivery\": {\n \"enabled\": true,\n \"initial_message\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.centralcart.io/v1/app/package/{package-id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"category_id\": 123,\n \"enabled\": true,\n \"price\": 123,\n \"compare_at_price\": 123,\n \"expiry_days\": 123,\n \"inventory_amount\": 123,\n \"per_user_limit\": true,\n \"min_amount\": 123,\n \"image\": \"<string>\",\n \"images\": [\n \"<string>\"\n ],\n \"parent_id\": 123,\n \"commands\": [\n {\n \"command\": \"<string>\",\n \"game_server_id\": 123,\n \"offline_execute\": true,\n \"schedule\": 123,\n \"execute_once\": true\n }\n ],\n \"discord_actions\": [\n {\n \"parameters\": {\n \"role_id\": \"<string>\",\n \"channel_id\": \"<string>\",\n \"message\": \"<string>\"\n }\n }\n ],\n \"variables\": [\n 123\n ],\n \"content\": {\n \"title\": \"<string>\",\n \"value\": \"<string>\",\n \"is_plain\": true,\n \"send_email\": true\n },\n \"license_keys\": [\n \"<string>\"\n ],\n \"license_key_format\": {\n \"separator\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ]\n },\n \"chat_delivery\": {\n \"enabled\": true,\n \"initial_message\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 100214,
"store_id": 1,
"category_id": 15124,
"position": 1,
"enabled": true,
"name": "Pacote",
"slug": "package-100214",
"type": "MULTIPLE",
"price": 20,
"compare_at_price": null,
"expiry_days": null,
"inventory_amount": null,
"per_user_limit": false,
"description": "Descrição do pacote",
"image": "https://cdn.centralcart.io/stores/1/packages/264573df-588e-45e2-a623-69184f75e7d7.gif",
"images": [
"https://cdn.centralcart.io/stores/1/packages/264573df-588e-45e2-a623-69184f75e7d7.gif"
],
"icon": null,
"parent_id": null,
"is_variation_parent": false,
"download_key": null,
"min_amount": null,
"license_key_format": null,
"chat_delivery": null,
"price_display": "R$ 20,00",
"created_at": "2024-02-25T12:27:33.000-03:00",
"updated_at": "2026-04-09T13:43:55.610-03:00"
}Autorizações
Token de API gerado no painel da CentralCart.
Parâmetros de caminho
O ID do pacote a ser atualizado
Corpo
Nome do pacote
Slug único do pacote (usado na URL). Se o slug informado já estiver em uso por outro pacote da loja, a requisição retornará erro.
Descrição detalhada do pacote
ID da categoria do pacote. Se o pacote possuir variações, a categoria delas também será atualizada.
Define se o pacote está visível na loja
Preço do pacote
Preço de comparação (preço original antes do desconto)
Número de dias até a expiração. Envie null para pacotes sem expiração.
Tipo do pacote: SINGLE ou MULTIPLE
SINGLE, MULTIPLE Quantidade em estoque. Envie null para estoque ilimitado.
Define se o pacote pode ser comprado apenas uma vez por usuário
Quantidade mínima de compra (apenas pacotes MULTIPLE)
URL da imagem do pacote. Envie null para remover a imagem
Lista de até 5 URLs de imagens do pacote. A primeira vira a principal (image é derivado de images[0]). Envie [] para limpar.
5ID do pacote pai. Use para transformar o pacote em uma variação
Lista de comandos associados. Se fornecida, substitui todos os comandos existentes.
Show child attributes
Show child attributes
Ações do Discord. Se fornecida, substitui todas as ações existentes.
Show child attributes
Show child attributes
IDs das variáveis associadas. O conjunto é sincronizado com o enviado. Envie null para remover todas as variáveis.
Conteúdo adicional entregue na compra. Envie null para remover.
Show child attributes
Show child attributes
Lista completa de chaves de licença (máximo 5.000 chaves, 3.000 caracteres cada). Envie null para remover todas
Aplicar formatação em chaves de licença. Envie null para remover
Show child attributes
Show child attributes
Configurações de entrega via chat. Envie null para desabilitar
Show child attributes
Show child attributes
Resposta
OK
Representação de um pacote.
SINGLE, MULTIPLE