products.hub_create
Criar produto com oferta principal. Cria o produto e a oferta principal (priceCents mínimo 500, recurrence para assinatura; produto físico só aceita pagamento único e exige quantity). limit_reached quando o plano define plans.limits.products e a conta já usa todos. A oferta nasce inativa até estar completa.
- Endpoint:
POST https://app.atomiks.com.br/api/v1/products.hub_create(corpo JSON) - Quem pode chamar: administrador da conta
- Escopo da chave:
crm:write - Grava dados: sim
- Pela chave de API: sim
- Ferramenta MCP:
products_hub_create - Ficha em JSON:
https://app.atomiks.com.br/api/v1/openapi.json(operationIdproducts.hub_create)
Entrada
| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
type | "course" | "community" | "ebook" | "mentorship" | "event" | "software" | "physical" | "other" | sim | |
name | string | sim | |
description | string | sim | |
category | string | sim | |
priceCents | integer | sim | |
recurrence | object | null | não | |
quantity | integer | não | |
checkoutType | "internal" | "external" | não |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"course",
"community",
"ebook",
"mentorship",
"event",
"software",
"physical",
"other"
]
},
"name": {
"type": "string",
"minLength": 1,
"maxLength": 120
},
"description": {
"type": "string",
"minLength": 50,
"maxLength": 1000
},
"category": {
"type": "string",
"maxLength": 80
},
"priceCents": {
"type": "integer",
"minimum": 500,
"maximum": 9007199254740991
},
"recurrence": {
"anyOf": [
{
"type": "object",
"properties": {
"frequency": {
"type": "string",
"enum": [
"monthly",
"quarterly",
"semi-annually",
"yearly"
]
},
"intervalMonths": {
"type": "integer",
"minimum": 1,
"maximum": 12
},
"trialDays": {
"type": "integer",
"minimum": 0,
"maximum": 180
}
},
"required": [
"frequency",
"intervalMonths",
"trialDays"
]
},
{
"type": "null"
}
]
},
"quantity": {
"type": "integer",
"minimum": 0,
"maximum": 100
},
"checkoutType": {
"type": "string",
"enum": [
"internal",
"external"
]
}
},
"required": [
"type",
"name",
"description",
"category",
"priceCents"
]
}Exemplo
curl -X POST https://app.atomiks.com.br/api/v1/products.hub_create \
-H "Authorization: Bearer $ATOMIKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"course","name":"Curso de vendas","description":"Aulas gravadas para quem quer aprender a vender mais pelo WhatsApp, passo a passo.","category":"Educacional","priceCents":49700}'CLI:
node cli/atomiks.mjs products.hub_create --json '{"type":"course","name":"Curso de vendas","description":"Aulas gravadas para quem quer aprender a vender mais pelo WhatsApp, passo a passo.","category":"Educacional","priceCents":49700}'MCP: ferramenta products_hub_create com a mesma entrada.
Saída
Sucesso: {"data": ...} com o formato abaixo.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"enum": [
"course",
"community",
"ebook",
"mentorship",
"event",
"software",
"physical",
"other"
]
},
"kind": {
"type": "string",
"enum": [
"physical",
"digital",
"service"
]
},
"category": {
"type": [
"string",
"null"
]
},
"checkoutType": {
"type": "string",
"enum": [
"internal",
"external"
]
},
"priceCents": {
"type": "number"
},
"imageUrl": {
"type": [
"string",
"null"
]
},
"archived": {
"type": "boolean"
},
"createdAt": {
"type": "string"
},
"supportEmail": {
"type": [
"string",
"null"
]
},
"supportPhone": {
"type": [
"string",
"null"
]
},
"softDescriptor": {
"type": [
"string",
"null"
]
},
"refundDays": {
"type": [
"number",
"null"
]
},
"stockQuantity": {
"type": [
"number",
"null"
]
},
"status": {
"type": "string",
"enum": [
"incomplete",
"ready_to_submit",
"approved",
"archived"
]
},
"offers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"productId": {
"type": "string"
},
"name": {
"type": "string"
},
"isMain": {
"type": "boolean"
},
"status": {
"type": "string",
"enum": [
"incomplete",
"ready_to_submit",
"approved",
"archived"
]
},
"priceCents": {
"type": "number"
},
"newPriceCents": {
"type": [
"number",
"null"
]
},
"recurrence": {
"anyOf": [
{
"type": "object",
"properties": {
"frequency": {
"type": "string",
"enum": [
"monthly",
"quarterly",
"semi-annually",
"yearly"
]
},
"intervalMonths": {
"type": "integer",
"minimum": 1,
"maximum": 12
},
"trialDays": {
"type": "integer",
"minimum": 0,
"maximum": 180
}
},
"required": [
"frequency",
"intervalMonths",
"trialDays"
],
"additionalProperties": false
},
{
"type": "null"
}
]
},
"incompleteReason": {
"type": "array",
"items": {
"type": "string"
}
},
"hasCoupon": {
"type": "boolean"
},
"archived": {
"type": "boolean"
}
},
"required": [
"id",
"productId",
"name",
"isMain",
"status",
"priceCents",
"newPriceCents",
"recurrence",
"incompleteReason",
"hasCoupon",
"archived"
],
"additionalProperties": false
}
},
"salesCount": {
"type": "number"
},
"revenueCents": {
"type": "number"
},
"series": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"id",
"name",
"description",
"type",
"kind",
"category",
"checkoutType",
"priceCents",
"imageUrl",
"archived",
"createdAt",
"supportEmail",
"supportPhone",
"softDescriptor",
"refundDays",
"stockQuantity",
"status",
"offers",
"salesCount",
"revenueCents",
"series"
],
"additionalProperties": false
}Erros
{"error": {"code", "message", "requestId"}}. Códigos: invalid_input (400), unauthorized (401), forbidden / account_pending / scope_missing (403), not_found (404), limit_reached (409), internal (500).