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
  • Product Simple Data
  • Mapping Data in the Product
  • Stock Data in the Product
  • Price Data in the Product
  • Category Data in the Product
  • Synchronous or Asynchronous Sales Channel Process

Was this helpful?

  1. Channel App Template
  2. Development Steps
  3. Encoding the Sales Channel

Product Data

Product Simple Data

{
    "pk": 12227,
    "name": "Kırmızı Tişört",
    "base_code": "1KBATC0231",
    "sku": "1KBATC0231001",
    "product_type": "0",
    "is_active": true,
    "parent": null,
    "attributes": {
        "boyut": "34X34",
        "renk": "001",
        "uretim_yeri": "Türkiye",
        "materyal": "%100 POLYESTER",
    },
    "productimage_set": [
        {
            "pk": 20044,
            "status": "active",
            "image": "http://localhost:8001/media/products/2021/10/17/12227/1bfe74b4-175e-4c1a-80f2-b355feae498c.jpg"
        }
    ],
    "attribute_set": 2,
    "productization_date": "2017-01-23T16:40:58.578504Z"
}

Mapping Data in the Product

This refers to the result of the mapping service applied to the product data, which includes the characteristics of the sales channel on Akinon.

The mapped_attributes property name is included in the product data and contains the mapping results that the company requires.

In the mapped_attribute_values section, you can access the attribute’s Omnitron ID along with the special code in the sales channel (remote_id) and other attribute information. The attribute_set_id and attribute_set_name indicate which attribute set this product corresponds to in Omnitron. The attribute_set_remote_id is the unique code representing the attribute set in the sales channel.

{
    "pk": 12227,
    "name": "Kırmızı Tişört",
    "base_code": "1KBATC0231",
    "sku": "1KBATC0231001",
    "product_type": "0",
    "is_active": true,
    "parent": null,
    "attributes": {
        "boyut": "34X34",
        "renk": "001",
        "uretim_yeri": "Türkiye",
        "materyal": "%100 POLYESTER",
    },
    "productimage_set": [
        {
            "pk": 20044,
            "status": "active",
            "image": "http://localhost:8001/media/products/2021/10/17/12227/1bfe74b4-175e-4c1a-80f2-b355feae498c.jpg"
        }
    ],
    "attribute_set": 2,
    "productization_date": "2017-01-23T16:40:58.578504Z",
    "mapped_attributes": {
        "pk": 370,
        "mapped_attributes": {
            "size": "34 - 34"
            "color": "red",
            "age": "std",
            "desc": "%100 POLYESTER"
        },
        "attribute_set_id": 1,
        "attribute_set_name": "Giyim",
        "attribute_set_remote_id": null,
        "mapped_attribute_values": {
            "123": {
                "attribute_name": "size",
                "label": "34 - 34",
                "value": "34 - 34",
                "attribute_remote_id": 22,
                "is_required": true,
                "is_variant": false,
                "is_custom": false,
                "is_meta": false
            },
            "223": {
                "attribute_name": "color",
                "label": "RED",
                "value": "red",
                "attribute_remote_id": 23,
                "is_required": true,
                "is_variant": false,
                "is_custom": false,
                "is_meta": false
            },
        }
    }
}

Stock Data in the Product

This refers to the inclusion of stock information in the product data.

The data is contained within productstock in the product data, which includes:

  • stock: The quantity of available stock for sale.

  • stock_list: The ID information of the stock list in Akinon.

  • unit_type: The unit of measurement for the quantity.

  • sold_quantity_unreported: The reserved stock quantity in Akinon.

  • modified_date: The date of the last update.

{
    "pk": 12227,
    "name": "Kırmızı Tişört",
    "base_code": "1KBATC0231",
    "sku": "1KBATC0231001",
    "product_type": "0",
    "is_active": true,
    "parent": null,
    "attributes": {
        "boyut": "34X34",
        "renk": "001",
        "uretim_yeri": "Türkiye",
        "materyal": "%100 POLYESTER",
    },
    "productimage_set": [
        {
            "pk": 20044,
            "status": "active",
            "image": "http://localhost:8001/media/products/2021/10/17/12227/1bfe74b4-175e-4c1a-80f2-b355feae498c.jpg"
        }
    ],
    "attribute_set": 2,
    "productization_date": "2017-01-23T16:40:58.578504Z",
    "productstock": {
        {
            "pk": 1,
            "product": 2250,
            "stock": 46,
            "stock_list": 1,
            "unit_type": "qty",
            "extra_field":{},
            "sold_quantity_unreported": 0,
            "modified_date": "2017-01-23T13:37:31.947171Z"
        }
    }
}

Price Data in the Product

This refers to the inclusion of price information in the product data.

The data is contained within productprice in the product data, which includes:

  • price: The sale price of the product.

  • price_list: The ID information of the price list in Akinon.

  • currency_type: The unit of currency for the price information.

  • tax_rate: The tax rate applied to the product.

  • retail_price: The store price of the product.

  • discount_percentage: The discount information applied to the product.

  • modified_date: The date of the last update.

{
    "pk": 12227,
    "name": "Kırmızı Tişört",
    "base_code": "1KBATC0231",
    "sku": "1KBATC0231001",
    "product_type": "0",
    "is_active": true,
    "parent": null,
    "attributes": {
        "boyut": "34X34",
        "renk": "001",
        "uretim_yeri": "Türkiye",
        "materyal": "%100 POLYESTER",
    },
    "productimage_set": [
        {
            "pk": 20044,
            "status": "active",
            "image": "http://localhost:8001/media/products/2021/10/17/12227/1bfe74b4-175e-4c1a-80f2-b355feae498c.jpg"
        }
    ],
    "attribute_set": 2,
    "productization_date": "2017-01-23T16:40:58.578504Z",
    "productprice": {
        "pk": 2,
        "product": 913,
        "price": "62.44",
        "price_list": 1,
        "currency_type": "try",
        "tax_rate": "8.00",
        "retail_price": "249.75",
        "extra_field": {},
        "discount_percentage": "75.00",
        "modified_date": "2017-01-23T18:29:23.716095Z"
    }
}

Category Data in the Product

This refers to the inclusion of category information in the product data.

The category data is contained within category_nodes in the product data, which includes:

  • name: The name of the category.

{
    "pk": 12227,
    "name": "Kırmızı Tişört",
    "base_code": "1KBATC0231",
    "sku": "1KBATC0231001",
    "product_type": "0",
    "is_active": true,
    "parent": null,
    "attributes": {
        "boyut": "34X34",
        "renk": "001",
        "uretim_yeri": "Türkiye",
        "materyal": "%100 POLYESTER",
    },
    "productimage_set": [
        {
            "pk": 20044,
            "status": "active",
            "image": "http://localhost:8001/media/products/2021/10/17/12227/1bfe74b4-175e-4c1a-80f2-b355feae498c.jpg"
        }
    ],
    "attribute_set": 2,
    "productization_date": "2017-01-23T16:40:58.578504Z"
    "category_nodes": [
        {
            "pk": 255,
            "name": "Shop",
            "order": 1,
            "numchild": 4,
            "depth": 1,
            "sort_option": 20,
            "uuid": "cf461e84-1f19-497b-8fb8-555805e58221",
            "path": "0001",
            "created_date": "2021-10-06T13:48:07.643569Z",
            "modified_date": "2021-11-01T13:54:52.526750Z"
        }
    ]
}

Synchronous or Asynchronous Sales Channel Process

The is_sync parameter relates to whether the product process will be synchronous or asynchronous.

If operations such as insert, update, or delete are processed immediately upon being sent to the sales channel, and the result is returned in the response, then this is a synchronous process. In synchronous operations, the commands related to the product must return data in the ProductBatchRequestResponseDto format:

  • classProductBatchRequestResponseDto(status: channel_app.omnitron.constants.ResponseStatus, sku: str, remote_id: Optional[str] = '', message: Optional[str] = '')

data: any
report: List[ErrorReportDto]
response_data: List[ProductBatchRequestResponseDto]
return response_data, report, data

If the processes are handled asynchronously, a code must be returned from the relevant sales channel for later verification (remote_batch_request_id).

remote_batch_id = response.get("remote_batch_request_id")
self.batch_request.remote_batch_id = remote_batch_id
return "", report, data

If a process is asynchronous but has pre-checks in the sales channel, and some records are processed while immediate results are shared for others, the errors for problematic records must still be indicated, even though the process is asynchronous. These issues appear in the error reports.

self.failed_object_list.append(
    (price, ContentType.product_stock.value,
     "Product has not been sent"))

Source code of the channel_app.core.data item:

import datetime
from dataclasses import dataclass
from decimal import Decimal
from typing import List, Optional

from channel_app.omnitron.constants import ResponseStatus, \
    ChannelConfSchemaDataTypes

@dataclass
class CategoryNodeDto:
    name: str
    children: List['CategoryNodeDto']
    remote_id: Optional[str] = ''
    parent: Optional['CategoryNodeDto'] = None

@dataclass
class CategoryTreeDto:
    root: CategoryNodeDto

@dataclass
class CategoryAttributeValueDto:
    remote_id: str
    name: str

@dataclass
class CategoryAttributeDto:
    remote_id: str
    name: str
    required: bool
    variant: bool
    allow_custom_value: bool
    values: List[CategoryAttributeValueDto]

@dataclass
class AttributeValueDto:
    remote_id: str
    name: str

@dataclass
class AttributeDto:
    remote_id: str
    name: str
    values: List[AttributeValueDto]

@dataclass
class CategoryDto:
    remote_id: str
    name: str
    attributes: List[CategoryAttributeDto]

@dataclass
class ChannelConfSchemaField:
    required: bool
    data_type: ChannelConfSchemaDataTypes
    key: str
    label: str
    schema: Optional[dict] = None

@dataclass
class ErrorReportDto:
    action_content_type: str
    action_object_id: int
    modified_date: str
    raw_request: str = ""
    raw_response: str = ""
    error_code: str = "custom"
    error_description: str = "custom"
    is_ok: bool = False
    target_content_type: Optional[str] = ''
    target_object_id: Optional[str] = ''

@dataclass
class BatchRequestObjectsDto:
    pk: int
    version_date: str
    content_type: str
    failed_reason_type: Optional[str] = ''
    remote_id: Optional[int] = 0

class BatchRequestDto:
    channel: int
    local_batch_id: str
    content_type: str
    pk: Optional[int] = 0
    remote_batch_id: Optional[str] = ''
    status: Optional[str] = ''
    objects: Optional[List[BatchRequestObjectsDto]] = []

@dataclass
class ProductBatchRequestResponseDto:
    status: ResponseStatus
    sku: str
    remote_id: Optional[str] = ''
    message: Optional[str] = ''

@dataclass
class BatchRequestResponseDto:
    status: ResponseStatus
    remote_id: Optional[str] = ''
    sku: Optional[str] = ''
    message: Optional[str] = ''

@dataclass
class OrderBatchRequestResponseDto:
    status: ResponseStatus
    remote_id: str
    number: str
    message: Optional[str] = ''


@dataclass
class OmnitronOrderDto:
    remote_id: str
    number: str
    channel: int
    customer: int
    shipping_address: int
    billing_address: int
    currency: str
    amount: Decimal
    shipping_amount: Decimal
    shipping_tax_rate: Decimal
    extra_field: dict
    cargo_company: int
    created_at: datetime.datetime
    delivery_type: Optional[str] = None
    discount_amount: Optional[Decimal] = "0.0"
    net_shipping_amount: Optional[Decimal] = "0.0"
    tracking_number: Optional[str] = None
    carrier_shipping_code: Optional[str] = ""
    remote_addr: Optional[str] = None
    has_gift_box: Optional[bool] = False
    gift_box_note: Optional[str] = ""
    client_type: Optional[str] = ""
    language_code: Optional[str] = ""
    notes: Optional[str] = ""
    delivery_range: Optional[str] = None
    shipping_option_slug: Optional[str] = ""
    status: Optional[str] = ""

@dataclass
class OrderItemDto:
    remote_id: str
    product: str
    price_currency: str
    price: Decimal
    tax_rate: Decimal
    extra_field: dict
    status: Optional[str] = None
    price_list: Optional[int] = None
    stock_list: Optional[int] = None
    tracking_number: Optional[str] = None
    invoice_number: Optional[str] = None
    invoice_date: Optional[str] = None
    carrier_shipping_code: Optional[str] = ""
    discount_amount: Optional[Decimal] = 0.0
    retail_price: Optional[Decimal] = 0.0
    attributes: Optional[dict] = None
    attributes_kwargs: Optional[dict] = None
    parent: Optional[str] = None
    delivered_date: Optional[str] = None
    estimated_delivery_date: Optional[str] = None

# dataclass used for omnitron.commands.orders.orders.CreateOrders
@dataclass
class OmnitronCreateOrderDto:
    order: OmnitronOrderDto
    order_item: List[OrderItemDto]

@dataclass
class CancelOrderDto:
    order: str  # remote order number
    cancel_items: List[str]  # order_item_remote_id list
    reasons: dict  # order_item_remote_id : reason code
    is_cargo_refund: Optional[bool] = False  # default False
    forced_refund_amount: Optional[bool] = None  # default False
    refund_invoice_number: Optional[str] = None

@dataclass
class CustomerDto:
    email: str  # "john.doe@akinon.com"
    first_name: str  # "John"
    last_name: str  # "Doe"
    channel_code: str  # will be unique
    extra_field: Optional[dict] = None
    phone_number: Optional[str] = None  # "05556667788"
    is_active: Optional[bool] = True

@dataclass
class AddressDto:
    email: str  # "john.doe@akinon.com"
    phone_number: str  # "05556667788"
    first_name: str  # "John"
    last_name: str  # "Doe"
    country: str  # 1
    city: str  # 80
    line: str  # "Hemen sahil kenarı"
    title: Optional[str] = None  # "COMM-876"
    township: Optional[str] = None  # 933
    district: Optional[str] = None  # 71387
    postcode: Optional[str] = None  # ""
    notes: Optional[str] = None  # null
    company_name: Optional[str] = None  # ""
    tax_office: Optional[str] = None  # ""
    tax_no: Optional[str] = None  # ""
    e_bill_taxpayer: Optional[bool] = False
    remote_id: Optional[str] = None  # null
    identity_number: Optional[str] = None  # null
    extra_field: Optional[dict] = None  # {}
    is_active: Optional[bool] = True  # true
    retail_store: Optional[str] = None

@dataclass
class ChannelOrderDto(OmnitronOrderDto):
    customer = CustomerDto
    shipping_address = AddressDto
    billing_address = AddressDto
    cargo_company = str

@dataclass
class ChannelCreateOrderDto:
    order: ChannelOrderDto
    order_item: List[OrderItemDto]

@dataclass
class ChannelUpdateOrderItemDto:
    remote_id: str
    order_remote_id: Optional[str] = None
    order_number: Optional[str] = None
    status: Optional[str] = None
    invoice_number: Optional[str] = None
    invoice_date: Optional[str] = None
    tracking_number: Optional[str] = None
    extra_field: Optional[dict] = None
PreviousOrdersNextAdding a New Command to Akinon

Was this helpful?