mutation Orders($orderId: Int, $customer_id: Int, $postcode: String, $order_channel_code: String, $carrier_name: String, $ref: String, $address_1: String, $address_2: String, $street_number: String, $street_name: String, $city: String, $province: String, $country: String, $name: String, $email: String, $telephone: String, $note: String, $pickup_instruction: String, $delivery_instruction: String, $signature_option: Int, $insurance_option: Int, $need_pick_up: Int, $allow_dropoff: Int, $self_pickup: Int, $auto_deduplication: Int, $service_time: Float, $pickup_service_time: Float, $type: String, $sorting_code: String, $notification_language: String, $packagesDetail: [String]) {
orders(orderId: $orderId, customer_id: $customer_id, postcode: $postcode, order_channel_code: $order_channel_code, carrier_name: $carrier_name, ref: $ref, address_1: $address_1, address_2: $address_2, street_number: $street_number, street_name: $street_name, city: $city, province: $province, country: $country, name: $name, email: $email, telephone: $telephone, note: $note, pickup_instruction: $pickup_instruction, delivery_instruction: $delivery_instruction, signature_option: $signature_option, insurance_option: $insurance_option, need_pick_up: $need_pick_up, allow_dropoff: $allow_dropoff, self_pickup: $self_pickup, auto_deduplication: $auto_deduplication, service_time: $service_time, pickup_service_time: $pickup_service_time, type: $type, sorting_code: $sorting_code, notification_language: $notification_language, packagesDetail: $packagesDetail)
}
curl -X POST "https://api.miliexpress.com/api/graphql" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"query":"mutation Orders($orderId: Int, $customer_id: Int, $postcode: String, $order_channel_code: String, $carrier_name: String, $ref: String, $address_1: String, $address_2: String, $street_number: String, $street_name: String, $city: String, $province: String, $country: String, $name: String, $email: String, $telephone: String, $note: String, $pickup_instruction: String, $delivery_instruction: String, $signature_option: Int, $insurance_option: Int, $need_pick_up: Int, $allow_dropoff: Int, $self_pickup: Int, $auto_deduplication: Int, $service_time: Float, $pickup_service_time: Float, $type: String, $sorting_code: String, $notification_language: String, $packagesDetail: [String]) {\n orders(orderId: $orderId, customer_id: $customer_id, postcode: $postcode, order_channel_code: $order_channel_code, carrier_name: $carrier_name, ref: $ref, address_1: $address_1, address_2: $address_2, street_number: $street_number, street_name: $street_name, city: $city, province: $province, country: $country, name: $name, email: $email, telephone: $telephone, note: $note, pickup_instruction: $pickup_instruction, delivery_instruction: $delivery_instruction, signature_option: $signature_option, insurance_option: $insurance_option, need_pick_up: $need_pick_up, allow_dropoff: $allow_dropoff, self_pickup: $self_pickup, auto_deduplication: $auto_deduplication, service_time: $service_time, pickup_service_time: $pickup_service_time, type: $type, sorting_code: $sorting_code, notification_language: $notification_language, packagesDetail: $packagesDetail)\n}","variables":{"orderId":1,"customer_id":1,"postcode":"example","order_channel_code":"example","carrier_name":"example","ref":"example","address_1":"example","address_2":"example","street_number":"example","street_name":"example","city":"example","province":"example","country":"example","name":"example","email":"user@example.com","telephone":"example","note":"example","pickup_instruction":"example","delivery_instruction":"example","signature_option":1,"insurance_option":1,"need_pick_up":1,"allow_dropoff":1,"self_pickup":1,"auto_deduplication":1,"service_time":1,"pickup_service_time":1,"type":"example","sorting_code":"example","notification_language":"example","packagesDetail":[{"id":1,"ref":"example","length":1,"width":1,"height":1,"weight":1,"dimension_unit":1,"weight_unit":1,"external_tracking_number":"example","insurance_value":1,"package_value":1}]}}'
<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->post('https://api.miliexpress.com/api/graphql', [
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'query' => 'mutation Orders($orderId: Int, $customer_id: Int, $postcode: String, $order_channel_code: String, $carrier_name: String, $ref: String, $address_1: String, $address_2: String, $street_number: String, $street_name: String, $city: String, $province: String, $country: String, $name: String, $email: String, $telephone: String, $note: String, $pickup_instruction: String, $delivery_instruction: String, $signature_option: Int, $insurance_option: Int, $need_pick_up: Int, $allow_dropoff: Int, $self_pickup: Int, $auto_deduplication: Int, $service_time: Float, $pickup_service_time: Float, $type: String, $sorting_code: String, $notification_language: String, $packagesDetail: [String]) {
orders(orderId: $orderId, customer_id: $customer_id, postcode: $postcode, order_channel_code: $order_channel_code, carrier_name: $carrier_name, ref: $ref, address_1: $address_1, address_2: $address_2, street_number: $street_number, street_name: $street_name, city: $city, province: $province, country: $country, name: $name, email: $email, telephone: $telephone, note: $note, pickup_instruction: $pickup_instruction, delivery_instruction: $delivery_instruction, signature_option: $signature_option, insurance_option: $insurance_option, need_pick_up: $need_pick_up, allow_dropoff: $allow_dropoff, self_pickup: $self_pickup, auto_deduplication: $auto_deduplication, service_time: $service_time, pickup_service_time: $pickup_service_time, type: $type, sorting_code: $sorting_code, notification_language: $notification_language, packagesDetail: $packagesDetail)
}',
'variables' => json_decode('{"orderId":1,"customer_id":1,"postcode":"example","order_channel_code":"example","carrier_name":"example","ref":"example","address_1":"example","address_2":"example","street_number":"example","street_name":"example","city":"example","province":"example","country":"example","name":"example","email":"user@example.com","telephone":"example","note":"example","pickup_instruction":"example","delivery_instruction":"example","signature_option":1,"insurance_option":1,"need_pick_up":1,"allow_dropoff":1,"self_pickup":1,"auto_deduplication":1,"service_time":1,"pickup_service_time":1,"type":"example","sorting_code":"example","notification_language":"example","packagesDetail":[{"id":1,"ref":"example","length":1,"width":1,"height":1,"weight":1,"dimension_unit":1,"weight_unit":1,"external_tracking_number":"example","insurance_value":1,"package_value":1}]}', true),
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);
import requests
response = requests.post(
'https://api.miliexpress.com/api/graphql',
headers={
'Content-Type': 'application/json',
'Accept': 'application/json',
},
json={
'query': 'mutation Orders($orderId: Int, $customer_id: Int, $postcode: String, $order_channel_code: String, $carrier_name: String, $ref: String, $address_1: String, $address_2: String, $street_number: String, $street_name: String, $city: String, $province: String, $country: String, $name: String, $email: String, $telephone: String, $note: String, $pickup_instruction: String, $delivery_instruction: String, $signature_option: Int, $insurance_option: Int, $need_pick_up: Int, $allow_dropoff: Int, $self_pickup: Int, $auto_deduplication: Int, $service_time: Float, $pickup_service_time: Float, $type: String, $sorting_code: String, $notification_language: String, $packagesDetail: [String]) {
orders(orderId: $orderId, customer_id: $customer_id, postcode: $postcode, order_channel_code: $order_channel_code, carrier_name: $carrier_name, ref: $ref, address_1: $address_1, address_2: $address_2, street_number: $street_number, street_name: $street_name, city: $city, province: $province, country: $country, name: $name, email: $email, telephone: $telephone, note: $note, pickup_instruction: $pickup_instruction, delivery_instruction: $delivery_instruction, signature_option: $signature_option, insurance_option: $insurance_option, need_pick_up: $need_pick_up, allow_dropoff: $allow_dropoff, self_pickup: $self_pickup, auto_deduplication: $auto_deduplication, service_time: $service_time, pickup_service_time: $pickup_service_time, type: $type, sorting_code: $sorting_code, notification_language: $notification_language, packagesDetail: $packagesDetail)
}',
'variables': {"orderId":1,"customer_id":1,"postcode":"example","order_channel_code":"example","carrier_name":"example","ref":"example","address_1":"example","address_2":"example","street_number":"example","street_name":"example","city":"example","province":"example","country":"example","name":"example","email":"user@example.com","telephone":"example","note":"example","pickup_instruction":"example","delivery_instruction":"example","signature_option":1,"insurance_option":1,"need_pick_up":1,"allow_dropoff":1,"self_pickup":1,"auto_deduplication":1,"service_time":1,"pickup_service_time":1,"type":"example","sorting_code":"example","notification_language":"example","packagesDetail":[{"id":1,"ref":"example","length":1,"width":1,"height":1,"weight":1,"dimension_unit":1,"weight_unit":1,"external_tracking_number":"example","insurance_value":1,"package_value":1}]},
},
)
data = response.json()
print(data)
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
payload, _ := json.Marshal(map[string]interface{}{
"query": `mutation Orders($orderId: Int, $customer_id: Int, $postcode: String, $order_channel_code: String, $carrier_name: String, $ref: String, $address_1: String, $address_2: String, $street_number: String, $street_name: String, $city: String, $province: String, $country: String, $name: String, $email: String, $telephone: String, $note: String, $pickup_instruction: String, $delivery_instruction: String, $signature_option: Int, $insurance_option: Int, $need_pick_up: Int, $allow_dropoff: Int, $self_pickup: Int, $auto_deduplication: Int, $service_time: Float, $pickup_service_time: Float, $type: String, $sorting_code: String, $notification_language: String, $packagesDetail: [String]) {
orders(orderId: $orderId, customer_id: $customer_id, postcode: $postcode, order_channel_code: $order_channel_code, carrier_name: $carrier_name, ref: $ref, address_1: $address_1, address_2: $address_2, street_number: $street_number, street_name: $street_name, city: $city, province: $province, country: $country, name: $name, email: $email, telephone: $telephone, note: $note, pickup_instruction: $pickup_instruction, delivery_instruction: $delivery_instruction, signature_option: $signature_option, insurance_option: $insurance_option, need_pick_up: $need_pick_up, allow_dropoff: $allow_dropoff, self_pickup: $self_pickup, auto_deduplication: $auto_deduplication, service_time: $service_time, pickup_service_time: $pickup_service_time, type: $type, sorting_code: $sorting_code, notification_language: $notification_language, packagesDetail: $packagesDetail)
}`,
"variables": {"orderId":1,"customer_id":1,"postcode":"example","order_channel_code":"example","carrier_name":"example","ref":"example","address_1":"example","address_2":"example","street_number":"example","street_name":"example","city":"example","province":"example","country":"example","name":"example","email":"user@example.com","telephone":"example","note":"example","pickup_instruction":"example","delivery_instruction":"example","signature_option":1,"insurance_option":1,"need_pick_up":1,"allow_dropoff":1,"self_pickup":1,"auto_deduplication":1,"service_time":1,"pickup_service_time":1,"type":"example","sorting_code":"example","notification_language":"example","packagesDetail":[{"id":1,"ref":"example","length":1,"width":1,"height":1,"weight":1,"dimension_unit":1,"weight_unit":1,"external_tracking_number":"example","insurance_value":1,"package_value":1}]},
})
req, _ := http.NewRequest("POST", "https://api.miliexpress.com/api/graphql", bytes.NewBuffer(payload))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Accept", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
const response = await fetch('https://api.miliexpress.com/api/graphql', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
},
body: JSON.stringify({
query: `mutation Orders($orderId: Int, $customer_id: Int, $postcode: String, $order_channel_code: String, $carrier_name: String, $ref: String, $address_1: String, $address_2: String, $street_number: String, $street_name: String, $city: String, $province: String, $country: String, $name: String, $email: String, $telephone: String, $note: String, $pickup_instruction: String, $delivery_instruction: String, $signature_option: Int, $insurance_option: Int, $need_pick_up: Int, $allow_dropoff: Int, $self_pickup: Int, $auto_deduplication: Int, $service_time: Float, $pickup_service_time: Float, $type: String, $sorting_code: String, $notification_language: String, $packagesDetail: [String]) {
orders(orderId: $orderId, customer_id: $customer_id, postcode: $postcode, order_channel_code: $order_channel_code, carrier_name: $carrier_name, ref: $ref, address_1: $address_1, address_2: $address_2, street_number: $street_number, street_name: $street_name, city: $city, province: $province, country: $country, name: $name, email: $email, telephone: $telephone, note: $note, pickup_instruction: $pickup_instruction, delivery_instruction: $delivery_instruction, signature_option: $signature_option, insurance_option: $insurance_option, need_pick_up: $need_pick_up, allow_dropoff: $allow_dropoff, self_pickup: $self_pickup, auto_deduplication: $auto_deduplication, service_time: $service_time, pickup_service_time: $pickup_service_time, type: $type, sorting_code: $sorting_code, notification_language: $notification_language, packagesDetail: $packagesDetail)
}`,
variables: {
"orderId": 1,
"customer_id": 1,
"postcode": "example",
"order_channel_code": "example",
"carrier_name": "example",
"ref": "example",
"address_1": "example",
"address_2": "example",
"street_number": "example",
"street_name": "example",
"city": "example",
"province": "example",
"country": "example",
"name": "example",
"email": "user@example.com",
"telephone": "example",
"note": "example",
"pickup_instruction": "example",
"delivery_instruction": "example",
"signature_option": 1,
"insurance_option": 1,
"need_pick_up": 1,
"allow_dropoff": 1,
"self_pickup": 1,
"auto_deduplication": 1,
"service_time": 1,
"pickup_service_time": 1,
"type": "example",
"sorting_code": "example",
"notification_language": "example",
"packagesDetail": [
{
"id": 1,
"ref": "example",
"length": 1,
"width": 1,
"height": 1,
"weight": 1,
"dimension_unit": 1,
"weight_unit": 1,
"external_tracking_number": "example",
"insurance_value": 1,
"package_value": 1
}
]
},
}),
});
const data = await response.json();
console.log(data);
import java.net.http.*;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
String body = "{\"query\":\"mutation Orders($orderId: Int, $customer_id: Int, $postcode: String, $order_channel_code: String, $carrier_name: String, $ref: String, $address_1: String, $address_2: String, $street_number: String, $street_name: String, $city: String, $province: String, $country: String, $name: String, $email: String, $telephone: String, $note: String, $pickup_instruction: String, $delivery_instruction: String, $signature_option: Int, $insurance_option: Int, $need_pick_up: Int, $allow_dropoff: Int, $self_pickup: Int, $auto_deduplication: Int, $service_time: Float, $pickup_service_time: Float, $type: String, $sorting_code: String, $notification_language: String, $packagesDetail: [String]) {\\n orders(orderId: $orderId, customer_id: $customer_id, postcode: $postcode, order_channel_code: $order_channel_code, carrier_name: $carrier_name, ref: $ref, address_1: $address_1, address_2: $address_2, street_number: $street_number, street_name: $street_name, city: $city, province: $province, country: $country, name: $name, email: $email, telephone: $telephone, note: $note, pickup_instruction: $pickup_instruction, delivery_instruction: $delivery_instruction, signature_option: $signature_option, insurance_option: $insurance_option, need_pick_up: $need_pick_up, allow_dropoff: $allow_dropoff, self_pickup: $self_pickup, auto_deduplication: $auto_deduplication, service_time: $service_time, pickup_service_time: $pickup_service_time, type: $type, sorting_code: $sorting_code, notification_language: $notification_language, packagesDetail: $packagesDetail)\\n}\",\"variables\":{\"orderId\":1,\"customer_id\":1,\"postcode\":\"example\",\"order_channel_code\":\"example\",\"carrier_name\":\"example\",\"ref\":\"example\",\"address_1\":\"example\",\"address_2\":\"example\",\"street_number\":\"example\",\"street_name\":\"example\",\"city\":\"example\",\"province\":\"example\",\"country\":\"example\",\"name\":\"example\",\"email\":\"user@example.com\",\"telephone\":\"example\",\"note\":\"example\",\"pickup_instruction\":\"example\",\"delivery_instruction\":\"example\",\"signature_option\":1,\"insurance_option\":1,\"need_pick_up\":1,\"allow_dropoff\":1,\"self_pickup\":1,\"auto_deduplication\":1,\"service_time\":1,\"pickup_service_time\":1,\"type\":\"example\",\"sorting_code\":\"example\",\"notification_language\":\"example\",\"packagesDetail\":[{\"id\":1,\"ref\":\"example\",\"length\":1,\"width\":1,\"height\":1,\"weight\":1,\"dimension_unit\":1,\"weight_unit\":1,\"external_tracking_number\":\"example\",\"insurance_value\":1,\"package_value\":1}]}}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.miliexpress.com/api/graphql"))
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString()
);
System.out.println(response.body());
require 'net/http'
require 'json'
require 'uri'
uri = URI.parse('https://api.miliexpress.com/api/graphql')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
request = Net::HTTP::Post.new(uri)
request.content_type = 'application/json'
request['Accept'] = 'application/json'
request.body = JSON.dump({
query: 'mutation Orders($orderId: Int, $customer_id: Int, $postcode: String, $order_channel_code: String, $carrier_name: String, $ref: String, $address_1: String, $address_2: String, $street_number: String, $street_name: String, $city: String, $province: String, $country: String, $name: String, $email: String, $telephone: String, $note: String, $pickup_instruction: String, $delivery_instruction: String, $signature_option: Int, $insurance_option: Int, $need_pick_up: Int, $allow_dropoff: Int, $self_pickup: Int, $auto_deduplication: Int, $service_time: Float, $pickup_service_time: Float, $type: String, $sorting_code: String, $notification_language: String, $packagesDetail: [String]) {
orders(orderId: $orderId, customer_id: $customer_id, postcode: $postcode, order_channel_code: $order_channel_code, carrier_name: $carrier_name, ref: $ref, address_1: $address_1, address_2: $address_2, street_number: $street_number, street_name: $street_name, city: $city, province: $province, country: $country, name: $name, email: $email, telephone: $telephone, note: $note, pickup_instruction: $pickup_instruction, delivery_instruction: $delivery_instruction, signature_option: $signature_option, insurance_option: $insurance_option, need_pick_up: $need_pick_up, allow_dropoff: $allow_dropoff, self_pickup: $self_pickup, auto_deduplication: $auto_deduplication, service_time: $service_time, pickup_service_time: $pickup_service_time, type: $type, sorting_code: $sorting_code, notification_language: $notification_language, packagesDetail: $packagesDetail)
}',
variables: {"orderId":1,"customer_id":1,"postcode":"example","order_channel_code":"example","carrier_name":"example","ref":"example","address_1":"example","address_2":"example","street_number":"example","street_name":"example","city":"example","province":"example","country":"example","name":"example","email":"user@example.com","telephone":"example","note":"example","pickup_instruction":"example","delivery_instruction":"example","signature_option":1,"insurance_option":1,"need_pick_up":1,"allow_dropoff":1,"self_pickup":1,"auto_deduplication":1,"service_time":1,"pickup_service_time":1,"type":"example","sorting_code":"example","notification_language":"example","packagesDetail":[{"id":1,"ref":"example","length":1,"width":1,"height":1,"weight":1,"dimension_unit":1,"weight_unit":1,"external_tracking_number":"example","insurance_value":1,"package_value":1}]}
})
response = http.request(request)
puts JSON.parse(response.body)