API para gesti贸n de tiendas, productos, pedidos y bots conversacionales
{
"service": "Botivent API",
"version": "1.0.0",
"status": "ok",
"description": "API para gesti贸n de tiendas, productos, pedidos y bots conversacionales",
"baseUrl": "https://api.botivent.com",
"endpoints": {
"user": {
"GET /api/user/me": {
"description": "Obtener informaci贸n del usuario autenticado",
"auth": "required"
}
},
"stores": {
"GET /api/store": {
"description": "Obtener tienda del usuario",
"auth": "required"
},
"POST /api/store": {
"description": "Crear nueva tienda",
"auth": "required",
"body": {
"name": "string",
"description": "string",
"type": "stripe|whatsapp|telegram",
"slug": "string"
}
},
"PATCH /api/store": {
"description": "Actualizar tienda",
"auth": "required"
}
},
"products": {
"GET /api/store/products": {
"description": "Obtener productos de la tienda",
"auth": "required"
},
"POST /api/store/products": {
"description": "Crear nuevo producto",
"auth": "required",
"body": {
"name": "string",
"description": "string",
"price": "number",
"currency": "string",
"is_public": "boolean"
}
},
"GET /api/store/products/[id]": {
"description": "Obtener producto espec铆fico",
"auth": "required"
},
"PATCH /api/store/products/[id]": {
"description": "Actualizar producto",
"auth": "required"
},
"DELETE /api/store/products/[id]": {
"description": "Eliminar producto",
"auth": "required"
}
},
"orders": {
"GET /api/orders": {
"description": "Obtener todos los pedidos",
"auth": "required"
},
"POST /api/orders": {
"description": "Crear nuevo pedido",
"auth": "required"
},
"GET /api/orders/[id]": {
"description": "Obtener pedido espec铆fico",
"auth": "required"
}
},
"paymentLinks": {
"GET /api/payment-links": {
"description": "Obtener enlaces de pago del usuario",
"auth": "required"
},
"POST /api/payment-links": {
"description": "Crear nuevo enlace de pago",
"auth": "required",
"body": {
"title": "string",
"description": "string",
"amount": "number",
"currency": "string",
"is_active": "boolean"
}
},
"GET /api/payment-links/[id]": {
"description": "Obtener enlace de pago espec铆fico",
"auth": "required"
},
"PATCH /api/payment-links/[id]": {
"description": "Actualizar enlace de pago",
"auth": "required"
},
"DELETE /api/payment-links/[id]": {
"description": "Eliminar enlace de pago",
"auth": "required"
}
},
"conversationFlows": {
"GET /api/conversation-flows": {
"description": "Obtener flujos de conversaci贸n",
"auth": "required"
},
"POST /api/conversation-flows": {
"description": "Crear nuevo flujo de conversaci贸n",
"auth": "required",
"body": {
"storeId": "string",
"name": "string",
"trigger": "object",
"nodes": "array",
"edges": "array",
"files": "array",
"behavior": "object",
"published": "boolean"
}
},
"GET /api/conversation-flows/[id]": {
"description": "Obtener flujo espec铆fico",
"auth": "required"
},
"PATCH /api/conversation-flows/[id]": {
"description": "Actualizar flujo de conversaci贸n",
"auth": "required"
},
"DELETE /api/conversation-flows/[id]": {
"description": "Eliminar flujo de conversaci贸n",
"auth": "required"
}
},
"bot": {
"GET /api/bot": {
"description": "Obtener configuraci贸n del bot",
"auth": "required"
},
"PATCH /api/bot": {
"description": "Actualizar configuraci贸n del bot",
"auth": "required",
"body": {
"greeting": "string",
"closing": "string",
"out_of_hours": "string",
"fallback": "string",
"order_confirmation": "string",
"tone": "string",
"typing_delays": "object"
}
}
},
"integrations": {
"GET /api/integrations": {
"description": "Obtener integraciones disponibles",
"auth": "required"
},
"POST /api/integrations": {
"description": "Crear nueva integraci贸n",
"auth": "required"
},
"PATCH /api/integrations/[id]": {
"description": "Actualizar integraci贸n",
"auth": "required"
},
"DELETE /api/integrations/[id]": {
"description": "Eliminar integraci贸n",
"auth": "required"
},
"POST /api/integrations/[id]/toggle": {
"description": "Activar/desactivar integraci贸n",
"auth": "required"
}
},
"public": {
"stores": {
"GET /api/public/store/[slug]": {
"description": "Obtener tienda p煤blica por slug",
"auth": "none"
},
"GET /api/public/store/[slug]/products": {
"description": "Obtener productos de tienda p煤blica",
"auth": "none"
}
},
"paymentLinks": {
"GET /api/public/payment-links/[publicId]": {
"description": "Obtener enlace de pago p煤blico",
"auth": "none"
},
"POST /api/public/payment-links/[publicId]": {
"description": "Procesar pago con enlace p煤blico",
"auth": "none",
"body": {
"amount": "number"
}
},
"POST /api/public/payment-links/[publicId]/success": {
"description": "Webhook de confirmaci贸n de pago",
"auth": "none"
}
}
}
},
"authentication": {
"type": "Bearer Token",
"description": "Usar el token de autenticaci贸n de Supabase en el header Authorization"
},
"examples": {
"getStore": {
"method": "GET",
"url": "/api/store",
"headers": {
"Authorization": "Bearer YOUR_SUPABASE_TOKEN"
}
},
"createProduct": {
"method": "POST",
"url": "/api/store/products",
"headers": {
"Authorization": "Bearer YOUR_SUPABASE_TOKEN",
"Content-Type": "application/json"
},
"body": {
"name": "Producto Ejemplo",
"description": "Descripci贸n del producto",
"price": 29.99,
"currency": "EUR",
"is_public": true
}
}
}
}