Akinon Release Notes (05/12/2025) are now live! Click here to learn what's new.
LogoLogo
API Reference
  • Home
  • Quick Start
  • Tutorials
  • Technical Guides
  • Release Notes
  • Glossary
  • Welcome to Akinon Technical Guides
  • ACC
    • ACC CLI
    • Create Application via CLI
    • Deploy Environment Variables
    • App Store for Developers
  • Omnitron
    • Product Types
    • Product Categorization
    • Splitting a Merged Order Item
  • Commerce
    • Shipping Rules Calculator
    • Data Source Shipping Options
    • Attribute Based Shipping Options
    • Filtering Products
    • Conversation & Messages
    • Sitemap Configuration
    • Weight-Based Product Sales
    • Group Attribute Sets
    • Contract Management
    • Find in Store for Whippy Ware
    • Plugins
    • Remote Price
    • E-mail Templates
    • Loyalty Accounts
    • Search Structure
    • User Segmentation & Rules
    • Promotions
  • OMS
    • Getting Started with OMS
    • Basic Setup
    • Scenarios
    • Capacity Feature
    • Package Management
      • Packages
      • Transfer
      • States
    • Commands
      • Packages
        • Package Command Parameters
        • DeAllocate Package Reservations Command
        • Channel Based Complete Packaging without Shipment Command
        • Complete Packaging with Shipment Command
        • Complete Packaging without Shipment Command
        • Package Refuse with Denial Reason Command
        • Product Not Found & Wrong Product Command
        • Product Not Found & Wrong Product Command Advanced
        • Package Packed for Refund Command
        • Block The Package For Action Command
        • Unblock the Package For Action Command
        • Update The Package’s Invoice
        • Manual Planning Command
      • Transfer
        • Transfer Order Advanced Command
        • Product for Transfer Not Found & Wrong Product Command
        • Transfer Delivered Command
        • Transfer Dispatch Command
        • Transfer Ready for Dispatch Command
        • Transfer Out Of Stock
      • Shipment
        • Shipment Order Command
        • Package Advanced Shipment Command
        • Ship The Package Command
        • Ship The Package without Shipment Integration Command
        • Update The Package’s Shipment Status Command
        • Update Shipment Info of Package Command
    • Inventory Locations & Engine
      • Properties & Domain Relation
      • Customization
      • Inventory Engine
    • Fulfillment
      • Shipments
      • Invoice Integration
    • Webhooks
      • Webhook Examples
        • Order Webhook
        • Package Webhook
        • Shipment Webhook
        • Stock Location Webhook
        • Transfer Webhook
    • Integrating OMS with Seller Center
  • Instore
    • Getting Started
    • Cash Register Integration
    • OTP (One Time Password) Process
    • Services
      • Password Reset Services
  • Marketplace Dashboard
    • N11 Marketplace Setup Configurations
    • Trendyol Marketplace Setup Configurations
    • Walmart Marketplace Setup Configurations
    • Amazon Marketplace Setup Configurations
    • Hepsiburada Marketplace Setup Configurations
  • Project Zero
    • Django
      • Basic Setup
      • Project Structure
        • Templates & Components
        • Private Dependencies
        • Omnife Project Submodule
        • Webpack
        • ESLint Rules
        • Bundles
        • Multilanguage & Translation
        • Environmental File
        • Custom Error Pages
        • Icon Font
      • Page Types
        • Static Pages & Flatpages
        • Account Page
          • Template Rendering in Account Pages
          • Forms & Validation
        • Basket Page
          • Redux Basket State
          • Basket Page - View
        • Checkout
          • Redux Checkout State
          • View & Template Rendering
          • Masking & Validation
      • Theming & Styling
      • Widgets
      • SEO Management
      • Extending Project Zero
    • Next.js
      • Basic Setup
      • Deployment
      • Static Assets
      • Plugins
      • Widgets
      • Icons
      • Localization
      • SEO Management
      • Advanced Usage
      • Data Fetching
        • Client
          • Account
          • Address
          • Basket
          • Checkout
          • Misc
          • Product
          • User
          • Wishlist
        • Server
          • Category
          • Flat Page
          • List
          • Menu
          • Product
          • SEO
          • Special Page
          • Widget
  • App Maker
    • Setup Your Environment
    • Plugin Quickstart
    • Create Project
    • Setup Existing Project
    • Deploy Project
    • Users and Roles
    • Add Public Key
    • App Maker CLI
    • Create App on Stores
      • Creating App on Apple App Store
      • Creating App on Google Play Store
    • Mobile App Framework
      • Configuration
      • Framework
      • Project Structure
        • Structure
        • Data Containers
        • Pages
      • Dependency Integration
        • Plugins
        • Akinon Plugin Adapter
  • Akifast
    • HPP
      • Getting Started
      • Authorization
      • Payment Session Creation
        • Key Points Before Creating a Payment Session
        • Creating Payment Session
        • Redirecting to the Payment Page
        • Errors Encountered During Payment Session Creation
      • Merchant Services
        • Shipping Query URL
        • Agreement Query URL
        • Other URLs
  • B2B
    • Getting Started
    • B2B Setup
  • Adds-on
    • Invoicer
      • Introduction
      • Invoice & Pay On Delivery Service
  • Channel App Template
    • Introduction
    • Installation and Usage
    • Development Steps
      • Folder Structure
      • Starting Step
      • Encoding the Sales Channel
        • Introduction
        • Setup
        • Products
        • Product Price
        • Product Stock
        • Product Image
        • Orders
        • Product Data
      • Adding a New Command to Akinon
      • Listening for External Requests
    • Architecture
      • Introduction
      • Integration
      • Services (Flows)
        • Introduction
        • Product Service
        • Price Service
        • Stock Service
        • Image Service
        • Order Service
  • Multi Regional Settings
    • Multi Regional Settings
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page
  • Listable Product Variants Plugin
  • Plugin API Endpoints
  • GET List Plugins
  • GET List All Available Plugins
  • POST Create a Plugin
  • PUT Update a Plugin

Was this helpful?

  1. Commerce

Plugins

In the Commerce system, plugins are used to load additional data on the product listing page. Currently, there is only one type of plugin available. New plugin definitions are requested and developed by the Commerce team based on requirements.

Available Plugin:

  • products.listable_product_variants

The only plugin currently available in the system allows additional data, defined for the plugin, to be added to the existing product data on the listing page. Once a plugin is defined, existing products must be reindexed to reflect its effects.

The next section details how to list and create plugins using the Commerce API.

Listable Product Variants Plugin

The products.listable_product_variants plugin is used to add extra data to the extra_data field within a product on the listing page.

Default extra_data Field Without Plugin:

If the plugin is not available or is inactive, the extra_data field of a product on the listing page appears as follows:

"extra_data": {
   "variants": []
}

Modified extra_data Field with Plugin:

When the plugin is configured with the following settings:

"config": {
   "attribute_keys": [
       "size",
       "color"
   ],
   "product_field_names": [
       "pk",
       "price",
       "absolute_url",
       "productimage_set",
       "attributes"
   ],
   "attribute_set_attributes": {}
}

The extra_data field on the listing page is modified as follows:

"extra_data": {
   "variants": [
       {
           "options": [{
               "label": "XS",
               "product": {
                   "pk": 114768,
                   "sku": "5797434",
                   "price": "1599",
                   "attributes": {},
                   "absolute_url": "/product/114768/",
                   "productimage_set": []
               },
               "in_stock": true,
               "is_selectable": true
           }],
           "attribute_key": "color"
       },
       {
           "options": [
               {},
               {},
               {},
               {}
           ],
           "attribute_key": "size"
       }
   ]
}

The modified structure results from defining attribute_keys with values like color and size. This allows variants of the product based on these attribute values to be listed within extra_data.

Additionally, the product_field_names setting defines which fields of the variant products should be included in the response. In the example above, the fields pk, price, absolute_url, productimage_set, and attributes are specified, ensuring that these details are included when displaying variant products.

The attributes specified in attribute_keys must be variant attributes. That is, they should correspond to attributes that define different variations of a product (e.g., color, size) rather than general product attributes.

Plugin API Endpoints

GET List Plugins

This endpoint retrieves the plugin settings stored in the database.

Path: /api/v1/plugins/

Example Request

curl --location '{commerce_url}/api/v1/plugins/'

Example Response

{
    "count": 1,
    "next": null,
    "previous": null,
    "results": [
        {
            "pk": 2,
            "key": "products.listable_product_variants",
            "name": "Listable Product Variants",
            "description": "...",
            "is_active": false,
            "config": {
                "attribute_keys": [],
                "product_field_names": ["attributes"],
                "attribute_set_attributes": {}
            },
            "default_config": {
                "attribute_keys": [],
                "product_field_names": ["attributes", "pk", "..."],
                "attribute_set_attributes": {}
            }
        }
    ]
}

Response Parameters

Key
Description

pk

Contains the ID of the plugin.

key

Stores the KEY attribute value of the plugin class.

name

Stores the NAME attribute value of the plugin class.

description

Stores the DESCRIPTION attribute value of the plugin class.

config

Contains the CONFIG attribute value of the plugin.

default_config

Contains the DEFAULT CONFIG attribute value of the plugin.

is_active

Indicates whether the plugin is active.


GET List All Available Plugins

This endpoint retrieves all plugin classes registered in the Plugin Registry.

Path: /api/v1/plugins/all/

Example Request

curl --location '{commerce_url}/api/v1/plugins/all/'

Example Response

[
    {
        "key": "products.listable_product_variants",
        "name": "Listable Product Variants",
        "description": "...",
        "config": {
            "attribute_keys": [],
            "product_field_names": [
                "pk",
                "price",
                "absolute_url",
                "productimage_set",
                "attributes"
            ],
            "attribute_set_attributes": {}
        },
        "is_active": false
    }
]

Response Parameters

Key
Description

key

Stores the KEY attribute value of the plugin class.

name

Stores the NAME attribute value of the plugin class.

description

Stores the DESCRIPTION attribute value of the plugin class.

config

Contains the CONFIG attribute value of the plugin.

is_active

Indicates whether the plugin is active.


POST Create a Plugin

This endpoint is used to add settings and activate a plugin. Only one record can be created for each plugin key, and duplicate records are not allowed. If the provided key does not exist in the Plugin Registry, the API returns an error: Plugin with this key does not exist.

The config key in the request body must contain a dictionary formatted according to the config_serializer defined in the plugin class.

Path: /api/v1/plugins/

Request Body Parameters

Key
Description

key

Must contain the KEY attribute value of the plugin class.

config

Must contain a valid configuration according to the serializer.

is_active

Indicates whether the plugin is active.

Example Request

curl --location '{commerce_url}/api/v1/plugins/' \
--header 'Content-Type: application/json' \
--data '{
    "key": "products.listable_product_variants",
    "config": {
        "product_field_names": [
            "pk",
            "price",
            "retail_product",
            "attributes"
        ],
        "attribute_keys": [],
        "attribute_set_attributes": {}
    },
    "is_active": false
}'

Example Response

{
    "pk": 2,
    "key": "products.listable_product_variants",
    "name": "Listable Product Variants",
    "description": "...",
    "is_active": false,
    "config": {
        "attribute_keys": [],
        "product_field_names": [
            "pk",
            "price",
            "retail_product",
            "attributes"
        ],
        "attribute_set_attributes": {}
    },
    "default_config": {
        "attribute_keys": [],
        "product_field_names": [
            "attributes", "pk", "..."
        ],
        "attribute_set_attributes": {}
    }
}

Response Parameters

Key
Description

pk

Contains the ID of the plugin.

key

Stores the KEY attribute value of the plugin class.

name

Stores the NAME attribute value of the plugin class.

description

Stores the DESCRIPTION attribute value of the plugin class.

config

Contains the CONFIG attribute value of the plugin.

default_config

Contains the DEFAULT CONFIG attribute value of the plugin.

is_active

Indicates whether the plugin is active.


PUT Update a Plugin

This endpoint updates the settings and activation status of an existing plugin. If a plugin has not been added previously, it must be created first.

The config key in the request body must contain a dictionary formatted according to the config_serializer defined in the plugin class.

Path: /api/v1/plugins/

Request Body Parameters

Key
Description

key

Must contain the KEY attribute value of the plugin class.

config

Must contain a valid configuration according to the serializer.

is_active

Indicates whether the plugin is active.

Example Request

curl --location --request PUT '{commerce_url}/api/v1/plugins/3/' \
--data '{
    "key": "products.listable_product_variants",
    "config": {
        "product_field_names": ["pk", "attributes"],
        "attribute_keys": [],
        "attribute_set_attributes": {}
    },
    "is_active": false // Deactivating the plugin
}'

Example Response

{
    "pk": 3,
    "key": "products.listable_product_variants",
    "name": "Listable Product Variants",
    "description": "...",
    "is_active": false,
    "config": {
        "attribute_keys": [],
        "product_field_names": [
            "pk","attributes"
        ],
        "attribute_set_attributes": {}
    },
    "default_config": {
        "attribute_keys": [],
        "product_field_names": [
            "pk",
            "price",
            "retail_product",
            "absolute_url",
            "productimage_set",
            "attributes"
        ],
        "attribute_set_attributes": {}
    }
}

Response Parameters

Key
Description

pk

Contains the ID of the plugin.

key

Stores the KEY attribute value of the plugin class.

name

Stores the NAME attribute value of the plugin class.

description

Stores the DESCRIPTION attribute value of the plugin class.

config

Contains the CONFIG attribute value of the plugin.

default_config

Contains the DEFAULT CONFIG attribute value of the plugin.

is_active

Indicates whether the plugin is active.

PreviousFind in Store for Whippy WareNextRemote Price

Last updated 16 days ago

Was this helpful?