openapi: 3.0.3 info: title: 'Ecommerce API Documentation' description: 'This is the documentation for the Ecommerce API.' version: 1.0.0 servers: - url: 'https://api.staging.newss.beer' paths: /external/v1/customers: get: summary: 'Display a listing of registered and unregistered customers.' operationId: displayAListingOfRegisteredAndUnregisteredCustomers description: '' parameters: - in: query name: page description: 'Optional. Page number for pagination. Default: 1.' example: 2 required: false schema: type: integer description: 'Optional. Page number for pagination. Default: 1.' example: 2 nullable: true - in: query name: limit description: 'Optional. Number of results per page (maximum 100). Default: 15.' example: 20 required: false schema: type: integer description: 'Optional. Number of results per page (maximum 100). Default: 15.' example: 20 nullable: true - in: query name: search description: 'Search term to filter by name, email or phone. Must not be greater than 255 characters.' example: Juan required: false schema: type: string description: 'Search term to filter by name, email or phone. Must not be greater than 255 characters.' example: Juan nullable: true - in: query name: registered description: 'Optional. Filter by customer type. true: registered only, false: unregistered only, null: all.' example: true required: false schema: type: boolean description: 'Optional. Filter by customer type. true: registered only, false: unregistered only, null: all.' example: true nullable: true responses: 200: description: '' content: application/json: schema: type: object example: data: - customer_id: 1 email: customer@example.com firstname: Juan lastname: Pérez telephone: '1234567890' status: 1 date_added: '2025-01-15 10:30:00' - customer_id: 0 email: unregistered@example.com firstname: María lastname: González telephone: '0987654321' status: 1 date_added: '2025-01-15 10:30:00' meta: current_page: 1 from: 1 last_page: 5 links: - url: null label: '« Previous' active: false - url: 'https://api.example.com/external/v1/customers?page=1' label: '1' active: true - url: 'https://api.example.com/external/v1/customers?page=2' label: '2' active: false - url: 'https://api.example.com/external/v1/customers?page=2' label: 'Next »' active: false path: 'https://api.example.com/external/v1/customers' per_page: 15 to: 15 total: 78 properties: data: type: array example: - customer_id: 1 email: customer@example.com firstname: Juan lastname: Pérez telephone: '1234567890' status: 1 date_added: '2025-01-15 10:30:00' - customer_id: 0 email: unregistered@example.com firstname: María lastname: González telephone: '0987654321' status: 1 date_added: '2025-01-15 10:30:00' items: type: object properties: customer_id: type: integer example: 1 email: type: string example: customer@example.com firstname: type: string example: Juan lastname: type: string example: Pérez telephone: type: string example: '1234567890' status: type: integer example: 1 date_added: type: string example: '2025-01-15 10:30:00' meta: type: object properties: current_page: type: integer example: 1 from: type: integer example: 1 last_page: type: integer example: 5 links: type: array example: - url: null label: '« Previous' active: false - url: 'https://api.example.com/external/v1/customers?page=1' label: '1' active: true - url: 'https://api.example.com/external/v1/customers?page=2' label: '2' active: false - url: 'https://api.example.com/external/v1/customers?page=2' label: 'Next »' active: false items: type: object properties: url: type: string example: null label: type: string example: '« Previous' active: type: boolean example: false path: type: string example: 'https://api.example.com/external/v1/customers' per_page: type: integer example: 15 to: type: integer example: 15 total: type: integer example: 78 tags: - Customers /external/v1/products: get: summary: 'Display a listing of the products.' operationId: displayAListingOfTheProducts description: '' parameters: - in: query name: page description: 'Optional. Page number for pagination. Default: 1.' example: 2 required: false schema: type: integer description: 'Optional. Page number for pagination. Default: 1.' example: 2 nullable: false - in: query name: limit description: 'Optional. Number of results per page. Default: 12.' example: 24 required: false schema: type: integer description: 'Optional. Number of results per page. Default: 12.' example: 24 nullable: false - in: query name: 'filter[search]' description: 'Search by text.' example: tractor required: false schema: type: string description: 'Search by text.' example: tractor nullable: false - in: query name: 'filter[category]' description: 'Filter by category.' example: 1 required: false schema: type: integer description: 'Filter by category.' example: 1 nullable: false - in: query name: 'filter[variants]' description: 'Filter by variants.' example: 'color:red' required: false schema: type: string description: 'Filter by variants.' example: 'color:red' nullable: false - in: query name: 'filter[tags]' description: 'Filter by tags.' example: oferta required: false schema: type: string description: 'Filter by tags.' example: oferta nullable: false - in: query name: sort description: "Sort results.\nAllowed values: sort_order, -sort_order, price, -price, date_added, -date_added, name, -name." example: price required: false schema: type: string description: "Sort results.\nAllowed values: sort_order, -sort_order, price, -price, date_added, -date_added, name, -name." example: price nullable: false responses: 200: description: '' content: text/plain: schema: type: string example: "{\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\": \"« 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 »\",\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}" tags: - Products patch: summary: "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)." operationId: updateMultipleProductsAndTheirVariantsInASingleRequestUpdateStockPricesDiscountsAndStatusEachProductIsProcessedIndependentlyFailuresWontAffectOtherProductsVariantsAreIdentifiedByTheirAttributesegColorSize description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: - type: product id: '1837' success: true attributes: quantity: 100 price: 18793.5 status: true - type: product id: '1838' success: true attributes: variants_updated: 1 - type: product id: '9999' success: false errors: - status: '422' source: pointer: /data/2/id title: 'Update failed' detail: 'No query results for model [App\Models\Site\Ecommerce\Product] 9999' meta: total: 3 successful: 2 failed: 1 version: 1.0.0 processed_at: '2025-10-07T14:30:00+00:00' properties: data: type: array example: - type: product id: '1837' success: true attributes: quantity: 100 price: 18793.5 status: true - type: product id: '1838' success: true attributes: variants_updated: 1 - type: product id: '9999' success: false items: type: object properties: type: type: string example: product id: type: string example: '1837' success: type: boolean example: true attributes: type: object properties: quantity: type: integer example: 100 price: type: number example: 18793.5 status: type: boolean example: true errors: type: array example: - status: '422' source: pointer: /data/2/id title: 'Update failed' detail: 'No query results for model [App\Models\Site\Ecommerce\Product] 9999' items: type: object properties: status: type: string example: '422' source: type: object properties: pointer: type: string example: /data/2/id title: type: string example: 'Update failed' detail: type: string example: 'No query results for model [App\Models\Site\Ecommerce\Product] 9999' meta: type: object properties: total: type: integer example: 3 successful: type: integer example: 2 failed: type: integer example: 1 version: type: string example: 1.0.0 processed_at: type: string example: '2025-10-07T14:30:00+00:00' 422: description: '' content: application/json: schema: type: object example: message: 'The given data was invalid.' errors: products: - 'Debe proporcionar al menos un producto para actualizar.' properties: message: type: string example: 'The given data was invalid.' errors: type: object properties: products: type: array example: - 'Debe proporcionar al menos un producto para actualizar.' items: type: string tags: - Products requestBody: required: true content: application/vnd.api+json: schema: type: object properties: products: type: array description: 'Array of products to update (minimum 1, maximum 100).' example: - product_id: 1837 quantity: 100 price: 18793.5 has_discount: true special_price: 15000.0 status: true variants: - attributes: color: blanco talle: xl quantity: 50 price: 19000.0 has_discount: false special_price: 18000.0 - product_id: 1838 quantity: 50 price: 12500.0 status: false items: type: object properties: product_id: type: integer description: 'Product ID to update.' example: 1837 nullable: false quantity: type: integer description: 'Product stock quantity.' example: 100 nullable: true price: type: number description: 'Product price.' example: 18793.5 nullable: true has_discount: type: boolean description: 'Indicates if the product has an active discount.' example: true nullable: true special_price: type: number description: 'Product discounted price.' example: 15000.0 nullable: true status: type: boolean description: 'Product status: true (active) or false (inactive).' example: true nullable: true variants: type: array description: 'Array of product variants to update.' example: - attributes: color: blanco talle: xl quantity: 50 price: 19000.0 items: type: object nullable: true properties: attributes: type: object description: 'Attributes that identify the variant as a key-value object.' example: color: blanco talle: xl nullable: false properties: { } quantity: type: integer description: 'Variant stock quantity.' example: 50 nullable: true price: type: number description: 'Variant price.' example: 19000.0 nullable: true has_discount: type: boolean description: 'Indicates if the variant has an active discount.' example: false nullable: true special_price: type: number description: 'Variant discounted price.' example: 18000.0 nullable: true required: - attributes required: - product_id required: - products tags: - name: Customers description: '' - name: Products description: '' components: securitySchemes: default: type: http scheme: bearer description: 'The access token is obtained by generating it from the administration panel.' security: - default: []