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 }}"}
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025