Skip to main content

Get Orders

Depending on the channel type, Omnitron retrieves and automatically creates new orders. In order to receive all orders in the system, the user must send an HTTP GET request as shown below.

ParameterData TypeRequiredInDescription
api_tokenstringYesheaderThe API key of the customer account
limitintegerNoqueryAmount of items per page that will be returned. Default value is 10
pagestringNoqueryPage number to return. Default value is 1
NOTE

If limit and page parameters are not sent, response returns 10 orders in the first page by default.

GET Orders

Path: /api/i1/orders/

Sample HTTP request to retrieve all orders in the system.

  • content_type header represents the response type.

  • Authorization header is required for authentication. You can retrieve api_token by logging in.

Example Request

import requests

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

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

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

Example Response

Shows desired orders. All parameters of an order are described in the table below.

Resource properties are in Python format.

PropertyData TypeDescription
numberintegerOrder code
statusstringOrder status at the current time. Order statuses are predefined. You can search for the meaning of the status in the Order Status section.
date_placediso date strCreated date of the order.
customerdictRelated Customer object. You can look up the Customer section for more details about the fields in the customer dictionary.
shipping_addressdictRelated Address object. You can look up the Address section for more details about the fields in the shipping_address dictionary.
billing_addressdictRelated Address object.You can look up the Address section for more details about the fields in the billing_address dictionary.
currencystringCurrency type of the transaction. Currency types are predefined. Every currency type is a global abbreviation of the currency.
amountstringAmount of the order
shipping_amountstringShipping amount of the order
shipping_tax_ratestringShipping tax rate of the order
extra_fielddictUsage of extra information.
payment_optionintRelated Payment Option object ID. You can look up the Payments section for more information.
payment_option_slugstringUnique slug information related to the Payment Option object.
bin_numberstringBin Number
installmentintRelated Installment object ID. You can look up the Payments section for more information
installment_countintInstallment count information related to the Installment object.
installment_interest_amountstringCalculated by (amount of the order * installment interest rate) \ Installment interest rate is the related Installment object info.
cargo_companyintRelated Cargo Company object ID.
invoice_numberstringInvoice number
invoice_dateIso date strInvoice date
e_archieve_urlUrl field stre archive url info
refund_amountstringRefund amount
discount_refund_amountstringDiscount refund amount
shipping_refund_amountstringShipping refund amount
shipping_refund_amountstringShipping refund amount
discount_amountstringDiscount amount
is_sendbooleanTrue means order sent to ERP.
net_shipping _amountstringNet shipping amount. (Shipping amount + Shipping Interest Amount)
shipping_interest_amountstringShipping Interest amount
tracking_numberstringTracking number for cargo integration
carrier_shipping_codestringShipping code for cargo integration
remote_addrstringGeneric IP address for the orders created.
has_gift_boxbooleanGift Box is selected or not
gift_box_notestringNote for the gift box
external_statusintRelated Order External Status object ID.
orderitem_setlistEach element is the related Order Item object. You can look up the Order Item section for more information.
channeldictRelated Channel object. You can look up the Channel section for more information.
  • Count shows how many orders exist in the system.

  • Next shows the next cursor url to retrieve the desired orders.

  • Previous shows the previous page url to retrieve the desired orders.

  • Results shows every order property with detailed field descriptions for the current page.

{
"count": 595,
"next": "https://{customer_api_url}/api/i1/orders/?limit=2&page=2",
"previous": null,
"results": [
{
"id": 1,
"number": "1055565228112825",
"status": "550",
"date_placed": "2019-06-17T13:35:47.026886Z",
"customer": {
"id": 1,
"email": "example@email.com ",
"first_name": "Lorem",
"last_name": "Ipsum",
"phone_number": null
},
"shipping_address": {
"email": "example@email.com ",
"phone_number": "05XXXXXXXX",
"first_name": "Lorem",
"last_name": "Ipsum",
"country": {
"name": "Italy",
"code": "it"
},
"city": {
"id": 1,
"name": "MILANO"
},
"line": "Viale Edoardo Jenner",
"title": "dolor sit amet",
"township": {
"id": 1,
"name": "20158 Milano MI"
},
"district": {
"id": 5,
"name": "Lorem Ipsum"
},
"postcode": "",
"notes": null,
"company_name": "",
"tax_office": "",
"tax_no": "",
"e_bill_taxpayer": false
},
"billing_address": {
"email": "example@email.com ",
"phone_number": "05XXXXXXXX",
"first_name": "Lorem",
"last_name": "Ipsum",
"country": {
"name": "Italy",
"code": "it"
},
"city": {
"id": 1,
"name": "MILANO"
},
"line": "Viale Edoardo Jenner",
"title": " dolor sit amet",
"township": {
"id": 1,
"name": "20158 Milano MI"
},
"district": {
"id": 5,
"name": "Lorem Ipsum"
},
"postcode": "",
"notes": null,
"company_name": "",
"tax_office": "",
"tax_no": "",
"e_bill_taxpayer": false
},
"currency": "try",
"amount": "107.00",
"shipping_amount": "7.00",
"shipping_tax_rate": null,
"extra_field": {},
"payment_option": 2,
"payment_option_slug": "kredi_karti",
"bin_number": null,
"installment": null,
"installment_count": 1,
"installment_interest_amount": "0.00",
"cargo_company": 1,
"invoice_number": "12345",
"invoice_date": null,
"e_archive_url": "http://www.zrrcovgizghvjpsveflc.com/",
"refund_amount": "0.00",
"discount_refund_amount": "0.00",
"shipping_refund_amount": "0.00",
"discount_amount": "0.00",
"is_send": true,
"net_shipping_amount": 7,
"shipping_interest_amount": "0.00",
"tracking_number": "11111111",
"carrier_shipping_code": null,
"remote_addr": "213.194.76.106",
"has_gift_box": false,
"gift_box_note": null,
"external_status": null,
"orderitem_set": [
{
"id": 1,
"order": 1,
"product_sku": "1185185001",
"status": "550",
"price_currency": "try",
"price": "100.00",
"tax_rate": "18.00",
"extra_field": {},
"price_list": 1,
"stock_list": 1,
"cancel_status": null,
"invoice_number": "12345",
"invoice_date": null,
"e_archive_url": "http://www.zrrcovgizghvjpsveflc.com/",
"installment_interest_amount": "0.00",
"tracking_number": "11111111",
"carrier_shipping_code": null,
"shipping_company": "other",
"shipment_code": null,
"external_status": null,
"discount_amount": "0.00",
"retail_price": null,
"attributes": {},
"attributes_kwargs": {},
"image": null
}
],
"channel": {
"name": "Shop",
"conf": {
"server": "https://example-shop.com.tr/api/v1/"
}
}
},
{
"id": 2,
"number": "1056370250512517",
"status": "450",
"date_placed": "2019-06-18T11:57:28.471578Z",
"customer": {
"id": 1,
"email": "example@email.com",
"first_name": "Lorem",
"last_name": "Ipsum",
"phone_number": null
},
"shipping_address": {
"email": "example@email.com",
"phone_number": "05XXXXXXXX",
"first_name": "Lorem",
"last_name": "Ipsum",
"country": {
"name": "Italy",
"code": "it"
},
"city": {
"id": 28,
"name": "ROME"
},
"line": "00184",
"title": "Akinon Busimess",
"township": {
"id": 318,
"name": "Rome"
},
"district": {
"id": 24444,
"name": "Lorem Ipsum"
},
"postcode": "43211",
"notes": null,
"company_name": "",
"tax_office": "",
"tax_no": "",
"e_bill_taxpayer": false
},
"billing_address": {
"email": "example@email.com",
"phone_number": "05XXXXXXXX",
"first_name": "Lorem",
"last_name": "Ipsum",
"country": {
"name": "Italy",
"code": "it"
},
"city": {
"id": 28,
"name": "ROME"
},
"line": "00184",
"title": "Akinon İş",
"township": {
"id": 318,
"name": "Rome"
},
"district": {
"id": 24444,
"name": "Lorem Ipsum"
},
"postcode": "43211",
"notes": null,
"company_name": "",
"tax_office": "",
"tax_no": "",
"e_bill_taxpayer": false
},
"currency": "try",
"amount": "207.00",
"shipping_amount": "7.00",
"shipping_tax_rate": null,
"extra_field": {},
"payment_option": 2,
"payment_option_slug": "kredi_karti",
"bin_number": null,
"installment": null,
"installment_count": 1,
"installment_interest_amount": "0.00",
"cargo_company": 1,
"invoice_number": null,
"invoice_date": null,
"e_archive_url": null,
"refund_amount": "0.00",
"discount_refund_amount": "0.00",
"shipping_refund_amount": "0.00",
"discount_amount": "0.00",
"is_send": true,
"net_shipping_amount": 7,
"shipping_interest_amount": "0.00",
"tracking_number": "09847356",
"carrier_shipping_code": null,
"remote_addr": "213.194.76.106",
"has_gift_box": false,
"gift_box_note": null,
"external_status": null,
"orderitem_set": [
{
"id": 3,
"order": 2,
"product_sku": "1185185001",
"status": "550",
"price_currency": "try",
"price": "100.00",
"tax_rate": "18.00",
"extra_field": {},
"price_list": 1,
"stock_list": 1,
"cancel_status": null,
"invoice_number": null,
"invoice_date": null,
"e_archive_url": null,
"installment_interest_amount": "0.00",
"tracking_number": "09847356",
"carrier_shipping_code": null,
"shipping_company": "other",
"shipment_code": null,
"external_status": null,
"discount_amount": "0.00",
"retail_price": null,
"attributes": {},
"attributes_kwargs": {},
"image": null
},
{
"id": 2,
"order": 2,
"product_sku": "1081448001",
"status": "450",
"price_currency": "try",
"price": "100.00",
"tax_rate": "18.00",
"extra_field": {},
"price_list": 1,
"stock_list": 1,
"cancel_status": null,
"invoice_number": null,
"invoice_date": null,
"e_archive_url": null,
"installment_interest_amount": "0.00",
"tracking_number": "74436",
"carrier_shipping_code": null,
"shipping_company": null,
"shipment_code": null,
"external_status": null,
"discount_amount": "0.00",
"retail_price": null,
"attributes": {},
"attributes_kwargs": {},
"image": null
}
],
"channel": {
"name": "Shop",
"conf": {
"server": "https://example-shop.com.tr/api/v1/"
}
}
}
]
}