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
  • 1. Insert Images
  • 2. Update Images
  • 3. Check Images
  • Source Code

Was this helpful?

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

Product Image

Tasks related to product integration that operate under channel_app_template.app.tasks:

1. Insert Images

It retrieves the ProductImages that need to be inserted for the first time on the sales side in Akinon and sends this data to the command found in channel.commands.product_images.SendInsertedImages. This command creates the product's image information in the sales channel.

If desired, the image data can be enriched with the parameter values listed below.

The parameters and their descriptions for the insert_product_images service within the ImageService are as follows:

Parameters for the insert_product_images service within the Image Service:

  • is_sync: Indicates whether the status is obtained immediately when the product is sent to the sales channel. It specifies whether the process is Synchronous or Asynchronous.

classSendInsertedImages(integration, objects=None, batch_request=None, kwargs)

get_data()

This function prepares the data to be sent in a request to transfer the product image information from Omnitron to the sales channel. The response should return a list containing ProductImage.

validated_data(data)

It takes the response returned by the get_data function as a parameter. If validation is needed on the product images to be sent to the sales channel, it will be used for that purpose. If no validation is required, the provided data should be returned.

transform_data(data)

It takes the response returned by the validated_data function as a parameter. It is used if changes need to be made to the data before sending it to the sales channel. It returns the final version of the data to be sent.

send_request(transformed_data)

It takes the response returned by the transform_data function as a parameter. This function uses the received data as the endpoint where the request will be sent to the sales channel. It should return either the response or the data that comes with the response.

normalize_response(data, validated_data, transformed_data, response)

This function is where we gather and finalize the data used to send our product images to the sales channel in the insert_images step. The response returned by this function will be directly used in the insert_product_images function.

If the process is asynchronous, the remote_batch_id returned from the sales channel should be processed in the batch_request.

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

The response returned in this section should consist of three parts:

  1. response_data: This is the processed version of the data returned from the sales channel. Its type can be either a string or a list. If there is no data to be used in the returned response, an empty string is sufficient. If the returned response is to be used, it must be of type list, with each element being of type BatchRequestResponseDto.

  2. report: These are the error reports generated while processing the response from the sales channel.

  3. data: This is the first parameter received by our function, which is the response obtained from the get_data function.

Example return:

return response_data, report, data

2. Update Images

It retrieves the ProductImages that need to be updated on the sales side in Akinon and sends this data to the command found in channel.commands.product_images.SendUpdatedImages. This command updates the image information of the product in the sales channel.

If desired, the image data can be enriched with the parameter values listed below.

The parameters and their descriptions for the update_product_images service within the ImageService are as follows:

Parameters for the insert_product_images service within the Image Service:

  • is_sync: Indicates whether the status is obtained immediately when the product is sent to the sales channel. It specifies whether the process is Synchronous or Asynchronous.

class SendUpdatedImages(integration, objects=None, batch_request=None, kwarg)

get_data()

This function prepares the data to be sent in a request to transfer the updated image information of the products from Omnitron to the sales channel. The response should return a list containing ProductImage.

validated_data(data)

It takes the response returned by the get_data function as a parameter. If validation is required on the product images to be sent to the sales channel, it will be used for that purpose. If no validation is needed, the provided data should be returned.

transform_data(data)

It takes the response returned by the validated_data function as a parameter. It is used if changes need to be made to the data before sending it to the sales channel. It returns the final version of the data to be sent.

send_request(transformed_data)

It takes the response returned by the transform_data function as a parameter. This function uses the received data as the endpoint where the request will be sent to the sales channel. It should return either the response or the data that comes with the response.

In this section, since the response to be returned will be sent to the normalize_response function, it is important to pay attention to data types when returning the data.

normalize_response(data, validated_data, transformed_data, response)

This function is where we gather and finalize the data used to send our product images to the sales channel in the update_images step. The response returned by this function will be directly used in the insert_product_images function.

If the process is asynchronous, the remote_batch_id returned from the sales channel should be processed in the batch_request.

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

The response returned in this section should consist of three parts:

  1. response_data: This is the processed version of the data returned from the sales channel. Its type can be either a string or a list. If there is no data to be used in the returned response, an empty string is sufficient. If the returned response is to be used, it must be of type list, with each element being of type BatchRequestResponseDto.

  2. report: These are the error reports generated while processing the response from the sales channel.

  3. data: This is the first parameter received by our function, which is the response obtained from the get_data function.

Example return:

return response_data, report, data

3. Check Images

It retrieves the asynchronously updated or newly created BatchRequest with an unknown status for the sales side in Akinon and sends this data to the command found in channel.commands.product_images.CheckImages. This command allows for checking the creation or update status of the product's image information in the sales channel.

If desired, the image data can be enriched with the parameter values listed below.

The get_image_batch_requests function within the ImageService is used.

classCheckImages(integration, objects=None, batch_request=None, kwargs)

get_data()

This function prepares the data to be sent in a request to check the status of the image information that has been sent to the sales channel. The response should return a list containing BatchRequest.

validated_data(data)

It takes the response returned by the get_data function as a parameter. This is used if there needs to be a validation on the product image data that has been sent to the sales channel. If no validation is required, it should return the provided data as a parameter.

transform_data(data)

It takes the response returned by the validated_data function as a parameter. This is used if changes need to be made to the data before sending it to the sales channel. It returns the final version of the data to be sent.

send_request(transformed_data)

It takes the response returned by the transform_data function as a parameter. This function is where the received data is sent to the relevant endpoint of the sales channel. It should return the response or the data received with the response.

In this section, since the response to be returned will be passed to the normalize_response function, it is important to pay attention to data types when returning the data.

normalize_response(data, validated_data, transformed_data, response)

This function collects the data used to query the sales channel for the processing status of our product images during the get_image_batch_requests step, and prepares the final response. The response returned by this function will be directly used in the get_image_batch_requests function.

The response returned in this section should consist of three parts:

  1. response_data: This is the processed version of the data returned from the sales channel. Its type can be either a string or a list. If there is no data to be used in the returned response, an empty string is sufficient. If data is to be used, it must be a list and each element must be of type BatchRequestResponseDto.

  2. report: These are the error reports generated while processing the response returned from the sales channel.

  3. data: This is the first parameter received by our function, which is the response obtained from the get_data function.

Example return:

return response_data, report, data

Source Code

Source Code of the channel.commands.product_images Item:

from typing import List, Tuple, Any

from channel_app.channel.commands.product_images import (
    SendUpdatedImages as AppSendUpdatedImages,
    SendInsertedImages as AppSendInsertedImages,
    CheckImages as AppCheckImages,
)
from channel_app.core.data import (
    ErrorReportDto, BatchRequestResponseDto
)
from omnisdk.omnitron.models import ProductImage, BatchRequest

class SendUpdatedImages(AppSendUpdatedImages):
    param_sync = True

    def get_data(self) -> List[ProductImage]:
        raise NotImplementedError

    def validated_data(self, data) -> object:
        raise NotImplementedError

    def transform_data(self, data) -> object:
        raise NotImplementedError

    def send_request(self, transformed_data) -> object:
        raise NotImplementedError

    def normalize_response(self, data, validated_data, transformed_data,
                           response) -> Tuple[List[BatchRequestResponseDto],
                                              ErrorReportDto, Any]:
        raise NotImplementedError

class SendInsertedImages(AppSendInsertedImages):
    param_sync = True

    def get_data(self) -> List[ProductImage]:
        raise NotImplementedError

    def validated_data(self, data) -> object:
        raise NotImplementedError

    def transform_data(self, data) -> object:
        raise NotImplementedError

    def send_request(self, transformed_data) -> object:
        raise NotImplementedError

    def normalize_response(self, data, validated_data, transformed_data,
                           response) -> Tuple[List[BatchRequestResponseDto],
                                              ErrorReportDto, Any]:
        raise NotImplementedError

class CheckImages(AppCheckImages):
    def get_data(self) -> BatchRequest:
        raise NotImplementedError

    def validated_data(self, data):
        raise NotImplementedError

    def transform_data(self, data) -> object:
        raise NotImplementedError

    def send_request(self, transformed_data) -> object:
        raise NotImplementedError

    def normalize_response(self, data, validated_data, transformed_data,
                           response) -> Tuple[List[BatchRequestResponseDto],
                                              ErrorReportDto, Any]:
        raise NotImplementedError
PreviousProduct StockNextOrders

Last updated 23 days ago

Was this helpful?