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
  • 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
  • Mapping Model Structure
  • MappingViewSet
  • GET Mapping
  • POST Create Mapping
  • PATCH Partial Update
  • PUT Partial Update

Was this helpful?

  1. Omnitron
  2. PIM

Mapping

Omnitron provides an easy-to-use mapping interface enabling you to associate the products integrated from ERP or other external resources and approved on Integrations > Pending Products page with Omnitron.

Mapping process is needed only if you prefer to use the pending product stage before the productization process. You might skip this stage if you prefer to handle the mapping process on the integration layer and directly send your products to the Product Pool.

Mapping Model Structure

Mapping is a matching process between values coming from ERP and external sources.

The mapping model consists of the following strategies:

AttributeValueMappingStrategy : This strategy leads to map attribute values

The strategy used to match attribute values. Pulls custom is_localizable and language parameters from kwargs. According to these parameters, it is decided whether the attribute will be pulled according to the language. Then, the default_value is drawn from the output_kwargs in the mapping model and the value is retrieved according to the mapping_key in the mapping model. If value does not exist and the default_attribute is present, it pulls the attribute directly from the product object and maps it to value. After that, it returns (value, True) if pulled from the default_attribute. If pulled directly from mapping (value, False).

AttributeSetMappingStrategy : This strategy leads to map [Attribute Set],

There are no language operations as in AttributeValueMappingStrategy, but the rest of the value pulling process is the same. When returning, the value is returned directly.

Path: omnitron.mappings.models.Mapping

  • Mapping_Type (EnumField): Indicates the mapping type. Its values are;

    • attribute='attribute'

    • attribute_set='attribute set'

    • attribute_value='attribute value'

  • input_kwargs (JSONField): Represents the attributes' rules

  • output_kwargs (JSONField): Represents default values

  • priority (integer): Indicates the mapping priority

  • mapping_key: The name of the attribute to be associated with

MappingViewSet

MappingViewSet {omnitron.mappings.resources.views.MappingViewSet} is located at the address of /api/v1/mappings/.

Allows GET, POST, PUT, PATCH and DELETE methods inherited from ModelViewSet. perform_create(), perform_update() and perform_destroy() functions are overridden; perform create/update operations on the relevant MappingService.

And one property named strategy is defined. This property returns the two strategies mentioned above in class format upon fetching from mapping_type.

Parameter

Data Type

Default

In

Required

Description

api_token

string

header

YES

product_sku

string

body

YES

Product SKU

stock_list

id

body

YES

Stock list which includes the product

stock

integer

0

body

NO

Amount of stock

unit_type

enum(string)

qty

body

NO

Stocked quantity type qty: Quantity kg: Kilogram

GET Mapping

Get request to get list of mapping objects.

Path: /api/v1/mappings/

{
    "count": 499,
    "next": "{customer_omnitron_url}/api/v1/mappings/?page=2",
    "previous": null,
    "results": [
        {
            "pk": 2515,
            "created_date": "2017-01-22T07:43:38.446000Z",
            "modified_date": "2017-01-22T07:43:38.446000Z",
            "mapping_type": "attribute_value",
            "value_dict": {
                "attributes__erp_color": "BEYAZ"
            },
            "default_value": {
                "filtre_renk1": "Beyaz"
            },
            "default_attribute": null,
            "priority": 0,
            "mapping_key": "filtre_renk1",
            "create_all_kind": false
        },
        ...
    ]
}

POST Create Mapping

Adds a new record to the mapping table.Validated with MappingSerializer. Returns HTTP400 if data is not available. Returns HTTP406 if there is an error or incompatibility at the service layer during the recording process.

Path: /api/v1/mappings/

Body

{
    "mapping_type": "attribute_value",
    "value_dict": {
        "attributes__erp_color": "TEST"
    },
    "default_value": {
        "filtre_renk1": "Test"
    },
    "default_attribute": null,
    "priority": 0,
    "mapping_key": "filtre_renk1",
    "create_all_kind": false
}

Response

{
    "pk": 3014,
    "created_date": "2023-01-05T19:06:07.007354Z",
    "modified_date": "2023-01-05T19:06:07.007381Z",
    "mapping_type": "attribute_value",
    "value_dict": {
        "attributes__erp_color": "TEST"
    },
    "default_value": {
        "filtre_renk1": "Test"
    },
    "default_attribute": null,
    "priority": 0,
    "mapping_key": "filtre_renk1",
    "create_all_kind": false
}

Errors

{
  {
    "non_field_errors": "... required field",
    "error_code": "mapping_101"
}
-- OR
{
    "mapping_type": [
        "This field is required."
    ]
}
-- OR
{
  {
    "non_field_errors": "{0} field type is not {1}",
    "error_code": "mapping_101"
}
-- OR
{
    "value_dict": [
        "Expected a dictionary of items but got type \"list\"."
    ]
}

PATCH Partial Update

Path: /api/v1/mappings/{pk}/

Partially updates the object of the relevant primary key from the attribute table. Validated with AttributeSerializer. Returns HTTP400 if data is not available. If it cannot find the object, it returns HTTP404. With partial update behavior, it only updates the sent parameters.

Body

{
    "create_all_kind": true
}

Response

{{
    "pk": 3016,
    "created_date": "2023-01-05T19:15:39.212420Z",
    "modified_date": "2023-01-05T19:20:57.624044Z",
    "mapping_type": "attribute_value",
    "default_attribute": null,
    "priority": 0,
    "mapping_key": "filtre_renk1",
    "value_dict": {
        "attributes__erp_color": "TEST"
    },
    "default_value": {
        "filtre_renk1": "Test Renk"
    },
    "create_all_kind": true
}

PUT Partial Update

Path: /api/v1/mappings/{pk}/

Updates the object of the corresponding primary key from the mapping table. Validated with MappingSerializer. Returns HTTP400 if data is not available. If it cannot find the object, it returns HTTP404. Updates the entire object with the update behavior.

Body

{
    "mapping_type": "attribute_value",
    "value_dict": {
        "attributes__erp_color": "TEST"
    },
    "default_value": {
        "filtre_renk1": "Test Renk"
    },
    "default_attribute": null,
    "priority": 0,
    "mapping_key": "filtre_renk1",
    "create_all_kind": false
}

Response

{
    "pk": 3016,
    "created_date": "2023-01-05T19:15:39.212420Z",
    "modified_date": "2023-01-05T19:16:14.737971Z",
    "mapping_type": "attribute_value",
    "value_dict": {
        "attributes__erp_color": "TEST"
    },
    "default_value": {
        "filtre_renk1": "Test Renk"
    },
    "default_attribute": null,
    "priority": 0,
    "mapping_key": "filtre_renk1",
    "create_all_kind": false
}

Errors

{
    "mapping_type": [
        "This field is required."
    ],
    "mapping_key": [
        "This field is required."
    ]
}
PreviousAttributes & SetsNextLocalization

Last updated 23 days ago

Was this helpful?

The API key of the customer’s account