How to save browser ip in shopify orders via shopify API

Highlighted
New Member
4 0 0

Hello there,

Actually I'm trying to save browser ip in order, I tried "browser_ip" and "client_details" parameters in orders api but its not working as expected. What should I have to do.

 

Thanks-

Anil Kumar

0 Likes
Highlighted
Explorer
258 0 22

When you get an order via the API the IP is already in the JSON under browser_ip 

0 Likes
Highlighted
New Member
4 0 0

Thanks Adrian for your quick reply.

 Actually I have an IP Address and I wnated to store it in shopify order as client's detail. I'm sending like

"browser_ip" => 'ANY IP ADDRESS',
            "client_details" => array(
                "accept_language" => null,
                "browser_height" => null,
                "browser_ip"=> 'ANY IP ADDRESS',
                "browser_width" => null,
                "session_hash" => null,
                "user_agent" => 'USER AGENT STRING'
            ),

And I have installed an APP(Subuno), now I have to show this IP Address in Subuno.

Please help me out.

 

0 Likes
Highlighted
Tourist
6 0 1

When creating orders via Admin REST API, both browser_ip and client_details fields are read-only and you cannot set those values there. Instead you can use note_attributes fields for this purpose. The data will end up showing in "Additional Details" sections when you view Order Details in Admin interface.

"note_attributes": [
  {
    "name": "IP Address",
    "value": "X.X.X.X"
  }
]
0 Likes