Shipping Line API for private app

Livby0426
New Member
4 0 0

Hi guys,

We are facing a serious problem with the shipping line API.

When we try to place an order from our backend, it returned all the info except the shipping line. 

It means we couldn't choose the shipping methods on our Private App. But we DO need this well-functional.

Could you kindly check on the codes below? If I want the shipping line returns to us, I have to manually choose the shipping method on the Shopify store, which does NOT make sense. 

What we need is when a user purchases a product from our private app, we can obtain the shipping methods calculated by Shopify to display to our customers.

And, we actually have checked on the APIs, and quite a lot of documents, no answers at all.

Please do help us out! Thank you so much!

{
            "id": 854045065388,
            "note": null,
            "email": "samanthatheus@gmail.com",
            "taxes_included": false,
            "currency": "USD",
            "invoice_sent_at": null,
            "created_at": "2021-07-13T19:12:25+09:00",
            "updated_at": "2021-07-13T19:12:25+09:00",
            "tax_exempt": false,
            "completed_at": null,
            "name": "#D60",
            "status": "open",
            "line_items": [
                {
                    "id": 57139691782316,
                    "variant_id": 40100176691372,
                    "product_id": 6820603330732,
                    "title": "Test Shipping",
                    "variant_title": "Colorful",
                    "sku": "LB001",
                    "vendor": "Livby0426",
                    "quantity": 1,
                    "requires_shipping": true,
                    "taxable": true,
                    "gift_card": false,
                    "fulfillment_service": "manual",
                    "grams": 454,
                    "tax_lines": [
                        {
                            "rate": 0.06,
                            "title": "Michigan State Tax",
                            "price": "0.60"
                        }
                    ],
                    "applied_discount": null,
                    "name": "Test Shipping - Colorful",
                    "properties": [],
                    "custom": false,
                    "price": "10.00",
                    "admin_graphql_api_id": "gid://shopify/DraftOrderLineItem/57139691782316"
                }
            ],
            "shipping_address": {
                "first_name": "samantha",
                "address1": "2929 Hannah Boulevard",
                "phone": null,
                "city": "East Lansing",
                "zip": "48823",
                "province": "Michigan",
                "country": "United States",
                "last_name": "hu",
                "address2": "",
                "company": null,
                "latitude": 42.7185319,
                "longitude": -84.458573,
                "name": "samantha hu",
                "country_code": "US",
                "province_code": "MI"
            },
            "billing_address": {
                "first_name": "samantha",
                "address1": "2929 Hannah Boulevard",
                "phone": null,
                "city": "East Lansing",
                "zip": "48823",
                "province": "Michigan",
                "country": "United States",
                "last_name": "hu",
                "address2": "",
                "company": null,
                "latitude": 42.7185319,
                "longitude": -84.458573,
                "name": "samantha hu",
                "country_code": "US",
                "province_code": "MI"
            },
            "invoice_url": "https://livby0426.myshopify.com/56464212140/invoices/d3077a275a7509af5049d5d35d9a3462",
            "applied_discount": null,
            "order_id": null,
            "shipping_line": {
                "title": "Media Mail",
                "custom": false,
                "handle": "usps-MediaMail-13.18",
                "price": "13.18"
            },
            "tax_lines": [
                {
                    "rate": 0.06,
                    "title": "Michigan State Tax",
                    "price": "0.60"
                },
                {
                    "rate": 0.06,
                    "title": "Michigan State Tax",
                    "price": "0.79"
                }
            ],
            "tags": "",
            "note_attributes": [],
            "total_price": "24.57",
            "subtotal_price": "10.00",
            "total_tax": "1.39",
            "admin_graphql_api_id": "gid://shopify/DraftOrder/854045065388",
            "customer": {
                "id": 5351632208044,
                "email": "samanthatheus@gmail.com",
                "accepts_marketing": false,
                "created_at": "2021-07-13T11:15:05+09:00",
                "updated_at": "2021-07-13T11:24:26+09:00",
                "first_name": "samantha",
                "last_name": "hu",
                "orders_count": 0,
                "state": "disabled",
                "total_spent": "0.00",
                "last_order_id": null,
                "note": null,
                "verified_email": true,
                "multipass_identifier": null,
                "tax_exempt": false,
                "phone": null,
                "tags": "",
                "last_order_name": null,
                "currency": "USD",
                "accepts_marketing_updated_at": "2021-07-13T11:15:06+09:00",
                "marketing_opt_in_level": null,
                "tax_exemptions": [],
                "admin_graphql_api_id": "gid://shopify/Customer/5351632208044",
                "default_address": {
                    "id": 6533145493676,
                    "customer_id": 5351632208044,
                    "first_name": "samantha",
                    "last_name": "hu",
                    "company": null,
                    "address1": "2929 Hannah Boulevard",
                    "address2": "",
                    "city": "East Lansing",
                    "province": "Michigan",
                    "country": "United States",
                    "zip": "48823",
                    "phone": null,
                    "name": "samantha hu",
                    "province_code": "MI",
                    "country_code": "US",
                    "country_name": "United States",
                    "default": true
                }
            }
        }

Best regards.

 

0 Likes