LogoLogo
  • Welcome to Akinon Documentation
  • Products
    • ACC
    • Omnitron
    • Commerce
    • Order Management System (OMS)
    • Instore
    • Integrator
    • Marketplace Dashboard (MPD)
    • Project Zero (PZ)
    • Seller Center
    • Akifast
    • App Maker
  • API Reference
    • Welcome to Akinon API Reference
  • Omnitron
    • Getting Started
    • Integration
      • Product
        • Product
        • Pre-Product
        • Attribute
        • Attribute Value
        • Attribute Set
        • Product Image
      • Price
        • Price List
        • Product Price
        • Currency Unit Table
      • Stock
        • Stock List
        • Product Stock
      • Order
        • Get Orders
        • Search Order
        • Get Order Detail by Order Number
        • Get Order Item Detail
        • Orders ID Detail Integration
        • Orders Waiting to Send to ERP
        • Update Order and Order Item
        • Stock Reservation Release
        • Order Cancellation
        • Cancellation & Refund Pending Orders
        • Order Discount Items
        • Order Status Codes & Cancellation Statuses
      • Migration
        • Getting Started
        • User Migration
        • Address Migration
        • Old Order Migration
        • Old Order Item Migration
        • View Migration Progress
        • Currency Options
    • PIM
      • Attributes & Sets
      • Mapping
      • Localization
      • Media
    • Catalogue
      • Introduction
      • Price List
      • Stock List
      • Catalogue Item
      • Category Trees
      • Product Collection
      • Product Sorting
    • Channels
      • Introduction
      • Payments
      • Customers
    • Order
      • Getting Started
      • Fulfillment
      • Cancellations & Refunds
    • Retail Stores
      • Retail Stores
    • User Management
      • Roles & Permissions
      • Add & Remove
    • Whippy Ware
      • Introduction
      • Stock
      • Stock Lists
      • Stock List Rules
      • Stock Providers
      • Stock Locations
  • Omnitron OpenAPIs
    • Without Server
      • Customers
      • Reporting
      • Deleted Items
      • Pos
      • AttributeValues
      • Attribute Values
      • Providers
      • LDAPProviders
      • Healthcheck
      • LoyaltyTransactions
      • Policies
      • Exports
      • Dashboard
      • AuthTOTP
      • Price Lists
      • ProductPrices
      • Districts
      • Cities
      • Countries
      • Townships
      • PrometheusMetrics
      • Language
      • Content Types
      • Mappings
      • Applications
      • ApplicationPermissions
      • Error Reports
      • MailTemplates
      • UploadLogo
      • SalesChannelMarketPlaceAttributeSetConfig
      • SalesChannelCancellationRequestImage
      • SalesChannelCities
      • SalesChannelCancellationReasons
      • SalesChannelCargoCompany
      • SalesChannelProductImage
      • SalesChannelAttributeConfig
      • SalesChannelAttributeValueConfig
      • SalesChannelTownships
      • SalesChannelCustomers
      • SalesChannelFailedIntegrations
      • SalesChannelGetStockList
      • SalesChannelRetailStore
      • IntegrationActions
      • SalesChannelOrderShippingInfo
      • SalesChannelBatchRequests
      • SalesChannelAddresses
      • SalesChannelMarketPlaceAttributeSet
      • SalesChannelErrorReports
      • SalesChannelCategoryNodes
      • SalesChannelDistricts
      • SalesChannelProductStock
      • SalesChannelExtraProductStock
      • SalesChannelOrders
      • SalesChannelCancellationPlans
      • SalesChannelExtraProductPrices
      • SalesChannelProduct
      • SalesChannelAttributeSchemas
      • SalesChannelProductCategories
      • SalesChannelCancellationRequests
      • SalesChannelMarketPlaceAttributeValue
      • SalesChannelMappedProduct
      • SalesChannelMarketPlaceAttribute
      • SalesChannelOrderItem
      • SalesChannelProductPrice
      • SalesChannelCreateOrder
      • GetPriceList
      • SalesChannelCountries
      • SalesChannelGetPriceList
      • SalesChannelCategoryTree
    • With Server
      • Customers
      • Reporting
      • Deleted Items
      • Pos
      • AttributeValues
      • Attribute Values
      • Providers
      • LDAPProviders
      • Healthcheck
      • LoyaltyTransactions
      • Policies
      • Exports
      • Dashboard
      • AuthTOTP
      • Price Lists
      • ProductPrices
      • Districts
      • Cities
      • Countries
      • Townships
      • PrometheusMetrics
      • Language
      • Mappings
      • Content Types
      • Applications
      • ApplicationPermissions
      • Error Reports
      • MailTemplates
      • UploadLogo
      • SalesChannelMarketPlaceAttributeSetConfig
      • SalesChannelCancellationRequestImage
      • SalesChannelCities
      • SalesChannelCancellationReasons
      • SalesChannelCargoCompany
      • SalesChannelProductImage
      • SalesChannelAttributeConfig
      • SalesChannelAttributeValueConfig
      • SalesChannelTownships
      • SalesChannelCustomers
      • SalesChannelFailedIntegrations
      • SalesChannelGetStockList
      • IntegrationActions
      • SalesChannelRetailStore
      • SalesChannelOrderShippingInfo
      • SalesChannelBatchRequests
      • SalesChannelAddresses
      • SalesChannelMarketPlaceAttributeSet
      • SalesChannelErrorReports
      • SalesChannelDistricts
      • SalesChannelCategoryNodes
      • SalesChannelProductStock
      • SalesChannelExtraProductStock
      • SalesChannelCountries
      • SalesChannelOrders
      • SalesChannelProduct
      • SalesChannelCancellationPlans
      • SalesChannelExtraProductPrices
      • SalesChannelProductCategories
      • SalesChannelAttributeSchemas
      • SalesChannelCancellationRequests
      • SalesChannelMarketPlaceAttributeValue
      • SalesChannelMappedProduct
      • SalesChannelMarketPlaceAttribute
      • SalesChannelOrderItem
      • SalesChannelProductPrice
      • SalesChannelCreateOrder
      • GetPriceList
      • SalesChannelGetPriceList
      • SalesChannelCategoryTree
  • Commerce
    • Users
      • Getting Started
      • User Management & Authentication
      • Password & OTP Operations
      • User Profile & Segment Management
      • User Payment & Card Management
      • User Orders & Cancellations
      • Anonymous User Orders & Cancellations
      • User Support & Conversation
      • Captcha Validation
      • Currency & Akifast Operations
    • Checkout
      • Payment Related
      • Payment Strategy Related
      • Shipping Related
      • Independent Pages
    • Product
    • User Collections
    • Basket
    • Discount
    • Autocomplete
    • Breadcrumb
    • Pretty URLs
    • Menu
    • Widgets
    • Loyalty Accounts
    • Address Migration
    • Index Configuration
    • Favourite Products
    • User Address
    • Data Warehouse
    • Introduction
      • Filtering Parameters
    • Data Warehouse
    • Default
  • OMS
    • Package Services
    • Package Item Services
    • Package Denial Reason Services
    • Order Services
    • Order Item Services
    • Transfer Order Services
    • Transfer Item Services
    • Channel Services
    • Cancellation Plan Services
    • Cancellation Reason Services
    • Address Setup Services
    • City Services
    • District Services
    • Township Services
    • Stock Location Address Services
    • Webhook Setup Services
    • Webhook Event Services
    • Omnitron Order Webhooks
    • Undelivered Webhook Event Services
    • Inventory Discrepancy Services
    • OMS Setup Services
    • UI Settings Services
    • OMS Audit Events Service
    • Customer Address Services
    • Application Settings Services
    • Content Type Services
    • Customer Services
    • Channel Setup Services
    • Demo Data Service
    • Order Execution Plan Services
    • Invoice Services
    • Localization Services
    • Action Log Services
    • Order Log Services
    • Celery Metrics Service
    • Stock Location Services
    • Stock Location Address Services
    • Stock Location Sender Address Services
    • Stock Location Sender Address Setup Services
    • Cargo Company Condition Services
    • Permission Group Services
  • OMS OpenAPIs
    • Package Services
      • Default
    • Transfer Order Services
      • Default
  • Instore
    • Password Reset Services
  • Integrator
    • Projects
    • Flows
    • Logs
  • Seller Center
    • Languages
    • Categories
    • Introduction
    • Products
    • Packages
    • Orders
    • Claims
    • Shipping Methods
  • Akifast
    • Authentication
  • B2B
    • Quotation
    • Basket
    • Division
    • User
    • Staff User
    • Groups
    • Notification
    • Notification Template
  • Flows
    • Shipment Flows
    • Payment Flows
    • SMS Flows
    • Basket Offer Flows
Powered by GitBook

© 2025 Akinon. All rights reserved.

On this page
  • GET Product Collection
  • POST Creating a Static Collection
  • POST Add a Product to a Static Collection
  • DELETE Product from Static Collection
  • POST Create Dynamic Collection
  • PATCH Update a Dynamic Collection
  • DELETE Collection
  • GET List All Products in a Collection
  • GET List All Addable Products for a Collection

Was this helpful?

  1. Omnitron
  2. Catalogue

Product Collection

It is provided with the ProductCollection model of grouping the products in catalogs or creating special collections with various rule sets. The collection type may be Dynamic or Static. Collection items are created only from items available for sale. In dynamic collections, a collection rule set is created using certain filters so that the products are dynamically added to the collection through this rule set. Dynamic collections remain active for the specified time expiration_date period. As long as they are not expired, the items in the collection are updated according to the rule set. This process is managed with tasks. In static collections, the items are added to the collection once and remain stable. While the created collections can be used to create special pages, they can also be used to create campaigns.

GET Product Collection

Sample HTTP request to get all product_collections lists from the system.

‘content_type’ header represents the response type.

The ‘Authorization’ header is required for authentication. You can retrieve api_token by logging in.

Request


import requests

url = "https://{customer_api_url}/api/v1/product_collections/"
api_token = "API TOKEN"

headers = {
    'content-type': 'application/json',
    'Authorization': 'Token {}'.format(api_token)
}

response = requests.get(url, headers=headers)
print(response.text)

Path: /api/v1/product_collections/

Response


{
    "count": n,
    "next": "/api/v1/product_collections/?page=2",
    "previous": null,
    "results": [
        {
            "pk": 170,
            "name": "test",
            "created_date": "2020-02-25T14:37:04.907721Z",
            "modified_date": "2021-05-07T11:35:27.751999Z",
            "collection_type": "dynamic",
            "catalog": 1,
            "is_active": true,
            "sort_option": 909,
            "uuid": "12cdaa24-31f6-4e4d-849c-93851b214b2e",
            "expiration_date": "2020-02-27T18:00:00Z",
            "value_dict": {
                "0": [
                    {
                        "value": "4",
                        "key": "active_stock__stock__gte"
                    }
                ],
                "1": [
                    {
                        "value": "True",
                        "key": "active_price__discount"
                    }
                ],
                "active_catalog_item__isnull": [
                    false
                ],
                "active_stock__isnull": [
                    false
                ],
                "active_price__isnull": [
                    false
                ]
            },
            "selected_filters": [
                {
                    "value": "4",
                    "key": "active_stock__stock__gte"
                },
                {
                    "value": "True",
                    "key": "active_price__discount"
                }
            ]
        },
        {
            "pk": 2,
            "name": "test-collection-sezgin22",
            "created_date": "2019-09-19T07:12:51.713764Z",
            "modified_date": "2020-03-31T16:11:21.606342Z",
            "collection_type": "static",
            "catalog": 1,
            "is_active": false,
            "sort_option": null,
            "uuid": "2be5902a-9dac-4720-a092-4faba04bc1a0",
            "expiration_date": null,
            "value_dict": {},
            "selected_filters": []
        },
        ...
    ]
}

POST Creating a Static Collection

Records new objects in the ProductCollection table. The ProductCollectionSerializer class defined at omnitron.channels.integrations.omniweb.serializers is used to validate the data.

‘content_type’ header represents the response type.

The ‘Authorization’ header is required for authentication. You can retrieve api_token by logging in.

Request

Path: /api/v1/product_collections/


import requests

url = "https://{customer_api_url}/api/v1/product_collections/"
api_token = "API TOKEN"

headers = {
    'content-type': 'application/json',
    'Authorization': 'Token {}'.format(api_token)
}

data = {
    "name": "test-collection-1",
    "collection_type": "static", # can be "static" or "dynamic"
    "catalog": {catalog-id}
}


response = requests.post(url, headers=headers, data=data)
print(response.text)

Response


{
    "pk":{product-collection-pk},
    "name":"test-collection-1",
    "created_date":"2021-05-11T11:50:01.348381Z",
    "modified_date":"2021-05-11T11:50:01.348414Z",
    "collection_type":"static",
    "catalog":{catalog-id},
    "is_active":true,
    "sort_option":null,
    "uuid":"df9b8773-6a35-44cd-b692-8eebadc69d60",
    "expiration_date":null,
    "value_dict":{},
    "selected_filters":[]
}

POST Add a Product to a Static Collection

Allows users to create their own product collection items. catalog_item and collection field IDs must be inserted.

Path: /api/v1/product_collection_items/


{
    "catalog_item": {catalog-item-id},
    "collection":  {product-collection-id}
}

Response

{
    "pk":1,
    "catalog_item": {catalog-item-od},
    "collection":{product-collection-id}
}

DELETE Product from Static Collection

Allows users to remove specific product collection items completely. It returns "204 No Content"

Path: /api/v1/product_collection_items/{product-collection-item-id}

Response Status Code: 204

POST Create Dynamic Collection

Allows users to create their own product collections. Dynamic refers users to add dynamic filters and automatically find and add products that fit into filters. Users can mark these collections as active or inactive, by default is_active is true.

Path: /api/v1/product_collections/

{
    "collection_type": "dynamic",
     "is_active": true,
     "name": "test",
     "catalog": {catalog-id},
     "expiration_date": "2021-05-12T15:27+0300"
}

Response

{
    "pk":1359,
    "name":"test",
    "created_date":"2021-05-11T12:27:09.239906Z",
    "modified_date":"2021-05-11T12:27:09.239932Z",
    "collection_type":"dynamic",
    "catalog":{catalog-id},
    "is_active":true,
    "sort_option":null,
    "uuid":"831174d8-ebb9-4cd2-aad1-00011ca056cf",
    "expiration_date":"2021-05-12T15:27:00+03:00",
    "value_dict":{},
    "selected_filters":[]
}

PATCH Update a Dynamic Collection

Update can be performed for collections with PATCH Patch operations. The following request is an example of a rule set assignment for a dynamic collection.

Path: /api/v1/product_collections/{product-collection-id}

{
   "value_dict":{
      "active_categories__category":{category-id}
   },
   "selected_filters":[
      {
         "name":"Test Category",
         "value":{catergory-id},
         "key":"active_categories__category",
         "label":"Category",
         "dumpedLabel":"Category"
      }
   ]
}

DELETE Collection

With the deletion request, the collection is deactivated but not completely removed from the system.The sample is_active parameter is updated to false because the perform_destroy method of the ProductCollectionViewSet is overridden.

Path: /api/v1/product_collections/{product-collection-pk}/

Response Status Code: 204

GET List All Products in a Collection

Path: /api/v1/product_collections/{product-collection-pk}/item_list

The endpoint where the products in the collection are listed so all the products belonging to this collection are listed. Listing is done by calling the item_list method of the ProductCollectionViewSet.

Response:

{
    "count": n,
    "next": "/api/v1/product_collections/1357/item_list/?limit=1&page=2",
    "previous": null,
    "results": [
        {
            "pk": 856,
            "name": "WEDGIE ALPARGATA FUCHSIA",
            "base_code": "1115101",
            "sku": "1115101003",
            "product_type": {
                "value": "0",
                "label": "Simple"
            },
            "is_active": false,
            "parent": 217740,
            "attributes": {
                "erp_MalDetayAdi": "WEDGIE",
                "integration_AsilRenk": "FUCHSIA"
            },
            "attributes_kwargs": {},
            "extra_attributes": {},
            "active_catalog_item": {
                "pk": 18,
                "active_collection_item": null
            },
            "active_price": {
                "pk": 12,
                "price": "100.00",
                ...
            },
            "active_stock": {
                "pk": 229,
                "stock": 100,
                "unit_type": "qty"
            },
            "active_categories": [
                {
                    "pk": 19,
                    "category": {
                        "pk": 7,
                        ...
                    }
                }
            ],
            "productimage_set": [
                {
                    "pk": 111635,
                    "status": "active"
                    ...
                },

            ],
            "attribute_set": {
                "pk": 2,
                "name": "Shoe"
            }
        }
    ]
}

GET List All Addable Products for a Collection

Path: /api/v1/product_collections/{product-collection-pk}/product_list/

The endpoint where the products that can be added in the collection are listed. Listing is done by calling the product_list method of the ProductCollectionViewSet.

Response:

{
    "count": 758,
    "next": "api/v1/product_collections/1357/product_list/?limit=1&page=2",
    "previous": null,
    "results": [
        {
            "pk": 3,
            "name": "Guitar",
            "base_code": "1020583",
            "sku": "1020583031",
            "product_type": {
                "value": "0",
                "label": "Simple"
            },
            "is_active": true,
            "parent": null,
            "attributes": {},
            "attributes_kwargs": {},
            "extra_attributes": {},
            "active_catalog_item": {
                "pk": 3383,
                "active_collection_item": null
            },
            "active_price": {
                "pk": 39,
                "price": "120.00",
                "currency_type": "usd"
            },
            "active_stock": {
                "pk": 1,
                "stock": 83,
                "unit_type": "qty"
            },
            "active_categories": [
                {
                    "pk": 67,
                    "category": {
                        "pk": 4,
                        ...
                    }
                }
            ],
            "productimage_set": [],
            "attribute_set": {
                "pk": 151,
                "name": "New feature set"
            }
        }
    ]
}
PreviousCategory TreesNextProduct Sorting

Last updated 27 days ago

Was this helpful?