Other API reference

The other APIs include phone, currency, country, and province.

GET /{locale}/api/phone

Get phone-related information data.

fetch(window.SHOPLAZZA.routes.root + '/api/phone')
  .then((response) => response.json())
  .then((data) => {
    // Do something...
  });
[
  {
    "cn_name": "阿富汗",
    "flag": "https://imglib.shoplazza.com/42757bc371af7061a1775697529b55c6.png",
    "iso_code_2": "AF",
    "iso_code_3": "AFG",
    "name": "Afghanistan",
    "phone_code": "93",
    "phone_key": "AF_93"
  },
  {
    "cn_name": "奥兰群岛",
    "flag": "https://imglib.shoplazza.com/Aland.png",
    "iso_code_2": "AX",
    "iso_code_3": "ALA",
    "name": "Aland lslands",
    "phone_code": "358",
    "phone_key": "AX_358"
  },
  {
    "cn_name": "阿尔巴尼亚",
    "flag": "https://imglib.shoplazza.com/a97d548f149b6b9279d20e7e76b92923.png",
    "iso_code_2": "AL",
    "iso_code_3": "ALB",
    "name": "Albania",
    "phone_code": "355",
    "phone_key": "AL_355"
  },
  ...
  {
    "cn_name": "赞比亚",
    "flag": "https://imglib.shoplazza.com/504995fc3ee2ee9d4ac61e780bed1c67.png",
    "iso_code_2": "ZM",
    "iso_code_3": "ZMB",
    "name": "Zambia",
    "phone_code": "260",
    "phone_key": "ZM_260"
  },
  {
    "cn_name": "津巴布韦",
    "flag": "https://imglib.shoplazza.com/eb2d7eafed41ce90f19b6b94055291a7.png",
    "iso_code_2": "ZW",
    "iso_code_3": "ZWE",
    "name": "Zimbabwe",
    "phone_code": "263",
    "phone_key": "ZW_263"
  }
]

GET /{locale}/api/currency

Get currency-related information data.

fetch(window.SHOPLAZZA.routes.root + '/api/currency')
  .then((response) => response.json())
  .then((data) => {
    // Do something...
  });
[
  {
    "cn_name": "美元",
    "code": "USD",
    "currency_id": 1,
    "flag": "//img.staticdj.com/411902f97f55701c425aeb0b1df78fed.png",
    "symbol_left": "$",
    "symbol_right": "",
    "title": "United States Dollars (USD)",
    "value": 0
  },
  {
    "cn_name": "欧元",
    "code": "EUR",
    "currency_id": 2,
    "flag": "//img.staticdj.com/8e76e4a274e105aaeca38a9e00f76821.png",
    "symbol_left": "€",
    "symbol_right": "",
    "title": "Euro (EUR)",
    "value": 0
  },
  {
    "cn_name": "英镑",
    "code": "GBP",
    "currency_id": 3,
    "flag": "//img.staticdj.com/94ba221ad0dd13bbfccdce561967eefd.png",
    "symbol_left": "£",
    "symbol_right": "",
    "title": "United Kingdom Pounds (GBP)",
    "value": 0
  },
  ...
  {
    "cn_name": "汤加邦加",
    "code": "TOP",
    "currency_id": 149,
    "flag": "//img.staticdj.com/444ffef602f5a7a0405b520a7c160e96.png",
    "symbol_left": "T$",
    "symbol_right": "",
    "title": "Tongan paʻanga",
    "value": 0
  },
  {
    "cn_name": "福克兰群岛镑",
    "code": "FKP",
    "currency_id": 150,
    "flag": "//img.staticdj.com/0fef57f16d4f35aaf179ca2ebd75b7c1.png",
    "symbol_left": "£",
    "symbol_right": "",
    "title": "Falkland Islands pound",
    "value": 0
  }
]

GET /{locale}/api/country

Get country-related information data.

fetch(window.SHOPLAZZA.routes.root + '/api/country')
  .then((response) => response.json())
  .then((data) => {
    // Do something...
  });
[
  {
    "cn_name": "阿富汗",
    "continent": "AS",
    "country_id": 1,
    "flag": "https://imglib.shoplazza.com/42757bc371af7061a1775697529b55c6.png",
    "iso_code_2": "AF",
    "iso_code_3": "AFG",
    "name": "Afghanistan"
  },
  {
    "cn_name": "奥兰群岛",
    "continent": "EU",
    "country_id": 2,
    "flag": "https://imglib.shoplazza.com/Aland.png",
    "iso_code_2": "AX",
    "iso_code_3": "ALA",
    "name": "Aland lslands"
  },
  {
    "cn_name": "阿尔巴尼亚",
    "continent": "EU",
    "country_id": 3,
    "flag": "https://imglib.shoplazza.com/a97d548f149b6b9279d20e7e76b92923.png",
    "iso_code_2": "AL",
    "iso_code_3": "ALB",
    "name": "Albania"
  },
  ...
  {
    "cn_name": "赞比亚",
    "continent": "AF",
    "country_id": 239,
    "flag": "https://imglib.shoplazza.com/504995fc3ee2ee9d4ac61e780bed1c67.png",
    "iso_code_2": "ZM",
    "iso_code_3": "ZMB",
    "name": "Zambia"
  },
  {
    "cn_name": "津巴布韦",
    "continent": "AF",
    "country_id": 240,
    "flag": "https://imglib.shoplazza.com/eb2d7eafed41ce90f19b6b94055291a7.png",
    "iso_code_2": "ZW",
    "iso_code_3": "ZWE",
    "name": "Zimbabwe"
  }
]

GET /{locale}/api/country/{country_code}/province

Get province-related information data from country code Alpha-2.

fetch(window.SHOPLAZZA.routes.root + '/api/country/CN/province')
  .then((response) => response.json())
  .then((data) => {
    // Do something...
  });
[
  {
    "cn_name": "安徽省",
    "code": "CN-AH",
    "name": "Anhui",
    "old_code": "ANH",
    "province_id": 615
  },
  {
    "cn_name": "北京市",
    "code": "CN-BJ",
    "name": "Beijing",
    "old_code": "BJG",
    "province_id": 616
  },
  {
    "cn_name": "重庆市",
    "code": "CN-CQ",
    "name": "Chongqing",
    "old_code": "CQG",
    "province_id": 617
  },
  {
    "cn_name": "福建省",
    "code": "CN-FJ",
    "name": "Fujian",
    "old_code": "FJN",
    "province_id": 618
  },
  {
    "cn_name": "广东省",
    "code": "CN-GD",
    "name": "Guangdong",
    "old_code": "GDG",
    "province_id": 619
  },
  {
    "cn_name": "甘肃省",
    "code": "CN-GS",
    "name": "Gansu",
    "old_code": "GSU",
    "province_id": 620
  },
  {
    "cn_name": "广西壮族自治区",
    "code": "CN-GX",
    "name": "Guangxi",
    "old_code": "GXI",
    "province_id": 621
  },
  {
    "cn_name": "贵州省",
    "code": "CN-GZ",
    "name": "Guizhou",
    "old_code": "GZU",
    "province_id": 622
  },
  {
    "cn_name": "河南省",
    "code": "CN-HA",
    "name": "Henan",
    "old_code": "HNA",
    "province_id": 623
  },
  {
    "cn_name": "湖北省",
    "code": "CN-HB",
    "name": "Hubei",
    "old_code": "HUB",
    "province_id": 624
  },
  {
    "cn_name": "河北省",
    "code": "CN-HE",
    "name": "Hebei",
    "old_code": "HBE",
    "province_id": 625
  },
  {
    "cn_name": "海南省",
    "code": "CN-HI",
    "name": "Hainan",
    "old_code": "HNN",
    "province_id": 626
  },
  {
    "cn_name": "香港",
    "code": "CN-HK",
    "name": "Hong Kong SAR ",
    "old_code": "HKG",
    "province_id": 627
  },
  {
    "cn_name": "黑龙江",
    "code": "CN-HL",
    "name": "Heilongjiang",
    "old_code": "HLJ",
    "province_id": 628
  },
  {
    "cn_name": "湖南省",
    "code": "CN-HN",
    "name": "Hunan",
    "old_code": "HUN",
    "province_id": 629
  },
  {
    "cn_name": "吉林省",
    "code": "CN-JL",
    "name": "Jilin",
    "old_code": "JLI",
    "province_id": 630
  },
  {
    "cn_name": "江苏省",
    "code": "CN-JS",
    "name": "Jiangsu",
    "old_code": "JSU",
    "province_id": 631
  },
  {
    "cn_name": "江西省",
    "code": "CN-JX",
    "name": "Jiangxi",
    "old_code": "JXI",
    "province_id": 632
  },
  {
    "cn_name": "辽宁省",
    "code": "CN-LN",
    "name": "Liaoning",
    "old_code": "LNG",
    "province_id": 633
  },
  {
    "cn_name": "澳门",
    "code": "CN-MO",
    "name": "Macao SAR",
    "old_code": "MAC",
    "province_id": 634
  },
  {
    "cn_name": "内蒙古自治区",
    "code": "CN-NM",
    "name": "Nei Mongol",
    "old_code": "IMO",
    "province_id": 635
  },
  {
    "cn_name": "宁夏回族自治区",
    "code": "CN-NX",
    "name": "Ningxia",
    "old_code": "NXA",
    "province_id": 636
  },
  {
    "cn_name": "青海省",
    "code": "CN-QH",
    "name": "Qinghai",
    "old_code": "QHI",
    "province_id": 637
  },
  {
    "cn_name": "四川省",
    "code": "CN-SC",
    "name": "Sichuan",
    "old_code": "SIC",
    "province_id": 638
  },
  {
    "cn_name": "山东省",
    "code": "CN-SD",
    "name": "Shandong",
    "old_code": "SAD",
    "province_id": 639
  },
  {
    "cn_name": "上海市",
    "code": "CN-SH",
    "name": "Shanghai",
    "old_code": "SHA",
    "province_id": 640
  },
  {
    "cn_name": "陕西省",
    "code": "CN-SN",
    "name": "Shaanxi",
    "old_code": "SAX",
    "province_id": 641
  },
  {
    "cn_name": "山西省",
    "code": "CN-SX",
    "name": "Shanxi",
    "old_code": "SHX",
    "province_id": 642
  },
  {
    "cn_name": "天津市",
    "code": "CN-TJ",
    "name": "Tianjin",
    "old_code": "TJN",
    "province_id": 643
  },
  {
    "cn_name": "台湾省",
    "code": "CN-TW",
    "name": "Taiwan",
    "old_code": "TWA",
    "province_id": 644
  },
  {
    "cn_name": "新疆维吾尔自治区",
    "code": "CN-XJ",
    "name": "Xinjiang",
    "old_code": "XJG",
    "province_id": 645
  },
  {
    "cn_name": "西藏自治区",
    "code": "CN-XZ",
    "name": "Xizang",
    "old_code": "TBT",
    "province_id": 646
  },
  {
    "cn_name": "云南省",
    "code": "CN-YN",
    "name": "Yunnan",
    "old_code": "YUN",
    "province_id": 647
  },
  {
    "cn_name": "浙江省",
    "code": "CN-ZJ",
    "name": "Zhejiang",
    "old_code": "ZHE",
    "province_id": 648
  }
]