What's your biggest current challenge? Have your say in Community Polls along the right column.

Why are some customer details missing in our API data retrieval?

Why are some customer details missing in our API data retrieval?

Muhammad_Raza
New Member
4 0 0
Issue we've encountered while accessing /consuming orders and customer API's in our system. It appears that for some stores, we are unable to fetch complete customer details. Despite having permissions granted for all modules including customers and orders, certain essential information such as first name, last name, address, and phone number are missing from the retrieved data.

While viewing the order information on platform, all customer details first name, last name, phone and address are visible, Could you please look into this matter and advise on any steps we can take to rectify this issue?
Replies 10 (10)

Xipirons
Shopify Partner
136 25 33

Hi @Muhammad_Raza 

 

What is the name of the platform or system you are using to access the orders and customer API's?

Was this helpful? Like or Accept solution - Buy me a coffee
- Contact me: Xipirons | WhatsApp
- Shopify Developer based in France, helping online merchants succeed

Muhammad_Raza
New Member
4 0 0

 

We have tested the API's on POSTMAN
here is the customer object in  "/admin/api/2024-01/orders.json?limit=250"

 

 

 

 

 "customer": {
                "id": SOME_ID,
                "created_at": "2024-04-02T11:51:12+05:00",
                "updated_at": "2024-04-02T11:51:14+05:00",
                "state": "disabled",
                "note": null,
                "verified_email": true,
                "multipass_identifier": null,
                "tax_exempt": false,
                "email_marketing_consent": {
                    "state": "not_subscribed",
                    "opt_in_level": "single_opt_in",
                    "consent_updated_at": null
                },
                "sms_marketing_consent": null,
                "tags": "",
                "currency": "PKR",
                "tax_exemptions": [],
                "admin_graphql_api_id": "gid://shopify/Customer/7705922273584",
                "default_address": {
                    "id": SOME_ID,
                    "customer_id": SOME_ID,
                    "company": null,
                    "province": null,
                    "country": "Pakistan",
                    "province_code": null,
                    "country_code": "PK",
                    "country_name": "Pakistan",
                    "default": true
                }
            },

 

 

 

Xipirons
Shopify Partner
136 25 33

@Muhammad_Raza 

 

In order to better understand the exact nature of the problem and to assist you effectively, could you please provide a concrete example of the API response you are currently receiving with the missing data?

 

Ideally, include a sample API request that you are sending (of course, masking any sensitive information like API keys) along with the corresponding raw JSON response received in return.

 

Having a real sample of the data will allow me to precisely analyze the structure and content of the response, and more easily identify why certain customer fields such as last name, first name, address, and phone number seem to be missing or incomplete compared to what is visible on the platform.

 

Feel free to send these elements as soon as possible. I can then examine it in detail and advise you on the next steps to resolve this API issue.

 

If you prefer, you can also contact me privately to share the API request and response samples. I'll be happy to take a look and provide further assistance in a confidential manner.

 

Was this helpful? Like or Accept solution - Buy me a coffee
- Contact me: Xipirons | WhatsApp
- Shopify Developer based in France, helping online merchants succeed

Muhammad_Raza
New Member
4 0 0

Here is the response i am getting,
API RESPONSE of STORE 1  (no customer details)

 

 {
            "id": "SENSITIVE_INFO",
            "admin_graphql_api_id": "gid://shopify/Order/SENSITIVE_INFO",
            "app_id": 580111,
            "browser_ip": "223.123.112.76",
            "buyer_accepts_marketing": false,
            "cancel_reason": null,
            "cancelled_at": null,
            "cart_token": "SENSITIVE_INFO",
            "checkout_id": 37743399993648,
            "checkout_token": "SENSITIVE_INFO",
            "client_details": {
                "accept_language": "en-PK",
                "browser_height": null,
                "browser_ip": "223.123.112.76",
                "browser_width": null,
                "session_hash": null,
                "user_agent": "Mozilla/5.0 (Linux; Android 13; Infinix X6731B Build/TP1A.220624.014; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/122.0.6261.120 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/450.0.0.42.110;]"
            },
            "closed_at": null,
            "confirmation_number": "",
            "confirmed": true,
            "created_at": "2024-04-02T11:51:13+05:00",
            "currency": "PKR",
            "current_subtotal_price": "2850.00",
            "current_subtotal_price_set": {
                "shop_money": {
                    "amount": "2850.00",
                    "currency_code": "PKR"
                },
                "presentment_money": {
                    "amount": "2850.00",
                    "currency_code": "PKR"
                }
            },
            "current_total_additional_fees_set": null,
            "current_total_discounts": "0.00",
            "current_total_discounts_set": {
                "shop_money": {
                    "amount": "0.00",
                    "currency_code": "PKR"
                },
                "presentment_money": {
                    "amount": "0.00",
                    "currency_code": "PKR"
                }
            },
            "current_total_duties_set": null,
            "current_total_price": "2850.00",
            "current_total_price_set": {
                "shop_money": {
                    "amount": "2850.00",
                    "currency_code": "PKR"
                },
                "presentment_money": {
                    "amount": "2850.00",
                    "currency_code": "PKR"
                }
            },
            "current_total_tax": "0.00",
            "current_total_tax_set": {
                "shop_money": {
                    "amount": "0.00",
                    "currency_code": "PKR"
                },
                "presentment_money": {
                    "amount": "0.00",
                    "currency_code": "PKR"
                }
            },
            "customer_locale": "en-PK",
            "device_id": null,
            "discount_codes": [],
            "estimated_taxes": false,
            "financial_status": "pending",
            "fulfillment_status": null,
            "landing_site": "SOME_URL",
            "landing_site_ref": null,
            "location_id": null,
            "merchant_of_record_app_id": null,
            "name": "#order_number",
            "note": null,
            "note_attributes": [],
            "number": "<number>",
            "order_number": "<number>",
            "original_total_additional_fees_set": null,
            "original_total_duties_set": null,
            "payment_gateway_names": [
                "Cash on Delivery (COD)"
            ],
            "po_number": null,
            "presentment_currency": "PKR",
            "processed_at": "2024-04-02T11:51:12+05:00",
            "reference": "",
            "referring_site": "http://m.facebook.com/",
            "source_identifier": "",
            "source_name": "web",
            "source_url": null,
            "subtotal_price": "2850.00",
            "subtotal_price_set": {
                "shop_money": {
                    "amount": "2850.00",
                    "currency_code": "PKR"
                },
                "presentment_money": {
                    "amount": "2850.00",
                    "currency_code": "PKR"
                }
            },
            "tags": "",
            "tax_exempt": false,
            "tax_lines": [],
            "taxes_included": false,
            "test": false,
            "token": "TOKEN",
            "total_discounts": "0.00",
            "total_discounts_set": {
                "shop_money": {
                    "amount": "0.00",
                    "currency_code": "PKR"
                },
                "presentment_money": {
                    "amount": "0.00",
                    "currency_code": "PKR"
                }
            },
            "total_line_items_price": "2850.00",
            "total_line_items_price_set": {
                "shop_money": {
                    "amount": "2850.00",
                    "currency_code": "PKR"
                },
                "presentment_money": {
                    "amount": "2850.00",
                    "currency_code": "PKR"
                }
            },
            "total_outstanding": "2850.00",
            "total_price": "2850.00",
            "total_price_set": {
                "shop_money": {
                    "amount": "2850.00",
                    "currency_code": "PKR"
                },
                "presentment_money": {
                    "amount": "2850.00",
                    "currency_code": "PKR"
                }
            },
            "total_shipping_price_set": {
                "shop_money": {
                    "amount": "0.00",
                    "currency_code": "PKR"
                },
                "presentment_money": {
                    "amount": "0.00",
                    "currency_code": "PKR"
                }
            },
            "total_tax": "0.00",
            "total_tax_set": {
                "shop_money": {
                    "amount": "0.00",
                    "currency_code": "PKR"
                },
                "presentment_money": {
                    "amount": "0.00",
                    "currency_code": "PKR"
                }
            },
            "total_tip_received": "0.00",
            "total_weight": 0,
            "updated_at": "2024-04-02T11:51:14+05:00",
            "user_id": null,
            "billing_address": {
                "province": null,
                "country": "Pakistan",
                "country_code": "PK",
                "province_code": null
            },
            "customer": {
                "id": "CUSTOMER_ID",
                "created_at": "2024-04-02T11:51:12+05:00",
                "updated_at": "2024-04-02T11:51:14+05:00",
                "state": "disabled",
                "note": null,
                "verified_email": true,
                "multipass_identifier": null,
                "tax_exempt": false,
                "email_marketing_consent": {
                    "state": "not_subscribed",
                    "opt_in_level": "single_opt_in",
                    "consent_updated_at": null
                },
                "sms_marketing_consent": null,
                "tags": "",
                "currency": "PKR",
                "tax_exemptions": [],
                "admin_graphql_api_id": "gid://shopify/Customer/7705922273584",
                "default_address": {
                    "id": "ID",
                    "customer_id": "ID",
                    "company": null,
                    "province": null,
                    "country": "Pakistan",
                    "province_code": null,
                    "country_code": "PK",
                    "country_name": "Pakistan",
                    "default": true
                }
            },
            "discount_applications": [],
            "fulfillments": [],
            "line_items": [
                {
                    "id": "ID",
                    "admin_graphql_api_id": "gid://shopify/LineItem/ID",
                    "attributed_staffs": [],
                    "current_quantity": 1,
                    "fulfillable_quantity": 1,
                    "fulfillment_service": "manual",
                    "fulfillment_status": null,
                    "gift_card": false,
                    "grams": 0,
                    "name": "ITEM NAME",
                    "price": "2850.00",
                    "price_set": {
                        "shop_money": {
                            "amount": "2850.00",
                            "currency_code": "PKR"
                        },
                        "presentment_money": {
                            "amount": "2850.00",
                            "currency_code": "PKR"
                        }
                    },
                    "product_exists": true,
                    "product_id": "PRODUCT_ID" ,
                    "properties": [],
                    "quantity": 1,
                    "requires_shipping": true,
                    "sku": "AF-0011",
                    "taxable": false,
                    "title": "",
                    "total_discount": "0.00",
                    "total_discount_set": {
                        "shop_money": {
                            "amount": "0.00",
                            "currency_code": "PKR"
                        },
                        "presentment_money": {
                            "amount": "0.00",
                            "currency_code": "PKR"
                        }
                    },
                    "variant_id":"ID" ,
                    "variant_inventory_management": "shopify",
                    "variant_title": "",
                    "vendor": "",
                    "tax_lines": [],
                    "duties": [],
                    "discount_allocations": []
                }
            ],
            "payment_terms": null,
            "refunds": [],
            "shipping_address": {
                "province": null,
                "country": "Pakistan",
                "country_code": "PK",
                "province_code": null
            },
         
        },

 


Here is the another response of STORE 2 (with proper customer details):

 

"orders": [
    {
        "id": "ORDER_ID",
        "admin_graphql_api_id": "gid://shopify/Order/ORDER_ID",
        "app_id": "API_ID",
        "browser_ip": "154.192.148.8",
        "buyer_accepts_marketing": false,
        "cancel_reason": null,
        "cancelled_at": null,
        "cart_token": null,
        "checkout_id": ,
        "checkout_token": "",
        "client_details": {
            "accept_language": null,
            "browser_height": null,
            "browser_ip": "154.192.148.8",
            "browser_width": null,
            "session_hash": null,
            "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
        },
        "closed_at": null,
        "confirmed": true,
        "contact_email": null,
        "created_at": "2024-02-18T13:34:19+05:00",
        "currency": "PKR",
        "current_subtotal_price": "12999.00",
        "current_subtotal_price_set": {
            "shop_money": {
                "amount": "12999.00",
                "currency_code": "PKR"
            },
            "presentment_money": {
                "amount": "12999.00",
                "currency_code": "PKR"
            }
        },
        "current_total_additional_fees_set": null,
        "current_total_discounts": "0.00",
        "current_total_discounts_set": {
            "shop_money": {
                "amount": "0.00",
                "currency_code": "PKR"
            },
            "presentment_money": {
                "amount": "0.00",
                "currency_code": "PKR"
            }
        },
        "current_total_duties_set": null,
        "current_total_price": "13149.00",
        "current_total_price_set": {
            "shop_money": {
                "amount": "13149.00",
                "currency_code": "PKR"
            },
            "presentment_money": {
                "amount": "13149.00",
                "currency_code": "PKR"
            }
        },
        "current_total_tax": "0.00",
        "current_total_tax_set": {
            "shop_money": {
                "amount": "0.00",
                "currency_code": "PKR"
            },
            "presentment_money": {
                "amount": "0.00",
                "currency_code": "PKR"
            }
        },
        "customer_locale": "en",
        "device_id": null,
        "discount_codes": [],
        "email": "",
        "estimated_taxes": false,
        "financial_status": "pending",
        "fulfillment_status": "fulfilled",
        "landing_site": null,
        "landing_site_ref": null,
        "location_id": null,
        "merchant_of_record_app_id": null,
        "name": "#",
        "note": null,
        "note_attributes": [],
        "number": 58632,
        "order_number": 59632,
        "order_status_url": "URL",
        "original_total_additional_fees_set": null,
        "original_total_duties_set": null,
        "payment_gateway_names": [
            "Cash on Delivery (COD)"
        ],
        "phone": null,
        "presentment_currency": "PKR",
        "processed_at": "2024-02-18T13:34:19+05:00",
        "reference": "88ffd516e79445daf8820ff438ed77bd",
        "referring_site": null,
        "source_identifier": "88ffd516e79445daf8820ff438ed77bd",
        "source_name": "shopify_draft_order",
        "source_url": null,
        "subtotal_price": "12999.00",
        "subtotal_price_set": {
            "shop_money": {
                "amount": "12999.00",
                "currency_code": "PKR"
            },
            "presentment_money": {
                "amount": "12999.00",
                "currency_code": "PKR"
            }
        },
        "tags": "",
        "tax_lines": [],
        "taxes_included": false,
        "test": false,
        "token": "e62cccac605ab900d68481dd2540386a",
        "total_discounts": "0.00",
        "total_discounts_set": {
            "shop_money": {
                "amount": "0.00",
                "currency_code": "PKR"
            },
            "presentment_money": {
                "amount": "0.00",
                "currency_code": "PKR"
            }
        },
        "total_line_items_price": "12999.00",
        "total_line_items_price_set": {
            "shop_money": {
                "amount": "12999.00",
                "currency_code": "PKR"
            },
            "presentment_money": {
                "amount": "12999.00",
                "currency_code": "PKR"
            }
        },
        "total_outstanding": "13149.00",
        "total_price": "13149.00",
        "total_price_set": {
            "shop_money": {
                "amount": "13149.00",
                "currency_code": "PKR"
            },
            "presentment_money": {
                "amount": "13149.00",
                "currency_code": "PKR"
            }
        },
        "total_shipping_price_set": {
            "shop_money": {
                "amount": "150.00",
                "currency_code": "PKR"
            },
            "presentment_money": {
                "amount": "150.00",
                "currency_code": "PKR"
            }
        },
        "total_tax": "0.00",
        "total_tax_set": {
            "shop_money": {
                "amount": "0.00",
                "currency_code": "PKR"
            },
            "presentment_money": {
                "amount": "0.00",
                "currency_code": "PKR"
            }
        },
        "total_tip_received": "0.00",
        "total_weight": 2000,
        "updated_at": "2024-02-18T14:48:45+05:00",
        "user_id": 101470896431,
        "billing_address": {
            "first_name": "CUSTOMER_INFO",
            "address1": "CUSTOMER_INFO",
            "phone": "CUSTOMER_INFO",
            "city": "CUSTOMER_INFO",
            "zip": null,
            "province": null,
            "country": "CUSTOMER_INFO",
            "last_name": "",
            "address2": null,
            "company": null,
            "latitude": null,
            "longitude": null,
            "name": "CUSTOMER_INFO",
            "country_code": "PK",
            "province_code": null
        },
        "customer": {
            "id": "CUSTOMER_ID",
            "email": null,
            "created_at": "2024-02-18T13:33:55+05:00",
            "updated_at": "2024-02-18T13:34:20+05:00",
            "first_name": "CUSTOMER_INFO",
            "last_name": "",
            "state": "disabled",
            "note": null,
            "verified_email": true,
            "multipass_identifier": null,
            "tax_exempt": false,
            "phone": null,
            "email_marketing_consent": null,
            "sms_marketing_consent": null,
            "tags": "",
            "currency": "PKR",
            "accepts_marketing": false,
            "accepts_marketing_updated_at": null,
            "marketing_opt_in_level": null,
            "tax_exemptions": [],
            "admin_graphql_api_id": "gid://shopify/Customer/CUSTOMER_ID",
            "default_address": {
                "id": "CUSTOMER_INFO",
                "customer_id": "CUSTOMER_INFO",
                "first_name": "CUSTOMER_INFO ",
                "last_name":"CUSTOMER_INFO ",
                "company":"CUSTOMER_INFO ",
                "address1": "CUSTOMER_INFO ",
                "address2":"CUSTOMER_INFO ",
                "city": "rawalpindi",
                "province":"CUSTOMER_INFO ",
                "country": "Pakistan",
                "zip":"CUSTOMER_INFO ",
                "phone": "CUSTOMER_INFO",
                "name": "Yasir ",
                "province_code": null,
                "country_code": "PK",
                "country_name": "Pakistan",
                "default": true
            }
        },
        "discount_applications": [],
        "fulfillments": [
            {
                "id": "ID",
                "admin_graphql_api_id": "gid://shopify/Fulfillment/ID",
                "created_at": "2024-02-18T14:48:45+05:00",
                "location_id": "location_id",
                "name": "#WIC59632.1",
                "order_id": "ORDER_ID",
                "origin_address": {},
                "receipt": {},
                "service": "manual",
                "shipment_status": null,
                "status": "success",
                "tracking_company": "TCS (Overland)",
                "tracking_number": "779806557692",
                "tracking_numbers": [
                    "779806557692"
                ],
                "tracking_url": "",
                "tracking_urls": [
                    ""
                ],
                "updated_at": "2024-02-18T14:48:46+05:00",
                "line_items": [
                    {
                        "id": "ID",
                        "admin_graphql_api_id": "gid://shopify/LineItem/ID",
                        "fulfillable_quantity": 0,
                        "fulfillment_service": "manual",
                        "fulfillment_status": "fulfilled",
                        "gift_card": false,
                        "grams": 2000,
                        "name": "",
                        "price": "12999.00",
                        "price_set": {
                            "shop_money": {
                                "amount": "12999.00",
                                "currency_code": "PKR"
                            },
                            "presentment_money": {
                                "amount": "12999.00",
                                "currency_code": "PKR"
                            }
                        },
                        "product_exists": true,
                        "product_id": "ID",
                        "properties": [],
                        "quantity": 1,
                        "requires_shipping": true,
                        "sku": "AR-000412",
                        "taxable": false,
                        "title": "WHIRLPOOL 8L Ultrasonic Humidifier with UVC Lights",
                        "total_discount": "0.00",
                        "total_discount_set": {
                            "shop_money": {
                                "amount": "0.00",
                                "currency_code": "PKR"
                            },
                            "presentment_money": {
                                "amount": "0.00",
                                "currency_code": "PKR"
                            }
                        },
                        "variant_id": "ID",
                        "variant_inventory_management": null,
                        "variant_title": null,
                        "vendor": "Warsak Imported Collection",
                        "tax_lines": [],
                        "duties": [],
                        "discount_allocations": []
                    }
                ]
            }
        ],
        "line_items": [
            {
                "id": "ID",
                "admin_graphql_api_id": "gid://shopify/LineItem/ID",
                "fulfillable_quantity": 0,
                "fulfillment_service": "manual",
                "fulfillment_status": "fulfilled",
                "gift_card": false,
                "grams": 2000,
                "name": "",
                "price": "12999.00",
                "price_set": {
                    "shop_money": {
                        "amount": "12999.00",
                        "currency_code": "PKR"
                    },
                    "presentment_money": {
                        "amount": "12999.00",
                        "currency_code": "PKR"
                    }
                },
                "product_exists": true,
                "product_id": "PRODUCT_ID",
                "properties": [],
                "quantity": 1,
                "requires_shipping": true,
                "sku": "SKU",
                "taxable": false,
                "title": "TITLE",
                "total_discount": "0.00",
                "total_discount_set": {
                    "shop_money": {
                        "amount": "0.00",
                        "currency_code": "PKR"
                    },
                    "presentment_money": {
                        "amount": "0.00",
                        "currency_code": "PKR"
                    }
                },
                "variant_id": "ID",
                "variant_inventory_management": null,
                "variant_title": null,
                "vendor": "",
                "tax_lines": [],
                "duties": [],
                "discount_allocations": []
            }
        ],
        "payment_terms": {
            "id": "ID",
            "created_at": "2024-02-18T13:34:20+05:00",
            "due_in_days": null,
            "payment_schedules": [
                {
                    "id": "ID",
                    "amount": "13149.00",
                    "currency": "PKR",
                    "issued_at": null,
                    "due_at": null,
                    "completed_at": null,
                    "created_at": "2024-02-18T13:34:20+05:00",
                    "updated_at": "2024-02-18T13:34:20+05:00"
                }
            ],
            "payment_terms_name": "Due on receipt",
            "payment_terms_type": "receipt",
            "updated_at": "2024-02-18T13:34:20+05:00"
        },
        "refunds": [],
        "shipping_address": {
            "first_name": "CUSTOMER_INFO",
            "address1": "CUSTOMER_INFO",
            "phone": "CUSTOMER_INFO",
            "city": "CUSTOMER_INFO",
            "zip": null,
            "province": null,
            "country": "CUSTOMER_INFO",
            "last_name": "",
            "address2": null,
            "company": null,
            "latitude": 33.5883895,
            "longitude": 73.090397,
            "name": "CUSTOMER_INFO",
            "country_code": "PK",
            "province_code": null
        },
    
    },

 

AlexandreG
Shopify Partner
5 0 5

Problem solved... but I'm not happy. 😡😡

The issue stems from the Shopify plan—now the basic plan does not include PII (Personal Identifiable Information); we need to upgrade to the Shopify Plan (level 2). We did not receive an informational email about this. We manage about twenty stores; they don't realize the mess this will cause for us and our clients.

merlin4191426
Visitor
2 0 2

I agree, this is a terrible policy. We already have to pay Shopify for every order, but they want to hold OUR customers information hostage until we pay more. They should be ashamed of themselves.

jameserobertson
Shopify Partner
3 0 0

There is a work around. Its not great.

 

You have to collect the webhook data. Calls to the customers/id.json (or the orders/id.json) will not provide the information.

 

customers/create webhook also does not provide the information BUT...

 

orders/create webhook does! 

 

I hope this helps

AlexandreG
Shopify Partner
5 0 5

I have the exact same problem on one of my shop. I have null on my customer detail....

Have you find the issue?

Muhammad_Raza
New Member
4 0 0

I am not having null on customer details in API, In customer object some main attributes are missing, like first_name, last_name, etc.

Have you found any solution? 

AlexandreG
Shopify Partner
5 0 5

Yes, I found the issue. It seems that, like me, your problem stems from your Shopify plan. Since January ( and we haven't received any notification about this btw )you cannot access PII (Personal Identifiable Information) with the Basic Plan. We need to upgrade to at least the "Shopify" plan as a minimum.
Applications personnalisées · Centre d'aide Shopify