When I send a request like below:
{"mutation":"{ fulfillmentCreateV2 ( fulfillment: {lineItemsByFulfillmentOrder: { fulfillmentOrderId: \"gid://shopify/FulfillmentOrder/4895903678719\"}} ) { fulfillment { id } userErrors {message}}"}
I get an error:
{"errors":{"query":"Required parameter missing or invalid"}}
(I'm coding in Java, in the query I got it successfully)
Is there anything missing in the JSON I passed?
My 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");
http.setEntity(new StringEntity(myJson));
HttpResponse response = httpClient.execute(http);