Order Item Services

All services related to order items are listed in this page.

GET Order Item List

This method gets a comprehensive list of order items, providing detailed information for each item.

Path: /api/v1/oms/order_items/

Query Parameters

The following query parameters can be used to get the details of order items.

Parameter
Data Type
In
Description

token

string

header

The API key of the customer account

{order_number}

string

query

The number of the order we want to get the order items

Example Request

To get a detailed list of all order items, a GET request should be sent to the /api/v1/oms/order_items/ endpoint. In the headers, set the Authorization header to include the token for authentication.

Here's an example of how to make the request in python:

import requests

url = "https://{domain_url}/api/v1/oms/order_items/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Token {token}'
}

response = requests.request('GET', url, headers=headers)

print(response.json())

Example Response (200 OK)

In a successful response with a status code of 200 OK, the API returns all the details of the order items in a JSON format. The response body contains a JSON object with the order items and their associated attributes, which may include ID, created and modified date, product, state, etc.

These parameters are described in the following table.

Parameter
Data Type
Description

id

integer

The primary key of the order item

state

json

The status information of the order item

product

json

The product information of the order item

created_date

date

The creation date

modified_date

date

The last modified date

omnitron_id

integer

The primary key of the order item on omnitron

net_amount

string

The net amount of the order item

price

string

The price of the order item

price_currency

string

The currency of the price

retail_price

string

The retail price of the order item

tax_rate

string

The tax rate of the order item

tax_amount

string

The tax amount of the order item

discount_amount

string

The discount amount of the order item

without_net_amount

string

The without net amount of the order item

installment_interest_amount

string

The installment interest amount of the order item

attributes

json

The properties of the order item such as sku, base code, color etc.

attributes_kwargs

json

The above data in key-value format

image

json

The image information of the order item

price_list

json

The price list information of the order item

stock_list

json

The stock list information of the order item

extra_field

json

The additional information for the order item

parent_omnitron_id

integer

The information for bundled order items

order

integer

The order ID of the order item

This example response serves as a reference to understand the structure and data format returned from this API service.

{
  "count": 1,
  "next": "https://{domain_url}/api/v1/oms/order_items/",
  "previous": null,
  "results": [
    {
      "id": 1,
      "state": {
        "id": 1,
        "created_date": "2021-06-30T14:43:26.801262Z",
        "modified_date": "2022-10-14T10:39:33.568211Z",
        "translations": {
          "en-us": {
            "name": "Preparing"
          },
          "tr-tr": {
            "name": "Hazırlanıyor"
          }
        },
        "name": "Preparing",
        "config": {},
        "enum_class": "OrderStatus",
        "enum_value": "450",
        "content_type": 1
      },
      "product": {
        "id": 1,
        "productimage_set": [
          {
            "order": 1,
            "id": 1,
            "url": "https://{cdn_url}/products/2021/03/17/8/604303c1-e2f9-4e78-a666-67d75bbca1e3.jpg",
            "product": 1
          }
        ],
        "created_date": "2021-07-07T08:17:49.890983Z",
        "modified_date": "2022-02-09T08:14:57.425198Z",
        "omnitron_id": 8,
        "name": "Urun8",
        "base_code": "8",
        "sku": "8",
        "barcode": null,
        "attributes": {
          "renk": "SİYAH",
          "beden": "L",
          "integration_size": "L",
          "integration_color": "SİYAH",
          "integration_gram1": "One size",
          "integration_SizeId": "S",
          "integration_ColorId": "SİYAH"
        },
        "attributes_kwargs": {
          "renk": {
            "label": "SİYAH",
            "value": "SİYAH",
            "data_type": "dropdown"
          },
          "beden": {
            "label": "Large",
            "value": "L",
            "data_type": "dropdown"
          },
          "integration_size": {
            "label": "L",
            "value": "L",
            "data_type": "dropdown"
          },
          "integration_color": {
            "label": "BLACK",
            "value": "SİYAH",
            "data_type": "dropdown"
          },
          "integration_gram1": {
            "label": "One Size",
            "value": "One size",
            "data_type": "dropdown"
          },
          "integration_SizeId": {
            "label": "S",
            "value": "S",
            "data_type": "dropdown"
          },
          "integration_ColorId": {
            "label": "SİYAH",
            "value": "SİYAH",
            "data_type": "dropdown"
          }
        },
        "extra_attributes": {},
        "remote_modified_date": "2022-02-03T11:53:24.467975Z"
      },
      "created_date": "2021-07-07T08:17:49.927569Z",
      "modified_date": "2021-07-07T08:42:21.265143Z",
      "omnitron_id": 1,
      "net_amount": "599.99",
      "price": "599.99",
      "price_currency": "try",
      "retail_price": "1000.00",
      "tax_rate": "8.00",
      "tax_amount": null,
      "discount_amount": "0.00",
      "without_net_amount": null,
      "installment_interest_amount": null,
      "attributes": {},
      "attributes_kwargs": {},
      "image": null,
      "price_list": {
        "pk": 1,
        "code": null,
        "name": "test_fiyat_list",
        "created_date": "2021-02-25T13:41:08.252536Z",
        "is_auto_sync": false,
        "modified_date": "2021-02-25T13:41:08.252562Z"
      },
      "stock_list": {
        "pk": 34,
        "code": null,
        "name": "test_stok_list",
        "created_date": "2021-02-25T13:41:20.523128Z",
        "is_auto_sync": false,
        "modified_date": "2021-02-25T13:41:20.523152Z"
      },
      "extra_field": {
        "price_extra_field": {},
        "stock_extra_field": {}
      },
      "parent_omnitron_id": null,
      "order": 1
    }
  ]
}

GET Order Item List - Simple

This method is used to get a list of order items with less detailed information.

Path: /api/v1/oms/order_items/list-simple/

Query Parameters

The following query parameters can be used to get the details of order items.

Parameter
Data Type
In
Description

token

string

header

The API key of the customer account

{order_number}

string

query

The number of the order we want to get the order items

Example Request

To get a less detailed information of the order items, a GET request should be sent to the /api/v1/oms/order_items/list-simple/ endpoint. In the headers, set the Authorization header to include the token for authentication.

Here's an example of how to make the request in python:

import requests

url = "https://{domain_url}/api/v1/oms/order_items/list-simple/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Token {token}'
}

response = requests.request('GET', url, headers=headers)

print(response.json())

Example Response (200 OK)

In a successful response with a status code of 200 OK, the API returns information about the order items in a JSON format. The response body contains a JSON object with the order items and their associated attributes that are only used on the frontend.

Parameter
Data Type
Description

id

integer

The primary key of the order item

created_date

date

The creation date

modified_date

date

The last modified date

omnitron_id

integer

The primary key of the order item on omnitron

net_amount

string

The net amount of the order item

price

string

The price of the order item

price_currency

string

The currency of the price

retail_price

string

The retail price of the order item

tax_rate

string

The tax rate of the order item

tax_amount

string

The tax amount of the order item

discount_amount

string

The discount amount of the order item

without_net_amount

string

The without net amount of the order item

installment_interest_amount

string

The installment interest amount of the order item

attributes

json

The properties of the order item such as sku, base code, color etc.

attributes_kwargs

json

The above data in key-value format

image

json

The image information of the order item

price_list

json

The price list information of the order item

stock_list

json

The stock list information of the order item

extra_field

json

The additional information for the order item

parent_omnitron_id

integer

The information for bundled order items

state

integer

The state ID of the order item

order

integer

The order ID of the order item

product

integer

The product ID of the order item

This example response serves as a reference to understand the structure and data format returned from this API service.

{
  "count": 1,
  "next": "https://{domain_url}/api/v1/oms/order_items/list-simple/",
  "previous": null,
  "results": [
    {
      "id": 1,
      "created_date": "2021-07-07T08:17:49.927569Z",
      "modified_date": "2021-07-07T08:42:21.265143Z",
      "omnitron_id": 1,
      "net_amount": "599.99",
      "price": "599.99",
      "price_currency": "try",
      "retail_price": "1000.00",
      "tax_rate": "8.00",
      "tax_amount": null,
      "discount_amount": "0.00",
      "without_net_amount": null,
      "installment_interest_amount": null,
      "attributes": {},
      "attributes_kwargs": {},
      "image": null,
      "price_list": {
        "pk": 1,
        "code": null,
        "name": "test_fiyat_list",
        "created_date": "2021-02-25T13:41:08.252536Z",
        "is_auto_sync": false,
        "modified_date": "2021-02-25T13:41:08.252562Z"
      },
      "stock_list": {
        "pk": 34,
        "code": null,
        "name": "test_stok_list",
        "created_date": "2021-02-25T13:41:20.523128Z",
        "is_auto_sync": false,
        "modified_date": "2021-02-25T13:41:20.523152Z"
      },
      "extra_field": {
        "price_extra_field": {},
        "stock_extra_field": {}
      },
      "parent_omnitron_id": null,
      "state": 1,
      "order": 1,
      "product": 1
    }
  ]
}

GET Order Item - Single

This method is used to get detailed information about a single order item based on its ID.

Path: /api/v1/oms/order_items/{id}/

Query Parameters

The following query parameters can be used to get the details of order items.

Parameter
Data Type
In
Description

token

string

header

The API key of the customer account

{id}

integer

url

The ID of the order item

Example Request

To retrieve detailed information of given order item, a GET request should be sent to the /api/v1/oms/order_items/{id}/ endpoint. In the headers, set the Authorization header to include the token for authentication.

Here's an example of how to make the request in python:

import requests

url = "https://{domain_url}/api/v1/oms/order_items/{id}/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Token {token}'
}

response = requests.request('GET', url, headers=headers)

print(response.json())

Example Response (200 OK)

In a successful response with a status code of 200 OK, the API returns all the details of the order items in a JSON format. The response body contains a JSON object with the order items and their associated attributes, which may include ID, created and modified date, product, state, etc.

These parameters are described in the following table.

Parameter
Data Type
Description

id

integer

The primary key of the order item

state

json

The status information of the order item

product

json

The product information of the order item

created_date

date

The creation date

modified_date

date

The last modified date

omnitron_id

integer

The primary key of the order item on omnitron

net_amount

string

The net amount of the order item

price

string

The price of the order item

price_currency

string

The currency of the price

retail_price

string

The retail price of the order item

tax_rate

string

The tax rate of the order item

tax_amount

string

The tax amount of the order item

discount_amount

string

The discount amount of the order item

without_net_amount

string

The without net amount of the order item

installment_interest_amount

string

The installment interest amount of the order item

attributes

json

The properties of the order item such as sku, base code, color etc.

attributes_kwargs

json

The above data in key-value format

image

json

The image information of the order item

price_list

json

The price list information of the order item

stock_list

json

The stock list information of the order item

extra_field

json

The additional information for the order item

parent_omnitron_id

integer

The information for bundled order items

order

integer

The order ID of the order item

This example response serves as a reference to understand the structure and data format returned from this API service.

{
  "id": 1,
  "state": {
    "id": 1,
    "created_date": "2021-06-30T14:43:26.801262Z",
    "modified_date": "2022-10-14T10:39:33.568211Z",
    "translations": {
      "en-us": {
        "name": "Preparing"
      },
      "tr-tr": {
        "name": "Hazırlanıyor"
      }
    },
    "name": "Preparing",
    "config": {},
    "enum_class": "OrderStatus",
    "enum_value": "450",
    "content_type": 3
  },
  "product": {
    "id": 1,
    "productimage_set": [
      {
        "order": 1,
        "id": 1,
        "url": "https://{cdn_urls}/products/2021/03/17/8/604303c1-e2f9-4e78-a666-67d75bbca1e3.jpg",
        "product": 1
      }
    ],
    "created_date": "2021-07-07T08:17:49.890983Z",
    "modified_date": "2022-02-09T08:14:57.425198Z",
    "omnitron_id": 1,
    "name": "Urun8",
    "base_code": "8",
    "sku": "8",
    "barcode": null,
    "attributes": {
      "renk": "SİYAH",
      "beden": "L",
      "integration_size": "L",
      "integration_color": "SİYAH",
      "integration_gram1": "One size",
      "integration_SizeId": "S",
      "integration_ColorId": "SİYAH"
    },
    "attributes_kwargs": {
      "renk": {
        "label": "SİYAH",
        "value": "SİYAH",
        "data_type": "dropdown"
      },
      "beden": {
        "label": "Large",
        "value": "L",
        "data_type": "dropdown"
      },
      "integration_size": {
        "label": "L",
        "value": "L",
        "data_type": "dropdown"
      },
      "integration_color": {
        "label": "BLACK",
        "value": "SİYAH",
        "data_type": "dropdown"
      },
      "integration_gram1": {
        "label": "One Size",
        "value": "One size",
        "data_type": "dropdown"
      },
      "integration_SizeId": {
        "label": "S",
        "value": "S",
        "data_type": "dropdown"
      },
      "integration_ColorId": {
        "label": "SİYAH",
        "value": "SİYAH",
        "data_type": "dropdown"
      }
    },
    "extra_attributes": {},
    "remote_modified_date": "2022-02-03T11:53:24.467975Z"
  },
  "created_date": "2021-07-07T08:17:49.927569Z",
  "modified_date": "2021-07-07T08:42:21.265143Z",
  "omnitron_id": 1,
  "net_amount": "599.99",
  "price": "599.99",
  "price_currency": "try",
  "retail_price": "1000.00",
  "tax_rate": "8.00",
  "tax_amount": null,
  "discount_amount": "0.00",
  "without_net_amount": null,
  "installment_interest_amount": null,
  "attributes": {},
  "attributes_kwargs": {},
  "image": null,
  "price_list": {
    "pk": 1,
    "code": null,
    "name": "pz_fiyat_list",
    "created_date": "2021-02-25T13:41:08.252536Z",
    "is_auto_sync": false,
    "modified_date": "2021-02-25T13:41:08.252562Z"
  },
  "stock_list": {
    "pk": 1,
    "code": null,
    "name": "pz_stok_list",
    "created_date": "2021-02-25T13:41:20.523128Z",
    "is_auto_sync": false,
    "modified_date": "2021-02-25T13:41:20.523152Z"
  },
  "extra_field": {
    "price_extra_field": {},
    "stock_extra_field": {}
  },
  "parent_omnitron_id": null,
  "order": 1
}

Last updated

Was this helpful?