In Shopify API, you can easily retrieve a list of orders using Postman to manage its information. With Shopify API, you can retrieve orders with many options, such as retrieving all orders, specific orders, and orders that have authorized payments ready to be captured,… But in this video, Beehexa will show you how to retrieve orders last updated after the time you choose in the EDT time zone. This call will clearly show all information about orders updated after 06th March 2022 from 1:00 to 23:00 in the EDT time zone.
Let’s dive into the article!
Step 1: Generate API Credentials From Shopify Admin
If this is the first time you make a call in the Postman, you must generate API credentials from the Shopify admin. Follow the process of How to build a custom app for Shopify in 2022? To know how to access Shopify API.
-
- After creating an app, you must assign “Orders” scopes to the admin API scopes.
- Remember the Admin API access token and the API key to retrieve a list of orders in the Postman.
Shopify Chime Integration
Shopify Close Integration
Shopify Magestore Integration
Step 2: Retrieve A List Of Orders Using Postman In The EDT Time Zone
After generating API credentials from the Shopify Admin, we will retrieve a list of orders last updated after 06th March 2022 from 1:00 to 23:00 in the EDT time zone using Postman.
-
- Log in to your Postman and create a new workspace
-
- Create a new GET with this URL:
https://{API_key}:{admin_API_access_token}@{shop}.myshopify.com/admin/api/{api-version}/{resource}
-
- {API_key} – The API key that you generated.
-
- {admin_API_access_token} – The admin API access token that you generated.
-
- {shop} – The name of your development store.
-
- {api-version} – The supported API version that you want to use.
-
- {resource} – A resource endpoint from the REST Admin API.
Or you can copy this example in the Shopify Admin, remember to change {resource} to {orders.json?updated_at_min=YY-MM-DDTtimeframe}:
https://ed86d512a2c95387ffa25f67074a222b:[email protected]/admin/api/2021-10/orders.json?updated_at_min=2022-03-06T01:00:00-23:00
Note: [updated_at_min=2022-03-06T01:00:00-23:00] = The zone time you want to retrieve the list of orders. The information is respectively [{YY-MM-DD}T{Time frame}].
-
- Paste the URL above.
Then click on send
Response:
The API will return all information about orders created last updated after 06th March 2022 from 1:00 to 23:00.
{
"orders": [
{
"id": 4345499451455,
"admin_graphql_api_id": "gid://shopify/Order/4345499451455",
"app_id": 580111,
"browser_ip": "171.236.243.102",
"buyer_accepts_marketing": false,
"cancel_reason": null,
"cancelled_at": null,
"cart_token": null,
"checkout_id": 26734414331967,
"checkout_token": "887003a6b89fa0f3f9d790e673757d78",
"client_details": {
"accept_language": "en-US,en;q=0.9",
"browser_height": 609,
"browser_ip": "171.236.243.102",
"browser_width": 1263,
"session_hash": null,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36"
},
"closed_at": null,
"confirmed": true,
"contact_email": "[email protected]",
"created_at": "2022-03-07T23:22:00+09:00",
"currency": "AUD",
"current_subtotal_price": "102.00",
"current_subtotal_price_set": {
"shop_money": {
"amount": "102.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "102.00",
"currency_code": "AUD"
}
},
"current_total_discounts": "18.00",
"current_total_discounts_set": {
"shop_money": {
"amount": "18.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "18.00",
"currency_code": "AUD"
}
},
"current_total_duties_set": null,
"current_total_price": "102.00",
"current_total_price_set": {
"shop_money": {
"amount": "102.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "102.00",
"currency_code": "AUD"
}
},
"current_total_tax": "0.00",
"current_total_tax_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "AUD"
}
},
"customer_locale": "en",
"device_id": null,
"discount_codes": [
{
"code": "BEEHEXA",
"amount": "18.00",
"type": "percentage"
}
],
"email": "[email protected]",
"estimated_taxes": false,
"financial_status": "authorized",
"fulfillment_status": null,
"gateway": "bogus",
"landing_site": "/wallets/checkouts.json",
"landing_site_ref": null,
"location_id": null,
"name": "#1254",
"note": null,
"note_attributes": [],
"number": 254,
"order_number": 1254,
"order_status_url": "https://hexasync.myshopify.com/25322618943/orders/72af96c75c3370c07d1f4f8638015500/authenticate?key=dada8a5d2cf78ffb9c234550022cc690",
"original_total_duties_set": null,
"payment_gateway_names": [
"bogus"
],
"phone": null,
"presentment_currency": "AUD",
"processed_at": "2022-03-07T23:21:59+09:00",
"processing_method": "direct",
"reference": null,
"referring_site": "https://hexasync.myshopify.com/products/polar-heart-rate-monitor",
"source_identifier": null,
"source_name": "web",
"source_url": null,
"subtotal_price": "102.00",
"subtotal_price_set": {
"shop_money": {
"amount": "102.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "102.00",
"currency_code": "AUD"
}
},
"tags": "",
"tax_lines": [],
"taxes_included": false,
"test": true,
"token": "72af96c75c3370c07d1f4f8638015500",
"total_discounts": "18.00",
"total_discounts_set": {
"shop_money": {
"amount": "18.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "18.00",
"currency_code": "AUD"
}
},
"total_line_items_price": "120.00",
"total_line_items_price_set": {
"shop_money": {
"amount": "120.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "120.00",
"currency_code": "AUD"
}
},
"total_outstanding": "0.00",
"total_price": "102.00",
"total_price_set": {
"shop_money": {
"amount": "102.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "102.00",
"currency_code": "AUD"
}
},
"total_price_usd": "75.40",
"total_shipping_price_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "AUD"
}
},
"total_tax": "0.00",
"total_tax_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "AUD"
}
},
"total_tip_received": "0.00",
"total_weight": 0,
"updated_at": "2022-03-07T23:22:02+09:00",
"user_id": null,
"billing_address": {
"first_name": "Van",
"address1": "300 Pere Megret Street",
"phone": "",
"city": "Abbeville",
"zip": "70510",
"province": "Louisiana",
"country": "United States",
"last_name": "Anh",
"address2": "",
"company": "beehexa",
"latitude": 29.9748979,
"longitude": -92.13769719999999,
"name": "Van Anh",
"country_code": "US",
"province_code": "LA"
},
"customer": {
"id": 5585745641535,
"email": "[email protected]",
"accepts_marketing": true,
"created_at": "2022-01-10T18:36:37+09:00",
"updated_at": "2022-03-07T23:22:01+09:00",
"first_name": "Van",
"last_name": "Anh",
"orders_count": 2,
"state": "disabled",
"total_spent": "531.80",
"last_order_id": 4340197785663,
"note": null,
"verified_email": true,
"multipass_identifier": null,
"tax_exempt": false,
"phone": null,
"tags": "",
"last_order_name": "#1245",
"currency": "AUD",
"accepts_marketing_updated_at": "2022-02-23T20:33:51+09:00",
"marketing_opt_in_level": "single_opt_in",
"tax_exemptions": [],
"sms_marketing_consent": null,
"admin_graphql_api_id": "gid://shopify/Customer/5585745641535",
"default_address": {
"id": 6833690705983,
"customer_id": 5585745641535,
"first_name": "Van",
"last_name": "Anh",
"company": "beehexa",
"address1": "300 Pere Megret Street",
"address2": "",
"city": "Abbeville",
"province": "Louisiana",
"country": "United States",
"zip": "70510",
"phone": "",
"name": "Van Anh",
"province_code": "LA",
"country_code": "US",
"country_name": "United States",
"default": true
}
},
"discount_applications": [
{
"target_type": "line_item",
"type": "discount_code",
"value": "15.0",
"value_type": "percentage",
"allocation_method": "across",
"target_selection": "all",
"code": "BEEHEXA"
}
],
"fulfillments": [],
"line_items": [
{
"id": 11069631332415,
"admin_graphql_api_id": "gid://shopify/LineItem/11069631332415",
"fulfillable_quantity": 1,
"fulfillment_service": "manual",
"fulfillment_status": null,
"gift_card": false,
"grams": 0,
"name": "Polar Heart Rate Monitor",
"origin_location": {
"id": 3140898455615,
"country_code": "VN",
"province_code": "",
"name": "Hexasync Demo Storefront",
"address1": "428 Dien Bien Phu Ward 11 District 10",
"address2": "",
"city": "Ho Chi Minh City",
"zip": "700000"
},
"price": "120.00",
"price_set": {
"shop_money": {
"amount": "120.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "120.00",
"currency_code": "AUD"
}
},
"product_exists": true,
"product_id": 4356054810687,
"properties": [],
"quantity": 1,
"requires_shipping": true,
"sku": "CONHEARTM1",
"taxable": true,
"title": "Polar Heart Rate Monitor",
"total_discount": "0.00",
"total_discount_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "AUD"
}
},
"variant_id": 31179522867263,
"variant_inventory_management": "shopify",
"variant_title": "",
"vendor": "hexasync",
"tax_lines": [],
"duties": [],
"discount_allocations": [
{
"amount": "18.00",
"amount_set": {
"shop_money": {
"amount": "18.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "18.00",
"currency_code": "AUD"
}
},
"discount_application_index": 0
}
]
}
],
"payment_details": {
"credit_card_bin": "1",
"avs_result_code": null,
"cvv_result_code": null,
"credit_card_number": "•••• •••• •••• 1",
"credit_card_company": "Bogus"
},
"payment_terms": null,
"refunds": [],
"shipping_address": {
"first_name": "Van",
"address1": "300 Pere Megret Street",
"phone": "",
"city": "Abbeville",
"zip": "70510",
"province": "Louisiana",
"country": "United States",
"last_name": "Anh",
"address2": "",
"company": "beehexa",
"latitude": 29.9748979,
"longitude": -92.13769719999999,
"name": "Van Anh",
"country_code": "US",
"province_code": "LA"
},
"shipping_lines": [
{
"id": 3683247587391,
"carrier_identifier": null,
"code": "Standard",
"delivery_category": null,
"discounted_price": "0.00",
"discounted_price_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "AUD"
}
},
"phone": null,
"price": "0.00",
"price_set": {
"shop_money": {
"amount": "0.00",
"currency_code": "AUD"
},
"presentment_money": {
"amount": "0.00",
"currency_code": "AUD"
}
},
"requested_fulfillment_service_id": null,
"source": "shopify",
"title": "Standard",
"tax_lines": [],
"discount_allocations": []
}
]
}
]
}
Above are all steps to retrieve a list of orders using Postman with Shopify API. If you have any questions, please comment below or refer to our blog: What is an API?. Besides, you can see more Shopify API documentation in the developer docs.
If you still do not understand the tutorial’s content, you can watch the video below for a more overview.
Hopefully, you can do it!