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 Attribute Values
  • Search Attribute Value
  • Create Attribute Value
  • Update Attribute Value

Was this helpful?

  1. Omnitron
  2. Integration
  3. Product

Attribute Value

This article provides comprehensive information and documentation on a set of API methods specifically designed to handle product attribute values. By leveraging these methods, users can retrieve, create, update, and search product attribute values, allowing for seamless integration and management of product data within the system.

The article includes detailed explanations, parameter descriptions, and usage examples for each API method, empowering developers to effectively utilize the capabilities provided by the product attribute value API.

Get Attribute Values

To get attribute values from the system, you can send the GET request. To filter, you can add parameters such as value, value_exact, attribute as in QueryString. If you don't add parameters for the filter, all attribute values in the system will be returned.

Parameter

Data Type

In

Description

api_token

string

header

value

string

query

It searches attributes that include the value

value__exact

string

query

It searches attributes that match the value exactly

attribute

string

query

The ID of the attribute to which the attribute value is related

Request GET

GET request is used for retrieving current attribute values from the system. This request is expected to return all attribute value data according to page and limit parameters.

‘content_type’ header represents the response type.

‘Authorization’ header is a required header for authentication. You can retrieve api_token with login.

‘limit’ determines how many attribute values are shown in the page. Default value is 10.

‘page’ determines the page of the retrieved results. Default value is 1.

Path:attribute_value/

import requests

url = "https://{customer_api_url}/api/i1/attribute_value/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

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

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

Response

Response contains all attribute value data with given parameters. Response status is expected to be HTTP-200 Successful.

Resource properties are in Python format.

Parameter

Data Type

Description

attribute

id

The id of the attribute to which the attribute value is related

value

string

Attribute's value

label

string

Attribute's label. It is used on the back office frontend.

order

int

Order

erp_code

string

Attribute's value code in ERP

“count” shows how many attribute values exist in the system.

“next” shows the next cursor url to retrieve the desired attribute values.

“previous” shows the previous cursor url to retrieve the desired attribute values.

“results” shows every attribute value detail.


{
  "count": 498,
  "next": "https://{customer_api_url}/api/i1/attribute_value/attribute_value/?limit=4&page=2",
  "previous": null,
  "results": [
    {
      "pk": 3672,
      "attribute": 158,
      "value": "40/41",
      "order": null,
      "label": null,
      "erp_code": "40/41",
    },
    {
      "pk": 3673,
      "attribute": 158,
      "value": "26-30",
      "order": null,
      "label": null,
      "erp_code": "26-30",
    },
    {
      "pk": 3674,
      "attribute": 158,
      "value": "26-32",
      "order": null,
      "label": null,
      "erp_code": "26-32",
    },
    {
      "pk": 3675,
      "attribute": 158,
      "value": "36/37",
      "order": null,
      "label": null,
      "erp_code": "36/37",
    }
  ]
}

Search Attribute Value

Filter attribute values in the system with allowed fields using a GET request. The table below shows the filtering options with details. If a user doesn’t add any filtering options in the query, all of the attribute values will be returned in the system.

Parameter

Data Type

In

Description

api_token

string

header

value

string

query

It searches attributes that include the value

value__exact

string

query

It searches attributes that match the value exactly

attribute

string

query

The ID of the attribute to which the attribute value is related

label

string

query

It searches the attribute values that include the label

erp_code

string

query

It searches the attribute values that include the erp_code

Request GET

‘content_type’ header represents the response type.

‘Authorization’ header is a required header for authentication. You can retrieve api_token with login.

‘django_language’ cookies allow you to retrieve desired language values. ‘Attribute Value’ field is a translatable field. If there are no translations with the given language code, the response shows the default language value.

The sample request below filters all attribute values related to the attributes with ID 205.

Path:<code>i1/attribute_value/</code></strong>

import requests

url = "https://{customer_api_url}/api/i1/attribute_value/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
    'content-type': 'application/json',
    'Authorization': 'Token {}'.format(api_token)
}
cookies = {
    'django_language':'en-us' # searches values in English
}

params = {
    'attribute': '205' #attribute id
}

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

Response

Response contains all attribute value data with search parameters. Response status is expected to be HTTP-200 Successful. Resource properties are in Python format.

Parameter

Data Type

Description

attribute

id

The ID of the attribute to which the attribute value is related

value

string

Attribute's value

order

int

Attribute value’s order

label

string

Attribute's label. It is used in the back-end front-end.

erp_code

string

Attribute value’s code in ERP

“count” shows how many attribute values exist in the system with used filter options.

“next” shows the next cursor url to retrieve the desired attribute values.

“previous” shows the previous cursor url to retrieve the desired attribute values.

“results” shows every attribute value detail.

{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "pk": 5214,
      "attribute": 205,
      "value": "2051",
      "order": 1,
      "label": "dark green ",
      "erp_code": "erp-2051",
    }
  ]
}

Below request is for retrieving Turkish values of the attribute values. Language is controlled by the ‘django_language’ cookie or ‘Accept-Language’ header. If the attribute value does not have translations for the given language code, it returns the default value.

Path: v1/attribute_value/


import requests
url = "https://{customer_api_url}/api/i1/attribute_value/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"
headers = {
    'content-type': 'application/json',
    'Authorization': 'Token {}'.format(api_token)
}
cookies = {
    'django_language':'tr-tr' # searches values in Turkish
}
params = {
    'attribute': '205' #attribute id
}
response = requests.get(url, headers=headers, cookies=cookies, params=params)
print(response.text)

Response

Response contains all attribute value data with search parameters. Response status is expected to be HTTP-200 Successful. Resource properties are in Python format.

Parameter

Data Type

Description

attribute

id

The ID of the attribute to which the attribute value is related

value

string

Attribute's value

order

int

Attribute value’s order

order

string

Attribute's label. It is used on the back office front end.

erp_code

string

Attribute value’s code in ERP

“count” shows how many attribute values exist in the system with used filter options.

“next” shows the next cursor url to retrieve the desired attribute values.

“previous” shows the previous cursor url to retrieve the desired attribute values.

“results” shows every attribute value detail.


{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "pk": 5214,
      "attribute": 205,
      "value": "2051",
      "order": 1,
      "label": "koyu yesil",
      "erp_code": "erp-2051",
    }
  ]
}

Create Attribute Value

Parameter

Data Type

In

Required

Description

api_token

string

header

YES

attribute_key

id

body

How attributes are saved in DB. (Ex: color, size).

attribute

id

body

YES

The ID of attribute to which the attribute value is related

value

string

body

YES

Attribute's value

label

string

body

Attribute's label. It is used in the backend and frontend

order

int

body

Order

erp_code

string

body

YES

Attribute's value code in ERP

Request POST

POST request is needed for creating a new attribute value.

‘content_type’ header represents the response type.

‘Authorization’ header is a required header for authentication. You can retrieve api_token with login.

The ‘Translation’ key is used to add different language translations for the attribute value.

Path: v1/attribute_value/


import requests
url = "https://{customer_api_url}/api/i1/attribute_value/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"
headers = {
    'content-type': 'application/json',
    'Authorization': 'Token {}'.format(api_token)
}
cookies = {
    'django_language':'en-us' #default Omnitron language
}
data = {
        'attribute' : '160',
        'label': 'dark green', # in default language
        'translations': {
            'de-de':{
                'label':'dunkelgrün' # in German
                },
        },   
        'value': '1606',
        'erp_code': 'erp-1606',
        'order': 1
}
response = requests.post(url, headers=headers, cookies=cookies , data=json.dumps(data))
print(response.text)

Returns the created attribute value data. Response status is expected to be HTTP-201 Created. Resource Properties are in Python format.

The table below shows the field details of the created attribute value.

Parameter

Data Type

Description

api_token

id

The ID of the attribute to which the attribute value is related

value

string

Attribute's value

label

string

Attribute's label. It is used in the backend and frontend

order

int

Order

erp_code

string

Attribute's value code in ERP


{
  "pk": 5211,
  "attribute": 160,
  "value": "1606",
  "order": 1,
  "label": "dark green",
  "erp_code": "erp-1606",
}

Bad Request Responses

When the requested action cannot be executed, API gives an explanation about the request.

“Erp_code” and “value” are unique fields and don’t accept duplicate data.


{
  "non_field_errors": "(erp_code:erp_color) is already exists",
  "error_code": "attribute__value_201_1"
}

{
  "non_field_errors": "(value:value) is already exists",
  "error_code": "attribute__value_201_1"
}

Update Attribute Value

To update the value of the attribute, it is necessary to know the ID of the attribute value. How to get ID and other details are explained under Search Attribute Value section.

Parameter

Data Type

In

Description

api_token

string

header

value

string

query

It searches attributes that include the value

value__exact

string

query

It searches attributes that match the value exactly

attribute

string

query

The ID of the attribute to which the attribute value is related

Request PATCH

Request sample to update an attribute value. Attribute Value ID is required to perform this action. If the given ID is not found in the system, the response code is: 404 Not Found.

‘content_type’ header represents the response type.

‘Authorization’ header is a required header for authentication. You can retrieve api_token with login.

Path:/api/i1/attribute_value/&lt;ATTRIBUTE_VALUE_ID>/


import requests

url = "https://{customer_api_url}/api/i1/attribute_value/5214/"
api_token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

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

cookies = {
    'django_language':'tr-tr'
}

data = {
        'label':'koyu yesil',
        'translations': {
            'en-us':{
                'label':'dark green'
                }
        },
}

response = requests.patch(url, headers=headers, cookies=cookies , data=json.dumps(data))
print(response.text)

Returns the updated version of the attribute value fields. Resource Properties are in Python format.

Parameter

Data Type

Description

pk

id

The ID of the attribute value

attribute

id

The ID of the attribute to which the attribute value is related

value

string

Attribute's value

label

string

Attribute's label. It is used on the back office frontend

order

int

Order

erp_code

string

Attribute value’s code in ERP


{
  "pk": 5214,
  "attribute": 205,
  "value": "2051",
  "order": 1,
  "label": "koyu yesil",
  "erp_code": "erp-2051",
}

Bad Request Responses

When the requested action cannot be performed, API gives an explanation about the request.

“erp_code” is a unique field and does not accept duplicate data.


{
  "non_field_errors": "(erp_code:erp_color) is already exists",
  "error_code": "attribute__value_201_1"
}

“value” is a unique field.


{
  "non_field_errors": "(value:value) is already exists",
  "error_code": "attribute__value_201_1"
}

If any product is using the “attribute_value”, the value of it cannot be updated.


{
  "non_field_errors": "AttributeValue can not be updated",
  "error_code": "attribute__value_201_2"
}
PreviousAttributeNextAttribute Set

Last updated 23 days ago

Was this helpful?

Request GET

Attribute value must be attached to an attribute. For this reason, attribute ID also must be sent when creating an attribute value. How to get attribute ID and other details are explained under section.

Response

Response

​
Search Attribute
​
​
The API key of the customer’s account
The API key of the customer’s account
The API key of the customer’s account
The API key of the customer’s account