Overview
Updated on 10/10/2026
Each Pense Chat client company has its own catalog, stock and sales. With this API, another system sends products, prices and stock to the company, looks up products and fetches sales to post them on its side. The URLs are the same for every company: the token tells which company the call belongs to.
- The company's management system (ERP), which sends the catalog and receives sales.
- Automations in n8n, Make, Zapier or Power Automate, through HTTP calls.
- AI assistants such as ChatGPT and Claude, and n8n agents, through the MCP server.
- Your own code, in any language that can make an HTTP call.
/api/integracao/produtosSend products, prices and stock/api/integracao/produtosLook up products, price and stock/api/integracao/vendasFetch sales, cancellations and returns/api/integracao/vendas/confirmacaoConfirm what was posted/api/integracao/mcpMCP server for AI and automationBase address: https://www.pensechat.com.br
Authentication
Updated on 10/10/2026
Every call uses the Authorization header with the connection token. The company creates the token in the Pense Chat panel, under Settings, Acesso por API tab, and sends it to whoever will integrate.
Each token has its own permissions, set by the company: view products, edit products, view sales, confirm sales and use MCP. It may also have an expiry date. A company can have several tokens, one per system. If one is replaced, the old one stops working immediately.
Authorization: Bearer SEU_TOKEN Content-Type: application/json
To test the token:
curl "https://www.pensechat.com.br/api/integracao/produtos?search=mouse&limit=1" \ -H "Authorization: Bearer SEU_TOKEN"
A 401 means the token is wrong, expired or the connection was turned off. A 403 means the token has no permission for that resource, or the company has not subscribed to a module with a catalog (Store, Stock or POS).
Formats and standards
Updated on 09/10/2026
How each type of data must be sent. Numbers always use a dot as the decimal separator, as JSON requires; the store shows them in Brazilian format (R$ 149,90) to customers. Data in the wrong format is rejected with 422, and the message names the field.
| Data | Format | Example | Notes |
|---|---|---|---|
| Date and time | ISO 8601 with offset | 2026-10-09T10:05:00-03:00 | Without an offset it is rejected. The platform saves in UTC and responses are in UTC (ending in Z). The reference time zone is Brasília (America/Sao_Paulo). |
| Money | Number with a dot, 2 decimals, in BRL | 149.90 | No currency symbol, no thousands separator. Text like "149,90" is rejected. Extra decimals are rounded. |
| Stock and quantity | Number, up to 4 decimals | 18 or 2.5 | Fractions only for products sold by weight or length (kg, m, l). |
| Weight | Number in kg, up to 3 decimals | 0.250 | 250 grams is 0.250. |
| Dimensions | Number in cm, up to 2 decimals | 17.5 | Height, width and length of the package. |
| Codes | Text or integer | "7120" or 7120 | product_code, variant_code and store_code. Numbers become text: 7120 and "7120" are the same code. |
| SKU | Text, up to 60 characters | 7120-1 | Required on every variant. |
| Barcode (ean) | Text, up to 14 digits | 7891234567895 | May be null. |
| Text | UTF-8, accents allowed | Mouse sem fio, preto | internal_name up to 200 characters; internal_description up to 20,000. |
| Boolean | true or false, without quotes | true | Used in is_active and pickup_in_store. |
| Sales unit | One from the list | un | un, kg, g, m, m2, l, cx, par. |
| Missing value | null or omitted field | null | Means "not provided": it never erases what is already on the platform. |
| Platform id | Integer | 1532 | You do not need it to send: use your own codes. It comes back in search and sales, in product_id and variant_id. |
| Messages | Portuguese (pt-BR) | Field names and error codes are in English; messages meant for people are in Portuguese. |
Names and codes
Updated on 09/10/2026
On the platform, the product is identified by its id, a number that never changes. Your codes come along in every response, so you can match them with your system.
| Field | What it is | Who sets it | Where it appears |
|---|---|---|---|
| product_code | Product code in your system. | Your system, on the load. If it changes, it becomes another product. | Load, search and sales. |
| variant_code | Variant code in your system. null for a product without variants. | Your system, on the load. | Load, search and sales. |
| sku | Variant SKU. | Your system, on the load. It may change: the old one still finds the variant. | Load, search and sales. |
| ean | Barcode. | Your system, on the load. | Load, search and sales. |
| product_id | Product id on the platform. Never changes. | The platform, when the product is created. | Search and sales. |
| variant_id | Variant id on the platform. | The platform, when the variant is created. | Search and sales. |
| online_code | Product code on the platform. | For a product created by a load, it comes from your product_code. For one registered in the panel, it is what the company chose. | Search and sales. |
| internal_name | Internal name, as in your system. | Your system, on the load. Updated on every load. | Load, search and sales. |
| internal_description | Internal description, as in your system. | Your system, on the load. Updated on every load. | Load. |
| commercial_name | Commercial name, the one customers see in the store. | The company, in its panel. The load never changes it. | Search and sales. In sales it comes with the variant, like "Mouse Gamer, Preto". |
Example: mouse 7120 in your system becomes product 1532 on the platform. It comes back as product_id 1532 and product_code 7120. A product registered directly in the panel comes with product_code null until the company enters your system's code on the product. On a new product, the commercial name and description start equal to the internal ones, and from then on they belong to the company.
Getting started
Updated on 09/10/2026
- Ask the company for a token. It creates one in the panel, ticks the permissions you will use and sends you the token. It is shown only once.
- Test with new products. Send 2 or 3 products that are not on the platform yet. They are created as drafts and customers do not see them.
- Check the result. The response shows what was created, updated or rejected. The company also sees every load in its panel, field by field.
- Send the full load. All of the company's products, with
load_type: "full", in batches of up to 2000 variants. - After that, only what changes. Use
load_type: "incremental"and send changed and new products.
Send products, prices and stock
Updated on 09/10/2026
Send the products in the body of POST /api/integracao/produtos. The response already contains the result.
How a product is identified
- By
product_codetogether withvariant_code, which are your system's codes. - If only the SKU changes, it is still the same product.
- If the
product_codechanges, it becomes another product. - A product without variants is sent with one item in
variantsandvariant_codenull.
Internal name and commercial name
- Send your system's name and description in
internal_nameandinternal_description. They are updated on every load. If you already sendnameanddescription, you can keep doing so: they count as the internal ones. - The commercial name and description, the ones customers see in the store, are written by the company. On a new product they start equal to the internal ones, and the company edits them in its panel. Your loads never change the commercial name.
- The variant name (
variants[].name, such as "Preto") follows the same rule as the commercial name.
What gets updated
- On every load: price, promotion, cost, stock, barcode, SKU, active flag, internal name and description.
- Only when the product is created: category, brand, weight and dimensions. After that, the company manages them.
- An empty or
nullfield erases nothing. is_active: falseon the product removes the whole product from the store, with all its variants. On a variant, it removes only that one: for a mouse in Black, White and Blue, deactivating Blue keeps Black and White for sale.- A product left out of a load has not changed, and stays as it is.
Stock
stock.on_hand is the stock your system has. A sale made on the platform lowers the stock immediately; until it is posted in your system, the platform subtracts that sale from the number you send. Example: there were 6, 3 were sold in the physical store and 3 online. Your system sends 3, and the platform shows 0. Once the sale is posted in your system and confirmed, the subtraction stops.
Example
curl -X POST "https://www.pensechat.com.br/api/integracao/produtos" \ -H "Authorization: Bearer SEU_TOKEN" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: carga-2026-10-09-1005" \ -d @produtos.json
{
"store_code": "matriz",
"generated_at": "2026-10-09T10:05:00-03:00",
"load_type": "full",
"products": [
{
"product_code": "6561",
"internal_name": "ADAPTADOR BLUETOOTH C/ CABO P2",
"internal_description": "Adaptador Bluetooth 5.0 com saída P2, para som automotivo e caixa de som.",
"brand_name": "EXEMPLO",
"category_code": "1",
"category_name": "GERAL",
"sale_unit_code": "un",
"is_active": true,
"variants": [
{
"variant_code": null,
"sku": "6561",
"ean": "7898843500046",
"price": 89.9,
"cost_price": 41.2,
"weight": 0.12,
"height": 4,
"width": 9,
"length": 14,
"is_active": true,
"stock": {
"on_hand": 214
}
}
]
},
{
"product_code": "7120",
"internal_name": "MOUSE GAMER RGB 7200DPI",
"brand_name": "EXEMPLO",
"category_code": "4",
"category_name": "PERIFERICOS",
"sale_unit_code": "un",
"is_active": true,
"variants": [
{
"variant_code": "1",
"sku": "7120-1",
"ean": "7891234567895",
"name": "Preto",
"color_name": "PRETO",
"price": 149.9,
"promo_price": 129.9,
"promo_starts_at": "2026-10-10T00:00:00-03:00",
"promo_ends_at": "2026-10-20T23:59:59-03:00",
"cost_price": 72.5,
"weight": 0.25,
"height": 6,
"width": 10,
"length": 17,
"is_active": true,
"stock": {
"on_hand": 18
}
}
]
}
]
}Response
{
"batch_id": 1532,
"status": "processed_with_errors",
"received_at": "2026-10-09T13:05:03.000Z",
"generated_at": "2026-10-09T13:05:00.000Z",
"totals": {
"received": 1200,
"created": 12,
"updated": 340,
"unchanged": 846,
"rejected": 2
},
"rejected": [
{
"product_code": "7120",
"variant_code": "3",
"sku": "7120-3",
"message": "O preço precisa ser maior que zero."
},
{
"product_code": "9001",
"variant_code": null,
"sku": "9001",
"message": "A unidade cxa não existe na plataforma. Use un, kg, g, m, m2, l, cx ou par."
}
]
}status is processed (all good) or processed_with_errors (some item rejected). A rejected item does not block the others.
Rules
- Required:
store_code(the code of the company's store, usually"matriz"),generated_at, and on each itemproduct_codeandsku. Whatever your system does not have, sendnull: the company completes it in the panel. - Up to 2000
variantsitems per load and 120 loads per hour per token. Any call, including through MCP, is capped at 120 per minute per token. - If you need to resend, use the same
Idempotency-Key: the load is not processed twice.
Look up products
Updated on 09/10/2026
Search by product_code, sku or search (part of the name, the id or the platform code). The response shows the commercial name (commercial_name), your system's name (internal_name), the price, the current price with promotion and the available stock of each variant. It is the right call for an AI assistant to answer "do you have product X? how much is it?".
curl "https://www.pensechat.com.br/api/integracao/produtos?product_code=7120" \ -H "Authorization: Bearer SEU_TOKEN"
{
"products": [
{
"product_id": 1532,
"online_code": "7120",
"product_code": "7120",
"commercial_name": "Mouse Gamer RGB 7200 DPI",
"internal_name": "MOUSE GAMER RGB 7200DPI",
"status": "published",
"variants": [
{
"variant_id": 2871,
"variant_code": "1",
"sku": "7120-1",
"ean": "7891234567895",
"name": "Preto",
"price": 149.9,
"promo_price": 129.9,
"current_price": 129.9,
"stock": 18,
"is_active": true
}
]
}
]
}Sales
Updated on 09/10/2026
It works in three steps: fetch the sales, post them in your system and confirm. Confirmed documents leave the list; unconfirmed ones come back on the next fetch.
Only sales made after the company turned the integration on are included. Earlier sales do not appear here.
1. Fetch
Returns up to 100 unconfirmed documents, oldest first: sale (paid sale), cancel (cancellation of an already confirmed sale) and return (completed return). Fetching changes nothing.
Each item comes with product_id and variant_id (the platform id), online_code (the platform code), product_code and variant_code (your codes), internal_name (the name in your system) and commercial_name (the commercial name the customer saw).
Delivery, pickup and channel
channel:siteis a sale in the online store;posis a counter sale (POS).pickup_in_store: false: delivery. The delivery address is incustomer(postal code, street, number, complement, neighborhood, city and state) and the shipping cost inshipping_cost.pickup_in_store: true: pickup at the store. The address is empty (null) and shipping is zero.
Payment methods
Each sale has a payments list, one line per method used: a sale can be paid partly in cash and partly by card. installments is the number of installments. method_code is the payment method code in the company's records. These are the platform's default codes; the company may add others:
| method_code | Method | Installments |
|---|---|---|
| pix | PIX | No |
| cartao_credito | Cartão de crédito | Yes |
| cartao_debito | Cartão de débito | No |
| boleto | Boleto | No |
| transferencia | Transferência | No |
| dinheiro | Dinheiro | No |
The example below has a sale paid with Pix and delivered, one with a credit card in 3 installments and picked up at the store, a counter sale paid with cash and debit card, a cancellation and a return.
curl "https://www.pensechat.com.br/api/integracao/vendas" \ -H "Authorization: Bearer SEU_TOKEN"
{
"generated_at": "2026-10-09T13:10:00.000Z",
"limit": 100,
"documents": [
{
"type": "sale",
"number": "100245",
"channel": "site",
"placed_at": "2026-10-09T12:41:07.000Z",
"pickup_in_store": false,
"customer": {
"name": "Maria Souza",
"document": "12345678909",
"email": "maria@exemplo.com.br",
"phone": "31999990000",
"postal_code": "30140071",
"street": "Rua da Bahia",
"number": "1000",
"complement": "Apto 302",
"neighborhood": "Centro",
"city": "Belo Horizonte",
"state": "MG"
},
"items": [
{
"product_id": 1532,
"variant_id": 2871,
"online_code": "7120",
"product_code": "7120",
"variant_code": "1",
"internal_name": "MOUSE GAMER RGB 7200DPI",
"commercial_name": "Mouse Gamer RGB 7200 DPI com 6 botões, Preto",
"sku": "7120-1",
"ean": "7891234567895",
"unit": "un",
"quantity": 1,
"unit_price": 129.9,
"discount": 0,
"total": 129.9,
"unit_cost": 72.5,
"ncm": null,
"cest": null,
"origin": null
}
],
"subtotal": 129.9,
"discount": 0,
"shipping_cost": 18.5,
"total": 148.4,
"payments": [
{
"method_code": "pix",
"method_name": "PIX",
"amount": 148.4,
"installments": 1
}
],
"invoice": null
},
{
"type": "sale",
"number": "100246",
"channel": "site",
"placed_at": "2026-10-09T14:05:22.000Z",
"pickup_in_store": true,
"customer": {
"name": "João Lima",
"document": "98765432100",
"email": "joao@exemplo.com.br",
"phone": "31988887777",
"postal_code": null,
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null
},
"items": [
{
"product_id": 1532,
"variant_id": 2871,
"online_code": "7120",
"product_code": "7120",
"variant_code": "1",
"internal_name": "MOUSE GAMER RGB 7200DPI",
"commercial_name": "Mouse Gamer RGB 7200 DPI com 6 botões, Preto",
"sku": "7120-1",
"ean": "7891234567895",
"unit": "un",
"quantity": 2,
"unit_price": 129.9,
"discount": 0,
"total": 259.8,
"unit_cost": 72.5,
"ncm": null,
"cest": null,
"origin": null
}
],
"subtotal": 259.8,
"discount": 0,
"shipping_cost": 0,
"total": 259.8,
"payments": [
{
"method_code": "cartao_credito",
"method_name": "Cartão de crédito",
"amount": 259.8,
"installments": 3
}
],
"invoice": null
},
{
"type": "sale",
"number": "100247",
"channel": "pos",
"placed_at": "2026-10-09T15:30:00.000Z",
"pickup_in_store": true,
"customer": {
"name": "Consumidor",
"document": null,
"email": null,
"phone": null,
"postal_code": null,
"street": null,
"number": null,
"complement": null,
"neighborhood": null,
"city": null,
"state": null
},
"items": [
{
"product_id": 1532,
"variant_id": 2871,
"online_code": "7120",
"product_code": "7120",
"variant_code": "1",
"internal_name": "MOUSE GAMER RGB 7200DPI",
"commercial_name": "Mouse Gamer RGB 7200 DPI com 6 botões, Preto",
"sku": "7120-1",
"ean": "7891234567895",
"unit": "un",
"quantity": 1,
"unit_price": 129.9,
"discount": 9.9,
"total": 120,
"unit_cost": 72.5,
"ncm": null,
"cest": null,
"origin": null
}
],
"subtotal": 129.9,
"discount": 9.9,
"shipping_cost": 0,
"total": 120,
"payments": [
{
"method_code": "dinheiro",
"method_name": "Dinheiro",
"amount": 50,
"installments": 1
},
{
"method_code": "cartao_debito",
"method_name": "Cartão de débito",
"amount": 70,
"installments": 1
}
],
"invoice": null
},
{
"type": "cancel",
"number": "100231",
"canceled_at": "2026-10-09T16:02:10.000Z",
"reason": "Cliente desistiu da compra",
"invoice": null
},
{
"type": "return",
"number": "D100198-1",
"order_number": "100198",
"opened_at": "2026-10-09T16:40:00.000Z",
"reason": "Produto com defeito",
"restocks": false,
"refund_amount": 129.9,
"items": [
{
"product_id": 1532,
"variant_id": 2871,
"online_code": "7120",
"product_code": "7120",
"variant_code": "1",
"internal_name": "MOUSE GAMER RGB 7200DPI",
"commercial_name": "Mouse Gamer RGB 7200 DPI com 6 botões, Preto",
"sku": "7120-1",
"ean": "7891234567895",
"quantity": 1,
"unit_paid": 129.9,
"unit_cost": 72.5
}
],
"invoice": null
}
]
}2. Confirm
Send each document you posted. processed removes it from the list; rejected keeps it and shows the reason to the company on the order.
curl -X POST "https://www.pensechat.com.br/api/integracao/vendas/confirmacao" \ -H "Authorization: Bearer SEU_TOKEN" \ -H "Content-Type: application/json" \ -d @confirmacao.json
{
"documents": [
{
"type": "sale",
"number": "100245",
"status": "processed"
},
{
"type": "sale",
"number": "100246",
"status": "rejected",
"message": "Produto 7120-9 não cadastrado."
}
]
}{
"results": [
{
"type": "sale",
"number": "100245",
"result": "saved"
},
{
"type": "sale",
"number": "100246",
"result": "saved"
}
]
}For each document, the response says: saved (recorded), already_confirmed (it was already confirmed), not_found (the number does not exist) or not_due (it cannot be confirmed yet, like an unpaid sale).
Where to use it
Updated on 09/10/2026
The API is HTTP with JSON and a token in the header, so it works in any tool that can make an HTTP call. Below is the path in the most common ones.
Management system (ERP)
The usual flow: every so often (every 5 or 10 minutes, for example), your system sends the products that changed, fetches new sales, posts them on its side and confirms. Use the Postman collection to see every call ready before coding.
n8n
- For a regular automation, use the HTTP Request node. Under Authentication, choose Generic Credential Type and Header Auth, with Name
Authorizationand ValueBearer SEU_TOKEN. - Method
GETand URLhttps://www.pensechat.com.br/api/integracao/vendasto fetch sales; methodPOST, URLhttps://www.pensechat.com.br/api/integracao/produtosand Body Content Type JSON to send products. - For an AI agent in n8n, use the MCP Client Tool node, as shown in the MCP section below.
Make
- Use the HTTP > Make a request module.
- URL: the call address, such as
https://www.pensechat.com.br/api/integracao/vendas. Method:GETorPOST. - Under Headers, add
Authorizationwith the valueBearer SEU_TOKEN. For POST, Body type Raw, Content type JSON (application/json).
Zapier
- Use the Webhooks by Zapier > Custom Request action.
- The call's method and URL, such as
GETandhttps://www.pensechat.com.br/api/integracao/vendas. - Under Headers,
AuthorizationwithBearer SEU_TOKENand, for POST,Content-Typewithapplication/json.
AI assistants and LLMs
For ChatGPT, Claude, n8n agents and any MCP client, use the MCP server: the assistant sees the tools the token allows and calls them on its own. The steps are in the MCP section.
Agents that read OpenAPI, such as the actions of a custom GPT, can import the specification from https://www.pensechat.com.br/api/integracao/openapi.json and use Bearer authentication with the token.
Your own code
Any language works. The examples below fetch sales in JavaScript and in Python:
const resposta = await fetch("https://www.pensechat.com.br/api/integracao/vendas", {
headers: { Authorization: "Bearer SEU_TOKEN" },
});
const { documents } = await resposta.json();import requests
resposta = requests.get(
"https://www.pensechat.com.br/api/integracao/vendas",
headers={"Authorization": "Bearer SEU_TOKEN"},
timeout=30,
)
documents = resposta.json()["documents"]Connect via MCP
Updated on 10/10/2026
MCP is a standard for connecting systems to AI assistants. With it, ChatGPT, Claude, n8n and others can look up the company's products, stock and sales using the same API token, with the same permissions.
Available tools:
enviar_produtos: Send products, prices and stockconsultar_produtos: Look up products, price and stockbuscar_vendas: Fetch sales, cancellations and returnsconfirmar_vendas: Confirm what was posted
Two ways to connect
| Method | Address | Use with |
|---|---|---|
| URL with token | https://www.pensechat.com.br/api/integracao/mcp/SEU_TOKEN | ChatGPT, Claude (web and app) and any system that only asks for the server URL. |
| URL + header | https://www.pensechat.com.br/api/integracao/mcp | n8n and platforms that accept the header Authorization: Bearer SEU_TOKEN. |
The URL with the token is shown in the company's panel when the token is created or replaced. Keep it like a password.
ChatGPT
- In Settings > Apps & Connectors > Advanced settings, turn on Developer mode.
- In Apps & Connectors, click Create.
- Name:
Pense Chat. MCP Server URL:https://www.pensechat.com.br/api/integracao/mcp/SEU_TOKEN. Authentication: No authentication. - Save and, in a conversation, enable the
Pense Chatconnector.
Claude (web and app)
- In Settings > Connectors, click Add custom connector.
- Name:
Pense Chat. Remote MCP server URL:https://www.pensechat.com.br/api/integracao/mcp/SEU_TOKEN.
n8n
MCP Client Tool node, connected to an AI agent:
- Endpoint:
https://www.pensechat.com.br/api/integracao/mcp - Server Transport:
HTTP Streamable - Authentication:
Header Auth, NameAuthorization, ValueBearer SEU_TOKEN
Other systems
If the system accepts a remote MCP server, register the URL with the token. If it asks for the connection type, choose HTTP. Systems that do not use MCP, such as Pipedrive, Conta Azul or Bling, can use this API directly or n8n as a bridge.
Test without any tool
curl -X POST "https://www.pensechat.com.br/api/integracao/mcp/SEU_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'The token and the URL with the token give access to the company's data. Do not share them. If one leaks, the company creates another in the panel and the old one stops working immediately.
Errors
Updated on 09/10/2026
Errors come back as { "code": "...", "message": "..." }. The code is fixed, for your system to handle; the message explains it in Portuguese.
| HTTP | code | When |
|---|---|---|
| 400 | invalid_json | The body is not valid JSON. |
| 401 | unauthorized | Wrong token, connection turned off by the company or company deactivated. |
| 401 | token_expired | The token expired. Ask the company for a new one. |
| 403 | forbidden | The token has no permission for this resource. |
| 403 | module_not_contracted | The company has not subscribed to a module with a catalog (Store, Stock or POS). |
| 404 | resource_disabled | This resource is turned off on the platform. |
| 413 | too_large | More than 2000 variants items. Split the load. |
| 422 | validation_failed | Wrong format. The message names the field. |
| 429 | rate_limited | More than 120 loads in the last hour, or more than 120 calls in the last minute. Wait for the Retry-After time. |
| 500 | Platform failure. Resend with the same Idempotency-Key. |
Rules
Updated on 09/10/2026
- Every call uses the header Authorization: Bearer TOKEN. The company creates the token in its panel, with its own permissions and, if it wants, an expiry date.
- A token only reaches the company that created it. No call crosses companies.
- Nothing is deleted. To remove something from the store, deactivate it with is_active false. There is no delete call.
- Through the API you can send products, prices and stock, look up products, and fetch and confirm sales. Resources turned off on the platform do not appear here.
- Not part of this API: settings, parameters, integrations, AI, passwords and admin users.
- Format: JSON, dates with offset (ISO 8601), numbers with a dot and 2 decimals, weight in kg and dimensions in cm.
- Every product load is recorded in the company's panel, with what changed in each item.
Technical reference
Updated on 10/10/2026
- Swagger: every field, type and response, with in-browser testing.
- Postman: ready-made calls; fill in
tokenin the variables. - OpenAPI (JSON): to generate a client, import into another tool or hand to an AI agent.