ChatGPT · GPT ActionsComercio
Crear carrito
Da de alta registros de carritos con confirmación del usuario.
por Prompt Studio
openapicarts
Licencia: MITVer original
Contenido
Dónde va: GPT → Configurar → Acciones → Esquema
{
"openapi": "3.1.0",
"info": {
"title": "Crear carrito",
"version": "1.0.0",
"description": "Acción de GPT para carritos. Cambia el servidor por la URL de tu API."
},
"servers": [
{
"url": "https://api.tu-dominio.com/v1"
}
],
"paths": {
"/carts": {
"post": {
"operationId": "createCart",
"summary": "Crea carrito",
"x-openai-isConsequential": true,
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewCart"
}
}
}
},
"responses": {
"201": {
"description": "Creado",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Cart"
}
}
}
},
"400": {
"description": "Datos inválidos"
}
}
}
}
},
"components": {
"schemas": {
"Cart": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"customerEmail": {
"type": "string",
"format": "email"
},
"total": {
"type": "number"
},
"items": {
"type": "integer"
},
"status": {
"type": "string",
"enum": [
"abierto",
"abandonado",
"convertido"
]
},
"createdAt": {
"type": "string",
"format": "date-time"
}
}
},
"NewCart": {
"type": "object",
"properties": {
"customerEmail": {
"type": "string",
"format": "email"
},
"total": {
"type": "number"
},
"items": {
"type": "integer"
}
},
"required": [
"customerEmail",
"total"
]
}
},
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer"
}
}
},
"security": [
{
"bearerAuth": []
}
]
}
Más en GPT Actions
Clima por ciudad
Ejemplo mínimo de Action con API key en el encabezado.
Crear lead en el CRM
Registra contactos desde la conversación con autenticación OAuth.
Agendar reunión
Crea eventos con invitados y zona horaria.
Enviar a webhook
Publica el resultado del GPT en cualquier URL (Zapier, Make, n8n).
Buscar contactos
Busca contactos por texto y estado desde tu GPT.
Consultar contacto
Trae un registro de contactos por su ID.