NAV Navbar
API Version:   V1.0.10
Logo
shell ruby python javascript

Introduction

About us

Boxme Global is one-stop solution for Cross-Border E-Commerce seller, who want to become millionaire.

Shipjung is a member of Boxme Global provide shipping gateway for ecommerce.

API Key

How to get your API Key?

Before you started with using our REST API services, you will need to obtain your API key under your own user account.

API end point

Once you’ve registered your API it’s easy to start requesting data from Shipjung.

All endpoints are only accessible via https

API Supported

Products

Shipment

Location

Order

Location

Get Province - City List

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/api/public/api/merchant/rest/lading/city")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["headers"] = '{'content-type': 'application/x-www-form-urlencoded'}'
request["content-type"] = 'application/x-www-form-urlencoded'

response = http.request(request)
puts response.read_body
import requests

url = "http://seller.shipjung.com/api/public/api/merchant/rest/lading/city"

payload = ""
headers = {
    'headers': "{'content-type': 'application/x-www-form-urlencoded'}",
    'content-type': "application/x-www-form-urlencoded"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
# With shell, you can just pass the correct header with each request
curl --request GET \
  --url http://seller.shipjung.com/api/public/api/merchant/rest/lading/city \
  --header 'content-type: application/x-www-form-urlencoded' \
  --header 'headers: {'\''content-type'\'': '\''application/x-www-form-urlencoded'\''}'
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://seller.shipjung.com/api/public/api/merchant/rest/lading/city");
xhr.setRequestHeader("headers", "{'content-type': 'application/x-www-form-urlencoded'}");
xhr.setRequestHeader("content-type", "application/x-www-form-urlencoded");

xhr.send(data);

The above command returns JSON structured like this:

{
  "error": false,
  "error_message": "success",
  "data": [
    {
      "CityId": 5475093,
      "CityName": "Amnat Charoen",
      "CityNameTh": "อำนาจเจริญ"
    },
    {
      "CityId": 5475073,
      "CityName": "Ang Thong",
      "CityNameTh": "อ่างทอง"
    },
    {
      "CityId": 5475072,
      "CityName": "Ayutthaya",
      "CityNameTh": "พระนครศรีอยุธยา"
    },
    {
      "CityId": 5475068,
      "CityName": "Bangkok",
      "CityNameTh": "กรุงเทพมหานคร"
    },
    {
      "CityId": 5475144,
      "CityName": "Buengkan",
      "CityNameTh": "บึงกาฬ"
    },
    {
      "CityId": 5475087,
      "CityName": "Buriram",
      "CityNameTh": "บุรีรัมย์"
    },
    {
      "CityId": 5475082,
      "CityName": "Chachoengsao",
      "CityNameTh": "ฉะเชิงเทรา"
    },
    {
      "CityId": 5475076,
      "CityName": "Chai Nat",
      "CityNameTh": "ชัยนาท"
    },
    {
      "CityId": 5475092,
      "CityName": "Chaiyaphum",
      "CityNameTh": "ชัยภูมิ"
    },
    {
      "CityId": 5475080,
      "CityName": "Chanthaburi",
      "CityNameTh": "จันทบุรี"
    },
    {
      "CityId": 5475105,
      "CityName": "Chiang Mai",
      "CityNameTh": "เชียงใหม่"
    },
    {
      "CityId": 5475112,
      "CityName": "Chiang Rai",
      "CityNameTh": "เชียงราย"
    },
    {
      "CityId": 5475078,
      "CityName": "Chonburi",
      "CityNameTh": "ชลบุรี"
    },
    {
      "CityId": 5475136,
      "CityName": "Chumphon",
      "CityNameTh": "ชุมพร"
    },
    {
      "CityId": 5475101,
      "CityName": "Kalasin",
      "CityNameTh": "กาฬสินธุ์"
    },
    {
      "CityId": 5475116,
      "CityName": "Kamphaeng Phet",
      "CityNameTh": "กำแพงเพชร"
    },
    {
      "CityId": 5475123,
      "CityName": "Kanchanaburi",
      "CityNameTh": "กาญจนบุรี"
    },
    {
      "CityId": 5475095,
      "CityName": "Khon Kaen",
      "CityNameTh": "ขอนแก่น"
    },
    {
      "CityId": 5475131,
      "CityName": "Krabi",
      "CityNameTh": "กระบี่"
    },
    {
      "CityId": 5475107,
      "CityName": "Lampang",
      "CityNameTh": "ลำปาง"
    },
    {
      "CityId": 5475106,
      "CityName": "Lamphun",
      "CityNameTh": "ลำพูน"
    },
    {
      "CityId": 5475097,
      "CityName": "Loei",
      "CityNameTh": "เลย"
    },
    {
      "CityId": 5475074,
      "CityName": "Lop Buri",
      "CityNameTh": "ลพบุรี"
    },
    {
      "CityId": 5475113,
      "CityName": "Mae Hong Son",
      "CityNameTh": "แม่ฮ่องสอน"
    },
    {
      "CityId": 5475099,
      "CityName": "Maha Sarakham",
      "CityNameTh": "มหาสารคาม"
    },
    {
      "CityId": 5475104,
      "CityName": "Mukdahan",
      "CityNameTh": "มุกดาหาร"
    },
    {
      "CityId": 5475084,
      "CityName": "Nakhon Nayok",
      "CityNameTh": "นครนายก"
    },
    {
      "CityId": 5475125,
      "CityName": "Nakhon Pathom",
      "CityNameTh": "นครปฐม"
    },
    {
      "CityId": 5475103,
      "CityName": "Nakhon Phanom",
      "CityNameTh": "นครพนม"
    },
    {
      "CityId": 5475086,
      "CityName": "Nakhon Ratchasima",
      "CityNameTh": "นครราชสีมา"
    },
    {
      "CityId": 5475114,
      "CityName": "Nakhon Sawan",
      "CityNameTh": "นครสวรรค์"
    },
    {
      "CityId": 5475130,
      "CityName": "Nakhon Si Thammarat",
      "CityNameTh": "นครศรีธรรมราช"
    },
    {
      "CityId": 5475110,
      "CityName": "Nan",
      "CityNameTh": "น่าน"
    },
    {
      "CityId": 5475143,
      "CityName": "Narathiwat",
      "CityNameTh": "นราธิวาส"
    },
    {
      "CityId": 5475098,
      "CityName": "Nong Khai",
      "CityNameTh": "หนองคาย"
    },
    {
      "CityId": 5475094,
      "CityName": "Nongbua Lamphu",
      "CityNameTh": "หนองบัวลำภู"
    },
    {
      "CityId": 5475070,
      "CityName": "Nonthaburi",
      "CityNameTh": "นนทบุรี"
    },
    {
      "CityId": 5475071,
      "CityName": "Pathum Thani",
      "CityNameTh": "ปทุมธานี"
    },
    {
      "CityId": 5475141,
      "CityName": "Pattani",
      "CityNameTh": "ปัตตานี"
    },
    {
      "CityId": 5475132,
      "CityName": "Phangnga",
      "CityNameTh": "พังงา"
    },
    {
      "CityId": 5475140,
      "CityName": "Phatthalung",
      "CityNameTh": "พัทลุง"
    },
    {
      "CityId": 5475111,
      "CityName": "Phayao",
      "CityNameTh": "พะเยา"
    },
    {
      "CityId": 5475121,
      "CityName": "Phetchabun",
      "CityNameTh": "เพชรบูรณ์"
    },
    {
      "CityId": 5475128,
      "CityName": "Phetchaburi",
      "CityNameTh": "เพชรบุรี"
    },
    {
      "CityId": 5475120,
      "CityName": "Phichit",
      "CityNameTh": "พิจิตร"
    },
    {
      "CityId": 5475119,
      "CityName": "Phitsanulok",
      "CityNameTh": "พิษณุโลก"
    },
    {
      "CityId": 5475109,
      "CityName": "Phrae",
      "CityNameTh": "แพร่"
    },
    {
      "CityId": 5475133,
      "CityName": "Phuket",
      "CityNameTh": "ภูเก็ต"
    },
    {
      "CityId": 5475083,
      "CityName": "Prachin Buri",
      "CityNameTh": "ปราจีนบุรี"
    },
    {
      "CityId": 5475129,
      "CityName": "Prachuap Khiri Khan",
      "CityNameTh": "ประจวบคีรีขันธ์"
    },
    {
      "CityId": 5475135,
      "CityName": "Ranong",
      "CityNameTh": "ระนอง"
    },
    {
      "CityId": 5475122,
      "CityName": "Ratchaburi",
      "CityNameTh": "ราชบุรี"
    },
    {
      "CityId": 5475079,
      "CityName": "Rayong",
      "CityNameTh": "ระยอง"
    },
    {
      "CityId": 5475100,
      "CityName": "Roi Et",
      "CityNameTh": "ร้อยเอ็ด"
    },
    {
      "CityId": 5475085,
      "CityName": "Sa Kaew",
      "CityNameTh": "สระแก้ว"
    },
    {
      "CityId": 5475102,
      "CityName": "Sakon Nakhon",
      "CityNameTh": "สกลนคร"
    },
    {
      "CityId": 5475069,
      "CityName": "Samut Prakarn",
      "CityNameTh": "สมุทรปราการ"
    },
    {
      "CityId": 5475126,
      "CityName": "Samut Sakhon",
      "CityNameTh": "สมุทรสาคร"
    },
    {
      "CityId": 5475127,
      "CityName": "Samut Songkhram",
      "CityNameTh": "สมุทรสงคราม"
    },
    {
      "CityId": 5475077,
      "CityName": "Saraburi",
      "CityNameTh": "สระบุรี"
    },
    {
      "CityId": 5475138,
      "CityName": "Satun",
      "CityNameTh": "สตูล"
    },
    {
      "CityId": 5475075,
      "CityName": "Sing Buri",
      "CityNameTh": "สิงห์บุรี"
    },
    {
      "CityId": 5475089,
      "CityName": "Sisaket",
      "CityNameTh": "ศรีสะเกษ"
    },
    {
      "CityId": 5475137,
      "CityName": "Songkhla",
      "CityNameTh": "สงขลา"
    },
    {
      "CityId": 5475118,
      "CityName": "Sukhothai",
      "CityNameTh": "สุโขทัย"
    },
    {
      "CityId": 5475124,
      "CityName": "Suphan Buri",
      "CityNameTh": "สุพรรณบุรี"
    },
    {
      "CityId": 5475134,
      "CityName": "Surat Thani",
      "CityNameTh": "สุราษฎร์ธานี"
    },
    {
      "CityId": 5475088,
      "CityName": "Surin",
      "CityNameTh": "สุรินทร์"
    },
    {
      "CityId": 5475117,
      "CityName": "Tak",
      "CityNameTh": "ตาก"
    },
    {
      "CityId": 5475139,
      "CityName": "Trang",
      "CityNameTh": "ตรัง"
    },
    {
      "CityId": 5475081,
      "CityName": "Trat",
      "CityNameTh": "ตราด"
    },
    {
      "CityId": 5475090,
      "CityName": "Ubon Ratchathani",
      "CityNameTh": "อุบลราชธานี"
    },
    {
      "CityId": 5475096,
      "CityName": "Udon Thani",
      "CityNameTh": "อุดรธานี"
    },
    {
      "CityId": 5475115,
      "CityName": "Uthai Thani",
      "CityNameTh": "อุทัยธานี"
    },
    {
      "CityId": 5475108,
      "CityName": "Uttaradit",
      "CityNameTh": "อุตรดิตถ์"
    },
    {
      "CityId": 5475142,
      "CityName": "Yala",
      "CityNameTh": "ยะลา"
    },
    {
      "CityId": 5475091,
      "CityName": "Yasothon",
      "CityNameTh": "ยโสธร"
    }
  ]
}

HTTP Request

GET http://seller.shipjung.com/courier/list_address_th/216

Query Parameters

Parameter Default Description
headers false ‘content-type’: ‘application/x-www-form-urlencoded’.

Product

Get Lists Inventory

To authorize, use this code:

require 'uri'
require 'net/http'
url = URI("http://seller.shipjung.com/bxapi/list_inventory-sdk")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("prod.boxme.vn")

payload = "{}"

headers = { 'content-type': "application/json" }

conn.request("GET", "/bxapi/list_inventory-sdk", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
# With shell, you can just pass the correct header with each request
curl --request GET \
  --url http://seller.shipjung.com/bxapi/list_inventory-sdk \
  --header 'content-type: application/json' \
  --data '{}'
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "http://seller.shipjung.com/bxapi/list_inventory-sdk",
  "method": "GET",
  "headers": {
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

The above command returns JSON structured like this:

{
  "inventory": [
    {
      "City": "BangKok",
      "Code": null,
      "Name": "Inventory - 10100 - Bangkok",
      "District": "--",
      "Phone": "0938131593",
      "InventoryId": "92932",
      "Type": 0,
      "AddressLine": "aaa"
    }
  ]
}

HTTP Request

GET http://seller.shipjung.com/bxapi/list_inventory-sdk

Query Parameters

Parameter Default Description
ApiKey false Your api key of seller.

Edit Product

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/bxapi/edit-product-sdk")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"InventoryId\":\"137123\",\"ApiKey\":\"7e4e80c6bdb03c5a2d639c4828bcf156\",\"SellerSKU\":\"KA-07\",\"Name\":\"iphone 9 \",\"Description\":\"Iphone 7s black new 100%\",\"BasePrice\":10000,\"SalePrice\":20000,\"Weight\":1223,\"Volume\":\"\",\"ProductImages\":\"\"}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("prod.boxme.vn")

payload = "{\"InventoryId\":\"137123\",\"ApiKey\":\"7e4e80c6bdb03c5a2d639c4828bcf156\",\"SellerSKU\":\"KA-07\",\"Name\":\"iphone 9 \",\"Description\":\"Iphone 7s black new 100%\",\"BasePrice\":10000,\"SalePrice\":20000,\"Weight\":1223,\"Volume\":\"\",\"ProductImages\":\"\"}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/bxapi/edit-product-sdk", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
# With shell, you can just pass the correct header with each request
curl --request POST \
  --url http://seller.shipjung.com/bxapi/edit-product-sdk \
  --header 'content-type: application/json' \
  --data '{"InventoryId":"137123","ApiKey":"7e4e80c6bdb03c5a2d639c4828bcf156","SellerSKU":"KA-07","Name":"iphone 9 ","Description":"Iphone 7s black new 100%","BasePrice":10000,"SalePrice":20000,"Weight":1223,"Volume":"","ProductImages":""}'
var data = JSON.stringify({
  "InventoryId": "137123",
  "ApiKey": "7e4e80c6bdb03c5a2d639c4828bcf156",
  "SellerSKU": "KA-07",
  "Name": "iphone 9 ",
  "Description": "Iphone 7s black new 100%",
  "BasePrice": 10000,
  "SalePrice": 20000,
  "Weight": 1223,
  "Volume": "",
  "ProductImages": ""
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://seller.shipjung.com/bxapi/edit-product-sdk");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

{
  "Name": "iphone 9 ",
  "SalePrice": 20000,
  "BasePrice": 10000,
  "SellerId": "87695",
  "Description": "Iphone 7s black new 100%",
  "QuantityUnit": null,
  "SellerSKU": "KA-07",
  "Weight": 1223,
  "Volume": null,
  "InventoryId": "137123",
  "ProductId": "88999"
}

HTTP Request

POST http://seller.shipjung.com/bxapi/edit-product-sdk

Query Parameters

Parameter Default Description
ApiKey false You Key API.
SellerSKU false Product code (sku) to edit.
Name false New product name.
InventoryId false New ID warehouse (Pickup address config).
Description false New product description .
BasePrice false New product base price .
SalePrice false New product sale price (Price to create orders) .
Weight false New product weight (weight to create orders) .
Volume false New Volume product .

Add Product

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/bxapi/product-sdk")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"InventoryId\":\"105341\",\"ApiKey\":\"7e4e80c6bdb03c5a2d639c4828bcf156\",\"SellerSKU\":\"Test-Pro-IP7S\",\"Name\":\"IPhone 7s Black\",\"CategoryName\":\"Phone\",\"SupplierName\":\"Apple\",\"BrandName\":\"Apple\",\"Description\":\"Iphone 7s black new 100%\",\"ProductTags\":\"iphone,iphone7s,iphone7\",\"Quantity\":50,\"BasePrice\":16000000,\"SalePrice\":16500000,\"BarcodeManufacturer\":\"IP7SABC\",\"ModelName\":\"IPhone7s\",\"Weight\":200,\"Volume\":\"2x2x2\",\"ProductImages\":\"\"}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("prod.boxme.vn")

payload = "{\"InventoryId\":\"105341\",\"ApiKey\":\"7e4e80c6bdb03c5a2d639c4828bcf156\",\"SellerSKU\":\"Test-Pro-IP7S\",\"Name\":\"IPhone 7s Black\",\"CategoryName\":\"Phone\",\"SupplierName\":\"Apple\",\"BrandName\":\"Apple\",\"Description\":\"Iphone 7s black new 100%\",\"ProductTags\":\"iphone,iphone7s,iphone7\",\"Quantity\":50,\"BasePrice\":16000000,\"SalePrice\":16500000,\"BarcodeManufacturer\":\"IP7SABC\",\"ModelName\":\"IPhone7s\",\"Weight\":200,\"Volume\":\"2x2x2\",\"ProductImages\":\"\"}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/bxapi/product-sdk", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
# With shell, you can just pass the correct header with each request
curl --request POST \
  --url http://seller.shipjung.com/bxapi/product-sdk \
  --header 'content-type: application/json' \
  --data '{"InventoryId":"105341","ApiKey":"7e4e80c6bdb03c5a2d639c4828bcf156","SellerSKU":"Test-Pro-IP7S","Name":"IPhone 7s Black","CategoryName":"Phone","SupplierName":"Apple","BrandName":"Apple","Description":"Iphone 7s black new 100%","ProductTags":"iphone,iphone7s,iphone7","Quantity":50,"BasePrice":16000000,"SalePrice":16500000,"BarcodeManufacturer":"IP7SABC","ModelName":"IPhone7s","Weight":200,"Volume":"2x2x2","ProductImages":""}'
var data = JSON.stringify({
  "InventoryId": "105341",
  "ApiKey": "7e4e80c6bdb03c5a2d639c4828bcf156",
  "SellerSKU": "Test-Pro-IP7S",
  "Name": "IPhone 7s Black",
  "CategoryName": "Phone",
  "SupplierName": "Apple",
  "BrandName": "Apple",
  "Description": "Iphone 7s black new 100%",
  "ProductTags": "iphone,iphone7s,iphone7",
  "Quantity": 50,
  "BasePrice": 16000000,
  "SalePrice": 16500000,
  "BarcodeManufacturer": "IP7SABC",
  "ModelName": "IPhone7s",
  "Weight": 200,
  "Volume": "2x2x2",
  "ProductImages": ""
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://seller.shipjung.com/bxapi/product-sdk");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

{
  "WeightUnit": 1,
  "BrandName": "brank",
  "SalePrice": 2000,
  "BasePrice": 1000,
  "SupplierName": "soupper",
  "Name": "Product Test",
  "Description": "Description testt",
  "Volume": "2x2x2",
  "ManufactureBarcode": null,
  "SellerId": "30788",
  "Quantity": 200,
  "ModelName": "moel",
  "SupplierId": null,
  "ModelId": null,
  "ExternalUrl": null,
  "CategoryId": null,
  "CategoryName": "Phone",
  "QuantityUnit": 1,
  "SellerSKU": "Biaaaa",
  "Weight": 200,
  "BrandId": "",
  "InventoryId": "36",
  "ProductTags": "tag 1 tag 2",
  "ProductId": "11584"
}

HTTP Request

POST http://seller.shipjung.com/bxapi/product-sdk

Query Parameters

Parameter Default Description
ApiKey false You Key API.
SellerSKU false Product code (sku) to edit.
InventoryId false Id inventory (not boxme).
Name false Product Name.
CategoryName false Product CategoryName .
SupplierName false Product SupplierName .
BrandName false Product Brand.
Description false Product Description.
ProductTags false Product tag.
Quantity false Product quantity.
BasePrice false New product base price.
SalePrice false New product sale price (Price to create orders) .
Weight false New product weight (weight to create orders).
BarcodeManufacturer false Barcode (if exist).
ProductImages false Images (if exist) .

Get Lists Product

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/bxapi/list_product-sdk")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("prod.boxme.vn")

payload = "{}"

headers = { 'content-type': "application/json" }

conn.request("GET", "/bxapi/list_product-sdk", payload, headers)

res = conn.getresponse()
# With shell, you can just pass the correct header with each request
curl --request GET \
  --url http://seller.shipjung.com/bxapi/list_product-sdk \
  --header 'content-type: application/json' \
  --data '{}'
var data = JSON.stringify({});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://seller.shipjung.com/bxapi/list_product-sdk");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

{
  "total_items": 26,
  "data": {
    "product": [
      {
        "Name": "iphone 7s ",
        "InventoryName": "Shipjung - Bangkok",
        "SalePrice": 200000,
        "BasePrice": 10000,
        "Description": "Iphone 7s black new 100%",
        "SellerSKU": "A-377AAEE",
        "Weight": 1223,
        "ProductImages": [],
        "InventoryId": 137123,
        "Quantity": 1,
        "ProductId": "89034",
        "ToBoxme": false
      }
    ]
  }
}

HTTP Request

GET http://seller.shipjung.com/bxapi/list_product-sdk

Query Parameters

Parameter Default Description
ApiKey false You Key API.

Get List Product To Create Order

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/bxapi/get_list_products_create_order")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["content-type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("prod.boxme.vn")

payload = "{}"

headers = { 'content-type': "application/json" }

conn.request("GET", "/bxapi/get_list_products_create_order", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
# With shell, you can just pass the correct header with each request
curl --request GET \
  --url http://seller.shipjung.com/bxapi/get_list_products_create_order \
  --header 'content-type: application/json' \
  --data '{}'
var data = JSON.stringify({});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://seller.shipjung.com/bxapi/get_list_products_create_order");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

{
  "total_items": 1,
  "data": {
    "product": [
      {
        "InventoryName": "Shipjung - Bangkok",
        "Waiting": 0,
        "InventoryLimit": 0,
        "SalePrice": "150000",
        "SellerSKU": "PO-150M4NU",
        "Weight": 200,
        "InventoryId": 133902,
        "Name": "Iphone X",
        "Quantity": 24,
        "ProductId": "88954"
      }
    ]
  }
}

HTTP Request

GET http://seller.shipjung.com/bxapi/get_list_products_create_order

Query Parameters

Parameter Default Description
ApiKey false You Key API.
inventory_id false ID inventory(boxme) (non-mandatory).
sellerSKU false SKU (non-mandatory).

Shipment

Create Shipment

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/bxapi/shipment-sdk")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"ApiKey\":\"7e4e80c6bdb03c5a2d639c4828bcf156\",\"ShipToAddress\":{\"InventoryId\":133455},\"ShipFromAddress\":{\"InventoryId\":105341},\"TypeTransport\":1,\"ShipmentStatus\":\"ReadyToShip\",\"Volumes\":\"10x10x10\",\"Weight\":500,\"ShippingMethod\":\"MYSELF\",\"ShipmentItems\":[{\"SKU\":\"14398602\",\"QuantityShipped\":100}]}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("seller.shipjung.com")

payload = "{\"ApiKey\":\"7e4e80c6bdb03c5a2d639c4828bcf156\",\"ShipToAddress\":{\"InventoryId\":133455},\"ShipFromAddress\":{\"InventoryId\":105341},\"TypeTransport\":1,\"ShipmentStatus\":\"ReadyToShip\",\"Volumes\":\"10x10x10\",\"Weight\":500,\"ShippingMethod\":\"MYSELF\",\"ShipmentItems\":[{\"SKU\":\"14398602\",\"QuantityShipped\":100}]}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/bxapi/shipment-sdk", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
# With shell, you can just pass the correct header with each request
curl --request POST \
  --url http://seller.shipjung.com/bxapi/shipment-sdk \
  --header 'content-type: application/json' \
  --data '{"ApiKey":"7e4e80c6bdb03c5a2d639c4828bcf156","ShipToAddress":{"InventoryId":133455},"ShipFromAddress":{"InventoryId":105341},"TypeTransport":1,"ShipmentStatus":"ReadyToShip","Volumes":"10x10x10","Weight":500,"ShippingMethod":"MYSELF","ShipmentItems":[{"SKU":"14398602","QuantityShipped":100}]}'
var data = JSON.stringify({
  "ApiKey": "7e4e80c6bdb03c5a2d639c4828bcf156",
  "ShipToAddress": {
    "InventoryId": 133455
  },
  "ShipFromAddress": {
    "InventoryId": 105341
  },
  "TypeTransport": 1,
  "ShipmentStatus": "ReadyToShip",
  "Volumes": "10x10x10",
  "Weight": 500,
  "ShippingMethod": "MYSELF",
  "ShipmentItems": [
    {
      "SKU": "14398602",
      "QuantityShipped": 100
    }
  ]
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://seller.shipjung.com/bxapi/shipment-sdk");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

{
  "inventory": [
    {
      "City": "Bangkok",
      "Code": null,
      "Name": "Inventory - 10100 - Bangkok",
      "District": "--",
      "Phone": "0938131593",
      "InventoryId": "92932",
      "Type": 0,
      "AddressLine": "aaa"
    }
  ]
}

HTTP Request

POST http://seller.shipjung.com/bxapi/shipment-sdk

Query Parameters

Parameter Default Description
ApiKey false Your api key of seller.

Orders

List of shipping services

id name
2 Door To Door

Calculate Shipping fee

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/courier/caculate_courier_order_new")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"From\":{\"City\":5475068,\"Province\":15385, \"Stock\":155303},\"To\":{\"City\":5475068,\"Province\":15396, \"Country\":216, \"ZipCode\": \"10120\"},\"Order\":{\"Amount\":10000,\"Weight\":2000, \"BoxSize\": \"100x10x100\", \"Quantity\": 1},\"Config\":{\"Service\":2,\"CoD\":2,\"Protected\":2,\"Checking\":2,\"Payment\":1,\"Fragile\":2},\"Domain\":\"seller.shipjung.com\",\"MerchantKey\":\"e80d1bb5cde172364fdd6c338b8966ac\", \"Items\":[{\"Name\":\"Casio AP-80R\",\"Price\": 10,\"Quantity\": 1, \"Weight\": 2000, \"BSIN\": \"CA-173\"}]}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("seller.shipjung.com")

payload = "{\"From\":{\"City\":5475068,\"Province\":15385, \"Stock\":155303},\"To\":{\"City\":5475068,\"Province\":15396, \"Country\":216, \"ZipCode\": \"10120\"},\"Order\":{\"Amount\":10000,\"Weight\":2000, \"BoxSize\": \"100x10x100\", \"Quantity\": 1},\"Config\":{\"Service\":2,\"CoD\":2,\"Protected\":2,\"Checking\":2,\"Payment\":1,\"Fragile\":2},\"Domain\":\"seller.shipjung.com\",\"MerchantKey\":\"e80d1bb5cde172364fdd6c338b8966ac\", \"Items\":[{\"Name\":\"Casio AP-80R\",\"Price\": 10,\"Quantity\": 1, \"Weight\": 2000, \"BSIN\": \"CA-173\"}]}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/courier/caculate_courier_order_new", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
# With shell, you can just pass the correct header with each request
curl --request POST \
  --url http://seller.shipjung.com/courier/caculate_courier_order_new \
  --header 'content-type: application/json' \
  --data '{"Domain":"seller.shipjung.com","From":{"City":5475068,"Province":15385,"Stock":155303},"To":{"City":"5475068","Province":"15396","Address":"88  แมนดารีน่า อ่อนนุช ถนนสุขุมวิท","Country":216,"ZipCode":"10120"},"Items":[{"Name":"Casio AP-80R","Price":10,"Quantity":1,"Weight":300,"BSIN":"CA-173"}],"Order":{"Weight":300,"Amount":10,"Quantity":1,"Box":"","BoxSize":"100x10x100"},"Config":{"Service":2,"Protected":2,"Fragile":2,"CoD":2,"Payment":1,"PaymentCod":2,"Checking":2},"MerchantKey":"e80d1bb5cde172364fdd6c338b8966ac"}'
var data = JSON.stringify({
  "Domain": "seller.shipjung.com",
  "From": {
    "City": 5475068,
    "Province": 15385,
    "Stock": 155303
  },
  "To": {
    "City": "5475068",
    "Province": "15396",
    "Address": "88  แมนดารีน่า อ่อนนุช ถนนสุขุมวิท",
    "Country": 216,
    "ZipCode": "10120"
  },
  "Items": [
    {
      "Name": "Casio AP-80R",
      "Price": 10,
      "Quantity": 1,
      "Weight": 300,
      "BSIN": "CA-173"
    }
  ],
  "Order": {
    "Weight": 300,
    "Amount": 10,
    "Quantity": 1,
    "Box": "",
    "BoxSize": "100x10x100"
  },
  "Config": {
    "Service": 2,
    "Protected": 2,
    "Fragile": 2,
    "CoD": 2,
    "Payment": 1,
    "PaymentCod": 2,
    "Checking": 2
  }
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://seller.shipjung.com/courier/caculate_courier_order_new");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

{
  "code": "SUCCESS",
  "error_message": "success",
  "error": false,
  "message": "success",
  "data": {
    "courier": {
      "system": [
        {
          "courier_id": 11,
          "logo": "http://seller.shipjung.com/img/logo-hvc/11.png",
          "leatime_str": "1 day",
          "fee": {
            "discount": {
              "pvc": 0,
              "pcod": 0
            },
            "collect": 0,
            "pvc": 78,
            "vas": {
              "protected": 0,
              "cod": 0
            },
            "promotion": 0,
            "total": 78
          },
          "leatime_delivery": 24,
          "courier_name": "Kerry Express",
          "leatime_courier": 24,
          "priority": 0,
          "leatime_ward": 0,
          "leatime_total": 24,
          "money_pickup": 0
        }
      ]
    },
    "discount": {
      "pvc": 0,
      "pcod": 0
    },
    "collect": 0,
    "pvc": 0,
    "vas": {
      "protected": 0,
      "cod": 0
    }
  }
}

HTTP Request

POST http://seller.shipjung.com/courier/caculate_courier_order_new

Query Parameters

Parameter Default Description
ApiKey (MerchantKey) false Your api key of seller.
From.City false From city send order.
From.Province false From province send order.
From.Stock false Stock send order.
To.City false To city receive order.
To.Province false To province receive order.
To.ZipCode false To ZipCode receive order.
Order.Amount false Order amount.
Order.Weight false Order weight.
Config.Service false Shipping method:1. Economy delivery service,2. Express delivery service.
Config.CoD false Cash On Delivery (COD) 1: Use; 2: Don’t use.
Config.Protected false Insurance.
Config.Checking false Accept receiver view item in order before confirm received or not.
Config.Payment false Payment.
Config.Fragile false Fragile.

Create Order Fulfillment (Boxme)

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/courier/add_order_courier")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"Domain\":\"boxme.shipjung.com\", \"MerchantKey\":\"e80d1bb5cde172364fdd6c338b89661ac\"
, \"From\":{\"City\":5475068,\"Province\":15385,\"Stock\":155303,\"Address\":\"89/7 หมู่ 9 ถนนสวนหนามแดง-บางพลี ตำบลบางแก้ว Amphoe Bang Phli, Chang Wat Samut Prakan 10540, Thailand\",\"Phone\":\"02-107-1456 / 089-55\",\"Name\":\"Sandbox\"},\"To\":{\"City\":\"5475068\",\"Province\":\"15396\",\"Address\":\"88  แมนดารีน่า อ่อนนุช ถนนสุขุมวิท\",\"Country\":216,\"ZipCode\":\"10120\",\"Phone\":\"089128311\",\"PhoneCode\":66,\"Name\":\"สุขโขไทยสปา\",\"BuyerId\":3130243},\"Items\":[{\"Name\":\"Casio AP-80R\",\"Price\":10,\"Quantity\":1,\"Weight\":300,\"BSIN\":\"CA-173\"}],\"Order\":{\"Weight\":300,\"Amount\":10,\"Quantity\":1,\"Box\":\"\",\"BoxSize\":\"100x10x100\",\"ProductName\":\"Casio AP-80R\"},\"Config\":{\"Service\":2,\"Protected\":2,\"Fragile\":2,\"CoD\":2,\"Payment\":1,\"PaymentCod\":2,\"Checking\":2,\"AutoAccept\":0,\"exchangeRate\":1},\"Courier\":11}"

response = http.request(request)
puts response.read_body
import http.client

conn = http.client.HTTPConnection("seller.shipjung.com")

payload = "{\"Domain\":\"boxme.shipjung.com\", \"MerchantKey\":\"e80d1bb5cde172364fdd6c338b89661ac\",\"From\":{\"City\":5475068,\"Province\":15385,\"Stock\":155303,\"Address\":\"89/7 หมู่ 9 ถนนสวนหนามแดง-บางพลี ตำบลบางแก้ว Amphoe Bang Phli, Chang Wat Samut Prakan 10540, Thailand\",\"Phone\":\"02-107-1456 / 089-55\",\"Name\":\"Sandbox\"},\"To\":{\"City\":\"5475068\",\"Province\":\"15396\",\"Address\":\"88  แมนดารีน่า อ่อนนุช ถนนสุขุมวิท\",\"Country\":216,\"ZipCode\":\"10120\",\"Phone\":\"089128311\",\"PhoneCode\":66,\"Name\":\"สุขโขไทยสปา\",\"BuyerId\":3130243},\"Items\":[{\"Name\":\"Casio AP-80R\",\"Price\":10,\"Quantity\":1,\"Weight\":300,\"BSIN\":\"CA-173\"}],\"Order\":{\"Weight\":300,\"Amount\":10,\"Quantity\":1,\"Box\":\"\",\"BoxSize\":\"100x10x100\",\"ProductName\":\"Casio AP-80R\"},\"Config\":{\"Service\":2,\"Protected\":2,\"Fragile\":2,\"CoD\":2,\"Payment\":1,\"PaymentCod\":2,\"Checking\":2,\"AutoAccept\":0,\"exchangeRate\":1},\"Courier\":11}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/courier/add_order_courier", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
# With shell, you can just pass the correct header with each request
curl --request POST \
  --url http://seller.shipjung.com/courier/add_order_courier \
  --header 'content-type: application/json' \
  --data '{"Domain":"seller.shipjung.com","MerchantKey":"e80d1bb5cde172364fdd6c338b89661ac",
"From":{"City":5475068,"Province":15385,"Stock":155303,"Address":"89/7 หมู่ 9 ถนนสวนหนามแดง-บางพลี ตำบลบางแก้ว Amphoe Bang Phli, Chang Wat Samut Prakan 10540, Thailand","Phone":"02-107-1456 / 089-55","Name":"Sandbox"},"To":{"City":"5475068","Province":"15396","Address":"88  แมนดารีน่า อ่อนนุช ถนนสุขุมวิท","Country":216,"ZipCode":"10120","Phone":"089128311","PhoneCode":66,"Name":"สุขโขไทยสปา","BuyerId":3130243},"Items":[{"Name":"Casio AP-80R","Price":10,"Quantity":1,"Weight":300,"BSIN":"CA-173"}],"Order":{"Weight":300,"Amount":10,"Quantity":1,"Box":"","BoxSize":"100x10x100","ProductName":"Casio AP-80R"},"Config":{"Service":2,"Protected":2,"Fragile":2,"CoD":2,"Payment":1,"PaymentCod":2,"Checking":2,"AutoAccept":0,"exchangeRate":1},"Courier":11}'
var data = JSON.stringify({
  "Domain": "seller.shipjung.com",
  "MerchantKey": "e80d1bb5cde172364fdd6c338b89661ac",
  "From": {
    "City": 5475068,
    "Province": 15385,
    "Stock": 155303,
    "Address": "89/7 หมู่ 9 ถนนสวนหนามแดง-บางพลี ตำบลบางแก้ว Amphoe Bang Phli, Chang Wat Samut Prakan 10540, Thailand",
    "Phone": "02-107-1456 / 089-55",
    "Name": "Sandbox"
  },
  "To": {
    "City": "5475068",
    "Province": "15396",
    "Address": "88  แมนดารีน่า อ่อนนุช ถนนสุขุมวิท",
    "Country": 216,
    "ZipCode": "10120",
    "Phone": "089128311",
    "PhoneCode": 66,
    "Name": "สุขโขไทยสปา",
    "BuyerId": 3130243
  },
  "Items": [
    {
      "Name": "Casio AP-80R",
      "Price": 10,
      "Quantity": 1,
      "Weight": 300,
      "BSIN": "CA-173"
    }
  ],
  "Order": {
    "Weight": 300,
    "Amount": 10,
    "Quantity": 1,
    "Box": "",
    "BoxSize": "100x10x100",
    "ProductName": "Casio AP-80R"
  },
  "Config": {
    "Service": 2,
    "Protected": 2,
    "Fragile": 2,
    "CoD": 2,
    "Payment": 1,
    "PaymentCod": 2,
    "Checking": 2,
    "AutoAccept": 0,
    "exchangeRate": 1
  },
  "Courier": 11
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", " http://seller.shipjung.com/courier/add_order_courier");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

{
  "message": "SUCCESS",
  "code": "SUCCESS",
  "data": {
    "Discount": 0,
    "ShowFee": {
      "pvc": 78,
      "cod": 0,
      "pbh": 0
    },
    "CourierId": 11,
    "TrackingCode": "SJ5330816102",
    "MoneyCollect": 0
  },
  "error_message": "SUCCESS",
  "error": false
}

HTTP Request

POST http://seller.shipjung.com/courier/add_order_courier

Query Parameters

Parameter Default Description
ApiKey (MerchantKey) false Your api key of seller.
Courier false Courier.
From.City false City inventory.
From.Province false Province inventoryr.
From.Stock false Id inventory.
From.Address false Address inventory.
From.Phone false Phone seller.
From.Name false Name seller.
To.City false City receive order.
To.Province false Province receive order.
To.Country false Country receive order.
To.Ward false Ward receive order.
To.Address false Address receive order.
To.ZipCode false ZipCode receive order.
To.Phone false Phone buyer.
To.Name false Name buyer.
To.PhoneCode false Name seller.
Items.Name false Name product.
Items.Price false Price product.
Items.Quantity false Quantity product.
Items.Weight false Weight product.
Items.BSIN false BSIN product.
Order.Weight false Total weight of item in order.
Order.Amount false Total product value.
Order.Quantity false Total quantity of item in order.
Order.Collect false Total money collect from buyer( when you use CoD). Currency: VND.
Order.ProductName false Info orders.
Config.Service false Shipping method:1. Economy delivery service,2. Express delivery service.
Config.CoD false Cash On Delivery (COD) 1: Use; 2: Don’t use.
Config.Protected false Insurance.
Config.Checking false Accept receiver view item in order before confirm received or not.
Config.Payment false Payment.
Config.Fragile false Fragile.
Config.AutoAccept false 1.Auto accept 0. No accept (default).

Create Shipping Order (Only Ship)

List of shipping services

id name
1 Drop-Off
2 Door To Door
9 Cool Parcel Delivery

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/courier/add_order_courier")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"Domain\":\"seller.shipjung.com\",\"MerchantKey\":\"e80d1bb5cde172364fdd6c338b8966ac\"
,\"From\":{\"City\":5475068,\"Province\":15423,\"Stock\":160605,\"Address\":\"on\",\"Phone\":\"12313111\",\"Name\":\"Hoang inventory\"},\"To\":{\"City\":\"5475068\",\"Province\":\"15396\",\"Address\":\"88  แมนดารีน่า อ่อนนุช ถนนสุขุมวิท\",\"Country\":216,\"ZipCode\":\"10120\",\"Phone\":\"089128311\",\"PhoneCode\":66,\"Name\":\"สุขโขไทยสปา\",\"BuyerId\":3130243},\"Order\":{\"Weight\":1499,\"Amount\":1000,\"Quantity\":1,\"Box\":\"20x30x11\",\"ProductName\":\"box\",\"ItemId\":3217855},\"Config\":{\"Service\":1,\"Protected\":2,\"Fragile\":2,\"CoD\":2,\"Payment\":1,\"PaymentCod\":2,\"Checking\":2,\"AutoAccept\":0,\"exchangeRate\":1},\"Courier\":3}"

response = http.request(request)
import http.client

conn = http.client.HTTPConnection("seller.shipjung.com")

payload = "{\"Domain\":\"seller.shipjung.com\",\"MerchantKey\":\"e80d1bb5cde172364fdd6c338b8966ac\",\"From\":{\"City\":5475068,\"Province\":15423,\"Stock\":160605,\"Address\":\"on\",\"Phone\":\"12313111\",\"Name\":\"Hoang inventory\"},\"To\":{\"City\":\"5475068\",\"Province\":\"15396\",\"Address\":\"88  แมนดารีน่า อ่อนนุช ถนนสุขุมวิท\",\"Country\":216,\"ZipCode\":\"10120\",\"Phone\":\"089128311\",\"PhoneCode\":66,\"Name\":\"สุขโขไทยสปา\",\"BuyerId\":3130243},\"Order\":{\"Weight\":1499,\"Amount\":1000,\"Quantity\":1,\"Box\":\"20x30x11\",\"ProductName\":\"box\",\"ItemId\":3217855},\"Config\":{\"Service\":1,\"Protected\":2,\"Fragile\":2,\"CoD\":2,\"Payment\":1,\"PaymentCod\":2,\"Checking\":2,\"AutoAccept\":0,\"exchangeRate\":1},\"Courier\":3}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/courier/add_order_courier", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
# With shell, you can just pass the correct header with each request
curl --request POST \
  --url http://seller.shipjung.com/courier/add_order_courier \
  --header 'content-type: application/json' \
  --data '{"Domain":"seller.shipjung.com","From":{"City":5475068,"Province":15423,"Stock":160605,"Address":"on","Phone":"12313111","Name":"Hoang inventory"},"To":{"City":"5475068","Province":"15396","Address":"88  แมนดารีน่า อ่อนนุช ถนนสุขุมวิท","Country":216,"ZipCode":"10120","Phone":"089128311","PhoneCode":66,"Name":"สุขโขไทยสปา","BuyerId":3130243},"Order":{"Weight":1499,"Amount":1000,"Quantity":1,"Box":"20x30x11","ProductName":"box","ItemId":3217855},"Config":{"Service":1,"Protected":2,"Fragile":2,"CoD":2,"Payment":1,"PaymentCod":2,"Checking":2,"AutoAccept":0,"exchangeRate":1},"Courier":3,"MerchantKey":"e80d1bb5cde172364fdd6c338b8966ac"}'
var data = JSON.stringify({
  "Domain": "seller.shipjung.com",
  "From": {
    "City": 5475068,
    "Province": 15423,
    "Stock": 160605,
    "Address": "on",
    "Phone": "12313111",
    "Name": "Hoang inventory"
  },
  "To": {
    "City": "5475068",
    "Province": "15396",
    "Address": "88  แมนดารีน่า อ่อนนุช ถนนสุขุมวิท",
    "Country": 216,
    "ZipCode": "10120",
    "Phone": "089128311",
    "PhoneCode": 66,
    "Name": "สุขโขไทยสปา",
    "BuyerId": 3130243
  },
  "Order": {
    "Weight": 1499,
    "Amount": 1000,
    "Quantity": 1,
    "Box": "20x30x11",
    "ProductName": "box",
    "ItemId": 3217855
  },
  "Config": {
    "Service": 1,
    "Protected": 2,
    "Fragile": 2,
    "CoD": 2,
    "Payment": 1,
    "PaymentCod": 2,
    "Checking": 2,
    "AutoAccept": 0,
    "exchangeRate": 1
  },
  "Courier": 3,
  "MerchantKey": "e80d1bb5cde172364fdd6c338b8966ac"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://seller.shipjung.com/courier/add_order_courier");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

{
  "error": "success",
  "error_message": "Tạo vận đơn thành công",
  "data": {
    "TrackingCode": "SC5732160351",
    "CourierId": 1,
    "MoneyCollect": 250000,
    "ShowFee": {
      "pvc": 0,
      "cod": 0,
      "pbh": 0
    },
    "Discount": {
      "seller": 0
    }
  }
}

HTTP Request

POST http://seller.shipjung.com/courier/add_order_courier

Query Parameters

Parameter Default Description
ApiKey (MerchantKey) false Your api key of seller.
Courier false Courier.
From.City false City inventory.
From.Province false Province inventoryr.
From.Stock false Id inventory.
From.Address false Address inventory.
From.Phone false Phone seller.
From.Name false Name seller.
To.City false City receive order.
To.Province false Province receive order.
To.Country false Country receive order.
To.ZipCode false ZipCode receive order.
To.Address false Address receive order.
To.Phone false Phone buyer.
To.Name false Name buyer.
To.PhoneCode false Name seller.
Order.Weight false Total weight of item in order.
Order.Amount false Total product value.
Order.Quantity false Total quantity of item in order.
Order.Collect false Total money collect from buyer( when you use CoD). Currency: VND.
Order.ProductName false Info orders.
Config.Service false Shipping method:1. Economy delivery service,2. Express delivery service.
Config.CoD false Cash On Delivery (COD) 1: Use; 2: Don’t use.
Config.Protected false Insurance.
Config.Checking false Accept receiver view item in order before confirm received or not.
Config.Payment false Payment.
Config.Fragile false Fragile.
Config.AutoAccept false 1.Auto accept 0. No accept (default).
Type false “Type”: “excel” : We auto select best courier. You don’t define params Courier.

Cancel Order

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/api/public/api/rest/lading/cancel")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"TrackingCode\":\"SJ52078917691\",\"ApiKey\":\"string (required)\"}"

response = http.request(request)
puts response.read_body
import requests

url = "http://seller.shipjung.com/api/public/api/rest/lading/cancel"

payload = "{\"TrackingCode\":\"SJ52078917691\",\"ApiKey\":\"string (required)\"}"
headers = {'content-type': 'application/json'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
# With shell, you can just pass the correct header with each request
curl --request POST \
  --url http://seller.shipjung.com/api/public/api/rest/lading/cancel \
  --header 'content-type: application/json' \
  --data '{"TrackingCode":"SJ52078917691","ApiKey":"string (required)"}'
var data = JSON.stringify({
  "TrackingCode": "SC52078917691",
  "ApiKey": "string (required)"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://seller.shipjung.com/api/public/api/rest/lading/cancel");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

HTTP Request

POST http://seller.shipjung.com/api/public/api/rest/lading/cancel

Query Parameters

Parameter Default Description
ApiKey (MerchantKey) false Your api key of seller.
TrackingCode false Shipjung Tracking Code.

Accept Order

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/courier/order_change_edit")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\"TrackingCode\":\"string (optional)\",\"ApiKey\":\"string (optional)\",\"status\":21}"

response = http.request(request)
puts response.read_body
import requests

url = "http://seller.shipjung.com/courier/order_change_edit"

payload = "{\"TrackingCode\":\"string (optional)\",\"ApiKey\":\"string (optional)\",\"status\":21}"
headers = {'content-type': 'application/json'}

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)
# With shell, you can just pass the correct header with each request
curl --request POST \
  --url http://seller.shipjung.com/courier/order_change_edit \
  --header 'content-type: application/json' \
  --data '{"TrackingCode":"string (optional)","ApiKey":"string (optional)", "status": 21}'
var data = JSON.stringify({
  "TrackingCode": "string (optional)",
  "status" : 21,
  "ApiKey": "string (optional)"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://seller.shipjung.com/courier/order_change_edit");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

{
  "error": true,
  "error_message": {
    "TrackingCode": [
      "The tracking code format is invalid."
    ]
  }
}

HTTP Request

POST http://seller.shipjung.com/courier/order_change_edit

Query Parameters

Parameter Default Description
ApiKey (MerchantKey) false Your api key of seller.
TrackingCode false Shipjung Tracking Code.
status false Status 21 accept

Merchant receive order status

This is webhook api. We will push order status and journey of order to your system via RestApi. Config at:

http://seller.shipjung.com/#/app/config/key

http://seller.shipjung.com/#/app/config/key

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/api/public/your-webhook-api")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["http_x_Shipjung_refesh_token"] = 'your key'
request["content-type"] = 'application/json'
request.body = "{\"TrackingCode\":\"SC5238848343\",\"StatusId\":\"string (required)\",\"StatusName\":\"string (required)\",\"TimeStamp\":\"integer (required)\"}"
import requests

url = "http://seller.shipjung.com/api/public/your-webhook-api"

payload = "{\"TrackingCode\":\"SC5238848343\",\"StatusId\":\"string (required)\",\"StatusName\":\"string (required)\",\"TimeStamp\":\"integer (required)\"}"
headers = {
    'http_x_Shipjung_refesh_token': "your key",
    'content-type': "application/json"
    }

response = requests.request("POST", url, data=payload, headers=headers)
# With shell, you can just pass the correct header with each request
curl --request POST \
  --url http://seller.shipjung.com/api/public/your-webhook-api \
  --header 'content-type: application/json' \
  --header 'http_x_Shipjung_refesh_token: your key' \
  --data '{"TrackingCode":"SC5238848343","StatusId":"string (required)","StatusName":"string (required)","TimeStamp":"integer (required)"}'
var data = JSON.stringify({
  "TrackingCode": "SC5238848343",
  "StatusId": "string (required)",
  "StatusName": "string (required)",
  "TimeStamp": "integer (required)"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "http://seller.shipjung.com/api/public/your-webhook-api");
xhr.setRequestHeader("http_x_Shipjung_refesh_token", "your key");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

The above command returns JSON structured like this:

{
  "error": true,
  "error_message": {
    "TrackingCode": [
      "The tracking code format is invalid."
    ]
  }
}

HTTP Request

POST http://seller.shipjung.com/api/public/your-webhook-api

Query Parameters

Parameter Default Description
ApiKey (MerchantKey) false Your api key of seller.
TrackingCode false Shipjung Tracking Code.
StatusId false Status Code defined status api.
StatusName false Status name.
TimeStamp false Time update this status.

List Status Order

This is webhook api. We will push order status and journey of order to your system via RestApi. Config at:

http://seller.shipjung.com/#/app/config/key

http://seller.shipjung.com/#/app/config/key

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/api/public/api/merchant/rest/lading/status")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request.body = "{}"

response = http.request(request)
puts response.read_body
import requests

url = "http://seller.shipjung.com/api/public/api/merchant/rest/lading/status"

payload = "{}"
response = requests.request("GET", url, data=payload)

print(response.text)
# With shell, you can just pass the correct header with each request
curl --request GET \
  --url http://seller.shipjung.com/api/public/api/merchant/rest/lading/status \
  --data '{}'
var data = "{}";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://seller.shipjung.com/api/public/api/merchant/rest/lading/status");

xhr.send(data);

The above command returns JSON structured like this:

{
  "error": false,
  "message": "Thành công",
  "data": [
    {
      "StatusId": 12,
      "StatusName": "Chờ duyệt",
      "StatusName_EN": "Waiting approve"
    },
    {
      "StatusId": 13,
      "StatusName": "Đã duyệt",
      "StatusName_EN": "Approved"
    },
    {
      "StatusId": 14,
      "StatusName": "Đang lấy hàng",
      "StatusName_EN": "Picking"
    },
    {
      "StatusId": 15,
      "StatusName": "Lấy không thành công",
      "StatusName_EN": "Pickup failed"
    },
    {
      "StatusId": 16,
      "StatusName": "Đã lấy hàng",
      "StatusName_EN": "Picked"
    },
    {
      "StatusId": 17,
      "StatusName": "Đang phát hàng",
      "StatusName_EN": "Delivering"
    },
    {
      "StatusId": 18,
      "StatusName": "Phát không thành công",
      "StatusName_EN": "Delivery failed"
    },
    {
      "StatusId": 19,
      "StatusName": "Đã phát thành công",
      "StatusName_EN": "Delivered"
    },
    {
      "StatusId": 20,
      "StatusName": "Chờ XN chuyển hoàn",
      "StatusName_EN": "Waiting return"
    },
    {
      "StatusId": 21,
      "StatusName": "Chuyển hoàn",
      "StatusName_EN": "Returning"
    },
    {
      "StatusId": 22,
      "StatusName": "Hủy đơn hàng",
      "StatusName_EN": "Cancelled"
    }
  ]
}

Get Status List Order

This is webhook api. We will push order status and journey of order to your system via RestApi. Config at:

http://seller.shipjung.com/#/app/config/key

http://seller.shipjung.com/#/app/config/key

To authorize, use this code:

require 'uri'
require 'net/http'

url = URI("http://seller.shipjung.com/api/public/api/merchant/rest/lading/statusmultil/{listorder}?MerchantKey={MerchantKey}")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request.body = "{}"

response = http.request(request)
puts response.read_body
import requests

url = "http://seller.shipjung.com/api/public/api/merchant/rest/lading/statusmultil/[listorder]?MerchantKey=[MerchantKey]"

payload = "{}"
response = requests.request("GET", url, data=payload)

print(response.text)
# With shell, you can just pass the correct header with each request
curl --request GET \
  --url http://seller.shipjung.com/api/public/api/merchant/rest/lading/statusmultil/[listorder] \
  --data '{MerchantKey=[MerchantKey]}'
var data = "{}";

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "http://seller.shipjung.com/api/public/api/merchant/rest/lading/statusmultil/[listorder]?MerchantKey=[MerchantKey]");

xhr.send(data);

The above command returns JSON structured like this:

{
  "error": false,
  "message": "Thành công",
  "data": [
    {
      "tracking_code": "SJ51786275290",
      "status": 20,
      "status_name": "Chờ duyệt",
      "status_name_en": "Awaiting approve",
      "status_group_name": "Chờ duyệt",
      "status_group_name_en": "Waiting approve"
    }
  ]
}

HTTP Request

GET http://seller.shipjung.com/api/public/api/merchant/rest/lading/statusmultil/[listorder]?MerchantKey=[MerchantKey]

Errors

Error Code Meaning
400 Bad Request – Your request sucks
401 Unauthorized – Your API key is wrong
403 Forbidden – The kitten requested is hidden for administrators only
404 Not Found – The specified kitten could not be found
405 Method Not Allowed – You tried to access a kitten with an invalid method
406 Not Acceptable – You requested a format that isn’t json
410 Gone – The kitten requested has been removed from our servers
418 I’m a teapot
429 Too Many Requests – You’re requesting too many kittens! Slow down!
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarily offline for maintenance. Please try again later.