shopit-back/ShopIt_API_Postman_Collecti...

2107 lines
60 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"
},
"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 (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\": \"acme\",\n \"nombre\": \"Acme\",\n \"dominio\": \"acme.test\",\n \"primary_color\": \"#111111\",\n \"secondary_color\": \"#222222\",\n \"danger_color\": \"#ff0000\",\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}"
},
"url": {
"raw": "{{base_url}}/api/tenants",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants"
]
}
},
"response": []
},
{
"name": "Create Tenant (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": "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": []
}
]
},
"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": "Brands",
"item": [
{
"name": "List Brands",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/marcas",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"marcas"
]
}
},
"response": []
},
{
"name": "Create Brand",
"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\": \"Puma\",\n \"descripcion\": \"Marca de prueba\"\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/marcas",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"marcas"
]
}
},
"response": []
},
{
"name": "Show Brand",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/marcas/{{marca_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"marcas",
"{{marca_id}}"
]
}
},
"response": []
},
{
"name": "Update Brand",
"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\": \"Puma Updated\",\n \"descripcion\": \"Marca actualizada\"\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/marcas/{{marca_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"marcas",
"{{marca_id}}"
]
}
},
"response": []
},
{
"name": "Delete Brand",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/marcas/{{marca_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"marcas",
"{{marca_id}}"
]
}
},
"response": []
}
]
},
{
"name": "Categories",
"item": [
{
"name": "List Categories",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/categorias",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"categorias"
]
}
},
"response": []
},
{
"name": "Create Category",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"categoria_id\": null,\n \"nombre\": \"Accesorios\"\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/categorias",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"categorias"
]
}
},
"response": []
},
{
"name": "Show Category",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/categorias/{{categoria_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"categorias",
"{{categoria_id}}"
]
}
},
"response": []
},
{
"name": "Update Category",
"request": {
"method": "PATCH",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"categoria_id\": null,\n \"nombre\": \"Accesorios Updated\"\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/categorias/{{categoria_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"categorias",
"{{categoria_id}}"
]
}
},
"response": []
},
{
"name": "Delete Category",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/categorias/{{categoria_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"categorias",
"{{categoria_id}}"
]
}
},
"response": []
}
]
},
{
"name": "Attributes",
"item": [
{
"name": "List Attributes",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/attributes",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"attributes"
]
}
},
"response": []
},
{
"name": "Create Attribute",
"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\": \"material\",\n \"nombre\": \"Material\",\n \"is_required\": false,\n \"type\": \"select\",\n \"metadata_schema\": {\n \"hex\": {\n \"type\": \"string\"\n }\n },\n \"options\": [\n {\n \"value\": \"algodon\",\n \"label\": \"Algodon\",\n \"sort_order\": 1,\n \"metadata\": null\n },\n {\n \"value\": \"poliester\",\n \"label\": \"Poliester\",\n \"sort_order\": 2,\n \"metadata\": null\n }\n ]\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/attributes",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"attributes"
]
}
},
"response": []
},
{
"name": "Show Attribute",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/attributes/{{attribute_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"attributes",
"{{attribute_id}}"
]
}
},
"response": []
},
{
"name": "Update Attribute",
"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\": \"Material Updated\",\n \"is_required\": true,\n \"type\": \"select\",\n \"options\": [\n {\n \"value\": \"algodon\",\n \"label\": \"Algodon\",\n \"sort_order\": 1,\n \"metadata\": null\n },\n {\n \"value\": \"modal\",\n \"label\": \"Modal\",\n \"sort_order\": 2,\n \"metadata\": null\n }\n ]\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/attributes/{{attribute_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"attributes",
"{{attribute_id}}"
]
}
},
"response": []
},
{
"name": "Delete Attribute",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/attributes/{{attribute_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"attributes",
"{{attribute_id}}"
]
}
},
"response": []
}
]
},
{
"name": "Products",
"item": [
{
"name": "List Products",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/productos",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"productos"
]
}
},
"response": []
},
{
"name": "Create Product",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"categoria_id\": {{categoria_id}},\n \"brand_id\": {{marca_id}},\n \"slug\": \"remera-basica-blanca\",\n \"nombre\": \"Remera Basica Blanca\",\n \"descripcion\": \"Remera de prueba\",\n \"precio\": 24999,\n \"attribute_ids\": [{{color_attribute_id}}, {{talle_attribute_id}}],\n \"images\": []\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/productos",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"productos"
]
}
},
"response": []
},
{
"name": "Show Product",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/productos/{{producto_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"productos",
"{{producto_id}}"
]
}
},
"response": []
},
{
"name": "Update Product",
"request": {
"method": "PATCH",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"categoria_id\": {{categoria_id}},\n \"brand_id\": {{marca_id}},\n \"slug\": \"remera-basica-blanca\",\n \"nombre\": \"Remera Basica Blanca Updated\",\n \"descripcion\": \"Remera de prueba actualizada\",\n \"precio\": 26999,\n \"attribute_ids\": [{{color_attribute_id}}, {{talle_attribute_id}}],\n \"images\": []\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/productos/{{producto_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"productos",
"{{producto_id}}"
]
}
},
"response": []
},
{
"name": "Delete Product",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/productos/{{producto_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"productos",
"{{producto_id}}"
]
}
},
"response": []
}
]
},
{
"name": "Product Variants",
"item": [
{
"name": "List Product Variants",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/productos/{{producto_id}}/variants",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"productos",
"{{producto_id}}",
"variants"
]
}
},
"response": []
},
{
"name": "Create Product Variant",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"stock\": 8,\n \"definitions\": [\n {\n \"products_attribute_id\": {{color_product_attribute_id}},\n \"value\": \"Blanco\"\n },\n {\n \"products_attribute_id\": {{talle_product_attribute_id}},\n \"value\": \"M\"\n }\n ],\n \"images\": []\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/productos/{{producto_id}}/variants",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"productos",
"{{producto_id}}",
"variants"
]
}
},
"response": []
},
{
"name": "Show Product Variant",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/productos/{{producto_id}}/variants/{{product_variant_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"productos",
"{{producto_id}}",
"variants",
"{{product_variant_id}}"
]
}
},
"response": []
},
{
"name": "Update Product Variant",
"request": {
"method": "PATCH",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"stock\": 12,\n \"definitions\": [\n {\n \"products_attribute_id\": {{color_product_attribute_id}},\n \"value\": \"Blanco\"\n },\n {\n \"products_attribute_id\": {{talle_product_attribute_id}},\n \"value\": \"M\"\n }\n ],\n \"images\": []\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/productos/{{producto_id}}/variants/{{product_variant_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"productos",
"{{producto_id}}",
"variants",
"{{product_variant_id}}"
]
}
},
"response": []
},
{
"name": "Delete Product Variant",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/productos/{{producto_id}}/variants/{{product_variant_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"productos",
"{{producto_id}}",
"variants",
"{{product_variant_id}}"
]
}
},
"response": []
}
]
}
]
},
{
"name": "Cart",
"item": [
{
"name": "Show Cart",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/cart",
"host": [
"{{base_url}}"
],
"path": [
"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"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"product_variant_id\": {{product_variant_id}},\n \"cantidad\": 1\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/cart/items",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"cart",
"items"
]
}
},
"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"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"cantidad\": 2\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/cart/items/{{product_variant_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"cart",
"items",
"{{product_variant_id}}"
]
}
},
"response": []
},
{
"name": "Remove Cart Item",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/cart/items/{{product_variant_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"cart",
"items",
"{{product_variant_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": "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": "Bank Accounts",
"item": [
{
"name": "List Bank Accounts",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/bank-accounts",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"bank-accounts"
]
}
},
"response": []
},
{
"name": "Create Bank Account",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"titular\": \"Ada Lovelace\",\n \"entidad\": \"Banco Demo\",\n \"alias\": \"ada.demo.alias\",\n \"cvu\": \"0000003100000000000001\"\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/bank-accounts",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"bank-accounts"
]
}
},
"response": []
},
{
"name": "Show Selected Bank Account",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/bank-accounts/selected",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"bank-accounts",
"selected"
]
}
},
"response": []
},
{
"name": "Show Bank Account",
"request": {
"method": "GET",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/bank-accounts/{{bank_account_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"bank-accounts",
"{{bank_account_id}}"
]
}
},
"response": []
},
{
"name": "Update Bank Account",
"request": {
"method": "PATCH",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "raw",
"raw": "{\n \"titular\": \"Ada Lovelace Updated\",\n \"entidad\": \"Banco Demo Updated\",\n \"alias\": \"ada.demo.updated\",\n \"cvu\": \"0000003100000000000002\"\n}"
},
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/bank-accounts/{{bank_account_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"bank-accounts",
"{{bank_account_id}}"
]
}
},
"response": []
},
{
"name": "Select Bank Account",
"request": {
"method": "POST",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/bank-accounts/{{bank_account_id}}/select",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"bank-accounts",
"{{bank_account_id}}",
"select"
]
}
},
"response": []
},
{
"name": "Delete Bank Account",
"request": {
"method": "DELETE",
"header": [
{
"key": "Accept",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{base_url}}/api/tenants/{{tenant_codigo}}/bank-accounts/{{bank_account_id}}",
"host": [
"{{base_url}}"
],
"path": [
"api",
"tenants",
"{{tenant_codigo}}",
"bank-accounts",
"{{bank_account_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": "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": []
}
]
}
],
"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": "marca_id",
"value": "1",
"type": "string"
},
{
"key": "categoria_id",
"value": "1",
"type": "string"
},
{
"key": "attribute_id",
"value": "1",
"type": "string"
},
{
"key": "color_attribute_id",
"value": "1",
"type": "string"
},
{
"key": "talle_attribute_id",
"value": "2",
"type": "string"
},
{
"key": "color_product_attribute_id",
"value": "1",
"type": "string"
},
{
"key": "talle_product_attribute_id",
"value": "2",
"type": "string"
},
{
"key": "producto_id",
"value": "1",
"type": "string"
},
{
"key": "product_variant_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": "bank_account_id",
"value": "1",
"type": "string"
}
]
}