1539 lines
44 KiB
JSON
1539 lines
44 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}}/product-variants",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_codigo}}",
|
|
"product-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 \"producto_id\": {{producto_id}},\n \"slug\": \"remera-basica-blanca-m\",\n \"nombre\": \"Remera Basica Blanca - Talle M\",\n \"stock\": 8,\n \"descripcion\": \"Variante de prueba\",\n \"precio\": 26999,\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}}/product-variants",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_codigo}}",
|
|
"product-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}}/product-variants/{{product_variant_id}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_codigo}}",
|
|
"product-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 \"slug\": \"remera-basica-blanca-m\",\n \"nombre\": \"Remera Basica Blanca - Talle M Updated\",\n \"stock\": 12,\n \"descripcion\": \"Variante actualizada\",\n \"precio\": 27999,\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}}/product-variants/{{product_variant_id}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_codigo}}",
|
|
"product-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}}/product-variants/{{product_variant_id}}",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"tenants",
|
|
"{{tenant_codigo}}",
|
|
"product-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": "Purchases",
|
|
"item": [
|
|
{
|
|
"name": "List Purchases",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer {{sanctum_token}}",
|
|
"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": "Authorization",
|
|
"value": "Bearer {{sanctum_token}}",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\n \"status\": \"pending\",\n \"payment_status\": \"pending\",\n \"payment_method\": \"cash\",\n \"items\": [\n {\n \"producto_variante_id\": {{product_variant_id}},\n \"cantidad\": 1\n }\n ]\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"
|
|
},
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer {{sanctum_token}}",
|
|
"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": "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": "Protected",
|
|
"item": [
|
|
{
|
|
"name": "Current User",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{
|
|
"key": "Accept",
|
|
"value": "application/json",
|
|
"type": "text"
|
|
},
|
|
{
|
|
"key": "Authorization",
|
|
"value": "Bearer {{sanctum_token}}",
|
|
"type": "text"
|
|
}
|
|
],
|
|
"url": {
|
|
"raw": "{{base_url}}/api/user",
|
|
"host": [
|
|
"{{base_url}}"
|
|
],
|
|
"path": [
|
|
"api",
|
|
"user"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"event": [
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"variable": [
|
|
{
|
|
"key": "base_url",
|
|
"value": "http://localhost:8000",
|
|
"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": "sanctum_token",
|
|
"value": "",
|
|
"type": "string"
|
|
}
|
|
]
|
|
}
|