openapi: 3.0.3
info:
  title: 'Orderain Headless API Documentation'
  description: "Orderain Headless is a powerful, AI-driven ecommerce solution that lets you build and scale custom storefronts without being limited by a traditional frontend. Built on Orderain’s complete ecommerce engine, it provides full support for core operations including products, categories, tags, orders, customers, and inventory, while giving developers total freedom over the user experience.\n\nOrderain Headless separates the frontend from the backend, letting you use any tech stack while Orderain handles ecommerce operations. Secure APIs and AI automation help you build, manage, and scale fast across web and mobile.\n\nOrderain Headless is ideal for businesses and developers who want flexibility, performance, and full control—without sacrificing the reliability of a complete ecommerce system."
  version: 1.0.0
servers:
  -
    url: 'https://api.orderain.com'
tags:
  -
    name: 'Getting Started'
    description: "                \n### Steps to Get Started with Orderain Headless API\n\n### Step 1: Generate Your API Token\nOpen your shop dashboard.\nClick Headless API at the bottom left.\nClick Create Token, enter a token name, set allowed origins and expiry days, select Read, Write, and Delete access, then click Create.\n\n\n<img src=\"/docs-guide-images/step-2create-token.png\" alt=\"API Token Generation\" width=\"600\" />\n\n\n### Step 2: Copy Your Bearer Token\nOnce generated, copy your Bearer token. Keep it secure!\n<img src=\"/docs-guide-images/step-3.png\" alt=\"Copy API Token\" width=\"600\" />\n### Step 3: Make Your First Request\nUse the Bearer token in your requests with {shop_id} replaced by your actual Shop ID.:\n\n```bash\ncurl -H \"Authorization: Bearer YOUR_TOKEN\" https://api.orderain.com/api/v1/headless/get-shop-products/{shop_id}\n```\n\n### Step 4: Allow CORS for Your  Storefront\nTo enable your frontend application to communicate with the API, add your frontend's domain to the CORS settings in your shop dashboard.\n\n<img src=\"/docs-guide-images/step-1headless.png\" alt=\"Copy API Token\" width=\"600\" />\n\n### Step 5: Build Your Frontend\nConnect your frontend application and start building amazing experiences!"
  -
    name: 'For AI/LLMs'
    description: "## API Documentation for AI & LLMs\n\nThis API documentation is optimized for AI assistants and Large Language Models.\n\n### LLM-Friendly Format\nGet the complete API documentation in LLM-friendly format:\n\n**[View llms.txt](/llms.txt)** - Complete API documentation for LLMs\n\n**[Download OpenAPI Spec](/docs/openapi.yaml)** - Machine-readable API specification\n\n### Quick Copy\n```\nCopy this link for your AI assistant:\nhttps://api.orderain.com/llms.txt\n```\n\n### What's Included\n- Complete endpoint documentation\n- Request/response examples\n- Authentication details\n- Rate limits and best practices\n\nPerfect for Claude, ChatGPT, and other AI assistants to understand and work with our API!"
  -
    name: 'Live Demo & Starter Kit'
    description: "## Live Storefront & Open Source Starter Kit\n\nJump-start your headless e-commerce project with our **open-source storefront template**!\n\n### Ready-to-Use Storefront\nGet a fully functional e-commerce storefront built with modern technologies and best practices.\n\n**[GitHub Repository](https://github.com/Orderain/headless-ecommerce)**\n\n### What's Included\n- **Complete storefront implementation** - Product listing, cart, checkout, and more\n- **Pre-built components** - Reusable UI components for e-commerce\n- **API integration examples** - All endpoints integrated and ready to use\n\n###  Tech Stack\n- **Next.js 14+** - React framework with App Router\n\n###  Quick Start\n```bash\n# Clone the repository\ngit clone https://github.com/Orderain/headless-ecommerce\n\n# Install dependencies\nnpm install\n\n# Configure your API credentials\ncp .env.example .env.local\n\n# Start development server\nnpm run dev\n```\n\n###  Features Showcase\n- Product browsing with filters and search\n- Shopping cart with real-time updates\n- Multi-step checkout process\n- Order tracking and history\n- Inventory management\n- Responsive product gallery\n- Reviews and ratings\n\n###  Perfect For\n- Building custom storefronts\n- Learning headless commerce\n- Prototyping e-commerce ideas\n- Starting a production project\n\n### Contributing\nWe welcome contributions! Check out our [Contributing Guide](https://github.com/Orderain/headless-ecommerce#contributing) to get started.\n\n**[Star on GitHub](https://github.com/Orderain/headless-ecommerce)** | **[View Documentation](https://github.com/Orderain/headless-ecommerce/wiki)** | **[Report Issues](https://github.com/Orderain/headless-ecommerce/issues)**"
  -
    name: Regions
    description: ''
  -
    name: 'Product Categories'
    description: ''
  -
    name: Products
    description: ''
  -
    name: Inventory
    description: ''
  -
    name: Shipping
    description: ''
  -
    name: Taxes
    description: ''
  -
    name: Cart
    description: ''
  -
    name: Customers
    description: ''
  -
    name: Order
    description: 'Retrieve a paginated list of orders for a specific shop with various filter and sort options. If no sorting is specified, orders are sorted by created_at and updated_at in descending order.'
  -
    name: 'Shop Tags'
    description: ''
  -
    name: 'Shop Warehouse'
    description: ''
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: "## Welcome to Orderain Headless API\n\nOur API is designed for headless commerce, meaning you handle the frontend presentation while we manage the core e-commerce logic. With endpoints for products, categories, shipping, carts, and orders, you can create tailored solutions that scale with your business. No more compromises on design or functionality—build exactly what your users need.\n\n### How to Get Started\n\nYou can generate a headless API token from your shop dashboard. The token must have the <code>headless_api</code> scope along with appropriate access scopes (<code>read_access</code>, <code>write_access</code>, <code>delete_access</code>)."
security:
  -
    default: []
paths:
  /api/v1/headless/get-all-countries:
    get:
      summary: 'Get all countries'
      operationId: getAllCountries
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": true,\n  \"data\": [\n    {\"id\": 1 \"name\": \"Afghanistan\",\"iso2\": \"AF\",\"iso3\": \"AFG\"},\n    {\"id\": 2 \"name\": \"Aland Islands\",\"iso2\": \"AX\",\"iso3\": \"ALA\"}\n  ]\n \"message\": \"Countries list.\"\n}"
      tags:
        - Regions
      security: []
  '/api/v1/headless/get-all-states/{country_id}':
    get:
      summary: 'Get states by country'
      operationId: getStatesByCountry
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            text/plain:
              schema:
                type: string
                example: "{\n  \"success\": true,\n  \"data\": [\n     { \"id\": 1, \"country_id\": 1, \"state_id\": 1,\"name\": \"Ashkāsham\", \"country_code\": \"AF\" },\n     { \"id\": 2, \"country_id\": 1, \"state_id\": 1,\"name\": \"Fayzabad\", \"country_code\": \"AF\" }\n  ]\n \"message\": \"States list.\"}"
      tags:
        - Regions
      security: []
    parameters:
      -
        in: path
        name: country_id
        description: 'The country ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/v1/headless/get-all-cities/{country_id}/{state_id}':
    get:
      summary: 'Get cities by state'
      operationId: getCitiesByState
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  data:
                    -
                      id: 1
                      name: 'Los Angeles'
                      state_id: 5
                      country_id: 1
                    -
                      id: 2
                      name: 'San Francisco'
                      state_id: 5
                      country_id: 1
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        name: 'Los Angeles'
                        state_id: 5
                        country_id: 1
                      -
                        id: 2
                        name: 'San Francisco'
                        state_id: 5
                        country_id: 1
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: 'Los Angeles'
                        state_id:
                          type: integer
                          example: 5
                        country_id:
                          type: integer
                          example: 1
      tags:
        - Regions
      security: []
    parameters:
      -
        in: path
        name: country_id
        description: 'The country ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: state_id
        description: 'The state ID.'
        example: 5
        required: true
        schema:
          type: integer
  '/api/v1/headless/get-all-product-categories/{shop_id}':
    get:
      summary: 'Get All Product Categories (live Site and Dashboard)'
      operationId: getAllProductCategoriesliveSiteAndDashboard
      description: ''
      parameters:
        -
          in: query
          name: parent_id
          description: 'Filter by parent category ID.'
          example: 5
          required: false
          schema:
            type: integer
            description: 'Filter by parent category ID.'
            example: 5
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  data:
                    -
                      id: 1
                      name: Electronics
                      slug: electronics
                      description: 'Electronic items'
                      parent_id: null
                      shop_id: 1
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    example:
                      -
                        id: 1
                        name: Electronics
                        slug: electronics
                        description: 'Electronic items'
                        parent_id: null
                        shop_id: 1
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 1
                        name:
                          type: string
                          example: Electronics
                        slug:
                          type: string
                          example: electronics
                        description:
                          type: string
                          example: 'Electronic items'
                        parent_id:
                          type: string
                          example: null
                        shop_id:
                          type: integer
                          example: 1
      tags:
        - 'Product Categories'
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'The shop ID.'
        example: 1
        required: true
        schema:
          type: integer
  '/api/v1/headless/get-product-category/{shop_id}/{id}':
    get:
      summary: 'Get product category (live Site and Dashboard)'
      operationId: getProductCategoryliveSiteAndDashboard
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  data:
                    id: 5
                    name: Smartphones
                    slug: smartphones
                    description: 'Mobile phones and accessories'
                    parent_id: 1
                    shop_id: 1
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 5
                      name:
                        type: string
                        example: Smartphones
                      slug:
                        type: string
                        example: smartphones
                      description:
                        type: string
                        example: 'Mobile phones and accessories'
                      parent_id:
                        type: integer
                        example: 1
                      shop_id:
                        type: integer
                        example: 1
      tags:
        - 'Product Categories'
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'The shop ID.'
        example: 1
        required: true
        schema:
          type: integer
      -
        in: path
        name: id
        description: 'The category ID.'
        example: 5
        required: true
        schema:
          type: integer
  /api/v1/headless/add-product-category:
    post:
      summary: 'Create Product Category'
      operationId: createProductCategory
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Product category has been created successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Product category has been created successfully.'
      tags:
        - 'Product Categories'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                shop_id:
                  type: string
                  description: 'The <code>id</code> of an existing record in the shops table.'
                  example: consequatur
                parent_id:
                  type: string
                  description: 'The <code>id</code> of an existing record in the product_categories table.'
                  example: null
                  nullable: true
                status:
                  type: string
                  description: ''
                  example: '1'
                  enum:
                    - '0'
                    - '1'
                name:
                  type: string
                  description: 'Must match the regex /^[^&]+$/. Must be at least 3 characters. Must not be greater than 50 characters.'
                  example: qeopfuudtdsufvyvddqam
                image:
                  type: string
                  description: 'Must be a valid URL.'
                  example: 'http://www.hahn.com/sed-fuga-aspernatur-natus-earum.html'
                  nullable: true
              required:
                - shop_id
                - name
  '/api/v1/headless/update-product-category/{id}':
    post:
      summary: 'Update Product Category'
      operationId: updateProductCategory
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Product category has been updated successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Product category has been updated successfully.'
      tags:
        - 'Product Categories'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                shop_id:
                  type: string
                  description: 'The <code>id</code> of an existing record in the shops table.'
                  example: consequatur
                parent_id:
                  type: string
                  description: 'The <code>id</code> of an existing record in the product_categories table.'
                  example: null
                  nullable: true
                status:
                  type: string
                  description: ''
                  example: '1'
                  enum:
                    - '0'
                    - '1'
                name:
                  type: string
                  description: 'Must match the regex /^[^&]+$/. Must be at least 3 characters. Must not be greater than 50 characters.'
                  example: qeopfuudtdsufvyvddqam
                image:
                  type: string
                  description: 'Must be a valid URL.'
                  example: 'http://www.hahn.com/sed-fuga-aspernatur-natus-earum.html'
                  nullable: true
              required:
                - shop_id
                - name
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the update product category.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/delete-product-category/{shop_id}/{id}':
    delete:
      summary: 'Delete Product Category'
      operationId: deleteProductCategory
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Product category has been deleted successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Product category has been deleted successfully.'
      tags:
        - 'Product Categories'
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: id
        description: 'The ID of the {shop id}.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-all-products/{shop_id}':
    get:
      summary: 'Get all active products (Live Site)'
      operationId: getAllActiveProductsLiveSite
      description: 'Returns only active products. This endpoint is public and does not require authentication.'
      parameters:
        -
          in: query
          name: search
          description: 'Search products by name (flexible search).'
          example: phone
          required: false
          schema:
            type: string
            description: 'Search products by name (flexible search).'
            example: phone
        -
          in: query
          name: 'category[]'
          description: 'Filter products by one or multiple category names.'
          example: electronics
          required: false
          schema:
            type: string
            description: 'Filter products by one or multiple category names.'
            example: electronics
        -
          in: query
          name: min_price
          description: 'Minimum price of product. Note: If the product has variants, it will consider the minimum price of the first variant.'
          example: '10.00'
          required: false
          schema:
            type: string
            description: 'Minimum price of product. Note: If the product has variants, it will consider the minimum price of the first variant.'
            example: '10.00'
        -
          in: query
          name: max_price
          description: 'Maximum price of product.'
          example: '1000.00'
          required: false
          schema:
            type: string
            description: 'Maximum price of product.'
            example: '1000.00'
        -
          in: query
          name: 'attributes[size][]'
          description: 'Filter products by size.'
          example: large
          required: false
          schema:
            type: string
            description: 'Filter products by size.'
            example: large
        -
          in: query
          name: sort_by
          description: 'Sorting field (e.g., price, name).'
          example: price
          required: false
          schema:
            type: string
            description: 'Sorting field (e.g., price, name).'
            example: price
        -
          in: query
          name: sort_direction
          description: 'Sorting direction (ascending or descending).'
          example: 'asc Allowed: asc, desc'
          required: false
          schema:
            type: string
            description: 'Sorting direction (ascending or descending).'
            example: 'asc Allowed: asc, desc'
        -
          in: query
          name: per_page
          description: 'Number of results per page.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'Number of results per page.'
            example: 20
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    data:
                      -
                        id: fddfdd30-310f-4313-8dab-e074609c569a
                        vendor_id: 736
                        prod_categories_names:
                          - 'Car Electronics'
                        prod_categories_ids:
                          - 311
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        name: 'DC 12V Lighter Plug Replacement'
                        slug: dc-12v-lighter-plug-replacement-1
                        description: 'High quality DC 12V replacement lighter plug with ceramic protection'
                        sku: P1J43KK8S
                        quantity: 80
                        reserve_inv: 0
                        tags:
                          - 'car lighter plug'
                          - '12v replacement'
                        attributes: null
                        price: '499.00'
                        currency_code: PKR
                        currency_icon: Rs
                        discount: '0.00'
                        discount_type: null
                        weight: '75.000'
                        inventory:
                          -
                            id: 25f0fa38-d628-495c-aa34-215aa1f05f75
                            warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                            warehouse_name: 'Main Warehouse'
                            product_id: fddfdd30-310f-4313-8dab-e074609c569a
                            product_variant_id: null
                            stock_in: 80
                        unit_id: 2
                        unit: g
                        tax_ids: null
                        tax_names: []
                        extra_charge_ids: null
                        extra_charges: []
                        variants: []
                        status: 1
                        images:
                          - 'https://static-01.daraz.pk/p/abb621b3764b1e9f4c07e28053a27ffd.jpg'
                        created_at: '2026-01-29T11:20:22.000000Z'
                        updated_at: '2026-01-29T11:20:22.000000Z'
                        average_reviews: 0
                        reviews_count: 0
                        weight_in_g: '75.000'
                        reviews:
                          one: 0
                          two: 0
                          three: 0
                          four: 0
                          five: 0
                    links:
                      first: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=1'
                      last: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=49'
                      prev: null
                      next: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=2'
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 49
                      links:
                        -
                          url: null
                          label: '&laquo; Previous'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=1'
                          label: '1'
                          active: true
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=2'
                          label: '2'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=3'
                          label: '3'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=4'
                          label: '4'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=5'
                          label: '5'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=6'
                          label: '6'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=7'
                          label: '7'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=8'
                          label: '8'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=9'
                          label: '9'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=10'
                          label: '10'
                          active: false
                        -
                          url: null
                          label: ...
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=48'
                          label: '48'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=49'
                          label: '49'
                          active: false
                        -
                          url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=2'
                          label: 'Next &raquo;'
                          active: false
                      path: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5'
                      per_page: 1
                      to: 1
                      total: 49
                  message: 'Product list.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      data:
                        type: array
                        example:
                          -
                            id: fddfdd30-310f-4313-8dab-e074609c569a
                            vendor_id: 736
                            prod_categories_names:
                              - 'Car Electronics'
                            prod_categories_ids:
                              - 311
                            shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            name: 'DC 12V Lighter Plug Replacement'
                            slug: dc-12v-lighter-plug-replacement-1
                            description: 'High quality DC 12V replacement lighter plug with ceramic protection'
                            sku: P1J43KK8S
                            quantity: 80
                            reserve_inv: 0
                            tags:
                              - 'car lighter plug'
                              - '12v replacement'
                            attributes: null
                            price: '499.00'
                            currency_code: PKR
                            currency_icon: Rs
                            discount: '0.00'
                            discount_type: null
                            weight: '75.000'
                            inventory:
                              -
                                id: 25f0fa38-d628-495c-aa34-215aa1f05f75
                                warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                                warehouse_name: 'Main Warehouse'
                                product_id: fddfdd30-310f-4313-8dab-e074609c569a
                                product_variant_id: null
                                stock_in: 80
                            unit_id: 2
                            unit: g
                            tax_ids: null
                            tax_names: []
                            extra_charge_ids: null
                            extra_charges: []
                            variants: []
                            status: 1
                            images:
                              - 'https://static-01.daraz.pk/p/abb621b3764b1e9f4c07e28053a27ffd.jpg'
                            created_at: '2026-01-29T11:20:22.000000Z'
                            updated_at: '2026-01-29T11:20:22.000000Z'
                            average_reviews: 0
                            reviews_count: 0
                            weight_in_g: '75.000'
                            reviews:
                              one: 0
                              two: 0
                              three: 0
                              four: 0
                              five: 0
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: fddfdd30-310f-4313-8dab-e074609c569a
                            vendor_id:
                              type: integer
                              example: 736
                            prod_categories_names:
                              type: array
                              example:
                                - 'Car Electronics'
                              items:
                                type: string
                            prod_categories_ids:
                              type: array
                              example:
                                - 311
                              items:
                                type: integer
                            shop_id:
                              type: string
                              example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            name:
                              type: string
                              example: 'DC 12V Lighter Plug Replacement'
                            slug:
                              type: string
                              example: dc-12v-lighter-plug-replacement-1
                            description:
                              type: string
                              example: 'High quality DC 12V replacement lighter plug with ceramic protection'
                            sku:
                              type: string
                              example: P1J43KK8S
                            quantity:
                              type: integer
                              example: 80
                            reserve_inv:
                              type: integer
                              example: 0
                            tags:
                              type: array
                              example:
                                - 'car lighter plug'
                                - '12v replacement'
                              items:
                                type: string
                            attributes:
                              type: string
                              example: null
                            price:
                              type: string
                              example: '499.00'
                            currency_code:
                              type: string
                              example: PKR
                            currency_icon:
                              type: string
                              example: Rs
                            discount:
                              type: string
                              example: '0.00'
                            discount_type:
                              type: string
                              example: null
                            weight:
                              type: string
                              example: '75.000'
                            inventory:
                              type: array
                              example:
                                -
                                  id: 25f0fa38-d628-495c-aa34-215aa1f05f75
                                  warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                                  warehouse_name: 'Main Warehouse'
                                  product_id: fddfdd30-310f-4313-8dab-e074609c569a
                                  product_variant_id: null
                                  stock_in: 80
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: 25f0fa38-d628-495c-aa34-215aa1f05f75
                                  warehouse_id:
                                    type: string
                                    example: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                                  warehouse_name:
                                    type: string
                                    example: 'Main Warehouse'
                                  product_id:
                                    type: string
                                    example: fddfdd30-310f-4313-8dab-e074609c569a
                                  product_variant_id:
                                    type: string
                                    example: null
                                  stock_in:
                                    type: integer
                                    example: 80
                            unit_id:
                              type: integer
                              example: 2
                            unit:
                              type: string
                              example: g
                            tax_ids:
                              type: string
                              example: null
                            tax_names:
                              type: array
                              example: []
                            extra_charge_ids:
                              type: string
                              example: null
                            extra_charges:
                              type: array
                              example: []
                            variants:
                              type: array
                              example: []
                            status:
                              type: integer
                              example: 1
                            images:
                              type: array
                              example:
                                - 'https://static-01.daraz.pk/p/abb621b3764b1e9f4c07e28053a27ffd.jpg'
                              items:
                                type: string
                            created_at:
                              type: string
                              example: '2026-01-29T11:20:22.000000Z'
                            updated_at:
                              type: string
                              example: '2026-01-29T11:20:22.000000Z'
                            average_reviews:
                              type: integer
                              example: 0
                            reviews_count:
                              type: integer
                              example: 0
                            weight_in_g:
                              type: string
                              example: '75.000'
                            reviews:
                              type: object
                              properties:
                                one:
                                  type: integer
                                  example: 0
                                two:
                                  type: integer
                                  example: 0
                                three:
                                  type: integer
                                  example: 0
                                four:
                                  type: integer
                                  example: 0
                                five:
                                  type: integer
                                  example: 0
                      links:
                        type: object
                        properties:
                          first:
                            type: string
                            example: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=1'
                          last:
                            type: string
                            example: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=49'
                          prev:
                            type: string
                            example: null
                          next:
                            type: string
                            example: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=2'
                      meta:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          from:
                            type: integer
                            example: 1
                          last_page:
                            type: integer
                            example: 49
                          links:
                            type: array
                            example:
                              -
                                url: null
                                label: '&laquo; Previous'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=1'
                                label: '1'
                                active: true
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=2'
                                label: '2'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=3'
                                label: '3'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=4'
                                label: '4'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=5'
                                label: '5'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=6'
                                label: '6'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=7'
                                label: '7'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=8'
                                label: '8'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=9'
                                label: '9'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=10'
                                label: '10'
                                active: false
                              -
                                url: null
                                label: ...
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=48'
                                label: '48'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=49'
                                label: '49'
                                active: false
                              -
                                url: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=2'
                                label: 'Next &raquo;'
                                active: false
                            items:
                              type: object
                              properties:
                                url:
                                  type: string
                                  example: null
                                label:
                                  type: string
                                  example: '&laquo; Previous'
                                active:
                                  type: boolean
                                  example: false
                          path:
                            type: string
                            example: 'https://api.orderain.com/api/v1/headless/get-all-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5'
                          per_page:
                            type: integer
                            example: 1
                          to:
                            type: integer
                            example: 1
                          total:
                            type: integer
                            example: 49
                  message:
                    type: string
                    example: 'Product list.'
      tags:
        - Products
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                page:
                  type: integer
                  description: 'Must be at least 1.'
                  example: 73
                  nullable: true
                per_page:
                  type: integer
                  description: 'Must be at least 1. Must not be greater than 100.'
                  example: 13
                  nullable: true
                search:
                  type: string
                  description: 'Must not be greater than 100 characters.'
                  example: qeopfuudtdsufvyvddqam
                  nullable: true
                status:
                  type: string
                  description: ''
                  example: '0'
                  enum:
                    - '0'
                    - '1'
                  nullable: true
                stock_filters:
                  type: array
                  description: ''
                  example:
                    - out_of_stock
                  items:
                    type: string
                    enum:
                      - in_stock
                      - out_of_stock
                      - low_stock
                      - status
                    nullable: true
                warehouse:
                  type: string
                  description: 'Must not be greater than 36 characters.'
                  example: ihfqcoynlazghdtqtqxba
                  nullable: true
                in_stock:
                  type: boolean
                  description: ''
                  example: false
                  nullable: true
                categories_ids:
                  type: array
                  description: ''
                  example:
                    - 17
                  items:
                    type: integer
                    nullable: true
                category:
                  type: array
                  description: 'Must not be greater than 100 characters.'
                  example:
                    - mqeopfuudtdsufvyvddqa
                  items:
                    type: string
                    nullable: true
                attributes:
                  type: array
                  description: 'Must not have more than 20 items.'
                  example: null
                  items:
                    type: object
                    nullable: true
                color:
                  type: string
                  description: 'Must not be greater than 50 characters.'
                  example: mniihfqcoynlazghdtqtq
                  nullable: true
                type:
                  type: string
                  description: 'Must not be greater than 50 characters.'
                  example: xbajwbpilpmufinllwloa
                  nullable: true
                size:
                  type: string
                  description: 'Must not be greater than 50 characters.'
                  example: uydlsmsjuryvojcybzvrb
                  nullable: true
                min_price:
                  type: number
                  description: 'Must be at least 0. Must not be greater than 999999999.'
                  example: 24
                  nullable: true
                max_price:
                  type: number
                  description: 'Must be at least 0. Must not be greater than 999999999.'
                  example: 9
                  nullable: true
                sort_by:
                  type: string
                  description: ''
                  example: created_at
                  enum:
                    - created_at
                    - name
                    - price
                    - updated_at
                  nullable: true
                sort_direction:
                  type: string
                  description: ''
                  example: asc
                  enum:
                    - asc
                    - desc
                  nullable: true
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'Shop_id or tenant name.'
        example: my-shop
        required: true
        schema:
          type: string
  '/api/v1/headless/get-product/{shop_id}/{slug_or_id}':
    get:
      summary: 'Get a single product by ID or slug (live Site and Dashboard)'
      operationId: getASingleProductByIDOrSlugliveSiteAndDashboard
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    id: fddfdd30-310f-4313-8dab-e074609c569a
                    vendor_id: 736
                    prod_categories_names:
                      - 'Car Electronics'
                    prod_categories_ids:
                      - 311
                    shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                    name: 'DC 12V Lighter Plug Replacement'
                    slug: dc-12v-lighter-plug-replacement-1
                    description: 'High quality DC 12V replacement lighter plug with ceramic protection'
                    sku: P1J43KK8S
                    quantity: 80
                    reserve_inv: 0
                    tags:
                      - 'car lighter plug'
                      - '12v replacement'
                    attributes: null
                    price: '499.00'
                    currency_code: PKR
                    currency_icon: Rs
                    discount: '0.00'
                    discount_type: null
                    weight: '75.000'
                    inventory:
                      -
                        id: 25f0fa38-d628-495c-aa34-215aa1f05f75
                        warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                        warehouse_name: 'Main Warehouse'
                        product_id: fddfdd30-310f-4313-8dab-e074609c569a
                        product_variant_id: null
                        stock_in: 80
                    unit_id: 2
                    unit: g
                    tax_ids: null
                    tax_names: []
                    extra_charge_ids: null
                    extra_charges: []
                    variants: []
                    status: 1
                    images:
                      - 'https://static-01.daraz.pk/p/abb621b3764b1e9f4c07e28053a27ffd.jpg'
                    created_at: '2026-01-29T11:20:22.000000Z'
                    updated_at: '2026-01-29T11:20:22.000000Z'
                    average_reviews: 0
                    reviews_count: 0
                    weight_in_g: '75.000'
                    reviews:
                      one: 0
                      two: 0
                      three: 0
                      four: 0
                      five: 0
                  message: 'Get product successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: fddfdd30-310f-4313-8dab-e074609c569a
                      vendor_id:
                        type: integer
                        example: 736
                      prod_categories_names:
                        type: array
                        example:
                          - 'Car Electronics'
                        items:
                          type: string
                      prod_categories_ids:
                        type: array
                        example:
                          - 311
                        items:
                          type: integer
                      shop_id:
                        type: string
                        example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                      name:
                        type: string
                        example: 'DC 12V Lighter Plug Replacement'
                      slug:
                        type: string
                        example: dc-12v-lighter-plug-replacement-1
                      description:
                        type: string
                        example: 'High quality DC 12V replacement lighter plug with ceramic protection'
                      sku:
                        type: string
                        example: P1J43KK8S
                      quantity:
                        type: integer
                        example: 80
                      reserve_inv:
                        type: integer
                        example: 0
                      tags:
                        type: array
                        example:
                          - 'car lighter plug'
                          - '12v replacement'
                        items:
                          type: string
                      attributes:
                        type: string
                        example: null
                      price:
                        type: string
                        example: '499.00'
                      currency_code:
                        type: string
                        example: PKR
                      currency_icon:
                        type: string
                        example: Rs
                      discount:
                        type: string
                        example: '0.00'
                      discount_type:
                        type: string
                        example: null
                      weight:
                        type: string
                        example: '75.000'
                      inventory:
                        type: array
                        example:
                          -
                            id: 25f0fa38-d628-495c-aa34-215aa1f05f75
                            warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                            warehouse_name: 'Main Warehouse'
                            product_id: fddfdd30-310f-4313-8dab-e074609c569a
                            product_variant_id: null
                            stock_in: 80
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: 25f0fa38-d628-495c-aa34-215aa1f05f75
                            warehouse_id:
                              type: string
                              example: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                            warehouse_name:
                              type: string
                              example: 'Main Warehouse'
                            product_id:
                              type: string
                              example: fddfdd30-310f-4313-8dab-e074609c569a
                            product_variant_id:
                              type: string
                              example: null
                            stock_in:
                              type: integer
                              example: 80
                      unit_id:
                        type: integer
                        example: 2
                      unit:
                        type: string
                        example: g
                      tax_ids:
                        type: string
                        example: null
                      tax_names:
                        type: array
                        example: []
                      extra_charge_ids:
                        type: string
                        example: null
                      extra_charges:
                        type: array
                        example: []
                      variants:
                        type: array
                        example: []
                      status:
                        type: integer
                        example: 1
                      images:
                        type: array
                        example:
                          - 'https://static-01.daraz.pk/p/abb621b3764b1e9f4c07e28053a27ffd.jpg'
                        items:
                          type: string
                      created_at:
                        type: string
                        example: '2026-01-29T11:20:22.000000Z'
                      updated_at:
                        type: string
                        example: '2026-01-29T11:20:22.000000Z'
                      average_reviews:
                        type: integer
                        example: 0
                      reviews_count:
                        type: integer
                        example: 0
                      weight_in_g:
                        type: string
                        example: '75.000'
                      reviews:
                        type: object
                        properties:
                          one:
                            type: integer
                            example: 0
                          two:
                            type: integer
                            example: 0
                          three:
                            type: integer
                            example: 0
                          four:
                            type: integer
                            example: 0
                          five:
                            type: integer
                            example: 0
                  message:
                    type: string
                    example: 'Get product successfully.'
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                slug_or_id:
                  type: string
                  description: ''
                  example: consequatur
              required:
                - slug_or_id
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: slug_or_id
        description: 'The ID of the slug or.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/v1/headless/get-all-units:
    get:
      summary: 'Get All Units'
      operationId: getAllUnits
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    -
                      id: 2
                      name: g
                    -
                      id: 1
                      name: kg
                  message: 'Units list.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: array
                    example:
                      -
                        id: 2
                        name: g
                      -
                        id: 1
                        name: kg
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 2
                        name:
                          type: string
                          example: g
                  message:
                    type: string
                    example: 'Units list.'
      tags:
        - Products
      security: []
  '/api/v1/headless/get-product-reviews/{shop_id}/{product_id}':
    get:
      summary: 'Get All Reviews of a Product (live Site)'
      operationId: getAllReviewsOfAProductliveSite
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Product reviews list.'
                  averageRating: 4.57
                  data:
                    current_page: 1
                    per_page: 1
                    total: 23
                    reviews:
                      -
                        id: 19
                        stars: 5
                        comment: 'Excellent product — totally worth it!'
                        created_at: '2025-10-10T11:16:44.000000Z'
                        customer:
                          full_name: 'Amber Tucker'
                        images:
                          - 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/SOslTDjUIldqUcYdgojRPasVkbtz3Z27gt4YAan6.webp'
                          - 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/g12I5GuWTRiK01uAxVe8ERTUOokAsHgC5b4LvS6V.webp'
                          - 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/fzmxr1tkvY0RQAKmywZjuXgFjfY2dvVOyWaCgUk7.webp'
                        reply:
                          message: 'Thank you so much for your kind words!'
                          created_at: '2025-10-10T12:41:53.000000Z'
                    pagination:
                      first_page_url: 'https://api.orderain.com/api/v1/headless/get-product-reviews/9f75b2e1-c16b-4e37-9744-de0ce877f40a/9f75b2e1-d591-410d-809f-03114c0e5af7?page=1'
                      next_page_url: 'https://api.orderain.com/api/v1/headless/get-product-reviews/9f75b2e1-c16b-4e37-9744-de0ce877f40a/9f75b2e1-d591-410d-809f-03114c0e5af7?page=2'
                      last_page: 23
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Product reviews list.'
                  averageRating:
                    type: number
                    example: 4.57
                  data:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      per_page:
                        type: integer
                        example: 1
                      total:
                        type: integer
                        example: 23
                      reviews:
                        type: array
                        example:
                          -
                            id: 19
                            stars: 5
                            comment: 'Excellent product — totally worth it!'
                            created_at: '2025-10-10T11:16:44.000000Z'
                            customer:
                              full_name: 'Amber Tucker'
                            images:
                              - 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/SOslTDjUIldqUcYdgojRPasVkbtz3Z27gt4YAan6.webp'
                              - 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/g12I5GuWTRiK01uAxVe8ERTUOokAsHgC5b4LvS6V.webp'
                              - 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/fzmxr1tkvY0RQAKmywZjuXgFjfY2dvVOyWaCgUk7.webp'
                            reply:
                              message: 'Thank you so much for your kind words!'
                              created_at: '2025-10-10T12:41:53.000000Z'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 19
                            stars:
                              type: integer
                              example: 5
                            comment:
                              type: string
                              example: 'Excellent product — totally worth it!'
                            created_at:
                              type: string
                              example: '2025-10-10T11:16:44.000000Z'
                            customer:
                              type: object
                              properties:
                                full_name:
                                  type: string
                                  example: 'Amber Tucker'
                            images:
                              type: array
                              example:
                                - 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/SOslTDjUIldqUcYdgojRPasVkbtz3Z27gt4YAan6.webp'
                                - 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/g12I5GuWTRiK01uAxVe8ERTUOokAsHgC5b4LvS6V.webp'
                                - 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/fzmxr1tkvY0RQAKmywZjuXgFjfY2dvVOyWaCgUk7.webp'
                              items:
                                type: string
                            reply:
                              type: object
                              properties:
                                message:
                                  type: string
                                  example: 'Thank you so much for your kind words!'
                                created_at:
                                  type: string
                                  example: '2025-10-10T12:41:53.000000Z'
                      pagination:
                        type: object
                        properties:
                          first_page_url:
                            type: string
                            example: 'https://api.orderain.com/api/v1/headless/get-product-reviews/9f75b2e1-c16b-4e37-9744-de0ce877f40a/9f75b2e1-d591-410d-809f-03114c0e5af7?page=1'
                          next_page_url:
                            type: string
                            example: 'https://api.orderain.com/api/v1/headless/get-product-reviews/9f75b2e1-c16b-4e37-9744-de0ce877f40a/9f75b2e1-d591-410d-809f-03114c0e5af7?page=2'
                          last_page:
                            type: integer
                            example: 23
      tags:
        - Products
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: product_id
        description: 'The ID of the product.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-shop-products/{shop_id}':
    get:
      summary: 'Get all shop products including active and inactive (Authenticated)'
      operationId: getAllShopProductsIncludingActiveAndInactiveAuthenticated
      description: 'Returns both active and inactive products. This endpoint requires authentication.'
      parameters:
        -
          in: query
          name: 'stock_filters[]'
          description: 'Filter products by multiple stock statuses and product status.'
          example: 'in_stock Allowed: in_stock, out_of_stock, low_stock, status'
          required: false
          schema:
            type: string
            description: 'Filter products by multiple stock statuses and product status.'
            example: 'in_stock Allowed: in_stock, out_of_stock, low_stock, status'
        -
          in: query
          name: search
          description: 'Search products by name (flexible search).'
          example: phone
          required: false
          schema:
            type: string
            description: 'Search products by name (flexible search).'
            example: phone
        -
          in: query
          name: 'category[]'
          description: 'Filter products by one or multiple category names.'
          example: electronics
          required: false
          schema:
            type: string
            description: 'Filter products by one or multiple category names.'
            example: electronics
        -
          in: query
          name: min_price
          description: 'Minimum price of product. Note: If the product has variants, it will consider the minimum price of the first variant.'
          example: '10.00'
          required: false
          schema:
            type: string
            description: 'Minimum price of product. Note: If the product has variants, it will consider the minimum price of the first variant.'
            example: '10.00'
        -
          in: query
          name: max_price
          description: 'Maximum price of product.'
          example: '1000.00'
          required: false
          schema:
            type: string
            description: 'Maximum price of product.'
            example: '1000.00'
        -
          in: query
          name: 'attributes[size][]'
          description: 'Filter products by size.'
          example: large
          required: false
          schema:
            type: string
            description: 'Filter products by size.'
            example: large
        -
          in: query
          name: sort_by
          description: 'Sorting field (e.g., price, name).'
          example: price
          required: false
          schema:
            type: string
            description: 'Sorting field (e.g., price, name).'
            example: price
        -
          in: query
          name: sort_direction
          description: 'Sorting direction (ascending or descending).'
          example: 'asc Allowed: asc, desc'
          required: false
          schema:
            type: string
            description: 'Sorting direction (ascending or descending).'
            example: 'asc Allowed: asc, desc'
        -
          in: query
          name: per_page
          description: 'Number of results per page.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'Number of results per page.'
            example: 20
        -
          in: query
          name: status
          description: 'Filter by product status (0 = inactive, 1 = active).'
          example: '1'
          required: false
          schema:
            type: string
            description: 'Filter by product status (0 = inactive, 1 = active).'
            example: '1'
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Product list.'
                  data:
                    products:
                      -
                        id: 07f20acd-64a3-4ed6-8be5-ff9f57ecd93b
                        name: 'Solar Dashboard Ring Perfume'
                        slug: solar-dashboard-ring-perfume-1
                        price: '450.00'
                        currency: PKR
                        qty: 400
                        image: 'https://static-01.daraz.pk/p/d4f68f05329f4d2c8bfd6c4eb10adcd6.jpg'
                      -
                        id: 87e43307-694d-4623-b4af-f4388715d29d
                        name: 'Mercedes Door Logo Projector Lights'
                        slug: mercedes-door-logo-projector-lights-1
                        price: '1595.00'
                        currency: PKR
                        qty: 25
                        image: 'https://static-01.daraz.pk/p/0d5cd5f4b35cf4dad3642887820154de.jpg'
                      -
                        id: 129653e6-e8d5-4438-9360-56aac83d6d1f
                        name: 'SOGO Car Cigarette Lighter Socket 12V'
                        slug: sogo-car-cigarette-lighter-socket-12v-1
                        price: '350.00'
                        currency: PKR
                        qty: 60
                        image: 'https://static-01.daraz.pk/p/1ff4808710082abe2cd808990db76112.jpg'
                      -
                        id: 9e92d98d-d437-4be5-b945-dcd8fe0e3ea7
                        name: 'LED Portable Car Ashtray'
                        slug: led-portable-car-ashtray-1
                        price: '340.00'
                        currency: PKR
                        qty: 50
                        image: 'https://static-01.daraz.pk/p/7a91fc1e20a9e797c56b7576c439e518.jpg'
                      -
                        id: fddfdd30-310f-4313-8dab-e074609c569a
                        name: 'DC 12V Lighter Plug Replacement'
                        slug: dc-12v-lighter-plug-replacement-1
                        price: '499.00'
                        currency: PKR
                        qty: 80
                        image: 'https://static-01.daraz.pk/p/abb621b3764b1e9f4c07e28053a27ffd.jpg'
                    pagination:
                      current_page: 1
                      last_page: 5
                      total: 49
                      next: 'https://api.orderain.com/api/v1/get-shop-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=2'
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Product list.'
                  data:
                    type: object
                    properties:
                      products:
                        type: array
                        example:
                          -
                            id: 07f20acd-64a3-4ed6-8be5-ff9f57ecd93b
                            name: 'Solar Dashboard Ring Perfume'
                            slug: solar-dashboard-ring-perfume-1
                            price: '450.00'
                            currency: PKR
                            qty: 400
                            image: 'https://static-01.daraz.pk/p/d4f68f05329f4d2c8bfd6c4eb10adcd6.jpg'
                          -
                            id: 87e43307-694d-4623-b4af-f4388715d29d
                            name: 'Mercedes Door Logo Projector Lights'
                            slug: mercedes-door-logo-projector-lights-1
                            price: '1595.00'
                            currency: PKR
                            qty: 25
                            image: 'https://static-01.daraz.pk/p/0d5cd5f4b35cf4dad3642887820154de.jpg'
                          -
                            id: 129653e6-e8d5-4438-9360-56aac83d6d1f
                            name: 'SOGO Car Cigarette Lighter Socket 12V'
                            slug: sogo-car-cigarette-lighter-socket-12v-1
                            price: '350.00'
                            currency: PKR
                            qty: 60
                            image: 'https://static-01.daraz.pk/p/1ff4808710082abe2cd808990db76112.jpg'
                          -
                            id: 9e92d98d-d437-4be5-b945-dcd8fe0e3ea7
                            name: 'LED Portable Car Ashtray'
                            slug: led-portable-car-ashtray-1
                            price: '340.00'
                            currency: PKR
                            qty: 50
                            image: 'https://static-01.daraz.pk/p/7a91fc1e20a9e797c56b7576c439e518.jpg'
                          -
                            id: fddfdd30-310f-4313-8dab-e074609c569a
                            name: 'DC 12V Lighter Plug Replacement'
                            slug: dc-12v-lighter-plug-replacement-1
                            price: '499.00'
                            currency: PKR
                            qty: 80
                            image: 'https://static-01.daraz.pk/p/abb621b3764b1e9f4c07e28053a27ffd.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: 07f20acd-64a3-4ed6-8be5-ff9f57ecd93b
                            name:
                              type: string
                              example: 'Solar Dashboard Ring Perfume'
                            slug:
                              type: string
                              example: solar-dashboard-ring-perfume-1
                            price:
                              type: string
                              example: '450.00'
                            currency:
                              type: string
                              example: PKR
                            qty:
                              type: integer
                              example: 400
                            image:
                              type: string
                              example: 'https://static-01.daraz.pk/p/d4f68f05329f4d2c8bfd6c4eb10adcd6.jpg'
                      pagination:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          last_page:
                            type: integer
                            example: 5
                          total:
                            type: integer
                            example: 49
                          next:
                            type: string
                            example: 'https://api.orderain.com/api/v1/get-shop-products/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=2'
      tags:
        - Products
    parameters:
      -
        in: path
        name: shop_id
        description: 'Shop_id or tenant name.'
        example: my-shop
        required: true
        schema:
          type: string
  '/api/v1/headless/get-all-products-reviews/{shop_id}':
    get:
      summary: 'Get All Reviews Of All Products (Dashboard)'
      operationId: getAllReviewsOfAllProductsDashboard
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    -
                      id: 19
                      shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                      product_id: 9f75b2e1-d591-410d-809f-03114c0e5af7
                      order_id: 353
                      customer_id: 725
                      stars: 5
                      comment: '⭐️⭐️⭐️⭐️⭐️ Excellent Product — Totally Worth It! I’ve been using this product for a few weeks now, and I’m genuinely impressed with its quality and performance.'
                      status: 1
                      created_at: '2025-10-10T11:16:44.000000Z'
                      updated_at: '2025-10-10T11:16:44.000000Z'
                      images:
                        -
                          id: 37
                          image: 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/SOslTDjUIldqUcYdgojRPasVkbtz3Z27gt4YAan6.webp'
                    -
                      id: 21
                      shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                      product_id: 9f75b2e1-d591-410d-809f-03114c0e5af7
                      order_id: 353
                      customer_id: 725
                      stars: 1
                      comment: "I don't like the product they are not same as shown on website, please be aware they are fucking scammers!"
                      status: 1
                    -
                      id: 22
                      shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                      product_id: 9f75b2e1-d591-410d-809f-03114c0e5af7
                      order_id: 353
                      customer_id: 725
                      stars: 2
                      comment: 'Product quality is worse but somehow I am using it because I paid it.'
                      status: 1
                    -
                      id: 23
                      shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                      product_id: 9f75b2e1-d591-410d-809f-03114c0e5af7
                      order_id: 353
                      customer_id: 725
                      stars: 3
                      comment: 'Average quality product.'
                      status: 1
                    -
                      id: 24
                      shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                      product_id: 9f75b2e1-d591-410d-809f-03114c0e5af7
                      order_id: 353
                      customer_id: 725
                      stars: 4
                      comment: 'Good product, I am using it.'
                      status: 1
                  meta:
                    current_page: 1
                    last_page: 3
                    per_page: 10
                    total: 23
                  message: 'Reviews paginated list.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: array
                    example:
                      -
                        id: 19
                        shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                        product_id: 9f75b2e1-d591-410d-809f-03114c0e5af7
                        order_id: 353
                        customer_id: 725
                        stars: 5
                        comment: '⭐️⭐️⭐️⭐️⭐️ Excellent Product — Totally Worth It! I’ve been using this product for a few weeks now, and I’m genuinely impressed with its quality and performance.'
                        status: 1
                        created_at: '2025-10-10T11:16:44.000000Z'
                        updated_at: '2025-10-10T11:16:44.000000Z'
                        images:
                          -
                            id: 37
                            image: 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/SOslTDjUIldqUcYdgojRPasVkbtz3Z27gt4YAan6.webp'
                      -
                        id: 21
                        shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                        product_id: 9f75b2e1-d591-410d-809f-03114c0e5af7
                        order_id: 353
                        customer_id: 725
                        stars: 1
                        comment: "I don't like the product they are not same as shown on website, please be aware they are fucking scammers!"
                        status: 1
                      -
                        id: 22
                        shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                        product_id: 9f75b2e1-d591-410d-809f-03114c0e5af7
                        order_id: 353
                        customer_id: 725
                        stars: 2
                        comment: 'Product quality is worse but somehow I am using it because I paid it.'
                        status: 1
                      -
                        id: 23
                        shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                        product_id: 9f75b2e1-d591-410d-809f-03114c0e5af7
                        order_id: 353
                        customer_id: 725
                        stars: 3
                        comment: 'Average quality product.'
                        status: 1
                      -
                        id: 24
                        shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                        product_id: 9f75b2e1-d591-410d-809f-03114c0e5af7
                        order_id: 353
                        customer_id: 725
                        stars: 4
                        comment: 'Good product, I am using it.'
                        status: 1
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 19
                        shop_id:
                          type: string
                          example: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                        product_id:
                          type: string
                          example: 9f75b2e1-d591-410d-809f-03114c0e5af7
                        order_id:
                          type: integer
                          example: 353
                        customer_id:
                          type: integer
                          example: 725
                        stars:
                          type: integer
                          example: 5
                        comment:
                          type: string
                          example: '⭐️⭐️⭐️⭐️⭐️ Excellent Product — Totally Worth It! I’ve been using this product for a few weeks now, and I’m genuinely impressed with its quality and performance.'
                        status:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2025-10-10T11:16:44.000000Z'
                        updated_at:
                          type: string
                          example: '2025-10-10T11:16:44.000000Z'
                        images:
                          type: array
                          example:
                            -
                              id: 37
                              image: 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/SOslTDjUIldqUcYdgojRPasVkbtz3Z27gt4YAan6.webp'
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 37
                              image:
                                type: string
                                example: 'https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/review_images/SOslTDjUIldqUcYdgojRPasVkbtz3Z27gt4YAan6.webp'
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      last_page:
                        type: integer
                        example: 3
                      per_page:
                        type: integer
                        example: 10
                      total:
                        type: integer
                        example: 23
                  message:
                    type: string
                    example: 'Reviews paginated list.'
      tags:
        - Products
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/v1/headless/add-product:
    post:
      summary: 'Add a new product'
      operationId: addANewProduct
      description: "This endpoint allows you to create a new product along with its categories,\ninventory levels, tags, and images.\n\n**Request Structure For without Variant Product Creation:**\n```json\n{\n  \"shop_id\": \"your-shop-uuid\",\n  \"prod_categories_ids\": [222],                               //Get prod_categories_ids from api/v1/headless/get-all-product-categories/shop_id\n  \"product_sub_category_id\": null,\n  \"unit_id\": 2,                                               //Get from api/v1/headless/get-all-units\n  \"name\": \"Vase\",\n  \"weight\": 200,\n  \"description\": \"The Vase to decorate home and office rooms\",\n  \"price\": 2500,\n  \"discount\": 100,\n  \"discount_type\": \"fixed\",\n  \"quantity\": 0,\n  \"tax_ids\": [],\n  \"extra_charge_ids\": [],\n  \"sku\": \"SAJKSH-34243\",\n  \"inventory\": [\n    {\n      \"warehouse_id\": \"a0d57fe4-7126-4ad8-9dfe-11d395aa2237\", //Get warehouse_id from api/v1/headless/get-all-shop-warehouses/shop_id\n      \"stock_in\": 10\n    }\n  ],\n  \"steps\": 1,\n  \"option_name\": \"\",\n  \"option_value\": \"\",\n  \"tags\": [],\n  \"attributes\": [],\n  \"variants\": null,\n  \"images\": [\n    \"https://sin1.contabostorage.com/7960d2e19b5642c08d55119550b3ba57:orderain/products/HcnFrATCNBh1q2VnpIp7LUc2LJ0kAKIBxR2BStJK.jpg\"\n  ],\n  \"dltImgArr\": [],\n  \"addingProduct\": false\n}\n```\n**Request Structure For Product Creation With Variants:**\n```json\n{\n  \"shop_id\": \"your-shop-uuid\",\n  \"prod_categories_ids\": [222],                               // Get prod_categories_ids from api/v1/headless/get-all-product-categories/{shop_id}\n  \"product_sub_category_id\": null,                            // Optional sub-category ID\n  \"unit_id\": null,                                            // Not required when variants are used (variant-level unit_id is required)\n  \"name\": \"Evilie Vase\",\n  \"weight\": null,                                             // Optional (variant-level weight will be used)\n  \"description\": \"<p>Product description in HTML format</p>\",\n  \"price\": 0,                                                 // Base price ignored when variants exist\n  \"discount\": 0,                                              // Base discount ignored when variants exist\n  \"discount_type\": \"\",                                        // Base discount type ignored when variants exist\n  \"quantity\": 0,                                              // Optional (handled via variant inventory)\n  \"tax_ids\": [],                                              // Optional tax IDs\n  \"extra_charge_ids\": [],                                     // Optional extra charge IDs\n  \"sku\": null,                                                // Optional (variant-level SKU is required)\n  \"inventory\": null,                                          // Not required when variants are used\n  \"steps\": 1,\n  \"option_name\": \"\",\n  \"option_value\": \"\",\n  \"tags\": [],\n  \"attributes\": [                                             // Required when variants are present\n    {\n      \"name\": \"Colors\",                                       // Attribute name\n      \"model\": \"\",\n      \"list\": [\"Yellow\", \"Pink\"],                              // Attribute values\n      \"colorValue\": []\n    }\n  ],\n\n  \"variants\": [                                               // Variant definitions\n    {\n      \"name\": \"Yellow\",                                       // Variant name\n      \"price\": 6000,                                          // Variant price\n      \"sku\": \"GHG_716121\",                                    // Unique variant SKU\n      \"inherit_attributes\": \"Yellow\",                         // Mapped attribute value\n      \"qty\": 0,\n      \"status\": 1,                                            // 1 = Active\n      \"discount\": 20,\n      \"discount_type\": \"percent\",                             // fixed | percent\n      \"unit_id\": 2,                                           // Required unit ID Get from api/v1/headless/get-all-units\n      \"weight\": 300,\n      \"image\": \"https://sin1.contabostorage.com/...jpg\",      // Variant image URL\n      \"inventory\": [\n        {\n          \"warehouse_id\": \"a0d57fe4-7126-4ad8-9dfe-11d395aa2237\", // Get warehouse_id from api/v1/headless/get-all-shop-warehouses/{shop_id}\n          \"stock_in\": 5                                       // Stock for this variant\n        }\n      ]\n    },\n    {\n      \"name\": \"Pink\",\n      \"price\": 5000,\n      \"sku\": \"HGHGH-3121\",\n      \"inherit_attributes\": \"Pink\",\n      \"qty\": 0,\n      \"status\": 1,\n      \"discount\": 10,\n      \"discount_type\": \"percent\",\n      \"unit_id\": 2,\n      \"weight\": 350,\n      \"image\": \"https://sin1.contabostorage.com/...jpg\",\n      \"inventory\": [\n        {\n          \"warehouse_id\": \"9f75b2e1-c383-4926-9fad-e55e72059451\",\n          \"stock_in\": 7\n        }\n      ]\n    }\n  ],\n\n  \"images\": [                                                  // Base product images\n    \"https://sin1.contabostorage.com/...jpg\"\n  ],\n  \"dltImgArr\": [],                                             // Images to delete (used on update)\n  \"addingProduct\": false\n}\n```\n**Request Structure For Product Creation With Multiple Attributes & Variants:**\n```json\n{\n  \"shop_id\": \"your-shop-uuid\",\n  \"prod_categories_ids\": [195],                              // Get from api/v1/headless/get-all-product-categories/{shop_id}\n  \"product_sub_category_id\": null,                           // Optional sub-category ID\n  \"unit_id\": null,                                           // Not required when variants are used\n  \"name\": \"Crystal Vase\",\n  \"weight\": null,                                            // Optional (variant-level weight will be used)\n  \"description\": \"<p>Best Specs Special Digital Vases</p>\",\n  \"price\": 0,                                                // Base price ignored when variants exist\n  \"discount\": 0,                                             // Base discount ignored when variants exist\n  \"discount_type\": \"\",                                       // Base discount type ignored when variants exist\n  \"quantity\": 0,                                             // Optional (handled via variant inventory)\n  \"tax_ids\": [],                                             // Optional tax IDs\n  \"extra_charge_ids\": [],                                    // Optional extra charge IDs\n  \"sku\": null,                                               // Optional (variant-level SKU is required)\n  \"inventory\": null,                                         // Not required when variants are used\n  \"steps\": 1,\n  \"option_name\": \"\",\n  \"option_value\": \"\",\n  \"tags\": [],\n  \"attributes\": [                                            // Required when multiple variants are present\n    {\n      \"name\": \"Colors\",                                      // Attribute 1\n      \"model\": \"\",\n      \"list\": [\"Black\"],                                     // Attribute values\n      \"colorValue\": []\n    },\n    {\n      \"name\": \"Material\",                                    // Attribute 2\n      \"model\": \"\",\n      \"list\": [\"Mud\", \"Stone\"],                               // Attribute values\n      \"colorValue\": []\n    }\n  ],\n\n  \"variants\": [                                              // Variant combinations\n    {\n      \"name\": \"Black-Mud\",                                   // Combination of attributes\n      \"price\": 1500,\n      \"sku\": \"MAU_314\",\n      \"inherit_attributes\": \"Black-Mud\",                     // Must match attribute combinations\n      \"qty\": 0,\n      \"status\": 1,                                           // 1 = Active, 0 = Inactive\n      \"discount\": 0,\n      \"unit_id\": 2,                                          // Get from api/v1/headless/get-all-units\n      \"weight\": 700,\n      \"image\": \"https://sin1.contabostorage.com/...jpg\",\n      \"inventory\": [\n        {\n          \"warehouse_id\": \"a0d57fe4-7126-4ad8-9dfe-11d395aa2237\", // Get from api/v1/headless/get-all-shop-warehouses/{shop_id}\n          \"stock_in\": 3\n        }\n      ]\n    },\n    {\n      \"name\": \"Black-Stone\",\n      \"price\": 1500,\n      \"sku\": \"STANE-321\",\n      \"inherit_attributes\": \"Black-Stone\",\n      \"qty\": 0,\n      \"status\": 1,\n      \"discount\": 0,\n      \"unit_id\": 2,\n      \"weight\": 900,\n      \"image\": \"https://sin1.contabostorage.com/...jpg\",\n      \"inventory\": [\n        {\n          \"warehouse_id\": \"a0d57fe4-7126-4ad8-9dfe-11d395aa2237\",\n          \"stock_in\": 3\n        }\n      ]\n    }\n  ],\n\n  \"images\": [],                                              // Base product images (optional)\n  \"dltImgArr\": [],                                           // Used only on update\n  \"addingProduct\": false\n}\n```"
      parameters: []
      responses:
        201:
          description: 'Product Created'
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Product Created Successfully'
                  data:
                    id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                    name: Earphones
                    sku: ASGH-329473284
                    price: 570
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Product Created Successfully'
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                      name:
                        type: string
                        example: Earphones
                      sku:
                        type: string
                        example: ASGH-329473284
                      price:
                        type: integer
                        example: 570
        422:
          description: 'Validation Error'
          content:
            application/json:
              schema:
                type: object
                example:
                  message: 'The given data was invalid.'
                  errors:
                    shop_id:
                      - 'The shop_id field is required.'
                    prod_categories_ids:
                      - 'The categories field must be an array.'
                properties:
                  message:
                    type: string
                    example: 'The given data was invalid.'
                  errors:
                    type: object
                    properties:
                      shop_id:
                        type: array
                        example:
                          - 'The shop_id field is required.'
                        items:
                          type: string
                      prod_categories_ids:
                        type: array
                        example:
                          - 'The categories field must be an array.'
                        items:
                          type: string
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                shop_id:
                  type: string
                  description: 'The unique UUID of the shop.'
                  example: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                unit_id:
                  type: integer
                  description: 'The ID of the measurement unit.'
                  example: 2
                  nullable: true
                name:
                  type: string
                  description: 'The name of the product.'
                  example: Earphones
                tags:
                  type: array
                  description: 'List of tags for categorization.'
                  example:
                    - new
                    - best
                    - buds
                  items:
                    type: string
                    nullable: true
                prod_categories_ids:
                  type: array
                  description: 'Array of category IDs associated with the product.'
                  example:
                    - 195
                  items:
                    type: integer
                description:
                  type: string
                  description: 'Detailed product description (HTML supported).'
                  example: '<p>Best Ever Buds</p>'
                sku:
                  type: string
                  description: 'Unique Stock Keeping Unit for the product.'
                  example: ASGH-329473284
                  nullable: true
                inventory:
                  type: array
                  description: 'Array of inventory data for different warehouses.'
                  example:
                    - []
                  items:
                    type: object
                    nullable: true
                    properties:
                      warehouse_id:
                        type: string
                        description: 'The UUID of the warehouse.'
                        example: 9f75b2e1-c383-4926-9fad-e55e72059451
                        nullable: true
                      stock_in:
                        type: integer
                        description: 'The amount of stock to be added.'
                        example: 2
                        nullable: true
                    required:
                      - warehouse_id
                      - stock_in
                weight:
                  type: number
                  description: 'The weight of the product.'
                  example: 12.0
                  nullable: true
                attributes:
                  type: array
                  description: 'Dynamic product attributes (color, size, etc.).'
                  example: []
                  items:
                    type: object
                discount_type:
                  type: string
                  description: 'The type of discount. Allowed: fixed, percent.'
                  example: fixed
                  nullable: true
                tax_type:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 255 characters.'
                  example: yickznkygloigmkwxphlv
                  nullable: true
                tax_ids:
                  type: object
                  description: ''
                  example: null
                  properties: {  }
                  nullable: true
                extra_charge_ids:
                  type: object
                  description: ''
                  example: null
                  properties: {  }
                  nullable: true
                images:
                  type: array
                  description: 'Array of product image URLs.'
                  example:
                    - storage.com
                  items:
                    type: string
                variants:
                  type: array
                  description: 'Product variants if applicable.'
                  example: null
                  items:
                    type: object
                    nullable: true
                    properties:
                      image:
                        type: string
                        description: 'Must be a valid URL.'
                        example: 'http://www.dubuque.com/fuga-a-debitis-autem.html'
                        nullable: true
                      name:
                        type: string
                        description: 'Must be at least 1 character.'
                        example: xhgjjmzuxjubqouzswiwxtrkimfcatbxspzmrazsroyjpxmqesedyghenqcopwvownkbamlnf
                      sku:
                        type: string
                        description: 'Must be at least 6 characters.'
                        example: ngefbeilfzsyuxoezbdtabptcyyerevrljcbwkthjnescwsestcouxpqsydkigioyoyprjkfdj
                      unit_id:
                        type: string
                        description: 'The <code>id</code> of an existing record in the units table.'
                        example: consequatur
                      inherit_attributes:
                        type: string
                        description: ''
                        example: consequatur
                      inventory:
                        type: array
                        description: 'Must have at least 1 items.'
                        example:
                          - []
                        items:
                          type: object
                          properties:
                            warehouse_id:
                              type: string
                              description: 'The <code>id</code> of an existing record in the shop_warehouses table.'
                              example: consequatur
                            stock_in:
                              type: integer
                              description: 'Must be at least 1.'
                              example: 45
                          required:
                            - warehouse_id
                            - stock_in
                      price:
                        type: number
                        description: 'Must be at least 0.'
                        example: 56
                      discount_type:
                        type: string
                        description: ''
                        example: percent
                        enum:
                          - fixed
                          - percent
                        nullable: true
                      weight:
                        type: number
                        description: 'Must be at least 0.'
                        example: 50
                    required:
                      - name
                      - sku
                      - unit_id
                      - inherit_attributes
                      - inventory
                      - price
                      - weight
                price:
                  type: number
                  description: 'The base price of the product.'
                  example: 570.0
                discount:
                  type: number
                  description: 'The discount amount applied to the product.'
                  example: 70.0
                  nullable: true
                quantity:
                  type: integer
                  description: 'Total initial quantity.'
                  example: 0
              required:
                - shop_id
                - unit_id
                - name
                - prod_categories_ids
                - description
                - inventory
                - variants
                - price
  '/api/v1/headless/update-product/{id}':
    post:
      summary: 'Update an existing product'
      operationId: updateAnExistingProduct
      description: "This endpoint updates the details of an existing product, including its variants,\ninventory levels, and associated images.\n\n**Request Structure For Product Update With Variants:**\n```json\n{\n  \"shop_id\": \"your-shop-uuid\",\n  \"prod_categories_ids\": [195],\n  \"product_sub_category_id\": null,\n  \"unit_id\": null,\n  \"name\": \"Evilie Vases\",\n  \"weight\": null,\n  \"description\": \"<p>Product description in HTML format</p>\",\n  \"price\": 0,                                 // Ignored when variants exist\n  \"discount\": 0,                              // Ignored when variants exist\n  \"discount_type\": null,\n  \"quantity\": 0,\n  \"tax_ids\": [35],\n  \"extra_charge_ids\": [],\n  \"sku\": null,\n  \"inventory\": null,\n  \"steps\": 1,\n  \"option_name\": \"\",\n  \"option_value\": \"\",\n  \"tags\": [],\n\n  \"attributes\": [\n    {\n      \"name\": \"Colors\",\n      \"model\": null,\n      \"list\": [\"Yellow\", \"Pink\"],\n      \"colorValue\": []\n    }\n  ],\n\n  \"variants\": [\n    {\n      \"id\": \"a0df8748-ace4-412b-93f5-f19ba65375c5\",        // REQUIRED (variant update)\n      \"product_id\": \"a0df8748-a8ed-4946-83f5-d599a72975c9\",\n      \"name\": \"Yellow\",\n      \"sku\": \"GHG_716121\",\n      \"inherit_attributes\": \"Yellow\",\n      \"status\": 1,\n      \"price\": 6000,\n      \"discount\": \"20.00\",\n      \"discount_type\": \"percent\",\n      \"unit_id\": 2,\n      \"weight\": \"300.00\",\n      \"image\": \"https://sin1.contabostorage.com/...jpg\",\n\n      \"inventory\": [\n        {\n          \"id\": \"a0df8748-ae91-452e-9835-f47f2ac90d72\",    // REQUIRED (inventory update)\n          \"warehouse_id\": \"a0d57fe4-7126-4ad8-9dfe-11d395aa2237\",\n          \"stock_in\": 5\n        }\n      ]\n    },\n    {\n      \"id\": \"a0df8748-b361-49cf-8f46-3a1d6079e091\",\n      \"product_id\": \"a0df8748-a8ed-4946-83f5-d599a72975c9\",\n      \"name\": \"Pink\",\n      \"sku\": \"HGHGH-3121\",\n      \"inherit_attributes\": \"Pink\",\n      \"status\": 1,\n      \"price\": 5000,\n      \"discount\": \"10.00\",\n      \"discount_type\": \"percent\",\n      \"unit_id\": 2,\n      \"weight\": \"350.00\",\n      \"image\": \"https://sin1.contabostorage.com/...jpg\",\n\n      \"inventory\": [\n        {\n          \"id\": \"a0df8748-b452-43f0-811c-33e31be8000b\",\n          \"warehouse_id\": \"9f75b2e1-c383-4926-9fad-e55e72059451\",\n          \"stock_in\": 7\n        }\n      ]\n    }\n  ],\n\n  \"images\": [\n    \"https://sin1.contabostorage.com/...jpg\",\n    \"https://sin1.contabostorage.com/...jpg\"\n  ],\n  \"dltImgArr\": [],                         // Image IDs/URLs to remove\n  \"addingProduct\": false,\n  \"inventory_ids\": []                      // Used to track removed inventories\n}\n```\n**Request Structure For Converting Variant Product to Simple Product:**\n```json\n{\n  \"shop_id\": \"your-shop-uuid\",\n  \"prod_categories_ids\": [198],\n  \"product_sub_category_id\": null,\n  \"unit_id\": 2,                                         // Required for simple product\n  \"name\": \"Evilie Vases\",\n  \"weight\": 300,\n  \"description\": \"<p><strong>Converted a variant product to simple product</strong></p>\",\n  \"price\": 2000,                                        // Required for simple product\n  \"discount\": 0,\n  \"discount_type\": null,\n  \"quantity\": null,\n  \"tax_ids\": [35],\n  \"extra_charge_ids\": [],\n  \"sku\": \"HJKHKJH-42343s\",                               // Required for simple product\n\n  \"inventory\": [                                        // Required when converting to simple\n    {\n      \"warehouse_id\": \"a0d57fe4-7126-4ad8-9dfe-11d395aa2237\",\n      \"stock_in\": 1\n    }\n  ],\n\n  \"steps\": 1,\n  \"option_name\": \"\",\n  \"option_value\": \"\",\n  \"tags\": [],\n  \"attributes\": [],                                     // Must be empty when no variants\n  \"images\": [\n    \"https://sin1.contabostorage.com/...jpg\",\n    \"https://sin1.contabostorage.com/...jpg\",\n    \"https://sin1.contabostorage.com/...jpg\"\n  ],\n  \"dltImgArr\": [],\n  \"addingProduct\": false,\n  \"inventory_ids\": []                                   // Used to remove old variant inventories\n}\n```"
      parameters: []
      responses:
        200:
          description: 'Update Success'
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Product Updated Successfully'
                  data:
                    id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                    name: 'Wireless Headphones'
                    updated_at: '2026-01-09T19:46:00Z'
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Product Updated Successfully'
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                      name:
                        type: string
                        example: 'Wireless Headphones'
                      updated_at:
                        type: string
                        example: '2026-01-09T19:46:00Z'
      tags:
        - Products
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                shop_id:
                  type: string
                  description: 'The unique UUID of the shop.'
                  example: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                name:
                  type: string
                  description: 'The updated name of the product.'
                  example: 'Wireless Headphones'
                description:
                  type: string
                  description: 'The updated product description.'
                  example: '<p>Updated description for high-quality audio.</p>'
                unit_id:
                  type: integer
                  description: 'The measurement unit ID.'
                  example: 2
                price:
                  type: number
                  description: 'The updated base price.'
                  example: 599.99
                discount:
                  type: number
                  description: 'The discount amount.'
                  example: 50.0
                discount_type:
                  type: string
                  description: 'The type of discount. Allowed: fixed, percent.'
                  example: fixed
                weight:
                  type: number
                  description: 'The weight of the product.'
                  example: 15.5
                status:
                  type: integer
                  description: 'The product status (0 for inactive, 1 for active).'
                  example: 1
                prod_category_ids:
                  type: array
                  description: 'Array of category IDs.'
                  example:
                    - 195
                    - 200
                  items:
                    type: integer
                tags:
                  type: array
                  description: 'List of product tags.'
                  example:
                    - electronics
                    - audio
                    - sale
                  items:
                    type: string
                images:
                  type: array
                  description: 'URLs of new images to add.'
                  example:
                    - storage.com
                  items:
                    type: string
                dltImgArr:
                  type: array
                  description: 'URLs of existing images to be deleted from storage.'
                  example:
                    - storage.com
                  items:
                    type: string
                inventory:
                  type: array
                  description: 'Array of inventory data.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 'The ID of the existing inventory record (null for new records).'
                        example: null
                      warehouse_id:
                        type: string
                        description: 'The UUID of the warehouse.'
                        example: 9f75b2e1-c383-4926-9fad-e55e72059451
                      stock_in:
                        type: integer
                        description: 'The stock quantity to set.'
                        example: 10
                variants:
                  type: array
                  description: 'Array of product variants.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 'The ID of the existing variant (null for new variants).'
                        example: '1'
                      name:
                        type: string
                        description: 'The name of the variant.'
                        example: 'Midnight Black'
                      sku:
                        type: string
                        description: 'The variant SKU.'
                        example: HEAD-BLK-001
                      price:
                        type: number
                        description: 'The price for this variant.'
                        example: 610.0
                      status:
                        type: integer
                        description: 'Status of the variant.'
                        example: 1
                variant_ids:
                  type: array
                  description: 'List of Variant UUIDs that should be deleted.'
                  example:
                    - uuid-1
                    - uuid-2
                  items:
                    type: string
                inventory_ids:
                  type: array
                  description: 'List of Inventory UUIDs that should be deleted.'
                  example:
                    - inv-uuid-1
                  items:
                    type: string
              required:
                - shop_id
    parameters:
      -
        in: path
        name: id
        description: 'The UUID of the product to update.'
        example: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
        required: true
        schema:
          type: string
  '/api/v1/headless/update-product-status/{id}':
    put:
      summary: 'Update product status'
      operationId: updateProductStatus
      description: "**Request Structure:**\n```json\n{\n  \"shop_id\": \"your-shop-uuid\",\n  \"status\": 0  //inactive 0 active 1\n}\n```"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Product has been updated successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Product has been updated successfully.'
      tags:
        - Products
    parameters:
      -
        in: path
        name: id
        description: 'The ID of the update product status.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/delete-product/{shop_id}/{id}':
    delete:
      summary: 'Delete a product'
      operationId: deleteAProduct
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Product has been deleted successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Product has been deleted successfully.'
      tags:
        - Products
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: id
        description: 'The ID of the {shop id}.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-all-products-inventory/{shop_id}':
    get:
      summary: 'Retrieves a paginated list of all products with their inventory information across all warehouses.'
      operationId: retrievesAPaginatedListOfAllProductsWithTheirInventoryInformationAcrossAllWarehouses
      description: "This endpoint returns products with their stock levels, warehouse distribution, categories, and images.\nUse this to get an overview of inventory status for all products in a shop.\n\n**Features:**\n- Search products by name\n- Filter by stock status (in_stock, out_of_stock, low_stock)\n- Filter by warehouse\n- Filter by multiple categories\n- Sort and paginate results\n\n**Stock Status Filters:**\n- in_stock: Products with total stock > 10\n- low_stock: Products with total stock <= 10 but > 0\n- out_of_stock: Products with total stock = 0\n\n**Response includes:**\n- Product details (id, name, price, discount, quantity, reserve_inv)\n- Inventory array showing stock_in per warehouse_id\n- Product categories and images\n- Unit information (unit_id, unit name like \"g\", \"kg\", \"pcs\")"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    data:
                      -
                        id: a0cbbdf1-8fa5-4f5e-87db-66e3946eb46f
                        vendor_id: 736
                        shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                        name: Earphones
                        attributes: []
                        price: '570.00'
                        discount: '70.00'
                        discount_type: fixed
                        quantity: 2
                        reserve_inv: 4
                        unit_id: 2
                        unit: g
                        status: 1
                        created_at: '2026-01-09T14:34:15.000000Z'
                        updated_at: '2026-01-09T14:34:15.000000Z'
                        categories:
                          -
                            id: 195
                            name: 'Jewelry and Rings'
                        inventory:
                          -
                            warehouse_id: 9f75b2e1-c383-4926-9fad-e55e72059451
                            stock_in: 2
                        images:
                          -
                            src: 'https://sin1.contabostorage.com/sample/products/product.jpg'
                            alt: 'Earphones image'
                    links:
                      first: '/api/v1/headless/get-all-products-inventory/{shop_id}?page=1'
                      last: '/api/v1/headless/get-all-products-inventory/{shop_id}?page=4'
                      prev: null
                      next: '/api/v1/headless/get-all-products-inventory/{shop_id}?page=2'
                    meta:
                      current_page: 1
                      per_page: 10
                      total: 37
                      last_page: 4
                  message: 'Product inventory list.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      data:
                        type: array
                        example:
                          -
                            id: a0cbbdf1-8fa5-4f5e-87db-66e3946eb46f
                            vendor_id: 736
                            shop_id: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                            name: Earphones
                            attributes: []
                            price: '570.00'
                            discount: '70.00'
                            discount_type: fixed
                            quantity: 2
                            reserve_inv: 4
                            unit_id: 2
                            unit: g
                            status: 1
                            created_at: '2026-01-09T14:34:15.000000Z'
                            updated_at: '2026-01-09T14:34:15.000000Z'
                            categories:
                              -
                                id: 195
                                name: 'Jewelry and Rings'
                            inventory:
                              -
                                warehouse_id: 9f75b2e1-c383-4926-9fad-e55e72059451
                                stock_in: 2
                            images:
                              -
                                src: 'https://sin1.contabostorage.com/sample/products/product.jpg'
                                alt: 'Earphones image'
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: a0cbbdf1-8fa5-4f5e-87db-66e3946eb46f
                            vendor_id:
                              type: integer
                              example: 736
                            shop_id:
                              type: string
                              example: 9f75b2e1-c16b-4e37-9744-de0ce877f40a
                            name:
                              type: string
                              example: Earphones
                            attributes:
                              type: array
                              example: []
                            price:
                              type: string
                              example: '570.00'
                            discount:
                              type: string
                              example: '70.00'
                            discount_type:
                              type: string
                              example: fixed
                            quantity:
                              type: integer
                              example: 2
                            reserve_inv:
                              type: integer
                              example: 4
                            unit_id:
                              type: integer
                              example: 2
                            unit:
                              type: string
                              example: g
                            status:
                              type: integer
                              example: 1
                            created_at:
                              type: string
                              example: '2026-01-09T14:34:15.000000Z'
                            updated_at:
                              type: string
                              example: '2026-01-09T14:34:15.000000Z'
                            categories:
                              type: array
                              example:
                                -
                                  id: 195
                                  name: 'Jewelry and Rings'
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 195
                                  name:
                                    type: string
                                    example: 'Jewelry and Rings'
                            inventory:
                              type: array
                              example:
                                -
                                  warehouse_id: 9f75b2e1-c383-4926-9fad-e55e72059451
                                  stock_in: 2
                              items:
                                type: object
                                properties:
                                  warehouse_id:
                                    type: string
                                    example: 9f75b2e1-c383-4926-9fad-e55e72059451
                                  stock_in:
                                    type: integer
                                    example: 2
                            images:
                              type: array
                              example:
                                -
                                  src: 'https://sin1.contabostorage.com/sample/products/product.jpg'
                                  alt: 'Earphones image'
                              items:
                                type: object
                                properties:
                                  src:
                                    type: string
                                    example: 'https://sin1.contabostorage.com/sample/products/product.jpg'
                                  alt:
                                    type: string
                                    example: 'Earphones image'
                      links:
                        type: object
                        properties:
                          first:
                            type: string
                            example: '/api/v1/headless/get-all-products-inventory/{shop_id}?page=1'
                          last:
                            type: string
                            example: '/api/v1/headless/get-all-products-inventory/{shop_id}?page=4'
                          prev:
                            type: string
                            example: null
                          next:
                            type: string
                            example: '/api/v1/headless/get-all-products-inventory/{shop_id}?page=2'
                      meta:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          per_page:
                            type: integer
                            example: 10
                          total:
                            type: integer
                            example: 37
                          last_page:
                            type: integer
                            example: 4
                  message:
                    type: string
                    example: 'Product inventory list.'
      tags:
        - Inventory
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-product-inventory/{shop_id}/{id}':
    get:
      summary: 'Retrieves inventory records for a specific product across all warehouses.'
      operationId: retrievesInventoryRecordsForASpecificProductAcrossAllWarehouses
      description: "This endpoint returns all inventory entries for a single product, showing stock levels\nin each warehouse where the product is stored.\n\n**Use this to:**\n- View stock distribution across warehouses for a specific product\n- Get inventory IDs for updating or deleting inventory records\n- Check which warehouses have stock for this product\n\n**Response includes:**\n- Array of inventory records with:\n  - id: Inventory record ID (use this for updates)\n  - warehouse_id: Warehouse UUID\n  - product_id: Product UUID\n  - product_variant_id: Variant UUID (null for simple products)\n  - stock_in: Current stock quantity in this warehouse\n  - created_at, updated_at timestamps"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    -
                      id: 25f0fa38-d628-495c-aa34-215aa1f05f75
                      shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                      warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                      product_id: fddfdd30-310f-4313-8dab-e074609c569a
                      product_variant_id: null
                      stock_in: 80
                      order_count: 0
                      created_by: 1
                      created_at: '2026-01-29T11:20:22.000000Z'
                      updated_at: '2026-01-29T11:20:22.000000Z'
                  message: 'Get product inventory successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: array
                    example:
                      -
                        id: 25f0fa38-d628-495c-aa34-215aa1f05f75
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                        product_id: fddfdd30-310f-4313-8dab-e074609c569a
                        product_variant_id: null
                        stock_in: 80
                        order_count: 0
                        created_by: 1
                        created_at: '2026-01-29T11:20:22.000000Z'
                        updated_at: '2026-01-29T11:20:22.000000Z'
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 25f0fa38-d628-495c-aa34-215aa1f05f75
                        shop_id:
                          type: string
                          example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        warehouse_id:
                          type: string
                          example: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                        product_id:
                          type: string
                          example: fddfdd30-310f-4313-8dab-e074609c569a
                        product_variant_id:
                          type: string
                          example: null
                        stock_in:
                          type: integer
                          example: 80
                        order_count:
                          type: integer
                          example: 0
                        created_by:
                          type: integer
                          example: 1
                        created_at:
                          type: string
                          example: '2026-01-29T11:20:22.000000Z'
                        updated_at:
                          type: string
                          example: '2026-01-29T11:20:22.000000Z'
                  message:
                    type: string
                    example: 'Get product inventory successfully.'
      tags:
        - Inventory
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: id
        description: 'The ID of the {shop id}.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/update-product-inventory/{shop_id}':
    post:
      summary: 'Updates inventory stock levels for one or multiple products across warehouses.'
      operationId: updatesInventoryStockLevelsForOneOrMultipleProductsAcrossWarehouses
      description: "This endpoint allows you to add, update, or delete inventory records. It supports bulk operations\nfor updating stock across multiple warehouses and products in a single request.\n\n**How it works:**\n\n1. **Create new inventory:** Omit the \"id\" field, provide product_id, warehouse_id, and stock_in\n2. **Update existing inventory:** Include the inventory \"id\" to update that specific record\n3. **Delete inventory:** Add inventory IDs to the \"inventory_ids\" array to remove those records\n\n**For products with variants:**\n- Include product_variant_id (UUID) in the inventory item\n- Each variant can have separate stock in different warehouses\n\n**For simple products:**\n- Set product_variant_id to null\n\n**Request Structure:**\n```json\n{\n  \"product_inventory\": [\n    {\n      \"id\": \"existing-inventory-uuid\",           // Include to UPDATE existing record\n      \"warehouse_id\": \"warehouse-uuid\",          // Required\n      \"product_id\": \"product-uuid\",              // Required\n      \"product_variant_id\": \"variant-uuid\",      // Required for variants, null for simple products\n      \"stock_in\": 50                             // Required: new stock quantity\n    },\n    {\n      // Omit \"id\" to CREATE new inventory record\n      \"warehouse_id\": \"another-warehouse-uuid\",\n      \"product_id\": \"product-uuid\",\n      \"product_variant_id\": null,                // null for simple product\n      \"stock_in\": 100\n    }\n  ],\n  \"inventory_ids\": [\"inv-uuid-1\", \"inv-uuid-2\"] // Optional: IDs to DELETE\n}\n```\n\n**Logic:**\n- If inventory with same product_id + warehouse_id exists, it updates the stock\n- If no match found, creates a new inventory record\n- Inventory IDs in \"inventory_ids\" array are deleted before processing updates"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: b1e83ba8-af46-4b14-821e-3470f9d336cb
                  shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                  warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                  product_id: ea6d595a-6082-43d2-908b-441cbcc68b60
                  product_variant_id: null
                  stock_in: 10
                  order_count: 0
                  created_by: 736
                  created_at: '2026-01-29T06:47:13.000000Z'
                  updated_at: '2026-01-30T14:31:52.000000Z'
                properties:
                  id:
                    type: string
                    example: b1e83ba8-af46-4b14-821e-3470f9d336cb
                  shop_id:
                    type: string
                    example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                  warehouse_id:
                    type: string
                    example: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                  product_id:
                    type: string
                    example: ea6d595a-6082-43d2-908b-441cbcc68b60
                  product_variant_id:
                    type: string
                    example: null
                  stock_in:
                    type: integer
                    example: 10
                  order_count:
                    type: integer
                    example: 0
                  created_by:
                    type: integer
                    example: 736
                  created_at:
                    type: string
                    example: '2026-01-29T06:47:13.000000Z'
                  updated_at:
                    type: string
                    example: '2026-01-30T14:31:52.000000Z'
      tags:
        - Inventory
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                inventory_ids:
                  type: object
                  description: ''
                  example: null
                  properties: {  }
                  nullable: true
                product_inventory:
                  type: array
                  description: ''
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: ''
                        example: null
                        nullable: true
                      warehouse_id:
                        type: string
                        description: 'The <code>id</code> of an existing record in the shop_warehouses table.'
                        example: consequatur
                      product_id:
                        type: string
                        description: 'The <code>id</code> of an existing record in the products table.'
                        example: consequatur
                      stock_in:
                        type: integer
                        description: 'Must be at least 0.'
                        example: 45
                    required:
                      - warehouse_id
                      - product_id
                      - stock_in
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-order-shipping-rate/{shop_id}':
    get:
      summary: 'Calculate Order Shipping Rate (live Site and dashboard)'
      operationId: calculateOrderShippingRateliveSiteAndDashboard
      description: "Calculates the shipping cost for an order based on location (country, state, city),\ncart subtotal, and total weight. The system searches for the most specific shipping\nzone available, starting from city-level, then state-level, and finally country-level\nzones. Returns the calculated shipping charge based on configured rates."
      parameters:
        -
          in: query
          name: country_id
          description: 'Country ID for delivery location.'
          example: 1
          required: true
          schema:
            type: integer
            description: 'Country ID for delivery location.'
            example: 1
        -
          in: query
          name: state_id
          description: 'State/Province ID for delivery location (optional, improves rate accuracy).'
          example: 3052
          required: false
          schema:
            type: integer
            description: 'State/Province ID for delivery location (optional, improves rate accuracy).'
            example: 3052
        -
          in: query
          name: city_id
          description: 'City ID for delivery location (optional, for most specific rate).'
          example: 5001
          required: false
          schema:
            type: integer
            description: 'City ID for delivery location (optional, for most specific rate).'
            example: 5001
        -
          in: query
          name: sub_total
          description: 'Cart subtotal amount (must be non-negative).'
          example: 150.0
          required: true
          schema:
            type: number
            description: 'Cart subtotal amount (must be non-negative).'
            example: 150.0
        -
          in: query
          name: cart_item_weight
          description: 'Total weight of all cart items in grams (must be non-negative).'
          example: 2500.0
          required: true
          schema:
            type: number
            description: 'Total weight of all cart items in grams (must be non-negative).'
            example: 2500.0
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  data:
                    shipping_charges: 15.5
                  message: 'Shipping rate calculated successfully.'
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      shipping_charges:
                        type: number
                        example: 15.5
                  message:
                    type: string
                    example: 'Shipping rate calculated successfully.'
        400:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Cart total must be a non-negative number'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Cart total must be a non-negative number'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Shipping to this location is not available.'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Shipping to this location is not available.'
        500:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Error calculating shipping charges: Division by zero'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Error calculating shipping charges: Division by zero'
      tags:
        - Shipping
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-shop-shipping-zone-countries/{shop_id}':
    get:
      summary: 'Get Shipping Zone Countries (live Site and dashboard)'
      operationId: getShippingZoneCountriesliveSiteAndDashboard
      description: "Retrieves all unique countries where a shop has configured shipping zones.\nReturns a list of countries with available shipping coverage for the shop.\nUseful for populating country dropdowns in checkout or shipping calculators."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  data:
                    -
                      id: 167
                      name: Pakistan
                      iso2: PK
                      iso3: PAK
                      phone_code: '92'
                      capital: Islamabad
                      currency: PKR
                    -
                      id: 231
                      name: 'United States'
                      iso2: US
                      iso3: USA
                      phone_code: '1'
                      capital: Washington
                      currency: USD
                  message: 'Countries with available shipping zones.'
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    example:
                      -
                        id: 167
                        name: Pakistan
                        iso2: PK
                        iso3: PAK
                        phone_code: '92'
                        capital: Islamabad
                        currency: PKR
                      -
                        id: 231
                        name: 'United States'
                        iso2: US
                        iso3: USA
                        phone_code: '1'
                        capital: Washington
                        currency: USD
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 167
                        name:
                          type: string
                          example: Pakistan
                        iso2:
                          type: string
                          example: PK
                        iso3:
                          type: string
                          example: PAK
                        phone_code:
                          type: string
                          example: '92'
                        capital:
                          type: string
                          example: Islamabad
                        currency:
                          type: string
                          example: PKR
                  message:
                    type: string
                    example: 'Countries with available shipping zones.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Shop not found.'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Shop not found.'
      tags:
        - Shipping
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-shop-shipping-zone-states/{shop_id}/{country_id}':
    get:
      summary: 'Get Shipping Zone States (live Site and dashboard)'
      operationId: getShippingZoneStatesliveSiteAndDashboard
      description: "Retrieves states/provinces available for shipping within a specific country for a shop.\nIf a country-wide shipping zone exists, returns all states in that country.\nIf only specific state zones exist, returns only those configured states.\nUseful for cascading location dropdowns (Country -> State -> City)."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  data:
                    -
                      id: 3052
                      name: Punjab
                      country_id: 167
                      iso2: PB
                    -
                      id: 3053
                      name: Sindh
                      country_id: 167
                      iso2: SD
                    -
                      id: 3054
                      name: 'Khyber Pakhtunkhwa'
                      country_id: 167
                      iso2: KP
                  message: 'All states available for shipping.'
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    example:
                      -
                        id: 3052
                        name: Punjab
                        country_id: 167
                        iso2: PB
                      -
                        id: 3053
                        name: Sindh
                        country_id: 167
                        iso2: SD
                      -
                        id: 3054
                        name: 'Khyber Pakhtunkhwa'
                        country_id: 167
                        iso2: KP
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 3052
                        name:
                          type: string
                          example: Punjab
                        country_id:
                          type: integer
                          example: 167
                        iso2:
                          type: string
                          example: PB
                  message:
                    type: string
                    example: 'All states available for shipping.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'No shipping zones found for this country.'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'No shipping zones found for this country.'
      tags:
        - Shipping
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: country_id
        description: 'The ID of the country.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-shop-shipping-zone-cities/{shop_id}/{country_id}/{state_id}':
    get:
      summary: 'Get Shipping Zone Cities (live Site and dashboard)'
      operationId: getShippingZoneCitiesliveSiteAndDashboard
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    -
                      id: 80174
                      country_id: 167
                      state_id: 3046
                      name: Bhimbar
                      country_code: PK
                    -
                      id: 80175
                      country_id: 167
                      state_id: 3046
                      name: Kotli
                      country_code: PK
                    -
                      id: 80176
                      country_id: 167
                      state_id: 3046
                      name: 'Kotli District'
                      country_code: PK
                    -
                      id: 80177
                      country_id: 167
                      state_id: 3046
                      name: 'Mirpur District'
                      country_code: PK
                    -
                      id: 80178
                      country_id: 167
                      state_id: 3046
                      name: Muzaffarābād
                      country_code: PK
                  message: 'Cities with available shipping zones.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: array
                    example:
                      -
                        id: 80174
                        country_id: 167
                        state_id: 3046
                        name: Bhimbar
                        country_code: PK
                      -
                        id: 80175
                        country_id: 167
                        state_id: 3046
                        name: Kotli
                        country_code: PK
                      -
                        id: 80176
                        country_id: 167
                        state_id: 3046
                        name: 'Kotli District'
                        country_code: PK
                      -
                        id: 80177
                        country_id: 167
                        state_id: 3046
                        name: 'Mirpur District'
                        country_code: PK
                      -
                        id: 80178
                        country_id: 167
                        state_id: 3046
                        name: Muzaffarābād
                        country_code: PK
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 80174
                        country_id:
                          type: integer
                          example: 167
                        state_id:
                          type: integer
                          example: 3046
                        name:
                          type: string
                          example: Bhimbar
                        country_code:
                          type: string
                          example: PK
                  message:
                    type: string
                    example: 'Cities with available shipping zones.'
      tags:
        - Shipping
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: country_id
        description: 'The ID of the country.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: state_id
        description: 'The ID of the state.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/v1/headless/get-state-cities-exist:
    get:
      summary: 'Get State Cities with Existing Zone Check (live Site and dashboard)'
      operationId: getStateCitiesWithExistingZoneCheckliveSiteAndDashboard
      description: "Retrieves cities for given state(s) with an additional flag indicating whether each city\nalready exists in a shipping zone for the specified shop. Useful for preventing duplicate\nzone creation and showing which cities are already configured."
      parameters:
        -
          in: query
          name: state_ids
          description: 'Comma-separated state IDs.'
          example: '3052,3053'
          required: true
          schema:
            type: string
            description: 'Comma-separated state IDs.'
            example: '3052,3053'
        -
          in: query
          name: shop_id
          description: 'Shop ID or tenant name.'
          example: '123'
          required: true
          schema:
            type: string
            description: 'Shop ID or tenant name.'
            example: '123'
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: true
                  data:
                    -
                      id: 3052
                      name: Punjab
                      country_id: 167
                      cities:
                        -
                          id: 86892
                          name: Lahore
                          state_id: 3052
                          exists_in_zone: true
                        -
                          id: 86893
                          name: Faisalabad
                          state_id: 3052
                          exists_in_zone: false
                    -
                      id: 3053
                      name: Sindh
                      country_id: 167
                      cities:
                        -
                          id: 86950
                          name: Karachi
                          state_id: 3053
                          exists_in_zone: true
                  message: 'Cities list with zone status.'
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    example:
                      -
                        id: 3052
                        name: Punjab
                        country_id: 167
                        cities:
                          -
                            id: 86892
                            name: Lahore
                            state_id: 3052
                            exists_in_zone: true
                          -
                            id: 86893
                            name: Faisalabad
                            state_id: 3052
                            exists_in_zone: false
                      -
                        id: 3053
                        name: Sindh
                        country_id: 167
                        cities:
                          -
                            id: 86950
                            name: Karachi
                            state_id: 3053
                            exists_in_zone: true
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          example: 3052
                        name:
                          type: string
                          example: Punjab
                        country_id:
                          type: integer
                          example: 167
                        cities:
                          type: array
                          example:
                            -
                              id: 86892
                              name: Lahore
                              state_id: 3052
                              exists_in_zone: true
                            -
                              id: 86893
                              name: Faisalabad
                              state_id: 3052
                              exists_in_zone: false
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 86892
                              name:
                                type: string
                                example: Lahore
                              state_id:
                                type: integer
                                example: 3052
                              exists_in_zone:
                                type: boolean
                                example: true
                  message:
                    type: string
                    example: 'Cities list with zone status.'
        404:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  success: false
                  message: 'Shop not found.'
                properties:
                  success:
                    type: boolean
                    example: false
                  message:
                    type: string
                    example: 'Shop not found.'
      tags:
        - Shipping
      security: []
  '/api/v1/headless/get-all-taxes/{shop_id}':
    get:
      summary: 'Get Taxes of a Shop'
      operationId: getTaxesOfAShop
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    current_page: 1
                    data: []
                    first_page_url: 'https://dev-api.orderain.com/api/v1/get-all-taxes/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=1'
                    from: null
                    last_page: 1
                    last_page_url: 'https://dev-api.orderain.com/api/v1/get-all-taxes/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=1'
                    links:
                      -
                        url: null
                        label: «Previous
                        active: false
                      -
                        url: 'https://dev-api.orderain.com/api/v1/get-all-taxes/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=1'
                        label: '1'
                        active: true
                      -
                        url: null
                        label: Next»
                        active: false
                    next_page_url: null
                    path: 'https://dev-api.orderain.com/api/v1/get-all-taxes/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5'
                    per_page: 10
                    prev_page_url: null
                    to: null
                    total: 0
                  message: 'Taxes list.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      data:
                        type: array
                        example: []
                      first_page_url:
                        type: string
                        example: 'https://dev-api.orderain.com/api/v1/get-all-taxes/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=1'
                      from:
                        type: string
                        example: null
                      last_page:
                        type: integer
                        example: 1
                      last_page_url:
                        type: string
                        example: 'https://dev-api.orderain.com/api/v1/get-all-taxes/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=1'
                      links:
                        type: array
                        example:
                          -
                            url: null
                            label: «Previous
                            active: false
                          -
                            url: 'https://dev-api.orderain.com/api/v1/get-all-taxes/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5?page=1'
                            label: '1'
                            active: true
                          -
                            url: null
                            label: Next»
                            active: false
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              example: null
                            label:
                              type: string
                              example: «Previous
                            active:
                              type: boolean
                              example: false
                      next_page_url:
                        type: string
                        example: null
                      path:
                        type: string
                        example: 'https://dev-api.orderain.com/api/v1/get-all-taxes/a0e59930-8c4b-4fa9-b49c-3dc6d23978c5'
                      per_page:
                        type: integer
                        example: 10
                      prev_page_url:
                        type: string
                        example: null
                      to:
                        type: string
                        example: null
                      total:
                        type: integer
                        example: 0
                  message:
                    type: string
                    example: 'Taxes list.'
      tags:
        - Taxes
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/v1/headless/guest-user-show-cart:
    post:
      summary: 'Get Guest User Cart Total Here (live Site and dashboard)'
      operationId: getGuestUserCartTotalHereliveSiteAndDashboard
      description: "This endpoint calculates and returns the complete cart summary for a **guest user**\nbased on the provided cart items. It supports both **simple products** and\n**variant-based products** in a single request.\n\nThe response includes:\n- Detailed cart items with product and variant information\n- Inventory and stock availability\n- Subtotal calculation\n- Total cart weight\n- Applied taxes (if any)\n- Extra charges (e.g. packing charges)\n- Final payable total with currency details\n\nThis endpoint does **not** create a persistent cart record.\nIt is intended for **cart preview and price calculation** before checkout.\n\n **Request Structure For Getting Cart Total (Simple + Variant Products):**\n```json\n{\n  \"items\": [\n    {\n      \"product_id\": \"product-id\",   // Simple product ID\n      \"variant_id\": null,                                     // Null for simple product\n      \"unit_qty\": 1                                           // Quantity\n    },\n    {\n      \"product_id\": \"product-id\",   // Parent product ID\n      \"variant_id\": \"variant-id\",   // Required for variant product\n      \"unit_qty\": 1                                           // Quantity\n    }\n  ]\n}\n```"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    carts:
                      -
                        id: null
                        user_id: null
                        shop_id: null
                        unit_qty: 1
                        product:
                          id: a09c2735-8148-4a2c-a680-a728f25b109b
                          name: 'Matte Lipstick Set'
                          description: '<p>Skin care</p>'
                          tags: []
                          attributes: []
                          images:
                            - 'https://sin1.contabostorage.com/...jpg'
                          weight: 50
                          price: '39.99'
                          discount: '0.00'
                          discount_type: null
                          unit:
                            id: 1
                            name: kg
                          currency_code: USD
                          currency_icon: $
                          stock: 10
                          inventory:
                            -
                              id: a09c27a8-8da9-4230-aeea-90271f29507c
                              warehouse_id: a09c26d0-2e8f-4bae-8e48-30ebcb2d6f5e
                              warehouse_name: 'Main warehouse'
                              product_variant_id: null
                              stock_in: 10
                        taxes: []
                        extra_charges: []
                        applied_extra_charges: []
                      -
                        id: null
                        user_id: null
                        shop_id: null
                        unit_qty: 1
                        product:
                          id: a09c2744-d23a-413f-8dd6-5d3f4faf6f95
                          name: 'Gentle Cleansing Foam'
                          description: '<p>cleansing foam</p>'
                          tags:
                            - 'personal care'
                          attributes:
                            -
                              name: size
                              list:
                                - md
                                - sm
                          images:
                            - 'https://sin1.contabostorage.com/...jpg'
                          price: '0.00'
                          currency_code: USD
                          currency_icon: $
                          stock: 20
                          variant:
                            id: a0e17f49-0f2c-453b-a5ba-7ece10c18358
                            name: sm
                            sku: dwadawdwad
                            price: '2222.00'
                            weight: '2.00'
                            inventory:
                              -
                                warehouse_name: 'Main warehouse'
                                stock_in: 20
                        taxes: []
                        extra_charges: []
                        applied_extra_charges: []
                    sub_total: 2261.99
                    cart_item_weight: 2.05
                    tax_amount: 0
                    totalDiscount: 0
                    extra_charges:
                      -
                        name: 'Safe Packing Charges'
                        type: fixed
                        rate: 2
                        amount: 2
                    extra_charges_total: 2
                    total: 2263.99
                    currency_code: USD
                    currency_icon: $
                  message: 'Cart list.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      carts:
                        type: array
                        example:
                          -
                            id: null
                            user_id: null
                            shop_id: null
                            unit_qty: 1
                            product:
                              id: a09c2735-8148-4a2c-a680-a728f25b109b
                              name: 'Matte Lipstick Set'
                              description: '<p>Skin care</p>'
                              tags: []
                              attributes: []
                              images:
                                - 'https://sin1.contabostorage.com/...jpg'
                              weight: 50
                              price: '39.99'
                              discount: '0.00'
                              discount_type: null
                              unit:
                                id: 1
                                name: kg
                              currency_code: USD
                              currency_icon: $
                              stock: 10
                              inventory:
                                -
                                  id: a09c27a8-8da9-4230-aeea-90271f29507c
                                  warehouse_id: a09c26d0-2e8f-4bae-8e48-30ebcb2d6f5e
                                  warehouse_name: 'Main warehouse'
                                  product_variant_id: null
                                  stock_in: 10
                            taxes: []
                            extra_charges: []
                            applied_extra_charges: []
                          -
                            id: null
                            user_id: null
                            shop_id: null
                            unit_qty: 1
                            product:
                              id: a09c2744-d23a-413f-8dd6-5d3f4faf6f95
                              name: 'Gentle Cleansing Foam'
                              description: '<p>cleansing foam</p>'
                              tags:
                                - 'personal care'
                              attributes:
                                -
                                  name: size
                                  list:
                                    - md
                                    - sm
                              images:
                                - 'https://sin1.contabostorage.com/...jpg'
                              price: '0.00'
                              currency_code: USD
                              currency_icon: $
                              stock: 20
                              variant:
                                id: a0e17f49-0f2c-453b-a5ba-7ece10c18358
                                name: sm
                                sku: dwadawdwad
                                price: '2222.00'
                                weight: '2.00'
                                inventory:
                                  -
                                    warehouse_name: 'Main warehouse'
                                    stock_in: 20
                            taxes: []
                            extra_charges: []
                            applied_extra_charges: []
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: null
                            user_id:
                              type: string
                              example: null
                            shop_id:
                              type: string
                              example: null
                            unit_qty:
                              type: integer
                              example: 1
                            product:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: a09c2735-8148-4a2c-a680-a728f25b109b
                                name:
                                  type: string
                                  example: 'Matte Lipstick Set'
                                description:
                                  type: string
                                  example: '<p>Skin care</p>'
                                tags:
                                  type: array
                                  example: []
                                attributes:
                                  type: array
                                  example: []
                                images:
                                  type: array
                                  example:
                                    - 'https://sin1.contabostorage.com/...jpg'
                                  items:
                                    type: string
                                weight:
                                  type: integer
                                  example: 50
                                price:
                                  type: string
                                  example: '39.99'
                                discount:
                                  type: string
                                  example: '0.00'
                                discount_type:
                                  type: string
                                  example: null
                                unit:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 1
                                    name:
                                      type: string
                                      example: kg
                                currency_code:
                                  type: string
                                  example: USD
                                currency_icon:
                                  type: string
                                  example: $
                                stock:
                                  type: integer
                                  example: 10
                                inventory:
                                  type: array
                                  example:
                                    -
                                      id: a09c27a8-8da9-4230-aeea-90271f29507c
                                      warehouse_id: a09c26d0-2e8f-4bae-8e48-30ebcb2d6f5e
                                      warehouse_name: 'Main warehouse'
                                      product_variant_id: null
                                      stock_in: 10
                                  items:
                                    type: object
                                    properties:
                                      id: { type: string, example: a09c27a8-8da9-4230-aeea-90271f29507c }
                                      warehouse_id: { type: string, example: a09c26d0-2e8f-4bae-8e48-30ebcb2d6f5e }
                                      warehouse_name: { type: string, example: 'Main warehouse' }
                                      product_variant_id: { type: string, example: null }
                                      stock_in: { type: integer, example: 10 }
                            taxes:
                              type: array
                              example: []
                            extra_charges:
                              type: array
                              example: []
                            applied_extra_charges:
                              type: array
                              example: []
                      sub_total:
                        type: number
                        example: 2261.99
                      cart_item_weight:
                        type: number
                        example: 2.05
                      tax_amount:
                        type: integer
                        example: 0
                      totalDiscount:
                        type: integer
                        example: 0
                      extra_charges:
                        type: array
                        example:
                          -
                            name: 'Safe Packing Charges'
                            type: fixed
                            rate: 2
                            amount: 2
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              example: 'Safe Packing Charges'
                            type:
                              type: string
                              example: fixed
                            rate:
                              type: integer
                              example: 2
                            amount:
                              type: integer
                              example: 2
                      extra_charges_total:
                        type: integer
                        example: 2
                      total:
                        type: number
                        example: 2263.99
                      currency_code:
                        type: string
                        example: USD
                      currency_icon:
                        type: string
                        example: $
                  message:
                    type: string
                    example: 'Cart list.'
      tags:
        - Cart
      security: []
  '/api/v1/headless/get-paginated-vendor-customers/{shop_id}':
    get:
      summary: 'Get All Customers Paginated list'
      operationId: getAllCustomersPaginatedList
      description: "**Detailed customers profiles including:**\n- Personal info (name, email, phone, gender, profile photo)\n- Addresses with country, state, city details\n- Currency info (code, icon)\n- data can be used for creating order"
      parameters:
        -
          in: query
          name: search
          description: 'optional Search by first name, last name, or email.'
          example: shrine
          required: false
          schema:
            type: string
            description: 'optional Search by first name, last name, or email.'
            example: shrine
        -
          in: query
          name: status
          description: 'optional Filter by status (active|inactive).'
          example: active
          required: false
          schema:
            type: string
            description: 'optional Filter by status (active|inactive).'
            example: active
        -
          in: query
          name: 'tags[]'
          description: 'optional Filter by multiple tags.'
          example: vip
          required: false
          schema:
            type: string
            description: 'optional Filter by multiple tags.'
            example: vip
        -
          in: query
          name: per_page
          description: 'optional Number of records per page.'
          example: 10
          required: false
          schema:
            type: integer
            description: 'optional Number of records per page.'
            example: 10
        -
          in: query
          name: from_date
          description: 'date optional Filter start date (Y-m-d).'
          example: '2026-01-01'
          required: false
          schema:
            type: string
            description: 'date optional Filter start date (Y-m-d).'
            example: '2026-01-01'
        -
          in: query
          name: to_date
          description: 'date optional Filter end date (Y-m-d).'
          example: '2026-01-31'
          required: false
          schema:
            type: string
            description: 'date optional Filter end date (Y-m-d).'
            example: '2026-01-31'
        -
          in: query
          name: sort_by
          description: 'optional Sort column.'
          example: created_at
          required: false
          schema:
            type: string
            description: 'optional Sort column.'
            example: created_at
        -
          in: query
          name: sort_direction
          description: 'optional Sort direction (asc|desc).'
          example: desc
          required: false
          schema:
            type: string
            description: 'optional Sort direction (asc|desc).'
            example: desc
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    data:
                      -
                        id: 761
                        first_name: Shrine
                        last_name: 'Al Arabi'
                        full_name: 'Shrine Al Arabi'
                        email: shrine@example.com
                        phone: '+923009201556'
                        gender: null
                        profile_photo: null
                        is_active: 1
                        currency_code: PKR
                        currency_icon: Rs
                        created_at: '2026-01-09T08:26:18.000000Z'
                        total_orders: 2
                        total_spent: '4350.00'
                        country:
                          id: 167
                          name: Pakistan
                        addresses:
                          -
                            id: 1736
                            address: 'Street 12, Model Town'
                            city: Kotli
                            state: 'Azad Kashmir'
                            postal_code: '12321'
                            default: true
                    meta:
                      current_page: 1
                      per_page: 10
                      total: 28
                      last_page: 3
                  message: 'Vendor customers list.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      data:
                        type: array
                        example:
                          -
                            id: 761
                            first_name: Shrine
                            last_name: 'Al Arabi'
                            full_name: 'Shrine Al Arabi'
                            email: shrine@example.com
                            phone: '+923009201556'
                            gender: null
                            profile_photo: null
                            is_active: 1
                            currency_code: PKR
                            currency_icon: Rs
                            created_at: '2026-01-09T08:26:18.000000Z'
                            total_orders: 2
                            total_spent: '4350.00'
                            country:
                              id: 167
                              name: Pakistan
                            addresses:
                              -
                                id: 1736
                                address: 'Street 12, Model Town'
                                city: Kotli
                                state: 'Azad Kashmir'
                                postal_code: '12321'
                                default: true
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 761
                            first_name:
                              type: string
                              example: Shrine
                            last_name:
                              type: string
                              example: 'Al Arabi'
                            full_name:
                              type: string
                              example: 'Shrine Al Arabi'
                            email:
                              type: string
                              example: shrine@example.com
                            phone:
                              type: string
                              example: '+923009201556'
                            gender:
                              type: string
                              example: null
                            profile_photo:
                              type: string
                              example: null
                            is_active:
                              type: integer
                              example: 1
                            currency_code:
                              type: string
                              example: PKR
                            currency_icon:
                              type: string
                              example: Rs
                            created_at:
                              type: string
                              example: '2026-01-09T08:26:18.000000Z'
                            total_orders:
                              type: integer
                              example: 2
                            total_spent:
                              type: string
                              example: '4350.00'
                            country:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 167
                                name:
                                  type: string
                                  example: Pakistan
                            addresses:
                              type: array
                              example:
                                -
                                  id: 1736
                                  address: 'Street 12, Model Town'
                                  city: Kotli
                                  state: 'Azad Kashmir'
                                  postal_code: '12321'
                                  default: true
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    example: 1736
                                  address:
                                    type: string
                                    example: 'Street 12, Model Town'
                                  city:
                                    type: string
                                    example: Kotli
                                  state:
                                    type: string
                                    example: 'Azad Kashmir'
                                  postal_code:
                                    type: string
                                    example: '12321'
                                  default:
                                    type: boolean
                                    example: true
                      meta:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          per_page:
                            type: integer
                            example: 10
                          total:
                            type: integer
                            example: 28
                          last_page:
                            type: integer
                            example: 3
                  message:
                    type: string
                    example: 'Vendor customers list.'
      tags:
        - Customers
    parameters:
      -
        in: path
        name: shop_id
        description: 'The vendor shop ID.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-vendor-customer/{shop_id}/{user_id}':
    get:
      summary: 'Get Customer'
      operationId: getCustomer
      description: "**Detailed customer profile including:**\n- Personal info (name, email, phone, gender, profile photo)\n- Addresses with country, state, city details\n- Order statistics (total orders, total spent, total coupons used, total coupon discount)\n- Currency info (code, icon)\n- data can be used for creating order"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    id: 761
                    first_name: Shrine
                    last_name: 'AL arabi'
                    full_name: 'Shrine AL Arabi'
                    email: shrine2@gmail.com
                    phone: '03092015565'
                    gender: null
                    profile_photo: null
                    is_active: 1
                    note: null
                    tags: null
                    last_order_at: '2026-01-09T09:50:58.000000Z'
                    created_at: '2026-01-09T08:26:18.000000Z'
                    country:
                      id: 167
                      name: Pakistan
                    state:
                      id: 3046
                      name: 'Azad Kashmir'
                    city:
                      id: 80175
                      name: Kotli
                    addresses:
                      -
                        id: 1736
                        addressable_id: 761
                        addressable_type: Customer
                        first_name: ''
                        last_name: ''
                        phone: '03092015565'
                        country:
                          id: 167
                          name: Pakistan
                        state:
                          id: 3046
                          name: 'Azad Kashmir'
                        city:
                          id: 80175
                          name: Kotli
                        address: 'saddas das'
                        type: null
                        default: 1
                        postal_code: '12321'
                    total_orders: 2
                    total_spent: '4350.00'
                    total_coupons: 0
                    total_coupon_discount: '0.00'
                    currency_code: PKR
                    currency_icon: Rs
                  message: 'Get vendor customer successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 761
                      first_name:
                        type: string
                        example: Shrine
                      last_name:
                        type: string
                        example: 'AL arabi'
                      full_name:
                        type: string
                        example: 'Shrine AL Arabi'
                      email:
                        type: string
                        example: shrine2@gmail.com
                      phone:
                        type: string
                        example: '03092015565'
                      gender:
                        type: string
                        example: null
                      profile_photo:
                        type: string
                        example: null
                      is_active:
                        type: integer
                        example: 1
                      note:
                        type: string
                        example: null
                      tags:
                        type: string
                        example: null
                      last_order_at:
                        type: string
                        example: '2026-01-09T09:50:58.000000Z'
                      created_at:
                        type: string
                        example: '2026-01-09T08:26:18.000000Z'
                      country:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 167
                          name:
                            type: string
                            example: Pakistan
                      state:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 3046
                          name:
                            type: string
                            example: 'Azad Kashmir'
                      city:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 80175
                          name:
                            type: string
                            example: Kotli
                      addresses:
                        type: array
                        example:
                          -
                            id: 1736
                            addressable_id: 761
                            addressable_type: Customer
                            first_name: ''
                            last_name: ''
                            phone: '03092015565'
                            country:
                              id: 167
                              name: Pakistan
                            state:
                              id: 3046
                              name: 'Azad Kashmir'
                            city:
                              id: 80175
                              name: Kotli
                            address: 'saddas das'
                            type: null
                            default: 1
                            postal_code: '12321'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 1736
                            addressable_id:
                              type: integer
                              example: 761
                            addressable_type:
                              type: string
                              example: Customer
                            first_name:
                              type: string
                              example: ''
                            last_name:
                              type: string
                              example: ''
                            phone:
                              type: string
                              example: '03092015565'
                            country:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 167
                                name:
                                  type: string
                                  example: Pakistan
                            state:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 3046
                                name:
                                  type: string
                                  example: 'Azad Kashmir'
                            city:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 80175
                                name:
                                  type: string
                                  example: Kotli
                            address:
                              type: string
                              example: 'saddas das'
                            type:
                              type: string
                              example: null
                            default:
                              type: integer
                              example: 1
                            postal_code:
                              type: string
                              example: '12321'
                      total_orders:
                        type: integer
                        example: 2
                      total_spent:
                        type: string
                        example: '4350.00'
                      total_coupons:
                        type: integer
                        example: 0
                      total_coupon_discount:
                        type: string
                        example: '0.00'
                      currency_code:
                        type: string
                        example: PKR
                      currency_icon:
                        type: string
                        example: Rs
                  message:
                    type: string
                    example: 'Get vendor customer successfully.'
      tags:
        - Customers
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: user_id
        description: 'The ID of the user.'
        example: consequatur
        required: true
        schema:
          type: string
  /api/v1/headless/create-order:
    post:
      summary: 'Create Order (Live Site - Guest and Dashboard)'
      operationId: createOrderLiveSiteGuestAndDashboard
      description: "**1. Guest User Checkout (No Authentication Required)**\n- No Bearer token needed for guest checkout\n- Provide customer details (first_name, last_name, email, phone) and address fields\n- System creates a new customer record if email doesn't exist\n- Type can be 'guest' or 'regular'\n\n**2. Vendor Creating Order for Customer (Headless API - Bearer Token Required)**\n- **IMPORTANT: Requires headless_api Bearer token in Authorization header**\n- Get customer data from GET /api/v1/headless/get-vendor-customer/{shop_id}/{user_id}\n- Requires all customer details and full address fields (country_id, state_id, city_id, address, postal_code)\n- Customer addresses are returned in the response - use the country_id, state_id, city_id from the address object\n- tenant field is required (shop_id as UUID)\n\n**Order Items:**\n- Each order must have at least one product item\n- For simple products: provide product_id, set variant_id to null, and unit_qty\n- For products with variants: provide product_id, variant_id (UUID), and unit_qty\n- Products must be active and not deleted\n- Stock availability is validated before order creation\n\n**Pre-Order Calculation APIs (Optional but Recommended):**\n- Calculate cart totals: POST /api/v1/headless/guest-user-show-cart (with items array)\n- Calculate shipping rates: GET /api/v1/headless/get-order-shipping-rate/{shop_id}?country_id={id}&state_id={id}&city_id={id}&sub_total={amount}&cart_item_weight={weight}\n\n**Payment Method:**\n- Currently only COD (Cash on Delivery) is supported\n- Order is created with status 'pending'.\n\n**Coupon Codes:**\n- Optional coupon_code can be applied for discounts\n- Discount is calculated and applied to the order total\n\n**Request Structure:**\n```json\n{\n  \"items\": [\n    {\n      \"product_id\": \"a0cbbdf1-8fa5-4f5e-87db-66e3946eb46f\",\n      \"variant_id\": null,\n      \"unit_qty\": 1\n    },\n    {\n      \"product_id\": \"a04af34b-fd1b-4cbe-980f-72f25c5c46f4\",\n      \"variant_id\": \"a04af34b-fe5c-4e37-8d6f-1d8b39a6771f\",\n      \"unit_qty\": 1\n    }\n  ],\n  \"first_name\": \"John\",\n  \"last_name\": \"Smith\",\n  \"email\": \"myorderain@gmail.com\",\n  \"type\": \"guest\",          // type regular with bearer token to avoid login message\n  \"country_id\": 167,\n  \"state_id\": 3046,\n  \"city_id\": 80175,\n  \"address\": \"New York, 123 Street\",\n  \"phone\": \"03092015565\",\n  \"postal_code\": \"12321\",\n  \"address_id\": 1736,        // required with bearer token null on guest customer\n  \"payment_method\": \"COD\",\n  \"tenant\": \"9f75b2e1-c16b-4e37-9744-de0ce877f40a\",\n  \"comment\": \"\"\n}\n```"
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    id: 1CLFMPLH
                    order_id: 1CLFMPLH
                    shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                    vendor_id: 736
                    customer:
                      id: 772
                      first_name: Aleezeh
                      last_name: Imran
                      type: guest
                      email: Alezehimran239@gmail.com
                      phone: '03248765098'
                      full_name: 'Aleezeh Imran'
                    address:
                      id: 1763
                      addressable_id: 772
                      addressable_type: Customer
                      first_name: ''
                      last_name: ''
                      phone: '03248765098'
                      country:
                        id: 170
                        name: Panama
                      state:
                        id: 3092
                        name: 'Guna Yala'
                      city:
                        id: 80901
                        name: Achutupo
                      address: 'Altamash road sialkoat'
                      type: null
                      default: 1
                      postal_code: '31411'
                    total_amount: '399.00'
                    paid_amount: '401.00'
                    currency_code: PKR
                    currency_icon: Rs
                    coupon_id: null
                    coupon_discount: '0.00'
                    tags: null
                    total_tax_amount: null
                    extra_charges: 0
                    track_payment: null
                    extra_charges_breakdown: []
                    delivery_charges: 2
                    total_discount_amount: 0
                    delivery_duration: null
                    payment_method: COD
                    status: pending
                    description: 'COD Order payment'
                    details:
                      comment: null
                      shipping_duration: '1-2 working days'
                      shipping_zone_id: 147
                    datetime: '2026-01-30T14:44:34.000000Z'
                    order_items:
                      -
                        id: 450
                        order_id: 384
                        warehouse_ids: null
                        product_id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                        variant_id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                        unit_qty: 1
                        unit_price: '399.00'
                        extra_charges: null
                        discount_amount: '0.00'
                        tax_amount: []
                        product:
                          id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                          name: 'Solar Dashboard Ring Perfume (Variants)'
                          description: 'Solar powered rotating dashboard perfume with color variants'
                          tags:
                            - 'dashboard decor'
                            - 'solar perfume'
                          sku: PBTOLTMCO
                          attributes:
                            -
                              list:
                                - Gold
                                - Black
                              name: color
                              model: null
                              colorValue:
                                - Gold
                                - Black
                          images:
                            - 'https://static-01.daraz.pk/p/0974766e8e8e7b20788b6a1ab04c4e3f.jpg'
                          weight: 0
                          unit:
                            id: 2
                            name: g
                          variant:
                            id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                            name: Black
                            image: ''
                            sku: prd-ring-black
                            inherited_attributes: []
                            weight: '120.00'
                            inventory:
                              -
                                id: f2c7e7d5-9025-4e68-9b0c-1cdcb0fb0ef1
                                warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                                warehouse_name: MainWarehouse
                                product_id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                                product_variant_id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                                stock_in: 45
                    order_activity_logs:
                      -
                        message: 'Order received'
                        event: created
                        properties:
                          attributes:
                            status: pending
                        created_by: null
                        author_name: 'Via online store'
                        created_at: '2026-01-30T14:44:34.000000Z'
                    shipment: null
                    payment_info: null
                    order_title: 'Order #1CLFMPLH is now Pending'
                    shipping_duration: 'Estimated delivery: 1-2 working days'
                  message: 'Order has been created successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 1CLFMPLH
                      order_id:
                        type: string
                        example: 1CLFMPLH
                      shop_id:
                        type: string
                        example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                      vendor_id:
                        type: integer
                        example: 736
                      customer:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 772
                          first_name:
                            type: string
                            example: Aleezeh
                          last_name:
                            type: string
                            example: Imran
                          type:
                            type: string
                            example: guest
                          email:
                            type: string
                            example: Alezehimran239@gmail.com
                          phone:
                            type: string
                            example: '03248765098'
                          full_name:
                            type: string
                            example: 'Aleezeh Imran'
                      address:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1763
                          addressable_id:
                            type: integer
                            example: 772
                          addressable_type:
                            type: string
                            example: Customer
                          first_name:
                            type: string
                            example: ''
                          last_name:
                            type: string
                            example: ''
                          phone:
                            type: string
                            example: '03248765098'
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 170
                              name:
                                type: string
                                example: Panama
                          state:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 3092
                              name:
                                type: string
                                example: 'Guna Yala'
                          city:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 80901
                              name:
                                type: string
                                example: Achutupo
                          address:
                            type: string
                            example: 'Altamash road sialkoat'
                          type:
                            type: string
                            example: null
                          default:
                            type: integer
                            example: 1
                          postal_code:
                            type: string
                            example: '31411'
                      total_amount:
                        type: string
                        example: '399.00'
                      paid_amount:
                        type: string
                        example: '401.00'
                      currency_code:
                        type: string
                        example: PKR
                      currency_icon:
                        type: string
                        example: Rs
                      coupon_id:
                        type: string
                        example: null
                      coupon_discount:
                        type: string
                        example: '0.00'
                      tags:
                        type: string
                        example: null
                      total_tax_amount:
                        type: string
                        example: null
                      extra_charges:
                        type: integer
                        example: 0
                      track_payment:
                        type: string
                        example: null
                      extra_charges_breakdown:
                        type: array
                        example: []
                      delivery_charges:
                        type: integer
                        example: 2
                      total_discount_amount:
                        type: integer
                        example: 0
                      delivery_duration:
                        type: string
                        example: null
                      payment_method:
                        type: string
                        example: COD
                      status:
                        type: string
                        example: pending
                      description:
                        type: string
                        example: 'COD Order payment'
                      details:
                        type: object
                        properties:
                          comment:
                            type: string
                            example: null
                          shipping_duration:
                            type: string
                            example: '1-2 working days'
                          shipping_zone_id:
                            type: integer
                            example: 147
                      datetime:
                        type: string
                        example: '2026-01-30T14:44:34.000000Z'
                      order_items:
                        type: array
                        example:
                          -
                            id: 450
                            order_id: 384
                            warehouse_ids: null
                            product_id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                            variant_id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                            unit_qty: 1
                            unit_price: '399.00'
                            extra_charges: null
                            discount_amount: '0.00'
                            tax_amount: []
                            product:
                              id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                              name: 'Solar Dashboard Ring Perfume (Variants)'
                              description: 'Solar powered rotating dashboard perfume with color variants'
                              tags:
                                - 'dashboard decor'
                                - 'solar perfume'
                              sku: PBTOLTMCO
                              attributes:
                                -
                                  list:
                                    - Gold
                                    - Black
                                  name: color
                                  model: null
                                  colorValue:
                                    - Gold
                                    - Black
                              images:
                                - 'https://static-01.daraz.pk/p/0974766e8e8e7b20788b6a1ab04c4e3f.jpg'
                              weight: 0
                              unit:
                                id: 2
                                name: g
                              variant:
                                id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                                name: Black
                                image: ''
                                sku: prd-ring-black
                                inherited_attributes: []
                                weight: '120.00'
                                inventory:
                                  -
                                    id: f2c7e7d5-9025-4e68-9b0c-1cdcb0fb0ef1
                                    warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                                    warehouse_name: MainWarehouse
                                    product_id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                                    product_variant_id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                                    stock_in: 45
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 450
                            order_id:
                              type: integer
                              example: 384
                            warehouse_ids:
                              type: string
                              example: null
                            product_id:
                              type: string
                              example: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                            variant_id:
                              type: string
                              example: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                            unit_qty:
                              type: integer
                              example: 1
                            unit_price:
                              type: string
                              example: '399.00'
                            extra_charges:
                              type: string
                              example: null
                            discount_amount:
                              type: string
                              example: '0.00'
                            tax_amount:
                              type: array
                              example: []
                            product:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                                name:
                                  type: string
                                  example: 'Solar Dashboard Ring Perfume (Variants)'
                                description:
                                  type: string
                                  example: 'Solar powered rotating dashboard perfume with color variants'
                                tags:
                                  type: array
                                  example:
                                    - 'dashboard decor'
                                    - 'solar perfume'
                                  items:
                                    type: string
                                sku:
                                  type: string
                                  example: PBTOLTMCO
                                attributes:
                                  type: array
                                  example:
                                    -
                                      list: [Gold, Black]
                                      name: color
                                      model: null
                                      colorValue: [Gold, Black]
                                  items:
                                    type: object
                                    properties:
                                      list: { type: array, example: [Gold, Black], items: { type: string } }
                                      name: { type: string, example: color }
                                      model: { type: string, example: null }
                                      colorValue: { type: array, example: [Gold, Black], items: { type: string } }
                                images:
                                  type: array
                                  example:
                                    - 'https://static-01.daraz.pk/p/0974766e8e8e7b20788b6a1ab04c4e3f.jpg'
                                  items:
                                    type: string
                                weight:
                                  type: integer
                                  example: 0
                                unit:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    name:
                                      type: string
                                      example: g
                                variant:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                                    name:
                                      type: string
                                      example: Black
                                    image:
                                      type: string
                                      example: ''
                                    sku:
                                      type: string
                                      example: prd-ring-black
                                    inherited_attributes:
                                      type: array
                                      example: []
                                    weight:
                                      type: string
                                      example: '120.00'
                                    inventory:
                                      type: array
                                      example: [{ id: f2c7e7d5-9025-4e68-9b0c-1cdcb0fb0ef1, warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d, warehouse_name: MainWarehouse, product_id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6, product_variant_id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382, stock_in: 45 }]
                                      items: { type: object, properties: { id: { type: string, example: f2c7e7d5-9025-4e68-9b0c-1cdcb0fb0ef1 }, warehouse_id: { type: string, example: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d }, warehouse_name: { type: string, example: MainWarehouse }, product_id: { type: string, example: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6 }, product_variant_id: { type: string, example: 492eded7-4b42-4b96-8c6b-3f93fc2b7382 }, stock_in: { type: integer, example: 45 } } }
                      order_activity_logs:
                        type: array
                        example:
                          -
                            message: 'Order received'
                            event: created
                            properties:
                              attributes:
                                status: pending
                            created_by: null
                            author_name: 'Via online store'
                            created_at: '2026-01-30T14:44:34.000000Z'
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                              example: 'Order received'
                            event:
                              type: string
                              example: created
                            properties:
                              type: object
                              properties:
                                attributes:
                                  type: object
                                  properties:
                                    status:
                                      type: string
                                      example: pending
                            created_by:
                              type: string
                              example: null
                            author_name:
                              type: string
                              example: 'Via online store'
                            created_at:
                              type: string
                              example: '2026-01-30T14:44:34.000000Z'
                      shipment:
                        type: string
                        example: null
                      payment_info:
                        type: string
                        example: null
                      order_title:
                        type: string
                        example: 'Order #1CLFMPLH is now Pending'
                      shipping_duration:
                        type: string
                        example: 'Estimated delivery: 1-2 working days'
                  message:
                    type: string
                    example: 'Order has been created successfully.'
      tags:
        - Order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tenant:
                  type: string
                  description: ''
                  example: consequatur
                first_name:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 20 characters.'
                  example: mqeopfuudtdsufvyv
                last_name:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 20 characters.'
                  example: ddqamniihfqcoynla
                email:
                  type: string
                  description: 'Must be a valid email address.'
                  example: hfay@example.com
                type:
                  type: string
                  description: ''
                  example: regular
                  enum:
                    - guest
                    - regular
                phone:
                  type: string
                  description: 'Must match the regex /^([0-9\s\-\+\(\)]*)$/. Must be at least 10 characters. Must not be greater than 15 characters.'
                  example: qtqxbajwbpilp
                country_id:
                  type: string
                  description: 'The <code>id</code> of an existing record in the countries table.'
                  example: consequatur
                state_id:
                  type: string
                  description: 'The <code>id</code> of an existing record in the states table.'
                  example: consequatur
                city_id:
                  type: string
                  description: 'The <code>id</code> of an existing record in the cities table.'
                  example: consequatur
                address:
                  type: string
                  description: 'Must not be greater than 100 characters.'
                  example: mqeopfuudtdsufvyvddqa
                coupon_code:
                  type: string
                  description: 'Must not be greater than 20 characters.'
                  example: mniihfqcoynlazghd
                  nullable: true
                postal_code:
                  type: string
                  description: ''
                  example: consequatur
                items:
                  type: array
                  description: 'Must have at least 1 items.'
                  example:
                    - []
                  items:
                    type: object
                    properties:
                      product_id:
                        type: string
                        description: 'The <code>id</code> of an existing record in the products table.'
                        example: consequatur
                      variant_id:
                        type: string
                        description: 'The <code>id</code> of an existing record in the product_variants table.'
                        example: null
                        nullable: true
                      unit_qty:
                        type: integer
                        description: 'Must be at least 1.'
                        example: 45
                    required:
                      - product_id
                      - unit_qty
                payment_method:
                  type: string
                  description: ''
                  example: COD
                  enum:
                    - COD
                    - Stripe
                    - PayPal
                    - Safepay
                    - RazorPay
                comment:
                  type: string
                  description: 'Must be at least 3 characters. Must not be greater than 300 characters.'
                  example: mqeopfuudtdsufvyvddqa
                  nullable: true
              required:
                - tenant
                - first_name
                - last_name
                - email
                - type
                - phone
                - country_id
                - state_id
                - city_id
                - address
                - postal_code
                - items
                - payment_method
  '/api/v1/headless/get-order/{shop_id}/{id}':
    get:
      summary: 'Get Single Order (live Site and Dashboard)'
      operationId: getSingleOrderliveSiteAndDashboard
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    id: 1CLFMPLH
                    order_id: 1CLFMPLH
                    shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                    vendor_id: 736
                    customer:
                      id: 772
                      first_name: Aleezeh
                      last_name: Imran
                      type: guest
                      email: Alezehimran239@gmail.com
                      phone: '03248765098'
                      full_name: 'Aleezeh Imran'
                    address:
                      id: 1763
                      addressable_id: 772
                      addressable_type: Customer
                      first_name: ''
                      last_name: ''
                      phone: '03248765098'
                      country:
                        id: 170
                        name: Panama
                      state:
                        id: 3092
                        name: 'Guna Yala'
                      city:
                        id: 80901
                        name: Achutupo
                      address: 'Altamash road sialkoat'
                      type: null
                      default: 1
                      postal_code: '31411'
                    total_amount: '399.00'
                    paid_amount: '401.00'
                    currency_code: PKR
                    currency_icon: Rs
                    coupon_id: null
                    coupon_discount: '0.00'
                    tags: null
                    total_tax_amount: '0.00'
                    extra_charges: '0.00'
                    track_payment:
                      id: 369
                      customer_id: 772
                      order_id: 384
                      credit: '401.00'
                      debit: '0.00'
                      description: 'COD Order payment'
                      invoice_data: null
                      shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                    extra_charges_breakdown: []
                    delivery_charges: '2.00'
                    total_discount_amount: 0
                    delivery_duration: null
                    payment_method: COD
                    status: pending
                    description: 'COD Order payment'
                    details:
                      comment: null
                      shipping_zone_id: 147
                      shipping_duration: '1-2 working days'
                    datetime: '2026-01-30T14:44:34.000000Z'
                    order_items:
                      -
                        id: 450
                        order_id: 384
                        warehouse_ids: null
                        product_id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                        variant_id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                        unit_qty: 1
                        unit_price: '399.00'
                        extra_charges: null
                        discount_amount: '0.00'
                        tax_amount: []
                        product:
                          id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                          name: 'Solar Dashboard Ring Perfume (Variants)'
                          description: 'Solar powered rotating dashboard perfume with color variants'
                          tags:
                            - 'dashboard decor'
                            - 'solar perfume'
                          sku: PBTOLTMCO
                          attributes:
                            -
                              list:
                                - Gold
                                - Black
                              name: color
                              model: null
                              colorValue:
                                - Gold
                                - Black
                          images:
                            - 'https://static-01.daraz.pk/p/0974766e8e8e7b20788b6a1ab04c4e3f.jpg'
                          weight: 0
                          unit:
                            id: 2
                            name: g
                          variant:
                            id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                            name: Black
                            image: ''
                            sku: prd-ring-black
                            inherited_attributes: []
                            weight: '120.00'
                            inventory:
                              -
                                id: f2c7e7d5-9025-4e68-9b0c-1cdcb0fb0ef1
                                warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                                warehouse_name: 'Main Warehouse'
                                product_id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                                product_variant_id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                                stock_in: 45
                    order_activity_logs:
                      -
                        message: 'Order received'
                        event: created
                        properties:
                          attributes:
                            status: pending
                        created_by: null
                        author_name: 'Via online store'
                        created_at: '2026-01-30T14:44:34.000000Z'
                    shipment: null
                    payment_info: null
                    order_title: 'Order #1CLFMPLH is now Pending'
                    shipping_duration: 'Estimated delivery: 1-2 working days'
                  message: 'Get order summary successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: 1CLFMPLH
                      order_id:
                        type: string
                        example: 1CLFMPLH
                      shop_id:
                        type: string
                        example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                      vendor_id:
                        type: integer
                        example: 736
                      customer:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 772
                          first_name:
                            type: string
                            example: Aleezeh
                          last_name:
                            type: string
                            example: Imran
                          type:
                            type: string
                            example: guest
                          email:
                            type: string
                            example: Alezehimran239@gmail.com
                          phone:
                            type: string
                            example: '03248765098'
                          full_name:
                            type: string
                            example: 'Aleezeh Imran'
                      address:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 1763
                          addressable_id:
                            type: integer
                            example: 772
                          addressable_type:
                            type: string
                            example: Customer
                          first_name:
                            type: string
                            example: ''
                          last_name:
                            type: string
                            example: ''
                          phone:
                            type: string
                            example: '03248765098'
                          country:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 170
                              name:
                                type: string
                                example: Panama
                          state:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 3092
                              name:
                                type: string
                                example: 'Guna Yala'
                          city:
                            type: object
                            properties:
                              id:
                                type: integer
                                example: 80901
                              name:
                                type: string
                                example: Achutupo
                          address:
                            type: string
                            example: 'Altamash road sialkoat'
                          type:
                            type: string
                            example: null
                          default:
                            type: integer
                            example: 1
                          postal_code:
                            type: string
                            example: '31411'
                      total_amount:
                        type: string
                        example: '399.00'
                      paid_amount:
                        type: string
                        example: '401.00'
                      currency_code:
                        type: string
                        example: PKR
                      currency_icon:
                        type: string
                        example: Rs
                      coupon_id:
                        type: string
                        example: null
                      coupon_discount:
                        type: string
                        example: '0.00'
                      tags:
                        type: string
                        example: null
                      total_tax_amount:
                        type: string
                        example: '0.00'
                      extra_charges:
                        type: string
                        example: '0.00'
                      track_payment:
                        type: object
                        properties:
                          id:
                            type: integer
                            example: 369
                          customer_id:
                            type: integer
                            example: 772
                          order_id:
                            type: integer
                            example: 384
                          credit:
                            type: string
                            example: '401.00'
                          debit:
                            type: string
                            example: '0.00'
                          description:
                            type: string
                            example: 'COD Order payment'
                          invoice_data:
                            type: string
                            example: null
                          shop_id:
                            type: string
                            example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                      extra_charges_breakdown:
                        type: array
                        example: []
                      delivery_charges:
                        type: string
                        example: '2.00'
                      total_discount_amount:
                        type: integer
                        example: 0
                      delivery_duration:
                        type: string
                        example: null
                      payment_method:
                        type: string
                        example: COD
                      status:
                        type: string
                        example: pending
                      description:
                        type: string
                        example: 'COD Order payment'
                      details:
                        type: object
                        properties:
                          comment:
                            type: string
                            example: null
                          shipping_zone_id:
                            type: integer
                            example: 147
                          shipping_duration:
                            type: string
                            example: '1-2 working days'
                      datetime:
                        type: string
                        example: '2026-01-30T14:44:34.000000Z'
                      order_items:
                        type: array
                        example:
                          -
                            id: 450
                            order_id: 384
                            warehouse_ids: null
                            product_id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                            variant_id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                            unit_qty: 1
                            unit_price: '399.00'
                            extra_charges: null
                            discount_amount: '0.00'
                            tax_amount: []
                            product:
                              id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                              name: 'Solar Dashboard Ring Perfume (Variants)'
                              description: 'Solar powered rotating dashboard perfume with color variants'
                              tags:
                                - 'dashboard decor'
                                - 'solar perfume'
                              sku: PBTOLTMCO
                              attributes:
                                -
                                  list:
                                    - Gold
                                    - Black
                                  name: color
                                  model: null
                                  colorValue:
                                    - Gold
                                    - Black
                              images:
                                - 'https://static-01.daraz.pk/p/0974766e8e8e7b20788b6a1ab04c4e3f.jpg'
                              weight: 0
                              unit:
                                id: 2
                                name: g
                              variant:
                                id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                                name: Black
                                image: ''
                                sku: prd-ring-black
                                inherited_attributes: []
                                weight: '120.00'
                                inventory:
                                  -
                                    id: f2c7e7d5-9025-4e68-9b0c-1cdcb0fb0ef1
                                    warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                                    warehouse_name: 'Main Warehouse'
                                    product_id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                                    product_variant_id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                                    stock_in: 45
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 450
                            order_id:
                              type: integer
                              example: 384
                            warehouse_ids:
                              type: string
                              example: null
                            product_id:
                              type: string
                              example: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                            variant_id:
                              type: string
                              example: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                            unit_qty:
                              type: integer
                              example: 1
                            unit_price:
                              type: string
                              example: '399.00'
                            extra_charges:
                              type: string
                              example: null
                            discount_amount:
                              type: string
                              example: '0.00'
                            tax_amount:
                              type: array
                              example: []
                            product:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6
                                name:
                                  type: string
                                  example: 'Solar Dashboard Ring Perfume (Variants)'
                                description:
                                  type: string
                                  example: 'Solar powered rotating dashboard perfume with color variants'
                                tags:
                                  type: array
                                  example:
                                    - 'dashboard decor'
                                    - 'solar perfume'
                                  items:
                                    type: string
                                sku:
                                  type: string
                                  example: PBTOLTMCO
                                attributes:
                                  type: array
                                  example:
                                    -
                                      list: [Gold, Black]
                                      name: color
                                      model: null
                                      colorValue: [Gold, Black]
                                  items:
                                    type: object
                                    properties:
                                      list: { type: array, example: [Gold, Black], items: { type: string } }
                                      name: { type: string, example: color }
                                      model: { type: string, example: null }
                                      colorValue: { type: array, example: [Gold, Black], items: { type: string } }
                                images:
                                  type: array
                                  example:
                                    - 'https://static-01.daraz.pk/p/0974766e8e8e7b20788b6a1ab04c4e3f.jpg'
                                  items:
                                    type: string
                                weight:
                                  type: integer
                                  example: 0
                                unit:
                                  type: object
                                  properties:
                                    id:
                                      type: integer
                                      example: 2
                                    name:
                                      type: string
                                      example: g
                                variant:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: 492eded7-4b42-4b96-8c6b-3f93fc2b7382
                                    name:
                                      type: string
                                      example: Black
                                    image:
                                      type: string
                                      example: ''
                                    sku:
                                      type: string
                                      example: prd-ring-black
                                    inherited_attributes:
                                      type: array
                                      example: []
                                    weight:
                                      type: string
                                      example: '120.00'
                                    inventory:
                                      type: array
                                      example: [{ id: f2c7e7d5-9025-4e68-9b0c-1cdcb0fb0ef1, warehouse_id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d, warehouse_name: 'Main Warehouse', product_id: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6, product_variant_id: 492eded7-4b42-4b96-8c6b-3f93fc2b7382, stock_in: 45 }]
                                      items: { type: object, properties: { id: { type: string, example: f2c7e7d5-9025-4e68-9b0c-1cdcb0fb0ef1 }, warehouse_id: { type: string, example: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d }, warehouse_name: { type: string, example: 'Main Warehouse' }, product_id: { type: string, example: 5c6d8ad0-10ad-4cb7-9d5c-fb1a5ba8aba6 }, product_variant_id: { type: string, example: 492eded7-4b42-4b96-8c6b-3f93fc2b7382 }, stock_in: { type: integer, example: 45 } } }
                      order_activity_logs:
                        type: array
                        example:
                          -
                            message: 'Order received'
                            event: created
                            properties:
                              attributes:
                                status: pending
                            created_by: null
                            author_name: 'Via online store'
                            created_at: '2026-01-30T14:44:34.000000Z'
                        items:
                          type: object
                          properties:
                            message:
                              type: string
                              example: 'Order received'
                            event:
                              type: string
                              example: created
                            properties:
                              type: object
                              properties:
                                attributes:
                                  type: object
                                  properties:
                                    status:
                                      type: string
                                      example: pending
                            created_by:
                              type: string
                              example: null
                            author_name:
                              type: string
                              example: 'Via online store'
                            created_at:
                              type: string
                              example: '2026-01-30T14:44:34.000000Z'
                      shipment:
                        type: string
                        example: null
                      payment_info:
                        type: string
                        example: null
                      order_title:
                        type: string
                        example: 'Order #1CLFMPLH is now Pending'
                      shipping_duration:
                        type: string
                        example: 'Estimated delivery: 1-2 working days'
                  message:
                    type: string
                    example: 'Get order summary successfully.'
      tags:
        - Order
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: id
        description: 'The ID of the {shop id}.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-all-shop-orders/{shop_id}':
    get:
      summary: 'Get All Shop Orders (Dashboard)'
      operationId: getAllShopOrdersDashboard
      description: ''
      parameters:
        -
          in: query
          name: status
          description: 'Filter orders by status.'
          example: 'pending Allowed: pending, rejected, accepted, shipped, delivered, cancelled, returned'
          required: false
          schema:
            type: string
            description: 'Filter orders by status.'
            example: 'pending Allowed: pending, rejected, accepted, shipped, delivered, cancelled, returned'
        -
          in: query
          name: 'payment_method[]'
          description: 'Filter orders by payment method(s) (can be used multiple times).'
          example: credit_card
          required: false
          schema:
            type: string
            description: 'Filter orders by payment method(s) (can be used multiple times).'
            example: credit_card
        -
          in: query
          name: paid_amount
          description: 'Filter orders by paid amount.'
          example: '100.00'
          required: false
          schema:
            type: string
            description: 'Filter orders by paid amount.'
            example: '100.00'
        -
          in: query
          name: paid_amount_operator
          description: 'Operator for paid amount filter.'
          example: '>= Allowed: =, <, <=, >, >= Default: <='
          required: false
          schema:
            type: string
            description: 'Operator for paid amount filter.'
            example: '>= Allowed: =, <, <=, >, >= Default: <='
        -
          in: query
          name: search
          description: 'Search by order_id, customer phone or customer name.'
          example: '12345'
          required: false
          schema:
            type: string
            description: 'Search by order_id, customer phone or customer name.'
            example: '12345'
        -
          in: query
          name: order_items_count
          description: 'Filter orders by number of order items.'
          example: 5
          required: false
          schema:
            type: integer
            description: 'Filter orders by number of order items.'
            example: 5
        -
          in: query
          name: order_items_count_operator
          description: 'Operator for order items count filter.'
          example: 0
          required: false
          schema:
            type: integer
            description: 'Operator for order items count filter.'
            example: 0
        -
          in: query
          name: 'tags[]'
          description: 'Filter orders by tags (can be used multiple times).'
          example: urgent
          required: false
          schema:
            type: string
            description: 'Filter orders by tags (can be used multiple times).'
            example: urgent
        -
          in: query
          name: start_date
          description: 'Start date for date range filter (Y-m-d).'
          example: '2023-01-01'
          required: false
          schema:
            type: string
            description: 'Start date for date range filter (Y-m-d).'
            example: '2023-01-01'
        -
          in: query
          name: end_date
          description: 'End date for date range filter (Y-m-d).'
          example: '2023-12-31'
          required: false
          schema:
            type: string
            description: 'End date for date range filter (Y-m-d).'
            example: '2023-12-31'
        -
          in: query
          name: 'sort_by[]'
          description: 'Fields to sort by (can be used multiple times). If not provided, default sort is by created_at and updated_at.'
          example: 'total_order_amount Allowed: created_at, updated_at, total_order_amount'
          required: false
          schema:
            type: string
            description: 'Fields to sort by (can be used multiple times). If not provided, default sort is by created_at and updated_at.'
            example: 'total_order_amount Allowed: created_at, updated_at, total_order_amount'
        -
          in: query
          name: 'sort_direction[]'
          description: 'Sort direction for each sort_by field (can be used multiple times).'
          example: 'desc Allowed: asc, desc'
          required: false
          schema:
            type: string
            description: 'Sort direction for each sort_by field (can be used multiple times).'
            example: 'desc Allowed: asc, desc'
        -
          in: query
          name: per_page
          description: 'Number of items per page.'
          example: 20
          required: false
          schema:
            type: integer
            description: 'Number of items per page.'
            example: 20
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    data:
                      -
                        id: 384
                        order_id: 1CLFMPLH
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        vendor_id: 736
                        customer:
                          id: 772
                          full_name: 'Aleezeh Imran'
                        total_amount: '399.00'
                        order_items_count: 1
                        payment_method: COD
                        currency_code: PKR
                        currency_icon: Rs
                        status: pending
                        total_order_amount: '401.00'
                        coupon_discount: '0.00'
                        created_at: '2026-01-30T14:44:34Z'
                        updated_at: '2026-01-30T14:44:34Z'
                      -
                        id: 383
                        order_id: 15HWB2RH
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        vendor_id: 736
                        customer:
                          id: 773
                          full_name: 'Adil Aslam'
                        total_amount: '390.00'
                        order_items_count: 1
                        payment_method: COD
                        currency_code: PKR
                        currency_icon: Rs
                        status: pending
                        total_order_amount: '392.00'
                        coupon_discount: '0.00'
                        created_at: '2026-01-29T11:23:54Z'
                        updated_at: '2026-01-29T11:23:54Z'
                      -
                        id: 382
                        order_id: 1OG4E5NQ
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        vendor_id: 736
                        customer:
                          id: 772
                          full_name: 'Aleezeh Imran'
                        total_amount: '390.00'
                        order_items_count: 1
                        payment_method: COD
                        currency_code: PKR
                        currency_icon: Rs
                        status: pending
                        total_order_amount: '392.00'
                        coupon_discount: '0.00'
                        created_at: '2026-01-29T11:09:18Z'
                        updated_at: '2026-01-29T11:09:18Z'
                      -
                        id: 381
                        order_id: 1NKCV0E5
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        vendor_id: 736
                        customer:
                          id: 771
                          full_name: 'Asma Sheij'
                        total_amount: '390.00'
                        order_items_count: 1
                        payment_method: COD
                        currency_code: PKR
                        currency_icon: Rs
                        status: pending
                        total_order_amount: '392.00'
                        coupon_discount: '0.00'
                        created_at: '2026-01-29T09:21:43Z'
                        updated_at: '2026-01-29T09:21:43Z'
                      -
                        id: 377
                        order_id: PW1YJVEA
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        vendor_id: 736
                        customer:
                          id: 767
                          full_name: 'Mubeen Moosani'
                        total_amount: '14200.00'
                        order_items_count: 1
                        payment_method: COD
                        currency_code: PKR
                        currency_icon: Rs
                        status: pending
                        total_order_amount: '14202.00'
                        coupon_discount: '0.00'
                        created_at: '2026-01-28T14:39:58Z'
                        updated_at: '2026-01-28T14:39:58Z'
                      -
                        id: 376
                        order_id: 2Q9QDJB3
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        vendor_id: 736
                        customer:
                          id: 766
                          full_name: 'Karam 3123123'
                        total_amount: '1998.00'
                        order_items_count: 1
                        payment_method: COD
                        currency_code: PKR
                        currency_icon: Rs
                        status: pending
                        total_order_amount: '2000.00'
                        coupon_discount: '0.00'
                        created_at: '2026-01-28T14:16:30Z'
                        updated_at: '2026-01-28T14:16:30Z'
                      -
                        id: 375
                        order_id: 1V5MM5V1
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        vendor_id: 736
                        customer:
                          id: 765
                          full_name: 'Adil Aslam'
                        total_amount: '699.00'
                        order_items_count: 1
                        payment_method: COD
                        currency_code: PKR
                        currency_icon: Rs
                        status: pending
                        total_order_amount: '699.00'
                        coupon_discount: '0.00'
                        created_at: '2026-01-28T11:07:05Z'
                        updated_at: '2026-01-28T11:07:05Z'
                    links:
                      first: 'api.orderain?page=1'
                      last: 'api.orderain?page=1'
                      prev: null
                      next: null
                    meta:
                      current_page: 1
                      from: 1
                      last_page: 1
                      per_page: 10
                      to: 7
                      total: 7
                  message: 'Orders paginated list.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      data:
                        type: array
                        example:
                          -
                            id: 384
                            order_id: 1CLFMPLH
                            shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            vendor_id: 736
                            customer:
                              id: 772
                              full_name: 'Aleezeh Imran'
                            total_amount: '399.00'
                            order_items_count: 1
                            payment_method: COD
                            currency_code: PKR
                            currency_icon: Rs
                            status: pending
                            total_order_amount: '401.00'
                            coupon_discount: '0.00'
                            created_at: '2026-01-30T14:44:34Z'
                            updated_at: '2026-01-30T14:44:34Z'
                          -
                            id: 383
                            order_id: 15HWB2RH
                            shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            vendor_id: 736
                            customer:
                              id: 773
                              full_name: 'Adil Aslam'
                            total_amount: '390.00'
                            order_items_count: 1
                            payment_method: COD
                            currency_code: PKR
                            currency_icon: Rs
                            status: pending
                            total_order_amount: '392.00'
                            coupon_discount: '0.00'
                            created_at: '2026-01-29T11:23:54Z'
                            updated_at: '2026-01-29T11:23:54Z'
                          -
                            id: 382
                            order_id: 1OG4E5NQ
                            shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            vendor_id: 736
                            customer:
                              id: 772
                              full_name: 'Aleezeh Imran'
                            total_amount: '390.00'
                            order_items_count: 1
                            payment_method: COD
                            currency_code: PKR
                            currency_icon: Rs
                            status: pending
                            total_order_amount: '392.00'
                            coupon_discount: '0.00'
                            created_at: '2026-01-29T11:09:18Z'
                            updated_at: '2026-01-29T11:09:18Z'
                          -
                            id: 381
                            order_id: 1NKCV0E5
                            shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            vendor_id: 736
                            customer:
                              id: 771
                              full_name: 'Asma Sheij'
                            total_amount: '390.00'
                            order_items_count: 1
                            payment_method: COD
                            currency_code: PKR
                            currency_icon: Rs
                            status: pending
                            total_order_amount: '392.00'
                            coupon_discount: '0.00'
                            created_at: '2026-01-29T09:21:43Z'
                            updated_at: '2026-01-29T09:21:43Z'
                          -
                            id: 377
                            order_id: PW1YJVEA
                            shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            vendor_id: 736
                            customer:
                              id: 767
                              full_name: 'Mubeen Moosani'
                            total_amount: '14200.00'
                            order_items_count: 1
                            payment_method: COD
                            currency_code: PKR
                            currency_icon: Rs
                            status: pending
                            total_order_amount: '14202.00'
                            coupon_discount: '0.00'
                            created_at: '2026-01-28T14:39:58Z'
                            updated_at: '2026-01-28T14:39:58Z'
                          -
                            id: 376
                            order_id: 2Q9QDJB3
                            shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            vendor_id: 736
                            customer:
                              id: 766
                              full_name: 'Karam 3123123'
                            total_amount: '1998.00'
                            order_items_count: 1
                            payment_method: COD
                            currency_code: PKR
                            currency_icon: Rs
                            status: pending
                            total_order_amount: '2000.00'
                            coupon_discount: '0.00'
                            created_at: '2026-01-28T14:16:30Z'
                            updated_at: '2026-01-28T14:16:30Z'
                          -
                            id: 375
                            order_id: 1V5MM5V1
                            shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            vendor_id: 736
                            customer:
                              id: 765
                              full_name: 'Adil Aslam'
                            total_amount: '699.00'
                            order_items_count: 1
                            payment_method: COD
                            currency_code: PKR
                            currency_icon: Rs
                            status: pending
                            total_order_amount: '699.00'
                            coupon_discount: '0.00'
                            created_at: '2026-01-28T11:07:05Z'
                            updated_at: '2026-01-28T11:07:05Z'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 384
                            order_id:
                              type: string
                              example: 1CLFMPLH
                            shop_id:
                              type: string
                              example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            vendor_id:
                              type: integer
                              example: 736
                            customer:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  example: 772
                                full_name:
                                  type: string
                                  example: 'Aleezeh Imran'
                            total_amount:
                              type: string
                              example: '399.00'
                            order_items_count:
                              type: integer
                              example: 1
                            payment_method:
                              type: string
                              example: COD
                            currency_code:
                              type: string
                              example: PKR
                            currency_icon:
                              type: string
                              example: Rs
                            status:
                              type: string
                              example: pending
                            total_order_amount:
                              type: string
                              example: '401.00'
                            coupon_discount:
                              type: string
                              example: '0.00'
                            created_at:
                              type: string
                              example: '2026-01-30T14:44:34Z'
                            updated_at:
                              type: string
                              example: '2026-01-30T14:44:34Z'
                      links:
                        type: object
                        properties:
                          first:
                            type: string
                            example: 'api.orderain?page=1'
                          last:
                            type: string
                            example: 'api.orderain?page=1'
                          prev:
                            type: string
                            example: null
                          next:
                            type: string
                            example: null
                      meta:
                        type: object
                        properties:
                          current_page:
                            type: integer
                            example: 1
                          from:
                            type: integer
                            example: 1
                          last_page:
                            type: integer
                            example: 1
                          per_page:
                            type: integer
                            example: 10
                          to:
                            type: integer
                            example: 7
                          total:
                            type: integer
                            example: 7
                  message:
                    type: string
                    example: 'Orders paginated list.'
      tags:
        - Order
    parameters:
      -
        in: path
        name: shop_id
        description: 'ID of the shop.'
        example: '1'
        required: true
        schema:
          type: string
  '/api/v1/headless/update-order-status/{shop_id}/{id}':
    post:
      summary: 'Update Order Status'
      operationId: updateOrderStatus
      description: "Updates the status of an order and manages inventory allocation.\nWhen accepting an order, you must specify which warehouses will fulfill each order item.\n\n**Multi-Warehouse Fulfillment:**\nYou can provide multiple warehouse IDs per order item to enable automatic fallback fulfillment.\nThe system deducts inventory sequentially from the warehouses in the order provided.\n\nExample: If an order item needs 100 units and warehouse_ids = [10, 15, 20]:\n- Warehouse 10 has 40 units → Takes 40, needs 60 more\n- Warehouse 15 has 35 units → Takes 35, needs 25 more\n- Warehouse 20 has 50 units → Takes 25, done!\n\nThis allows products to be fulfilled from multiple locations when stock is distributed across warehouses."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  message: 'Order has been updated successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  message:
                    type: string
                    example: 'Order has been updated successfully.'
      tags:
        - Order
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  description: 'The new order status. Must be one of: accepted, rejected, shipped, delivered, cancelled, returned.'
                  example: accepted
                order_items:
                  type: array
                  description: 'when status is "accepted". Array of order items with warehouse assignments. Each item must include the order item ID and an array of warehouse IDs to fulfill from.'
                  example:
                    -
                      id: 1
                      warehouse_ids:
                        - 10
                        - 15
                  items:
                    type: string
                description:
                  type: string
                  description: 'when status is "rejected", "cancelled", or "returned". Reason for the status change.'
                  example: 'Customer requested cancellation'
                tracking_id:
                  type: string
                  description: 'when status is "shipped". Shipment tracking number from the courier.'
                  example: TRACK123456789
                courier_name:
                  type: string
                  description: 'when status is "shipped". Name of the courier/shipping company.'
                  example: FedEx
                contact_no:
                  type: string
                  description: 'when status is "shipped". Contact number for delivery inquiries.'
                  example: '+1234567890'
              required:
                - status
                - order_items
                - description
                - tracking_id
                - courier_name
                - contact_no
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: id
        description: 'The ID of the {shop id}.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-order-activity-logs/{shop_id}/{id}':
    get:
      summary: 'Get Order Activity logs'
      operationId: getOrderActivityLogs
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    -
                      message: 'Order received'
                      event: created
                      properties:
                        attributes:
                          status: pending
                      created_by: null
                      author_name: 'Via online store'
                      created_at: '2026-01-30T14:44:34.000000Z'
                  message: 'Order activity logs.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: array
                    example:
                      -
                        message: 'Order received'
                        event: created
                        properties:
                          attributes:
                            status: pending
                        created_by: null
                        author_name: 'Via online store'
                        created_at: '2026-01-30T14:44:34.000000Z'
                    items:
                      type: object
                      properties:
                        message:
                          type: string
                          example: 'Order received'
                        event:
                          type: string
                          example: created
                        properties:
                          type: object
                          properties:
                            attributes:
                              type: object
                              properties:
                                status:
                                  type: string
                                  example: pending
                        created_by:
                          type: string
                          example: null
                        author_name:
                          type: string
                          example: 'Via online store'
                        created_at:
                          type: string
                          example: '2026-01-30T14:44:34.000000Z'
                  message:
                    type: string
                    example: 'Order activity logs.'
      tags:
        - Order
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: id
        description: 'The ID of the {shop id}.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-shop-tags/{shop_id}':
    get:
      summary: 'Get all shop tags'
      operationId: getAllShopTags
      description: 'These tags can be retrieved by shop_id'
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    current_page: 1
                    data:
                      -
                        id: 86
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        name: 'Hot Deals'
                        description: 'January Hot Deals Till 29 Jan'
                        association_type: Product
                        association_ids:
                          - 89d01a70-a73d-49cb-84ac-770f727a8610
                          - 88114e85-2871-4dac-b25e-138780c3c8b0
                          - 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                        associated_items:
                          data:
                            -
                              id: 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                              name: 'HTC-1 Digital Thermometer Hygrometer – Set 5'
                              sku: P20B87LQD
                              quantity: 49
                              price: '699.00'
                              currency_code: PKR
                              inventory:
                                -
                                  warehouse_name: 'Main Warehouse'
                                  stock_in: 50
                              images:
                                - 'https://static-01.daraz.pk/p/18ea4e5c07474259223f6a6f0d27c4ea.jpg'
                            -
                              id: 243fe596-3b4a-454e-9d42-5af7a7acaca7
                              name: 'Car LED Sensor Switch – Set 1'
                              sku: P32PU319T
                              quantity: 58
                              price: '999.00'
                              currency_code: PKR
                              inventory:
                                -
                                  warehouse_name: 'Main Warehouse'
                                  stock_in: 60
                              images:
                                - 'https://static-01.daraz.pk/p/de442380e8f8f4a15ce223d48a2357ff.jpg'
                            -
                              id: 265ce016-61d8-4466-84b6-40a4c9c9941b
                              name: 'Car Android Touch Panel 10 Inch – Set 3'
                              sku: P2WPCUO7Q
                              quantity: 14
                              price: '14200.00'
                              currency_code: PKR
                              inventory:
                                -
                                  warehouse_name: 'Main Warehouse'
                                  stock_in: 15
                              images:
                                - 'https://pk-live-21.slatic.net/kf/Sbbcaf588d9384344a3eb3b1e96f35dce6.jpg'
                    first_page_url: 'api.orderain?page=1'
                    last_page_url: 'api.orderain?page=1'
                    links:
                      -
                        url: null
                        label: '&laquo; Previous'
                        active: false
                      -
                        url: 'api.orderain?page=1'
                        label: '1'
                        active: true
                      -
                        url: null
                        label: 'Next &raquo;'
                        active: false
                    next_page_url: null
                    prev_page_url: null
                    per_page: 10
                    total: 2
                    from: 1
                    to: 2
                  message: 'Tags retrieved successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      data:
                        type: array
                        example:
                          -
                            id: 86
                            shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            name: 'Hot Deals'
                            description: 'January Hot Deals Till 29 Jan'
                            association_type: Product
                            association_ids:
                              - 89d01a70-a73d-49cb-84ac-770f727a8610
                              - 88114e85-2871-4dac-b25e-138780c3c8b0
                              - 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                            associated_items:
                              data:
                                -
                                  id: 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                                  name: 'HTC-1 Digital Thermometer Hygrometer – Set 5'
                                  sku: P20B87LQD
                                  quantity: 49
                                  price: '699.00'
                                  currency_code: PKR
                                  inventory:
                                    -
                                      warehouse_name: 'Main Warehouse'
                                      stock_in: 50
                                  images:
                                    - 'https://static-01.daraz.pk/p/18ea4e5c07474259223f6a6f0d27c4ea.jpg'
                                -
                                  id: 243fe596-3b4a-454e-9d42-5af7a7acaca7
                                  name: 'Car LED Sensor Switch – Set 1'
                                  sku: P32PU319T
                                  quantity: 58
                                  price: '999.00'
                                  currency_code: PKR
                                  inventory:
                                    -
                                      warehouse_name: 'Main Warehouse'
                                      stock_in: 60
                                  images:
                                    - 'https://static-01.daraz.pk/p/de442380e8f8f4a15ce223d48a2357ff.jpg'
                                -
                                  id: 265ce016-61d8-4466-84b6-40a4c9c9941b
                                  name: 'Car Android Touch Panel 10 Inch – Set 3'
                                  sku: P2WPCUO7Q
                                  quantity: 14
                                  price: '14200.00'
                                  currency_code: PKR
                                  inventory:
                                    -
                                      warehouse_name: 'Main Warehouse'
                                      stock_in: 15
                                  images:
                                    - 'https://pk-live-21.slatic.net/kf/Sbbcaf588d9384344a3eb3b1e96f35dce6.jpg'
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              example: 86
                            shop_id:
                              type: string
                              example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            name:
                              type: string
                              example: 'Hot Deals'
                            description:
                              type: string
                              example: 'January Hot Deals Till 29 Jan'
                            association_type:
                              type: string
                              example: Product
                            association_ids:
                              type: array
                              example:
                                - 89d01a70-a73d-49cb-84ac-770f727a8610
                                - 88114e85-2871-4dac-b25e-138780c3c8b0
                                - 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                              items:
                                type: string
                            associated_items:
                              type: object
                              properties:
                                data:
                                  type: array
                                  example:
                                    -
                                      id: 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                                      name: 'HTC-1 Digital Thermometer Hygrometer – Set 5'
                                      sku: P20B87LQD
                                      quantity: 49
                                      price: '699.00'
                                      currency_code: PKR
                                      inventory: [{ warehouse_name: 'Main Warehouse', stock_in: 50 }]
                                      images: ['https://static-01.daraz.pk/p/18ea4e5c07474259223f6a6f0d27c4ea.jpg']
                                    -
                                      id: 243fe596-3b4a-454e-9d42-5af7a7acaca7
                                      name: 'Car LED Sensor Switch – Set 1'
                                      sku: P32PU319T
                                      quantity: 58
                                      price: '999.00'
                                      currency_code: PKR
                                      inventory: [{ warehouse_name: 'Main Warehouse', stock_in: 60 }]
                                      images: ['https://static-01.daraz.pk/p/de442380e8f8f4a15ce223d48a2357ff.jpg']
                                    -
                                      id: 265ce016-61d8-4466-84b6-40a4c9c9941b
                                      name: 'Car Android Touch Panel 10 Inch – Set 3'
                                      sku: P2WPCUO7Q
                                      quantity: 14
                                      price: '14200.00'
                                      currency_code: PKR
                                      inventory: [{ warehouse_name: 'Main Warehouse', stock_in: 15 }]
                                      images: ['https://pk-live-21.slatic.net/kf/Sbbcaf588d9384344a3eb3b1e96f35dce6.jpg']
                                  items:
                                    type: object
                                    properties:
                                      id: { type: string, example: 09f28ab0-ece8-419c-a88f-8f3c0213ca2f }
                                      name: { type: string, example: 'HTC-1 Digital Thermometer Hygrometer – Set 5' }
                                      sku: { type: string, example: P20B87LQD }
                                      quantity: { type: integer, example: 49 }
                                      price: { type: string, example: '699.00' }
                                      currency_code: { type: string, example: PKR }
                                      inventory: { type: array, example: [{ warehouse_name: 'Main Warehouse', stock_in: 50 }], items: { type: object, properties: { warehouse_name: { type: string, example: 'Main Warehouse' }, stock_in: { type: integer, example: 50 } } } }
                                      images: { type: array, example: ['https://static-01.daraz.pk/p/18ea4e5c07474259223f6a6f0d27c4ea.jpg'], items: { type: string } }
                      first_page_url:
                        type: string
                        example: 'api.orderain?page=1'
                      last_page_url:
                        type: string
                        example: 'api.orderain?page=1'
                      links:
                        type: array
                        example:
                          -
                            url: null
                            label: '&laquo; Previous'
                            active: false
                          -
                            url: 'api.orderain?page=1'
                            label: '1'
                            active: true
                          -
                            url: null
                            label: 'Next &raquo;'
                            active: false
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                              example: null
                            label:
                              type: string
                              example: '&laquo; Previous'
                            active:
                              type: boolean
                              example: false
                      next_page_url:
                        type: string
                        example: null
                      prev_page_url:
                        type: string
                        example: null
                      per_page:
                        type: integer
                        example: 10
                      total:
                        type: integer
                        example: 2
                      from:
                        type: integer
                        example: 1
                      to:
                        type: integer
                        example: 2
                  message:
                    type: string
                    example: 'Tags retrieved successfully.'
      tags:
        - 'Shop Tags'
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-shop-tag/{shop_id}/{id}':
    get:
      summary: 'Get a single shop tag (live Site and dashboard)'
      operationId: getASingleShopTagliveSiteAndDashboard
      description: "These tags can be retrieved using either their numeric ID or their unique name slug.\n\nUse Case:\n\nThis endpoint is intended to support storefront features such as displaying\nTop Products or Top Categories based on assigned tags."
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    id: 86
                    shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                    name: 'Hot Deals'
                    description: 'January Hot Deals Till 29 Jan'
                    association_type: Product
                    association_ids:
                      - 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                      - 243fe596-3b4a-454e-9d42-5af7a7acaca7
                      - 265ce016-61d8-4466-84b6-40a4c9c9941b
                    created_at: '2026-01-22T11:33:21.000000Z'
                    updated_at: '2026-01-29T11:21:53.000000Z'
                    associated_items:
                      data:
                        -
                          id: 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                          name: 'HTC-1 Digital Thermometer Hygrometer – Set 5'
                          description: 'LCD Digital Temperature & Humidity Meter'
                          price: '699.00'
                          currency_code: PKR
                          quantity: 49
                          images:
                            - 'https://static-01.daraz.pk/p/18ea4e5c07474259223f6a6f0d27c4ea.jpg'
                        -
                          id: 243fe596-3b4a-454e-9d42-5af7a7acaca7
                          name: 'Car LED Sensor Switch – Set 1'
                          description: 'Car LED Sensor Switch Button'
                          price: '999.00'
                          currency_code: PKR
                          quantity: 58
                          images:
                            - 'https://static-01.daraz.pk/p/de442380e8f8f4a15ce223d48a2357ff.jpg'
                        -
                          id: 265ce016-61d8-4466-84b6-40a4c9c9941b
                          name: 'Car Android Touch Panel 10 Inch – Set 3'
                          description: '10 Inch Android Touch Screen Car Panel'
                          price: '14200.00'
                          currency_code: PKR
                          quantity: 14
                          images:
                            - 'https://pk-live-21.slatic.net/kf/Sbbcaf588d9384344a3eb3b1e96f35dce6.jpg'
                  message: 'Get shop tag successfully.'
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        example: 86
                      shop_id:
                        type: string
                        example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                      name:
                        type: string
                        example: 'Hot Deals'
                      description:
                        type: string
                        example: 'January Hot Deals Till 29 Jan'
                      association_type:
                        type: string
                        example: Product
                      association_ids:
                        type: array
                        example:
                          - 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                          - 243fe596-3b4a-454e-9d42-5af7a7acaca7
                          - 265ce016-61d8-4466-84b6-40a4c9c9941b
                        items:
                          type: string
                      created_at:
                        type: string
                        example: '2026-01-22T11:33:21.000000Z'
                      updated_at:
                        type: string
                        example: '2026-01-29T11:21:53.000000Z'
                      associated_items:
                        type: object
                        properties:
                          data:
                            type: array
                            example:
                              -
                                id: 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                                name: 'HTC-1 Digital Thermometer Hygrometer – Set 5'
                                description: 'LCD Digital Temperature & Humidity Meter'
                                price: '699.00'
                                currency_code: PKR
                                quantity: 49
                                images:
                                  - 'https://static-01.daraz.pk/p/18ea4e5c07474259223f6a6f0d27c4ea.jpg'
                              -
                                id: 243fe596-3b4a-454e-9d42-5af7a7acaca7
                                name: 'Car LED Sensor Switch – Set 1'
                                description: 'Car LED Sensor Switch Button'
                                price: '999.00'
                                currency_code: PKR
                                quantity: 58
                                images:
                                  - 'https://static-01.daraz.pk/p/de442380e8f8f4a15ce223d48a2357ff.jpg'
                              -
                                id: 265ce016-61d8-4466-84b6-40a4c9c9941b
                                name: 'Car Android Touch Panel 10 Inch – Set 3'
                                description: '10 Inch Android Touch Screen Car Panel'
                                price: '14200.00'
                                currency_code: PKR
                                quantity: 14
                                images:
                                  - 'https://pk-live-21.slatic.net/kf/Sbbcaf588d9384344a3eb3b1e96f35dce6.jpg'
                            items:
                              type: object
                              properties:
                                id:
                                  type: string
                                  example: 09f28ab0-ece8-419c-a88f-8f3c0213ca2f
                                name:
                                  type: string
                                  example: 'HTC-1 Digital Thermometer Hygrometer – Set 5'
                                description:
                                  type: string
                                  example: 'LCD Digital Temperature & Humidity Meter'
                                price:
                                  type: string
                                  example: '699.00'
                                currency_code:
                                  type: string
                                  example: PKR
                                quantity:
                                  type: integer
                                  example: 49
                                images:
                                  type: array
                                  example:
                                    - 'https://static-01.daraz.pk/p/18ea4e5c07474259223f6a6f0d27c4ea.jpg'
                                  items:
                                    type: string
                  message:
                    type: string
                    example: 'Get shop tag successfully.'
      tags:
        - 'Shop Tags'
      security: []
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: id
        description: 'The ID of the {shop id}.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-shop-warehouse/{shop_id}/{id}':
    get:
      summary: 'Get shop warehouse'
      operationId: getShopWarehouse
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                  shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                  name: 'Main Warehouse'
                  type: primary
                  inventory:
                    -
                      product_id: b8691019-c9f6-4656-9df9-e10c97f41be6
                      variant_id: null
                      stock: 60
                    -
                      product_id: c16f88da-5c50-4b81-81f8-be9c62623778
                      variant_id: aaf04d57-9f3c-43e5-9937-8c4f9e081cd5
                      stock: 20
                    -
                      product_id: a3e76e01-b333-485b-b835-ce6e67e97ddb
                      variant_id: null
                      stock: 25
                    -
                      product_id: 18cc3636-0f98-4ef8-960d-28a779cd75ca
                      variant_id: null
                      stock: 15
                    -
                      product_id: 993cd74d-c478-449e-9ecb-98595e08b997
                      variant_id: 18a4f513-bbd2-4ca9-8e0c-a181f0b70fce
                      stock: 25
                    -
                      product_id: 89d01a70-a73d-49cb-84ac-770f727a8610
                      variant_id: null
                      stock: 25
                    -
                      product_id: 81bcef1b-4870-4589-83b6-0cc15569f2d5
                      variant_id: null
                      stock: 40
                properties:
                  id:
                    type: string
                    example: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                  shop_id:
                    type: string
                    example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                  name:
                    type: string
                    example: 'Main Warehouse'
                  type:
                    type: string
                    example: primary
                  inventory:
                    type: array
                    example:
                      -
                        product_id: b8691019-c9f6-4656-9df9-e10c97f41be6
                        variant_id: null
                        stock: 60
                      -
                        product_id: c16f88da-5c50-4b81-81f8-be9c62623778
                        variant_id: aaf04d57-9f3c-43e5-9937-8c4f9e081cd5
                        stock: 20
                      -
                        product_id: a3e76e01-b333-485b-b835-ce6e67e97ddb
                        variant_id: null
                        stock: 25
                      -
                        product_id: 18cc3636-0f98-4ef8-960d-28a779cd75ca
                        variant_id: null
                        stock: 15
                      -
                        product_id: 993cd74d-c478-449e-9ecb-98595e08b997
                        variant_id: 18a4f513-bbd2-4ca9-8e0c-a181f0b70fce
                        stock: 25
                      -
                        product_id: 89d01a70-a73d-49cb-84ac-770f727a8610
                        variant_id: null
                        stock: 25
                      -
                        product_id: 81bcef1b-4870-4589-83b6-0cc15569f2d5
                        variant_id: null
                        stock: 40
                    items:
                      type: object
                      properties:
                        product_id:
                          type: string
                          example: b8691019-c9f6-4656-9df9-e10c97f41be6
                        variant_id:
                          type: string
                          example: null
                        stock:
                          type: integer
                          example: 60
      tags:
        - 'Shop Warehouse'
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
      -
        in: path
        name: id
        description: 'The ID of the {shop id}.'
        example: consequatur
        required: true
        schema:
          type: string
  '/api/v1/headless/get-all-shop-warehouses/{shop_id}':
    get:
      summary: 'Get all Warehouses of a Shop'
      operationId: getAllWarehousesOfAShop
      description: ''
      parameters: []
      responses:
        200:
          description: ''
          content:
            application/json:
              schema:
                type: object
                example:
                  status: success
                  data:
                    current_page: 1
                    data:
                      -
                        id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                        shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                        state_id: 1
                        country_id: 1
                        city_id: 1
                        name: 'Main Warehouse'
                        type: primary
                        contact_person_name: 'Default Contact'
                        contact_no: '1234567890'
                        address: 'Default warehouse address'
                        zip_code: 0
                        deleted_at: null
                        inventory:
                          -
                            id: 0132d30c-5ad6-4a37-8f83-8dab719edf1f
                            product_id: b8691019-c9f6-4656-9df9-e10c97f41be6
                            stock_in: 60
                            order_count: 0
                          -
                            id: 0499288f-1f09-4d53-b1da-b79796e25d83
                            product_id: c16f88da-5c50-4b81-81f8-be9c62623778
                            product_variant_id: aaf04d57-9f3c-43e5-9937-8c4f9e081cd5
                            stock_in: 20
                            order_count: 0
                          -
                            id: 095d114d-ab45-4283-8d1e-058c190b9eed
                            product_id: a3e76e01-b333-485b-b835-ce6e67e97ddb
                            stock_in: 25
                            order_count: 0
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        example: 1
                      data:
                        type: array
                        example:
                          -
                            id: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                            shop_id: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            state_id: 1
                            country_id: 1
                            city_id: 1
                            name: 'Main Warehouse'
                            type: primary
                            contact_person_name: 'Default Contact'
                            contact_no: '1234567890'
                            address: 'Default warehouse address'
                            zip_code: 0
                            deleted_at: null
                            inventory:
                              -
                                id: 0132d30c-5ad6-4a37-8f83-8dab719edf1f
                                product_id: b8691019-c9f6-4656-9df9-e10c97f41be6
                                stock_in: 60
                                order_count: 0
                              -
                                id: 0499288f-1f09-4d53-b1da-b79796e25d83
                                product_id: c16f88da-5c50-4b81-81f8-be9c62623778
                                product_variant_id: aaf04d57-9f3c-43e5-9937-8c4f9e081cd5
                                stock_in: 20
                                order_count: 0
                              -
                                id: 095d114d-ab45-4283-8d1e-058c190b9eed
                                product_id: a3e76e01-b333-485b-b835-ce6e67e97ddb
                                stock_in: 25
                                order_count: 0
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              example: a0e59930-a3e7-453b-8ce0-6d5a7c0a064d
                            shop_id:
                              type: string
                              example: a0e59930-8c4b-4fa9-b49c-3dc6d23978c5
                            state_id:
                              type: integer
                              example: 1
                            country_id:
                              type: integer
                              example: 1
                            city_id:
                              type: integer
                              example: 1
                            name:
                              type: string
                              example: 'Main Warehouse'
                            type:
                              type: string
                              example: primary
                            contact_person_name:
                              type: string
                              example: 'Default Contact'
                            contact_no:
                              type: string
                              example: '1234567890'
                            address:
                              type: string
                              example: 'Default warehouse address'
                            zip_code:
                              type: integer
                              example: 0
                            deleted_at:
                              type: string
                              example: null
                            inventory:
                              type: array
                              example:
                                -
                                  id: 0132d30c-5ad6-4a37-8f83-8dab719edf1f
                                  product_id: b8691019-c9f6-4656-9df9-e10c97f41be6
                                  stock_in: 60
                                  order_count: 0
                                -
                                  id: 0499288f-1f09-4d53-b1da-b79796e25d83
                                  product_id: c16f88da-5c50-4b81-81f8-be9c62623778
                                  product_variant_id: aaf04d57-9f3c-43e5-9937-8c4f9e081cd5
                                  stock_in: 20
                                  order_count: 0
                                -
                                  id: 095d114d-ab45-4283-8d1e-058c190b9eed
                                  product_id: a3e76e01-b333-485b-b835-ce6e67e97ddb
                                  stock_in: 25
                                  order_count: 0
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    example: 0132d30c-5ad6-4a37-8f83-8dab719edf1f
                                  product_id:
                                    type: string
                                    example: b8691019-c9f6-4656-9df9-e10c97f41be6
                                  stock_in:
                                    type: integer
                                    example: 60
                                  order_count:
                                    type: integer
                                    example: 0
      tags:
        - 'Shop Warehouse'
    parameters:
      -
        in: path
        name: shop_id
        description: 'The ID of the shop.'
        example: consequatur
        required: true
        schema:
          type: string
