Are null-address discovery requests expected

When Shopify sends the dummy request for service discovery, I am seeing the request come over with a null address. Is this expected? Will this dummy request change?

{

"rate": {

    "origin": {

        "country": "US",

        "postal_code": null,

        "province": null,

        "city": null,

        "name": "Shop location",

        "address1": {

            "first_name": null,

            "address1": null,

            "phone": null,

            "city": null,

            "zip": null,

            "province": null,

            "country": "United States",

            "last_name": null,

            "address2": null,

            "company": null,

            "latitude": null,

            "longitude": null,

            "name": "",

            "country_code": "US",

            "province_code": null

        },

        "address2": null,

        "address3": null,

        "latitude": null,

        "longitude": null,

        "phone": null,

        "fax": null,

        "email": null,

        "address_type": null,

        "company_name": "My Store"

    },

    "destination": {

        "country": "US",

        "postal_code": null,

        "province": null,

        "city": null,

        "name": "Shop location",

        "address1": {

            "first_name": null,

            "address1": null,

            "phone": null,

            "city": null,

            "zip": null,

            "province": null,

            "country": "United States",

            "last_name": null,

            "address2": null,

            "company": null,

            "latitude": null,

            "longitude": null,

            "name": "",

            "country_code": "US",

            "province_code": null

        },

        "address2": null,

        "address3": null,

        "latitude": null,

        "longitude": null,

        "phone": null,

        "fax": null,

        "email": null,

        "address_type": null,

        "company_name": "My Store"

    },

    "items": \[

        {

            "name": "",

            "sku": "XXXXXXXX",

            "quantity": 1,

            "grams": 100,

            "price": 0,

            "vendor": null,

            "requires_shipping": true,

            "taxable": true,

            "fulfillment_service": "manual",

            "properties": null,

            "product_id": null,

            "variant_id": null

        }

    \],

    "currency": "USD",

    "locale": "en"

}

}

Hey @Nick_berger - thanks for reaching out.

I did some digging here:

With service discovery enabled, Shopify calls your callback URL with a dummy shipment (that’s the “XXXXXXXX” SKU and the 100g item priced at 0) to find out which services you offer for a given origin and destination. The rates you return populate the available services a merchant can pick from when they set up calculated rates.

To your two questions:

Would it ever show another country? Yes. The destination reflects the merchant’s shipping zone, not a fixed value. I tested this with shipping zones set up in different countries. For instance a Mexico shipping zone resulted in the probe coming through with “country”: “MX”. So your endpoint should branch on the country code in each request rather than assuming US. The origin tracks the shop’s location.

On the null fields you saw: that could be because the location doesn’t have a full address configured, although I can’t say for sure without knowing the specifics of the store you were testing on.

In my test, the origin came through fully populated (real street address, postal code, lat/long) because my store’s location had an address set. The “Shop location” / “My Store” placeholder in your payload points to a location with no address filled in, which could be why those fields are null.

In testing, my destination address in discovery was also sample data, although it did look to have a different structure than what you saw in your discovery payload you shared:

        "country": "MX",
        "postal_code": "02860",
        "province": null,
        "city": "rate test",
        "name": null,
        "address1": "rate test",
        "address2": null,
        "address3": null,
        "latitude": null,
        "longitude": null,
        "phone": null,
        "fax": null,
        "email": null,
        "address_type": null,
        "company_name": null
      }

If you’d like to explore this further, it may be a good idea to create an authenticated ticket with support through help.shopify.com. With the specifics of your store’s setup, we should be able to better explain exactly why your discovery payload came the way it did.

Hope this helps!