{
    "variable": [
        {
            "id": "baseUrl",
            "key": "baseUrl",
            "type": "string",
            "name": "string",
            "value": "https:\/\/api.sitiosimple.com"
        }
    ],
    "info": {
        "name": "Ecommerce API Documentation",
        "_postman_id": "2ff90f63-768b-4949-a4e8-f73f1c3fa0ff",
        "description": "This is the documentation for the Ecommerce API.",
        "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
    },
    "item": [
        {
            "name": "Customers",
            "description": "",
            "item": [
                {
                    "name": "Display a listing of registered and unregistered customers.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "external\/v1\/customers",
                            "query": [
                                {
                                    "key": "page",
                                    "value": "2",
                                    "description": "Optional. Page number for pagination. Default: 1.",
                                    "disabled": false
                                },
                                {
                                    "key": "limit",
                                    "value": "20",
                                    "description": "Optional. Number of results per page (maximum 100). Default: 15.",
                                    "disabled": false
                                },
                                {
                                    "key": "search",
                                    "value": "Juan",
                                    "description": "Search term to filter by name, email or phone. Must not be greater than 255 characters.",
                                    "disabled": false
                                },
                                {
                                    "key": "registered",
                                    "value": "1",
                                    "description": "Optional. Filter by customer type. true: registered only, false: unregistered only, null: all.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/external\/v1\/customers?page=2&limit=20&search=Juan&registered=1"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/vnd.api+json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/vnd.api+json"
                            }
                        ],
                        "body": null,
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n \"data\": [\n     {\n         \"customer_id\": 1,\n         \"email\": \"customer@example.com\",\n         \"firstname\": \"Juan\",\n         \"lastname\": \"P\u00e9rez\",\n         \"telephone\": \"1234567890\",\n         \"status\": 1,\n         \"date_added\": \"2025-01-15 10:30:00\"\n     },\n     {\n         \"customer_id\": 0,\n         \"email\": \"unregistered@example.com\",\n         \"firstname\": \"Mar\u00eda\",\n         \"lastname\": \"Gonz\u00e1lez\",\n         \"telephone\": \"0987654321\",\n         \"status\": 1,\n         \"date_added\": \"2025-01-15 10:30:00\"\n     }\n ],\n\"meta\": {\n \"current_page\": 1,\n     \"from\": 1,\n     \"last_page\": 5,\n     \"links\": [\n         {\n             \"url\": null,\n             \"label\": \"&laquo; Previous\",\n             \"active\": false\n         },\n     {\n             \"url\": \"https:\/\/api.example.com\/external\/v1\/customers?page=1\",\n             \"label\": \"1\",\n             \"active\": true\n         },\n         {\n             \"url\": \"https:\/\/api.example.com\/external\/v1\/customers?page=2\",\n             \"label\": \"2\",\n             \"active\": false\n         },\n         {\n             \"url\": \"https:\/\/api.example.com\/external\/v1\/customers?page=2\",\n             \"label\": \"Next &raquo;\",\n             \"active\": false\n         }\n     ],\n     \"path\": \"https:\/\/api.example.com\/external\/v1\/customers\",\n     \"per_page\": 15,\n \"to\": 15,\n     \"total\": 78\n}\n}",
                            "name": ""
                        }
                    ]
                }
            ]
        },
        {
            "name": "Products",
            "description": "",
            "item": [
                {
                    "name": "Display a listing of the products.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "external\/v1\/products",
                            "query": [
                                {
                                    "key": "page",
                                    "value": "2",
                                    "description": "Optional. Page number for pagination. Default: 1.",
                                    "disabled": false
                                },
                                {
                                    "key": "limit",
                                    "value": "24",
                                    "description": "Optional. Number of results per page. Default: 12.",
                                    "disabled": false
                                },
                                {
                                    "key": "filter%5Bsearch%5D",
                                    "value": "tractor",
                                    "description": "Search by text.",
                                    "disabled": false
                                },
                                {
                                    "key": "filter%5Bcategory%5D",
                                    "value": "1",
                                    "description": "Filter by category.",
                                    "disabled": false
                                },
                                {
                                    "key": "filter%5Bvariants%5D",
                                    "value": "color%3Ared",
                                    "description": "Filter by variants.",
                                    "disabled": false
                                },
                                {
                                    "key": "filter%5Btags%5D",
                                    "value": "oferta",
                                    "description": "Filter by tags.",
                                    "disabled": false
                                },
                                {
                                    "key": "sort",
                                    "value": "price",
                                    "description": "Sort results.\nAllowed values: sort_order, -sort_order, price, -price, date_added, -date_added, name, -name.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/external\/v1\/products?page=2&limit=24&filter%5Bsearch%5D=tractor&filter%5Bcategory%5D=1&filter%5Bvariants%5D=color%3Ared&filter%5Btags%5D=oferta&sort=price"
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/vnd.api+json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/vnd.api+json"
                            }
                        ],
                        "body": null,
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n \"data\": [\n     {\n         \"id\": 1837,\n         \"product_id\": 1837,\n         \"name\": \"Tornillos para strap de talones (pack x 5)\",\n         \"price\": 18793,\n         \"order_price\": 18793,\n         \"sku\": \"\",\n         \"special\": null,\n         \"hasDiscount\": false,\n         \"min_price\": 18793,\n         \"max_price\": 18793,\n         \"count_variants\": 0,\n         \"id_first_variant\": null,\n         \"image\": \"host1\/b69b712f7bd6757ddcda59959c89a2b1\/\/img\/products\/\",\n         \"date_added\": \"2025-09-10 13:39:36\",\n         \"url\": \"demos-2.\/tornillos-para-strap-de-talones-(pack-x-5)\",\n         \"status\": 1,\n         \"currency_code\": \"ARS\"\n      },\n     {\n\t    \"id\": 1838,\n\t    \"product_id\": 1838,\n\t\t\"name\": \"Tornillos para strap de dedos (pack x 5) (copia)\",\n\t\t\"price\": 18793,\n\t\t\"order_price\": 18793,\n\t\t\"sku\": \"\",\n\t\t\"special\": null,\n\t\t\"hasDiscount\": false,\n\t\t\"min_price\": 18793,\n\t\t\"max_price\": 18793,\n\t\t\"count_variants\": 0,\n\t\t\"id_first_variant\": null,\n\t\t\"image\": \"host1\/b69b712f7bd6757ddcda59959c89a2b1\/\/img\/products\/\",\n\t\t\"date_added\": \"2025-09-10 13:39:36\",\n\t\t\"url\": \"demos-2.\/tornillos-para-strap-de-dedos-(pack-x-5)-(copia)\",\n\t\t\"status\": 1,\n\t\t\"currency_code\": \"ARS\"\n\t}\n ],\n\"meta\": {\n\"current_page\": 1,\n\t\"from\": 1,\n\t\"last_page\": 10,\n\t\"links\": [\n\t\t{\n\t\t\t\"url\": null,\n\t\t\t\"label\": \"&laquo; Previous\",\n\t\t\t\"active\": false\n\t\t},\n\t{\n\t\t\t\"url\": \"https:\/\/api-ecomm.llujan.t2.newss.beer\/external\/v1\/products?page=1\",\n\t\t\t\"label\": \"1\",\n\t\t\t\"active\": true\n\t\t},\n\t\t{\n\t\t\t\"url\": \"https:\/\/api-ecomm.llujan.t2.newss.beer\/external\/v1\/products?page=2\",\n\t\t\t\"label\": \"2\",\n\t\t\t\"active\": false\n\t\t}\n\t\t{\n\t\t\t\"url\": \"https:\/\/api-ecomm.llujan.t2.newss.beer\/external\/v1\/products?page=2\",\n\t\t\t\"label\": \"Next &raquo;\",\n\t\t\t\"active\": false\n\t\t}\n\t],\n\t\"path\": \"https:\/\/api-ecomm.llujan.t2.newss.beer\/external\/v1\/products\",\n\t\"per_page\": 10,\n\"to\": 10,\n\t\"total\": 99\n}\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Display a single product by ID with its variants, images, and related data.",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "external\/v1\/products\/:id",
                            "query": [
                                {
                                    "key": "include",
                                    "value": "productDescription%2CproductOptions",
                                    "description": "Optional relationships to include. Comma-separated values.\nAllowed: productDescription, categories, tags, productOptions, productSpecial, images.",
                                    "disabled": false
                                }
                            ],
                            "raw": "{{baseUrl}}\/external\/v1\/products\/:id?include=productDescription%2CproductOptions",
                            "variable": [
                                {
                                    "id": "id",
                                    "key": "id",
                                    "value": "1837",
                                    "description": "Product ID."
                                }
                            ]
                        },
                        "method": "GET",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/vnd.api+json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/vnd.api+json"
                            }
                        ],
                        "body": null,
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": {\n    \"id\": 1837,\n    \"product_id\": 1837,\n    \"name\": \"Remera Deportiva\",\n    \"price\": 18793,\n    \"order_price\": 18793,\n    \"sku\": \"REM-001\",\n    \"special\": null,\n    \"hasDiscount\": false,\n    \"min_price\": 18793,\n    \"max_price\": 18793,\n    \"count_variants\": 2,\n    \"id_first_variant\": 1,\n    \"image\": \"host1\/b69b712f7bd6757ddcda59959c89a2b1\/\/img\/products\/remera.jpg\",\n    \"date_added\": \"2025-09-10 13:39:36\",\n    \"url\": \"remera-deportiva\",\n    \"status\": 1,\n    \"currency_code\": \"ARS\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 404,
                            "body": "{\n  \"message\": \"Product not found\"\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Create a new product with variants. When providing variants, all possible combinations of attributes must be included.\nFor example, if you specify one color (azul) and two sizes (s, l), you must provide both combinations (azul-s, azul-l).",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "external\/v1\/products",
                            "query": [],
                            "raw": "{{baseUrl}}\/external\/v1\/products"
                        },
                        "method": "POST",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/vnd.api+json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/vnd.api+json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"name\":\"Remera Deportiva\",\"description\":\"Remera 100% algod\u00f3n\",\"status\":true,\"video\":\"https:\\\/\\\/www.youtube.com\\\/watch?v=dQw4w9WgXcQ\",\"product_type\":\"1\",\"digital_product_url\":null,\"price\":100,\"has_discount\":false,\"special_price\":null,\"control_stock\":true,\"quantity\":25,\"sku\":\"REM-DEPO-001\",\"width\":30,\"height\":40,\"length\":10,\"weight\":0.25,\"tag\":\"algodon,deporte\",\"product_category\":5,\"variants\":[{\"attributes\":{\"color\":\"azul\",\"talle\":\"s\"},\"quantity\":10,\"price\":100,\"sku\":\"REM-AZUL-S\"},{\"attributes\":{\"color\":\"azul\",\"talle\":\"l\"},\"quantity\":15,\"price\":100,\"sku\":\"REM-AZUL-L\"}]}"
                        },
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 201,
                            "body": "{\n  \"data\": {\n    \"product_id\": 123,\n    \"name\": \"Remera Deportiva\",\n    \"sku\": \"REM-DEPO-001\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\n  \"message\": \"The given data was invalid.\",\n  \"errors\": {\n    \"variants\": [\"Incomplete variant set. Expected 2 variants but got 1. Missing combinations: color=azul, talle=l. Please provide all 2 possible combinations.\"]\n  }\n}",
                            "name": ""
                        }
                    ]
                },
                {
                    "name": "Update multiple products and their variants in a single request. Update stock, prices, discounts and status. Each product is processed independently - failures won't affect other products. Variants are identified by their attributes (e.g., color, size).",
                    "request": {
                        "url": {
                            "host": "{{baseUrl}}",
                            "path": "external\/v1\/products",
                            "query": [],
                            "raw": "{{baseUrl}}\/external\/v1\/products"
                        },
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Content-Type",
                                "value": "application\/vnd.api+json"
                            },
                            {
                                "key": "Accept",
                                "value": "application\/vnd.api+json"
                            }
                        ],
                        "body": {
                            "mode": "raw",
                            "raw": "{\"products\":[{\"product_id\":1837,\"quantity\":100,\"price\":18793.5,\"has_discount\":true,\"special_price\":15000,\"status\":true,\"variants\":[{\"attributes\":{\"color\":\"blanco\",\"talle\":\"xl\"},\"quantity\":50,\"price\":19000,\"has_discount\":false,\"special_price\":18000}]},{\"product_id\":1838,\"quantity\":50,\"price\":12500,\"status\":false}]}"
                        },
                        "description": ""
                    },
                    "response": [
                        {
                            "header": [],
                            "code": 200,
                            "body": "{\n  \"data\": [\n    {\n      \"type\": \"product\",\n      \"id\": \"1837\",\n      \"success\": true,\n      \"attributes\": {\n        \"quantity\": 100,\n        \"price\": 18793.50,\n        \"status\": true\n      }\n    },\n    {\n      \"type\": \"product\",\n      \"id\": \"1838\",\n      \"success\": true,\n      \"attributes\": {\n        \"variants_updated\": 1\n      }\n    },\n    {\n      \"type\": \"product\",\n      \"id\": \"9999\",\n      \"success\": false\n    }\n  ],\n  \"errors\": [\n    {\n      \"status\": \"422\",\n      \"source\": {\"pointer\": \"\/data\/2\/id\"},\n      \"title\": \"Update failed\",\n      \"detail\": \"No query results for model [App\\\\Models\\\\Site\\\\Ecommerce\\\\Product] 9999\"\n    }\n  ],\n  \"meta\": {\n    \"total\": 3,\n    \"successful\": 2,\n    \"failed\": 1,\n    \"version\": \"1.0.0\",\n    \"processed_at\": \"2025-10-07T14:30:00+00:00\"\n  }\n}",
                            "name": ""
                        },
                        {
                            "header": [],
                            "code": 422,
                            "body": "{\n  \"message\": \"The given data was invalid.\",\n  \"errors\": {\n    \"products\": [\"Debe proporcionar al menos un producto para actualizar.\"]\n  }\n}",
                            "name": ""
                        }
                    ]
                }
            ]
        }
    ],
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "token",
                "type": "string"
            }
        ]
    }
}