Create shipment
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_number": "<string>",
"shipments": [
{
"warehouse_id": "<string>",
"shipment_items": [
{
"product_id": "<string>",
"variant_id": "<string>",
"quantity": 123,
"free_quantity": 123,
"selling_price": 123
}
],
"shipping_provider_id": "<string>",
"total_weight": 0,
"boxes": [
{
"box_name": "<string>",
"box_length": 123,
"box_width": 123,
"box_height": 123,
"box_weight": 123,
"items_count": 123,
"box_count": 123
}
],
"tracking_link": "<string>",
"expected_delivery_date": "2023-12-25",
"manual_shipping_charges": 123,
"courier_company_id": "<string>"
}
],
"shipment_number": "<string>"
}
'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments"
payload = {
"order_number": "<string>",
"shipments": [
{
"warehouse_id": "<string>",
"shipment_items": [
{
"product_id": "<string>",
"variant_id": "<string>",
"quantity": 123,
"free_quantity": 123,
"selling_price": 123
}
],
"shipping_provider_id": "<string>",
"total_weight": 0,
"boxes": [
{
"box_name": "<string>",
"box_length": 123,
"box_width": 123,
"box_height": 123,
"box_weight": 123,
"items_count": 123,
"box_count": 123
}
],
"tracking_link": "<string>",
"expected_delivery_date": "2023-12-25",
"manual_shipping_charges": 123,
"courier_company_id": "<string>"
}
],
"shipment_number": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
order_number: '<string>',
shipments: [
{
warehouse_id: '<string>',
shipment_items: [
{
product_id: '<string>',
variant_id: '<string>',
quantity: 123,
free_quantity: 123,
selling_price: 123
}
],
shipping_provider_id: '<string>',
total_weight: 0,
boxes: [
{
box_name: '<string>',
box_length: 123,
box_width: 123,
box_height: 123,
box_weight: 123,
items_count: 123,
box_count: 123
}
],
tracking_link: '<string>',
expected_delivery_date: '2023-12-25',
manual_shipping_charges: 123,
courier_company_id: '<string>'
}
],
shipment_number: '<string>'
})
};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order_number' => '<string>',
'shipments' => [
[
'warehouse_id' => '<string>',
'shipment_items' => [
[
'product_id' => '<string>',
'variant_id' => '<string>',
'quantity' => 123,
'free_quantity' => 123,
'selling_price' => 123
]
],
'shipping_provider_id' => '<string>',
'total_weight' => 0,
'boxes' => [
[
'box_name' => '<string>',
'box_length' => 123,
'box_width' => 123,
'box_height' => 123,
'box_weight' => 123,
'items_count' => 123,
'box_count' => 123
]
],
'tracking_link' => '<string>',
'expected_delivery_date' => '2023-12-25',
'manual_shipping_charges' => 123,
'courier_company_id' => '<string>'
]
],
'shipment_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments"
payload := strings.NewReader("{\n \"order_number\": \"<string>\",\n \"shipments\": [\n {\n \"warehouse_id\": \"<string>\",\n \"shipment_items\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123,\n \"free_quantity\": 123,\n \"selling_price\": 123\n }\n ],\n \"shipping_provider_id\": \"<string>\",\n \"total_weight\": 0,\n \"boxes\": [\n {\n \"box_name\": \"<string>\",\n \"box_length\": 123,\n \"box_width\": 123,\n \"box_height\": 123,\n \"box_weight\": 123,\n \"items_count\": 123,\n \"box_count\": 123\n }\n ],\n \"tracking_link\": \"<string>\",\n \"expected_delivery_date\": \"2023-12-25\",\n \"manual_shipping_charges\": 123,\n \"courier_company_id\": \"<string>\"\n }\n ],\n \"shipment_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order_number\": \"<string>\",\n \"shipments\": [\n {\n \"warehouse_id\": \"<string>\",\n \"shipment_items\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123,\n \"free_quantity\": 123,\n \"selling_price\": 123\n }\n ],\n \"shipping_provider_id\": \"<string>\",\n \"total_weight\": 0,\n \"boxes\": [\n {\n \"box_name\": \"<string>\",\n \"box_length\": 123,\n \"box_width\": 123,\n \"box_height\": 123,\n \"box_weight\": 123,\n \"items_count\": 123,\n \"box_count\": 123\n }\n ],\n \"tracking_link\": \"<string>\",\n \"expected_delivery_date\": \"2023-12-25\",\n \"manual_shipping_charges\": 123,\n \"courier_company_id\": \"<string>\"\n }\n ],\n \"shipment_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_number\": \"<string>\",\n \"shipments\": [\n {\n \"warehouse_id\": \"<string>\",\n \"shipment_items\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123,\n \"free_quantity\": 123,\n \"selling_price\": 123\n }\n ],\n \"shipping_provider_id\": \"<string>\",\n \"total_weight\": 0,\n \"boxes\": [\n {\n \"box_name\": \"<string>\",\n \"box_length\": 123,\n \"box_width\": 123,\n \"box_height\": 123,\n \"box_weight\": 123,\n \"items_count\": 123,\n \"box_count\": 123\n }\n ],\n \"tracking_link\": \"<string>\",\n \"expected_delivery_date\": \"2023-12-25\",\n \"manual_shipping_charges\": 123,\n \"courier_company_id\": \"<string>\"\n }\n ],\n \"shipment_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true
}Shipping
Create shipment
Create shipment
POST
/
shipping
/
shipments
Create shipment
curl --request POST \
--url https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"order_number": "<string>",
"shipments": [
{
"warehouse_id": "<string>",
"shipment_items": [
{
"product_id": "<string>",
"variant_id": "<string>",
"quantity": 123,
"free_quantity": 123,
"selling_price": 123
}
],
"shipping_provider_id": "<string>",
"total_weight": 0,
"boxes": [
{
"box_name": "<string>",
"box_length": 123,
"box_width": 123,
"box_height": 123,
"box_weight": 123,
"items_count": 123,
"box_count": 123
}
],
"tracking_link": "<string>",
"expected_delivery_date": "2023-12-25",
"manual_shipping_charges": 123,
"courier_company_id": "<string>"
}
],
"shipment_number": "<string>"
}
'import requests
url = "https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments"
payload = {
"order_number": "<string>",
"shipments": [
{
"warehouse_id": "<string>",
"shipment_items": [
{
"product_id": "<string>",
"variant_id": "<string>",
"quantity": 123,
"free_quantity": 123,
"selling_price": 123
}
],
"shipping_provider_id": "<string>",
"total_weight": 0,
"boxes": [
{
"box_name": "<string>",
"box_length": 123,
"box_width": 123,
"box_height": 123,
"box_weight": 123,
"items_count": 123,
"box_count": 123
}
],
"tracking_link": "<string>",
"expected_delivery_date": "2023-12-25",
"manual_shipping_charges": 123,
"courier_company_id": "<string>"
}
],
"shipment_number": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
order_number: '<string>',
shipments: [
{
warehouse_id: '<string>',
shipment_items: [
{
product_id: '<string>',
variant_id: '<string>',
quantity: 123,
free_quantity: 123,
selling_price: 123
}
],
shipping_provider_id: '<string>',
total_weight: 0,
boxes: [
{
box_name: '<string>',
box_length: 123,
box_width: 123,
box_height: 123,
box_weight: 123,
items_count: 123,
box_count: 123
}
],
tracking_link: '<string>',
expected_delivery_date: '2023-12-25',
manual_shipping_charges: 123,
courier_company_id: '<string>'
}
],
shipment_number: '<string>'
})
};
fetch('https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'order_number' => '<string>',
'shipments' => [
[
'warehouse_id' => '<string>',
'shipment_items' => [
[
'product_id' => '<string>',
'variant_id' => '<string>',
'quantity' => 123,
'free_quantity' => 123,
'selling_price' => 123
]
],
'shipping_provider_id' => '<string>',
'total_weight' => 0,
'boxes' => [
[
'box_name' => '<string>',
'box_length' => 123,
'box_width' => 123,
'box_height' => 123,
'box_weight' => 123,
'items_count' => 123,
'box_count' => 123
]
],
'tracking_link' => '<string>',
'expected_delivery_date' => '2023-12-25',
'manual_shipping_charges' => 123,
'courier_company_id' => '<string>'
]
],
'shipment_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments"
payload := strings.NewReader("{\n \"order_number\": \"<string>\",\n \"shipments\": [\n {\n \"warehouse_id\": \"<string>\",\n \"shipment_items\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123,\n \"free_quantity\": 123,\n \"selling_price\": 123\n }\n ],\n \"shipping_provider_id\": \"<string>\",\n \"total_weight\": 0,\n \"boxes\": [\n {\n \"box_name\": \"<string>\",\n \"box_length\": 123,\n \"box_width\": 123,\n \"box_height\": 123,\n \"box_weight\": 123,\n \"items_count\": 123,\n \"box_count\": 123\n }\n ],\n \"tracking_link\": \"<string>\",\n \"expected_delivery_date\": \"2023-12-25\",\n \"manual_shipping_charges\": 123,\n \"courier_company_id\": \"<string>\"\n }\n ],\n \"shipment_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"order_number\": \"<string>\",\n \"shipments\": [\n {\n \"warehouse_id\": \"<string>\",\n \"shipment_items\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123,\n \"free_quantity\": 123,\n \"selling_price\": 123\n }\n ],\n \"shipping_provider_id\": \"<string>\",\n \"total_weight\": 0,\n \"boxes\": [\n {\n \"box_name\": \"<string>\",\n \"box_length\": 123,\n \"box_width\": 123,\n \"box_height\": 123,\n \"box_weight\": 123,\n \"items_count\": 123,\n \"box_count\": 123\n }\n ],\n \"tracking_link\": \"<string>\",\n \"expected_delivery_date\": \"2023-12-25\",\n \"manual_shipping_charges\": 123,\n \"courier_company_id\": \"<string>\"\n }\n ],\n \"shipment_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.api.commercengine.io/api/v1/{store_id}/admin/shipping/shipments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"order_number\": \"<string>\",\n \"shipments\": [\n {\n \"warehouse_id\": \"<string>\",\n \"shipment_items\": [\n {\n \"product_id\": \"<string>\",\n \"variant_id\": \"<string>\",\n \"quantity\": 123,\n \"free_quantity\": 123,\n \"selling_price\": 123\n }\n ],\n \"shipping_provider_id\": \"<string>\",\n \"total_weight\": 0,\n \"boxes\": [\n {\n \"box_name\": \"<string>\",\n \"box_length\": 123,\n \"box_width\": 123,\n \"box_height\": 123,\n \"box_weight\": 123,\n \"items_count\": 123,\n \"box_count\": 123\n }\n ],\n \"tracking_link\": \"<string>\",\n \"expected_delivery_date\": \"2023-12-25\",\n \"manual_shipping_charges\": 123,\n \"courier_company_id\": \"<string>\"\n }\n ],\n \"shipment_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"success": true
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Was this page helpful?
⌘I