Admin Order Rest API not retuning all fields in shipping_address

railz_dev
Shopify Partner
4 0 0

I am trying to get the list of all orders using Admin Order API but I am not getting all the fields inside shipping_address & customer but I can see them populated Shopify store

Shopify Store Order UIShopify Store Order UI

Using Shopify node SDK @Shopify/shopify-api version 3.0.1

This is what I am getting from the API response 

 

 

{
  "id": "<id>",
  "admin_graphql_api_id": "<admin_graphql_api_id>",
  "app_id": "<app_id>",
  "buyer_accepts_marketing": false,
  "cancel_reason": null,
  "cancelled_at": null,
  "cart_token": null,
  "checkout_id": "<checkout_id>",
  "checkout_token": "<checkout_token>",
  "client_details": {
    "accept_language": null,
    "browser_height": null,
    "browser_width": null
  },
  "closed_at": null,
  "confirmed": true,
  "created_at": "2022-07-13T05:18:37-03:00",
  "currency": "CAD",
  "current_subtotal_price": "6.00",
  "current_subtotal_price_set": {
    "shop_money": {
      "amount": "6.00",
      "currency_code": "CAD"
    },
    "presentment_money": {
      "amount": "6.00",
      "currency_code": "CAD"
    }
  },
  "current_total_discounts": "0.00",
  "current_total_discounts_set": {
    "shop_money": {
      "amount": "0.00",
      "currency_code": "CAD"
    },
    "presentment_money": {
      "amount": "0.00",
      "currency_code": "CAD"
    }
  },
  "current_total_duties_set": null,
  "current_total_price": "6.00",
  "current_total_price_set": {
    "shop_money": {
      "amount": "6.00",
      "currency_code": "CAD"
    },
    "presentment_money": {
      "amount": "6.00",
      "currency_code": "CAD"
    }
  },
  "current_total_tax": "0.00",
  "current_total_tax_set": {
    "shop_money": {
      "amount": "0.00",
      "currency_code": "CAD"
    },
    "presentment_money": {
      "amount": "0.00",
      "currency_code": "CAD"
    }
  },
  "customer_locale": "en",
  "device_id": null,
  "discount_codes": [],
  "estimated_taxes": false,
  "financial_status": "pending",
  "fulfillment_status": null,
  "gateway": "Bank Deposit",
  "landing_site": null,
  "landing_site_ref": null,
  "location_id": null,
  "name": "#31039",
  "note": null,
  "note_attributes": [],
  "number": 39,
  "order_number": 1039,
  "order_status_url": "<order_status_url>",
  "original_total_duties_set": null,
  "payment_gateway_names": [
    "Bank Deposit"
  ],
  "presentment_currency": "CAD",
  "processed_at": "2022-07-13T05:18:37-03:00",
  "processing_method": "manual",
  "reference": null,
  "referring_site": null,
  "source_identifier": null,
  "source_name": "shopify_draft_order",
  "source_url": null,
  "subtotal_price": "6.00",
  "subtotal_price_set": {
    "shop_money": {
      "amount": "6.00",
      "currency_code": "CAD"
    },
    "presentment_money": {
      "amount": "6.00",
      "currency_code": "CAD"
    }
  },
  "tags": "",
  "tax_lines": [],
  "taxes_included": false,
  "test": false,
  "token": "<token>",
  "total_discounts": "0.00",
  "total_discounts_set": {
    "shop_money": {
      "amount": "0.00",
      "currency_code": "CAD"
    },
    "presentment_money": {
      "amount": "0.00",
      "currency_code": "CAD"
    }
  },
  "total_line_items_price": "6.00",
  "total_line_items_price_set": {
    "shop_money": {
      "amount": "6.00",
      "currency_code": "CAD"
    },
    "presentment_money": {
      "amount": "6.00",
      "currency_code": "CAD"
    }
  },
  "total_outstanding": "6.00",
  "total_price": "6.00",
  "total_price_set": {
    "shop_money": {
      "amount": "6.00",
      "currency_code": "CAD"
    },
    "presentment_money": {
      "amount": "6.00",
      "currency_code": "CAD"
    }
  },
  "total_price_usd": "4.62",
  "total_shipping_price_set": {
    "shop_money": {
      "amount": "0.00",
      "currency_code": "CAD"
    },
    "presentment_money": {
      "amount": "0.00",
      "currency_code": "CAD"
    }
  },
  "total_tax": "0.00",
  "total_tax_set": {
    "shop_money": {
      "amount": "0.00",
      "currency_code": "CAD"
    },
    "presentment_money": {
      "amount": "0.00",
      "currency_code": "CAD"
    }
  },
  "total_tip_received": "0.00",
  "total_weight": 453,
  "updated_at": "2022-07-13T05:18:38-03:00",
  "user_id": "<user_id>",
  "billing_address": {
    "province": "Ontario",
    "country": "Canada",
    "latitude": 43.6506942,
    "longitude": -79.3918249,
    "country_code": "CA",
    "province_code": "ON"
  },
  "customer": {
    "id": "<customer_id>",
    "accepts_marketing": false,
    "created_at": "2022-07-13T05:17:09-03:00",
    "updated_at": "2022-07-13T05:17:09-03:00",
    "state": "disabled",
    "note": "testing orders",
    "verified_email": true,
    "multipass_identifier": null,
    "tax_exempt": true,
    "tags": "",
    "currency": "CAD",
    "accepts_marketing_updated_at": "2022-07-13T05:17:09-03:00",
    "marketing_opt_in_level": null,
    "tax_exemptions": [],
    "email_marketing_consent": {
      "state": "not_subscribed",
      "opt_in_level": "single_opt_in",
      "consent_updated_at": null
    },
    "sms_marketing_consent": null,
    "sms_transactional_consent": null,
    "admin_graphql_api_id": "<admin_graphql_api_id>",
    "default_address": {
      "id": 7904247316697,
      "customer_id": "<customer_id>",
      "company": "",
      "province": "Ontario",
      "country": "Canada",
      "province_code": "ON",
      "country_code": "CA",
      "country_name": "Canada",
      "default": true
    }
  },
  "discount_applications": [],
  "fulfillments": [],
  "line_items": [
    {
      "id": 12313714753753,
      "admin_graphql_api_id": "<admin_graphql_api_id>",
      "destination_location": {
        "id": 3536293363929,
        "country_code": "CA",
        "province_code": "ON"
      },
      "fulfillable_quantity": 1,
      "fulfillment_service": "manual",
      "fulfillment_status": null,
      "gift_card": false,
      "grams": 454,
      "name": "aged waterfall",
      "origin_location": {
        "id": 3501500203225,
        "country_code": "CA",
        "province_code": "ON"
      },
      "price": "6.00",
      "price_set": {
        "shop_money": {
          "amount": "6.00",
          "currency_code": "CAD"
        },
        "presentment_money": {
          "amount": "6.00",
          "currency_code": "CAD"
        }
      },
      "product_exists": true,
      "product_id": 7681215594713,
      "properties": [],
      "quantity": 1,
      "requires_shipping": true,
      "sku": "abc123",
      "taxable": false,
      "title": "aged waterfall",
      "total_discount": "0.00",
      "total_discount_set": {
        "shop_money": {
          "amount": "0.00",
          "currency_code": "CAD"
        },
        "presentment_money": {
          "amount": "0.00",
          "currency_code": "CAD"
        }
      },
      "variant_id": 42840909054169,
      "variant_inventory_management": "shopify",
      "variant_title": "",
      "vendor": "Railz Dev Store",
      "tax_lines": [],
      "duties": [],
      "discount_allocations": []
    }
  ],
  "payment_details": null,
  "payment_terms": {
    "id": 8567619801,
    "created_at": "2022-07-13T05:18:37-03:00",
    "due_in_days": 7,
    "payment_schedules": [
      {
        "id": 9526116569,
        "amount": "6.00",
        "currency": "CAD",
        "issued_at": "2022-07-13T05:18:12-03:00",
        "due_at": "2022-07-20T05:18:12-03:00",
        "completed_at": null,
        "created_at": "2022-07-13T05:18:37-03:00",
        "updated_at": "2022-07-13T05:18:37-03:00"
      }
    ],
    "payment_terms_name": "Net 7",
    "payment_terms_type": "net",
    "updated_at": "2022-07-13T05:18:37-03:00"
  },
  "refunds": [],
  "shipping_address": {
    "province": "Ontario",
    "country": "Canada",
    "company": "",
    "country_code": "CA",
    "province_code": "ON"
  },
  "shipping_lines": []
}

 

 


As you can see for shipping_address I am only getting province, country, company, country_code, province_code.
but not getting any of first_name, address1, phone, city, zip, last_name, address2, latitude, longitude, name

Similarly, fields are missing from customer too.

Replies 2 (2)

bhaskarvyas001
Shopify Partner
1 0 0

@railz_dev Did you find any solution for this ?

nil2023
Shopify Partner
1 0 0

Did You Find any solution for this?
and why that happened?
Please Let me know