Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
when i set entity with string:
{"query":"{ order (id:4895903678719) { id }}"}
I received a respone:
200 OK
"message":"Invalid global id '4895903678719'"
when i set entity with string:
{"query":"{ order (id:"gid://shopify/Order/4895903678719") { id }}"}
I received a : {"status":400,"error":"The json provided is not formatted correctly: Error occurred while parsing request parameters"}
Where am i going wrong can you guide me?
My sourcre code :
'''
CloseableHttpClient httpClient = HttpClientBuilder.create().build();
HttpPost http = new HttpPost(urlStr);
http.addHeader("x-shopify-access-token", access_token);
http.addHeader("Accept", "application/json");
http.addHeader("Content-Type", "application/json");
HttpEntity entity = new ByteArrayEntity(reqData.getBytes("UTF-8"));
http.setEntity(entity);
HttpResponse response = httpClient.execute(http);
'''
Solved! Go to the solution
This is an accepted solution.
i solved it with request like below:
{"query":"{ order (id:\\\"gid://shopify/Order/4895903678719\\\") { id }}"}
This is an accepted solution.
i solved it with request like below:
{"query":"{ order (id:\\\"gid://shopify/Order/4895903678719\\\") { id }}"}
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025