Shopify API: Retrieve a list of orders Using Postman

Shopify API: Retrieve a list of orders Using Postman

In Shopify API, you can retrieve a list of orders to manage easily information of its. With Shopify API, you can retrieve orders with many options such as retrieve all orders, retrieve specific orders, retrieve 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 show clearly all information about orders last 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 in How to build a custom app for Shopify in 2022? to know how to access Shopify API. 

  • After creating an app, you need to 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. 

Step 2: Retrieve A List Of Orders In The EDT Time Zone Using Postman

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}
Code language: JavaScript (javascript)
  1. {API_key} – The API key that you generated.
  2. {admin_API_access_token} – The admin API access token that you generated.
  3. {shop} – The name of your development store.
  4. {api-version} – The supported API version that you want to use.
  5. {resource} – A resource endpoint from the REST Admin API.

Or you can copy this example in the Shopify Admin, remember 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
Code language: JavaScript (javascript)

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.
Retrieve a list of orders

Then click on send

Response:

The API will return all information about orders are 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": []
                }
            ]
        }
    ]
}
response_retrieve a list of orders

Above are all steps to retrieve a list of orders using Postman with Shopify API. If you have any questions, please leave a comment below or refer to our Shopify api documentation.

If you still do not understand the tutorial’s content, you can watch the video below for a more overview.

Shopify API – Retrieve a list of orders

Hopefully, you can do it!

Shopify API: Retrieve a list of orders Using Postman

Shopify API: Retrieve a list of orders Using Postman

Join The Ride

Subscribe to our fortnightly newsletter with stories from our latest adventures and the best travel tips

Table of Contents