Configuración de tienda
Lo que le falta a una tienda nueva para vender por el chat: conectar la tienda, revisar el catálogo y conectar Mercado Pago.
Descarga la proyección completa de la API pública: openapi.json.
| Método | Ruta | Qué hace |
|---|---|---|
GET | /store-setup | Get the store setup steps |
PATCH | /store-setup | Mark the catalog reviewed, or that the store sells without one |
GET /store-setup
Get the store setup steps
The steps a store still has before its agent sells end to end, each computed from real data on every read: store «Conecta tu tienda» (a Shopify or WooCommerce store connected, or sells_without_store; attention when the store asks to be reconnected), catalog «Revisa tu catálogo» (at least one active product and the owner marked it reviewed), mercadopago «Conecta Mercado Pago» (present when native orders can be paid by link, i.e. order_payment.mode is not transfer_only) and bank_account «Agrega tu cuenta para transferencias» (present for transfer_first / transfer_only). order_payment is how a native order is paid (the final charging mode; change it with PUT /payment-settings/charging). applies is true for an ecommerce workspace, the one whose Home shows the steps; complete when every listed step is done. Requires tenant:read.
curl https://api.vitrinadev.com/api/v1/store-setup \
-H "Authorization: Bearer $VITRINA_KEY"Ejemplo de respuesta (200)
{
"data": {
"applies": true,
"complete": false,
"steps": [
{
"key": "store",
"status": "done"
},
{
"key": "catalog",
"status": "todo"
},
{
"key": "mercadopago",
"status": "todo"
}
],
"order_payment": {
"mode": "mp_first",
"source": "tenant",
"default_mode": "mp_first"
},
"store": {
"connections": [
{
"provider": "shopify",
"status": "connected",
"account": "Tienda Ejemplo"
},
{
"provider": "woocommerce",
"status": "not_connected",
"account": null
}
],
"sells_without_store": false
},
"catalog": {
"active": 42,
"native": 0,
"synced": 42,
"without_price": 1,
"without_photo": 3,
"reviewed_at": null
},
"mercadopago": {
"configured": true,
"connected": false,
"account": null
},
"bank_accounts": {
"active": 0
}
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429
PATCH /store-setup
Mark the catalog reviewed, or that the store sells without one
The owner’s two marks no table can know: catalog_reviewed (true stamps the review, false clears it) and sells_without_store (no Shopify / WooCommerce to connect; the Vitrina catalog is the store). Answers with the recomputed setup. Requires tenant:write.
Cuerpo
| Campo | Tipo | Obligatorio | Restricciones |
|---|---|---|---|
catalog_reviewed | boolean | — | |
sells_without_store | boolean | — |
curl -X PATCH https://api.vitrinadev.com/api/v1/store-setup \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{
"catalog_reviewed": true
}'Ejemplo de respuesta (200)
{
"data": {
"applies": true,
"complete": false,
"steps": [
{
"key": "store",
"status": "done"
},
{
"key": "catalog",
"status": "todo"
},
{
"key": "mercadopago",
"status": "todo"
}
],
"order_payment": {
"mode": "mp_first",
"source": "tenant",
"default_mode": "mp_first"
},
"store": {
"connections": [
{
"provider": "shopify",
"status": "connected",
"account": "Tienda Ejemplo"
},
{
"provider": "woocommerce",
"status": "not_connected",
"account": null
}
],
"sells_without_store": false
},
"catalog": {
"active": 42,
"native": 0,
"synced": 42,
"without_price": 1,
"without_photo": 3,
"reviewed_at": null
},
"mercadopago": {
"configured": true,
"connected": false,
"account": null
},
"bank_accounts": {
"active": 0
}
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429