skip to Main Content

If I use a buy it now link with a ref parameter like this:

https://my-site.myshopify.com/4589944918/checkouts/875eeab0d9826de7f83241e07d930339?ref=xxx34

then I can see they used referral code xxx34 in the Shopify admin if I go to the order and then view conversion details > view full session.

However, this referral code value doesn’t appear to show up in the order data that is returned by the admin/orders.json API endpoint.

Is there anyway to get the referral code using the Shopify API?

2

Answers


  1. There are lots of small attributes an order has, you should check them all out:

    • landing_site_ref: "abc"
    • reference: "fhwdgads"
    • referring_site: "http://www.otherexample.com"
    • landing_site: "http://www.example.com?source=abc"

    Probably the one you want is the first one in this small list.

    Login or Signup to reply.
  2. The ref value is stored in the landing_site_ref property.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search