Skip to main content

Get Order Detail by Order Number

In order to extract specific order details, the user must know the number field of the order.

ParameterData TypeRequiredInDescription
api_tokenstringYESheaderThe API key of the customer account
{order_number}stringYESqueryOrder No.

GET Order Detail by Order Number

Path: /api/i1/orders/

GET request is used for retrieving order details.

  • content_type header represents the response type.

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

Example Request

import requests

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

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

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

Example Response

Shows desired order with a given number. All parameters of an order are described in the table below. Resource properties are in Python format.

ParameterData TypeDescription
numberintegerOrder code
statusstringOrder status code
date_placedstringOrder date
customerdictCustomer information
emailstringCustomer e-mail
first_namestringCustomer name
last_namestringCustomer surname
phone_numberstringCustomer phone
shipping_addressdictShipping destination address information
emailstringShip-to party email
first_namestringShip-to party name
last_namestringShip-to party surname
phone_numberstringShip-to party phone number
countrydictDestination country code
namestringDestination country name
codestringDestination country code
citydictOrder's city details
idstringCity ID
namestringCity name
linestringAddress
titlestringAddress title
townshipdictOrder's township details
idstringTownship ID
namestringTownship name
districtdictOrder's district details
idstringDistrict ID
postcodestringDistrict postcode
notesstringAddress notes
company_namestringCompany name
tax_officestringTax office
tax_nostringTax no
e_bill_taxpayerbooleanIs E-bill tax payer or not
billing_addressdictBilling address
currencystringUnit of currency
amountfloatAmount
shipping_amountfloatShipping amount
shipping_tax_ratefloatShipping tax rate
extra_fielddictAdditional informations about order
payment_optionstringRelated Payment Option object id. Check for Payment section for more information.
payment_option_slugstringRelated Payment Option object slug property.
bin_numberstringBin number
installmentstringRelated Installment object id. See the Installment section for more information.
installment_countintegerInstallment count
installment_interest_amountstringLate charges
cargo_companystringCargo company
invoice_numberstringInvoice number
invoice_dateiso date strInvoice date
e_archive_urlstringE-archive url
refund_amountstringRefund amount
discount_refund_amountstringDiscount refund amount
shipping_refund_amountstringShipping refund amount
discount_amountfloatTotal discount amount for the order
is_sendbooleanShows if the order has been sent to ERP
net_shipping_amountfloatNet shipping amount. (Shipping amount + Shipping Interest Amount)
shipping_interest_amountfloatShipping 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_boxbooleanShows whether it has a gift box
gift_box_notestringGift Note
external_statusidRelated Order External Status object id.
orderitem_setarrayList of order items
idstringOrder item ID
orderstringThe order of the order item
product_skustringProduct SKU of order item
statusstringOrder status code
price_currencystringPrice currency of the order item
pricefloatPrice of the order item
tax_ratefloatTax rate of the order item
extra_fieldfloatAdditional information about the order item
price_listidThe price list containing the order item
stock_listidThe stock list containing the order item
cancel_statusstringwaiting, confirmation_waiting, confirmed, approved, rejected, waiting_for_payment, manuel_refund_need, completed
invoice_numberstringInvoice number
invoice_dateiso date strInvoice date
e_archive_urlstringE-archive url
installment_interest_amountfloatDelay interest of installment
tracking_numberstringShipping tracking number
carrier_shipping_codestringShipping code for cargo integration
shipping_companystringShipping company
shipment_codestringShipment code
external_statusidRelated Order External Status object ID.
discount_amountstringTotal discount applied of order
retail_pricefloatRetail price
attributesdictAttribute list
attributes_kwargsdictDetails of the attributes attached to the product
imagestr(url)Product image
{
"id": 27,
"number": "bf7b66149236455",
"status": "400",
"date_placed": "2017-01-30T08:28:26.158165Z",
"customer": {
"id": 1103,
"email": "test@test.com",
"first_name": "TEST",
"last_name": "TEST",
"phone_number": null
},
"shipping_address": {
"email": "test@test.com",
"phone_number": "0 (198) 895-4431",
"first_name": "TEST",
"last_name": "TEST",
"country": {
"name": "Turkey",
"code": "tr"
},
"city": {
"id": 71,
"name": "Afyon"
},
"line": "test",
"title": "TEST",
"township": {
"id": 853,
"name": "DİNAR"
},
"district": {
"id": 3679,
"name": "İNCESU"
},
"postcode": "11111",
"notes": null,
"company_name": null,
"tax_office": null,
"tax_no": null,
"e_bill_taxpayer": false,
"identity_number": null,
"extra_field": {}
},
"billing_address": {
"email": "test@test.com",
"phone_number": "0 (198) 895-4431",
"first_name": "TEST",
"last_name": "TEST",
"country": {
"name": "Turkey",
"code": "tr"
},
"city": {
"id": 71,
"name": "Afyon"
},
"line": "test",
"title": "TEST",
"township": {
"id": 853,
"name": "DİNAR"
},
"district": {
"id": 3679,
"name": "İNCESU"
},
"postcode": "11111",
"notes": null,
"company_name": null,
"tax_office": null,
"tax_no": null,
"e_bill_taxpayer": false,
"identity_number": null,
"extra_field": {}
},
"currency": "try",
"amount": "16.40",
"shipping_amount": "8.50",
"shipping_tax_rate": null,
"extra_field": {
"cargo_line_id": "325a79ac-e251-4285-8a32-a70e0119237e"
},
"payment_option": 2,
"payment_option_slug": "kredi_karti",
"bin_number": "454360",
"installment": 22,
"installment_count": 1,
"installment_interest_amount": "0.00",
"cargo_company": 1,
"invoice_number": "",
"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": "8.50",
"shipping_interest_amount": "0.00",
"tracking_number": null,
"carrier_shipping_code": null,
"remote_addr": null,
"has_gift_box": false,
"gift_box_note": null,
"external_status": null,
"orderitem_set": [
{
"id": 113,
"order": 27,
"product_sku": "2672881047887",
"status": "400",
"price_currency": "try",
"price": "7.90",
"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": null,
"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": "http://localhost:8080/api/v1/"
}
}
}