{ "openapi": "3.2.0", "info": { "title": "Bagisto Shop API", "description": "Bagisto Shop API - Customer-facing operations for products, cart, orders, and checkout.", "contact": { "name": "", "url": "", "email": "" }, "license": { "name": "", "url": "" }, "version": "2.4.10" }, "servers": [ { "url": "{url}/api/shop", "description": "Bagisto Shop API", "variables": { "url": { "default": "http://localhost:8000", "description": "Base URL of your Bagisto installation." } } } ], "paths": { "/attribute-options": { "get": { "operationId": "api_apishopattribute-options_get_collection", "tags": [ "Attribute" ], "responses": { "200": { "description": "List of attribute options.", "content": { "application/json": { "example": [ { "id": 1, "adminName": "Red", "sortOrder": 0, "translation": { "id": 1, "attributeOptionId": 1, "locale": "en", "label": "Red" }, "translations": [ { "id": 86, "attributeOptionId": 1, "locale": "de", "label": "" }, { "id": 1, "attributeOptionId": 1, "locale": "en", "label": "Red" } ] } ] } } } }, "summary": "List attribute options", "description": "Returns attribute options with their translations, ordered by sort order. Pass `attribute_id` to list one attribute's options — a boolean attribute returns its No (id 0) and Yes (id 1) options — and `search` to match the option label in the current locale or its admin name. Public endpoint.", "parameters": [ { "name": "attribute_id", "in": "query", "description": "Only the options of this attribute. Returns 404 when the attribute does not exist.", "required": false, "deprecated": false, "schema": { "type": "integer", "example": 23 }, "style": "form", "explode": true }, { "name": "search", "in": "query", "description": "Partial match on the option label (current locale) or admin name.", "required": false, "deprecated": false, "schema": { "type": "string", "example": "red" }, "style": "form", "explode": true }, { "name": "page", "in": "query", "description": "The collection page number", "required": false, "deprecated": false, "schema": { "type": "integer", "default": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "The number of items per page", "required": false, "deprecated": false, "schema": { "type": "integer", "default": 10, "minimum": 0, "maximum": 50 }, "style": "form", "explode": true }, { "name": "X-STOREFRONT-KEY", "in": "header", "description": "Storefront API Key for authentication. Required for all shop/storefront API requests.", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "" }, "style": "simple", "explode": false }, { "name": "X-Locale", "in": "header", "description": "Locale code for localized data (e.g. \"en\", \"fr\", \"ar\"). Defaults to channel's default locale.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "en" }, "style": "simple", "explode": false }, { "name": "X-Channel", "in": "header", "description": "Channel code (e.g. \"default\"). Defaults to the current channel.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "X-Currency", "in": "header", "description": "Currency code (e.g. \"USD\", \"EUR\", \"INR\"). Defaults to channel's base currency.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "USD" }, "style": "simple", "explode": false } ] } }, "/attribute-options/{id}": { "get": { "operationId": "api_apishopattribute-options_id_get", "tags": [ "Attribute" ], "responses": { "200": { "description": "Attribute option detail.", "content": { "application/json": { "example": { "id": 1, "adminName": "Red", "sortOrder": 0, "translation": { "id": 1, "attributeOptionId": 1, "locale": "en", "label": "Red" }, "translations": [ { "id": 86, "attributeOptionId": 1, "locale": "de", "label": "" }, { "id": 1, "attributeOptionId": 1, "locale": "en", "label": "Red" } ] } } } }, "404": { "description": "Attribute option not found." } }, "summary": "Get a single attribute option by ID", "description": "Returns one attribute option with its translations. Public endpoint.", "parameters": [ { "name": "id", "in": "path", "description": "Attribute option ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false }, { "name": "X-STOREFRONT-KEY", "in": "header", "description": "Storefront API Key for authentication. Required for all shop/storefront API requests.", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "" }, "style": "simple", "explode": false }, { "name": "X-Locale", "in": "header", "description": "Locale code for localized data (e.g. \"en\", \"fr\", \"ar\"). Defaults to channel's default locale.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "en" }, "style": "simple", "explode": false }, { "name": "X-Channel", "in": "header", "description": "Channel code (e.g. \"default\"). Defaults to the current channel.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "X-Currency", "in": "header", "description": "Currency code (e.g. \"USD\", \"EUR\", \"INR\"). Defaults to channel's base currency.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "USD" }, "style": "simple", "explode": false } ] } }, "/attributes": { "get": { "operationId": "api_apishopattributes_get_collection", "tags": [ "Attribute" ], "responses": { "200": { "description": "List of attributes.", "content": { "application/json": { "example": [ { "id": 1, "code": "sku", "adminName": "SKU", "type": "text", "position": 1, "isRequired": 1, "isUnique": 1, "isFilterable": 0, "isComparable": 0, "isConfigurable": 0, "isUserDefined": 0, "isVisibleOnFront": 0, "valuePerLocale": 0, "valuePerChannel": 0, "enableWysiwyg": 0, "createdAt": "2024-04-16T21:44:17+05:30", "updatedAt": "2024-04-16T21:44:17+05:30", "columnName": "text_value", "validations": "{ required: true }", "options": [], "translation": { "id": 1, "attributeId": 1, "locale": "en", "name": "SKU" }, "translations": [ "/api/shop/attribute_translations/1" ] } ] } } } }, "summary": "List all attributes", "description": "Returns all product attributes with their translations and options. Public endpoint.", "parameters": [ { "name": "page", "in": "query", "description": "The collection page number", "required": false, "deprecated": false, "schema": { "type": "integer", "default": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "The number of items per page", "required": false, "deprecated": false, "schema": { "type": "integer", "default": 10, "minimum": 0, "maximum": 50 }, "style": "form", "explode": true }, { "name": "X-STOREFRONT-KEY", "in": "header", "description": "Storefront API Key for authentication. Required for all shop/storefront API requests.", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "" }, "style": "simple", "explode": false }, { "name": "X-Locale", "in": "header", "description": "Locale code for localized data (e.g. \"en\", \"fr\", \"ar\"). Defaults to channel's default locale.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "en" }, "style": "simple", "explode": false }, { "name": "X-Channel", "in": "header", "description": "Channel code (e.g. \"default\"). Defaults to the current channel.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "X-Currency", "in": "header", "description": "Currency code (e.g. \"USD\", \"EUR\", \"INR\"). Defaults to channel's base currency.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "USD" }, "style": "simple", "explode": false } ] } }, "/attributes/{id}": { "get": { "operationId": "api_apishopattributes_id_get", "tags": [ "Attribute" ], "responses": { "200": { "description": "Attribute detail.", "content": { "application/json": { "example": { "id": 1, "code": "sku", "adminName": "SKU", "type": "text", "position": 1, "isRequired": 1, "isUnique": 1, "isFilterable": 0, "isComparable": 0, "isConfigurable": 0, "isUserDefined": 0, "isVisibleOnFront": 0, "valuePerLocale": 0, "valuePerChannel": 0, "enableWysiwyg": 0, "createdAt": "2024-04-16T21:44:17+05:30", "updatedAt": "2024-04-16T21:44:17+05:30", "columnName": "text_value", "validations": "{ required: true }", "options": [], "translation": { "id": 1, "attributeId": 1, "locale": "en", "name": "SKU" }, "translations": [ "/api/shop/attribute_translations/1" ] } } } }, "404": { "description": "Attribute not found." } }, "summary": "Get a single attribute by ID", "description": "Returns one product attribute with its translations and options. Public endpoint.", "parameters": [ { "name": "id", "in": "path", "description": "Attribute ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false }, { "name": "X-STOREFRONT-KEY", "in": "header", "description": "Storefront API Key for authentication. Required for all shop/storefront API requests.", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "" }, "style": "simple", "explode": false }, { "name": "X-Locale", "in": "header", "description": "Locale code for localized data (e.g. \"en\", \"fr\", \"ar\"). Defaults to channel's default locale.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "en" }, "style": "simple", "explode": false }, { "name": "X-Channel", "in": "header", "description": "Channel code (e.g. \"default\"). Defaults to the current channel.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "X-Currency", "in": "header", "description": "Currency code (e.g. \"USD\", \"EUR\", \"INR\"). Defaults to channel's base currency.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "USD" }, "style": "simple", "explode": false } ] } }, "/attribute_translations": { "get": { "operationId": "api_apishopattribute_translations_get_collection", "tags": [ "AttributeTranslation" ], "responses": { "200": { "description": "Attribute translation collection.", "content": { "application/json": { "example": [ { "id": 1, "attributeId": 1, "locale": "en", "name": "SKU" } ] } } } }, "summary": "List attribute translations", "description": "Returns the localized names of catalog attributes. Public endpoint.", "parameters": [ { "name": "page", "in": "query", "description": "The collection page number", "required": false, "deprecated": false, "schema": { "type": "integer", "default": 1 }, "style": "form", "explode": true }, { "name": "per_page", "in": "query", "description": "The number of items per page", "required": false, "deprecated": false, "schema": { "type": "integer", "default": 10, "minimum": 0, "maximum": 50 }, "style": "form", "explode": true }, { "name": "X-STOREFRONT-KEY", "in": "header", "description": "Storefront API Key for authentication. Required for all shop/storefront API requests.", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "" }, "style": "simple", "explode": false }, { "name": "X-Locale", "in": "header", "description": "Locale code for localized data (e.g. \"en\", \"fr\", \"ar\"). Defaults to channel's default locale.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "en" }, "style": "simple", "explode": false }, { "name": "X-Channel", "in": "header", "description": "Channel code (e.g. \"default\"). Defaults to the current channel.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "X-Currency", "in": "header", "description": "Currency code (e.g. \"USD\", \"EUR\", \"INR\"). Defaults to channel's base currency.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "USD" }, "style": "simple", "explode": false } ] } }, "/attribute_translations/{id}": { "get": { "operationId": "api_apishopattribute_translations_id_get", "tags": [ "AttributeTranslation" ], "responses": { "200": { "description": "Attribute translation.", "content": { "application/json": { "example": { "id": 1, "attributeId": 1, "locale": "en", "name": "SKU" } } } }, "404": { "description": "Translation not found." } }, "summary": "Get an attribute translation", "description": "Returns a single attribute translation by its identifier. Public endpoint.", "parameters": [ { "name": "id", "in": "path", "description": "Attribute translation ID", "required": true, "deprecated": false, "schema": { "type": "string" }, "style": "simple", "explode": false }, { "name": "X-STOREFRONT-KEY", "in": "header", "description": "Storefront API Key for authentication. Required for all shop/storefront API requests.", "required": true, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "" }, "style": "simple", "explode": false }, { "name": "X-Locale", "in": "header", "description": "Locale code for localized data (e.g. \"en\", \"fr\", \"ar\"). Defaults to channel's default locale.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "en" }, "style": "simple", "explode": false }, { "name": "X-Channel", "in": "header", "description": "Channel code (e.g. \"default\"). Defaults to the current channel.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "default" }, "style": "simple", "explode": false }, { "name": "X-Currency", "in": "header", "description": "Currency code (e.g. \"USD\", \"EUR\", \"INR\"). Defaults to channel's base currency.", "required": false, "deprecated": false, "allowEmptyValue": false, "schema": { "type": "string", "example": "USD" }, "style": "simple", "explode": false } ] } }, "/pages": { "get": { "operationId": "api_apishoppages_get_collection", "tags": [ "CMS Page" ], "responses": { "200": { "description": "List of CMS pages.", "content": { "application/json": { "example": [ { "id": "/api/shop/pages/152", "_id": 152, "layout": null, "createdAt": "2026-06-23T12:21:16+05:30", "updatedAt": "2026-06-23T12:21:16+05:30", "translation": { "id": "/api/shop/page_translations/297", "_id": 297, "pageTitle": "About testing (Updated)", "urlKey": "testing", "htmlContent": "