1467 lines
40 KiB
JSON
1467 lines
40 KiB
JSON
{
|
|
"info": {
|
|
"_postman_id": "76fd6fd2-53b9-4d92-8e02-1ddcc6207fa2",
|
|
"name": "ShopIt API",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
|
|
"description": "Colección de la API vigente de ShopIt. El script previo agrega automáticamente el Bearer token guardado por Login User."
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "Tenants",
|
|
"item": [
|
|
{
|
|
"name": "List Tenants",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/tenants",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Create Tenant OnTicket (JSON)",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"codigo\": \"festival-demo\",\n \"nombre\": \"Festival Demo\",\n \"dominio\": \"festival-demo.test\",\n \"primary_color\": \"#111111\",\n \"secondary_color\": \"#222222\",\n \"danger_color\": \"#ff0000\",\n \"success_color\": \"#00aa55\",\n \"header_bg_color\": \"#333333\",\n \"footer_bg_color\": \"#333333\",\n \"header_logo\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\",\n \"footer_logo\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\",\n \"search_product_layout\": \"column_with_image\",\n \"search_group_layout\": \"paginated\",\n \"search_items_per_page\": 12,\n \"website_type_code\": \"onticket\",\n \"extras\": {\n \"heroConfig\": {\n \"title_html\": \"<h1>Festival Demo</h1>\",\n \"description_html\": \"<p>Una experiencia inolvidable</p>\",\n \"button_text\": \"Comprar entradas\",\n \"button_href\": \"/tickets\",\n \"background_image_id\": \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==\"\n },\n \"eventConfig\": {\n \"title\": \"Festival Demo\",\n \"location\": \"Buenos Aires\",\n \"dates\": [\n \"2026-10-10\",\n \"2026-10-11\"\n ]\n }\n }\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/tenants",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Create Tenant ShopIt (Form Data)",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "formdata",
|
|
"formdata": [
|
|
{
|
|
"key": "codigo",
|
|
"value": "acme",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "nombre",
|
|
"value": "Acme",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "dominio",
|
|
"value": "acme.test",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "primary_color",
|
|
"value": "#111111",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "secondary_color",
|
|
"value": "#222222",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "danger_color",
|
|
"value": "#ff0000",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "success_color",
|
|
"value": "#00aa55",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "header_bg_color",
|
|
"value": "#333333",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "footer_bg_color",
|
|
"value": "#333333",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "header_logo",
|
|
"type": "file",
|
|
"src": []
|
|
},
|
|
{
|
|
"key": "footer_logo",
|
|
"type": "file",
|
|
"src": []
|
|
},
|
|
{
|
|
"key": "search_product_layout",
|
|
"value": "column_with_image",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "search_group_layout",
|
|
"value": "paginated",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "search_items_per_page",
|
|
"value": "12",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "website_type_code",
|
|
"value": "shopit",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "extras[carousel][]",
|
|
"type": "file",
|
|
"src": [],
|
|
"description": "Se puede repetir esta key hasta 10 veces. También acepta una imagen base64 o el UUID de un attachment."
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/tenants",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Bootstrap Tenant",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/tenants/bootstrap/{{tenant_domain}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"bootstrap",
|
|
"{{tenant_domain}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Show Tenant",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/tenants/{{tenant_id}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_id}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Update Tenant (JSON)",
|
|
"request": {
|
|
"method": "PATCH",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"nombre\": \"Acme Updated\",\n \"primary_color\": \"#555555\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/tenants/{{tenant_id}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_id}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Delete Tenant",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/tenants/{{tenant_id}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_id}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Catalog",
|
|
"item": [
|
|
{
|
|
"name": "Get Catalog",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/catalog"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "List Featured Group Items",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/catalog/featured-groups/{{featured_group_id}}/items?page=1",
|
|
"description": "Returns one page of items for a featured catalog group."
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Show Catalog Item",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/catalog-items/{{catalog_item_id}}?variant_id={{variant_id}}",
|
|
"description": "variant_id is optional; remove the query parameter when the item has no selected variant."
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Create Standard Catalog Item",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/catalog-items",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"type\": \"standard\",\n \"category_id\": 1,\n \"brand_id\": 1,\n \"slug\": \"entrada-general\",\n \"nombre\": \"Entrada general\",\n \"descripcion\": \"Entrada general de ejemplo\",\n \"precio\": 15000,\n \"inventory_policy\": \"tracked\",\n \"has_tickets\": true,\n \"minimum_use_date\": \"2026-08-01\",\n \"maximum_use_date\": \"2026-08-31\",\n \"real_stock\": 100,\n \"attribute_codes\": [],\n \"images\": [],\n \"variants\": []\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Cart",
|
|
"item": [
|
|
{
|
|
"name": "Show Cart",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/cart"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Add Cart Item",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/cart/items",
|
|
"description": "variant_id is optional and may be removed for catalog items without variants.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"catalog_item_id\": {{catalog_item_id}},\n \"variant_id\": {{variant_id}},\n \"cantidad\": 1\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Update Cart Item Quantity",
|
|
"request": {
|
|
"method": "PATCH",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/cart/items/{{cart_item_id}}",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"cantidad\": 2\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Remove Cart Item",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/cart/items/{{cart_item_id}}"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Auth",
|
|
"item": [
|
|
{
|
|
"name": "Register User",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"nombre_apellido\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"password\": \"secret123\",\n \"password_confirmation\": \"secret123\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/register",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"register"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Login User",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"const response = pm.response.json();",
|
|
"",
|
|
"if (response.token) {",
|
|
" pm.collectionVariables.set('auth_token', response.token);",
|
|
" console.log('auth_token saved to collection variables');",
|
|
"} else {",
|
|
" console.warn('Login response does not contain token');",
|
|
"}"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"email\": \"ada@example.com\",\n \"password\": \"secret123\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/login",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"login"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Logout User",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/logout",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"logout"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Me",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/me",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"me"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Update Profile",
|
|
"request": {
|
|
"method": "PUT",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/me",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"nombre_apellido\": \"Ada Lovelace\",\n \"email\": \"ada@example.com\",\n \"dni\": \"12345678\",\n \"telefono\": \"+54 9 341 555-1234\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Purchases",
|
|
"item": [
|
|
{
|
|
"name": "List Purchases",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/compras",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_codigo}}",
|
|
"compras"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Create Purchase",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"cart_id\": {{cart_id}},\n \"dni\": \"12345678\",\n \"telefono\": \"+54 9 341 555-4321\",\n \"nombre_apellido\": \"Juan Perez\",\n \"email\": \"juan.perez@example.com\"\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/compras",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_codigo}}",
|
|
"compras"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Show Purchase",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/compras/{{compra_id}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_codigo}}",
|
|
"compras",
|
|
"{{compra_id}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Create QR Payment Intent",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/compras/{{compra_id}}/payment-intent",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"method\": \"qr\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Create Transfer Payment Intent",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/compras/{{compra_id}}/payment-intent",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"method\": \"transfer\",\n \"transfer_payer_dni\": \"12345678\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Complete Purchase",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/compras/{{compra_id}}/complete"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Tickets",
|
|
"item": [
|
|
{
|
|
"name": "List My Tickets",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/tenants/{{tenant_codigo}}/tickets",
|
|
"description": "Requires authentication and returns only the current user tickets for this tenant."
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Menus",
|
|
"item": [
|
|
{
|
|
"name": "List Menus",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/menues"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Create Menu",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/menues",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"code\": \"catalog\",\n \"route\": \"/catalog\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Show Menu",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/menues/{{menu_id}}"
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Update Menu",
|
|
"request": {
|
|
"method": "PUT",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/menues/{{menu_id}}",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"code\": \"catalog\",\n \"route\": \"/catalogo\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Delete Menu",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/menues/{{menu_id}}"
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Integrations",
|
|
"item": [
|
|
{
|
|
"name": "List Integrations",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/integrations",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"integrations"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Create Integration",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"integration_code\": \"mercadopago\",\n \"name\": \"Mercado Pago\",\n \"url\": \"https://api.mercadopago.com\",\n \"integration_data_schema\": {\n \"access_token\": \"required|string\",\n \"public_key\": \"nullable|string\"\n }\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/integrations",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"integrations"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Show Integration",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/integrations/{{integration_id}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"integrations",
|
|
"{{integration_id}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Update Integration",
|
|
"request": {
|
|
"method": "PUT",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"integration_code\": \"mercadopago\",\n \"name\": \"Mercado Pago Updated\",\n \"url\": \"https://api.mercadopago.com\",\n \"integration_data_schema\": {\n \"access_token\": \"required|string\",\n \"public_key\": \"nullable|string\"\n }\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/integrations/{{integration_id}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"integrations",
|
|
"{{integration_id}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Delete Integration",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/integrations/{{integration_id}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"integrations",
|
|
"{{integration_id}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Tenant Integrations",
|
|
"item": [
|
|
{
|
|
"name": "List Tenant Integrations",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/{{tenant_codigo}}/integrations",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"{{tenant_codigo}}",
|
|
"integrations"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Show Tenant Integration",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/{{tenant_codigo}}/integrations/{{integration_code}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"{{tenant_codigo}}",
|
|
"integrations",
|
|
"{{integration_code}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Configure Tenant Integration",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"integration_data\": {\n \"access_token\": \"APP_USR-demo-token\",\n \"public_key\": \"APP_PUBLIC-demo-key\"\n }\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/{{tenant_codigo}}/integrations/{{integration_code}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"{{tenant_codigo}}",
|
|
"integrations",
|
|
"{{integration_code}}"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Webhooks",
|
|
"item": [
|
|
{
|
|
"name": "Telepagos Cash-in Notification",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/webhooks/telepagos/{{tenant_codigo}}",
|
|
"description": "Receives a Telepagos cash-in identifier and updates the related purchase payment.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"id\": \"{{telepagos_cashin_id}}\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Storage Test",
|
|
"item": [
|
|
{
|
|
"name": "Upload S3 File (Base64)",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"file_base64\": \"data:text/plain;base64,SG9sYSBTaG9wSXQ=\",\n \"path\": \"tests/postman\",\n \"expires_in_minutes\": 10\n}"
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/storage-test/s3/upload",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"storage-test",
|
|
"s3",
|
|
"upload"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Upload S3 File (Form Data)",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "formdata",
|
|
"formdata": [
|
|
{
|
|
"key": "file",
|
|
"type": "file",
|
|
"src": []
|
|
},
|
|
{
|
|
"key": "path",
|
|
"value": "tests/postman",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "expires_in_minutes",
|
|
"value": "10",
|
|
"type": "text"
|
|
}
|
|
]
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/storage-test/s3/upload",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"storage-test",
|
|
"s3",
|
|
"upload"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "Generate S3 Temporary URL",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/storage-test/s3/temporary-url?path=tests/postman/example.txt&expires_in_minutes=10",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"storage-test",
|
|
"s3",
|
|
"temporary-url"
|
|
],
|
|
"query": [
|
|
{
|
|
"key": "path",
|
|
"value": "tests/postman/example.txt"
|
|
},
|
|
{
|
|
"key": "expires_in_minutes",
|
|
"value": "10"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Mail Test",
|
|
"item": [
|
|
{
|
|
"name": "Send Test Email",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": "{{base_url}}/api/mail-test/send",
|
|
"description": "Sends a real message through the mailer configured in the backend environment.",
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"to\": \"{{test_email}}\",\n \"subject\": \"Prueba de correo de Shopit\",\n \"message\": \"Este es un correo de prueba enviado desde Postman.\"\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"event": [
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"const authToken = pm.collectionVariables.get('auth_token');",
|
|
"",
|
|
"if (authToken) {",
|
|
" pm.request.headers.upsert({",
|
|
" key: 'Authorization',",
|
|
" value: `Bearer ${authToken}`,",
|
|
" });",
|
|
"}"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "base_url",
|
|
"value": "http://127.0.0.1:8000",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "auth_token",
|
|
"value": "",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "tenant_codigo",
|
|
"value": "sonder",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "tenant_domain",
|
|
"value": "localhost",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "tenant_id",
|
|
"value": "1",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "catalog_item_id",
|
|
"value": "1",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "featured_group_id",
|
|
"value": "1",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "variant_id",
|
|
"value": "1",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "cart_item_id",
|
|
"value": "1",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "cart_id",
|
|
"value": "1",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "compra_id",
|
|
"value": "1",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "integration_id",
|
|
"value": "1",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "integration_code",
|
|
"value": "mercadopago",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "menu_id",
|
|
"value": "1",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "telepagos_cashin_id",
|
|
"value": "7000",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"key": "test_email",
|
|
"value": "destinatario@example.com",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|