深圳泰中科技有限公司 目 录 1.背景说明 API 调用方法 调用流程 调用说明 签名算法 请求入口地址 授权 token 获取 公共错误码... 3.签名生成示例 参数 排序

Similar documents
入學考試網上報名指南

Microsoft Word - template.doc

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

Microsoft PowerPoint - ch6 [相容模式]

获取 Access Token access_token 是接口的全局唯一票据, 接入方调用各接口时都需使用 access_token 开发者需要进行妥善保存 access_token 的存储至少要保留 512 个字符空间 access_token 的有效期目前为 2 个小时, 需定时刷新, 重复

PowerPoint Presentation

ch_code_infoaccess

HCD0174_2008

Microsoft Word - CX VMCO 3 easy step v1.doc

Microsoft Word - (web)_F.1_Notes_&_Application_Form(Chi)(non-SPCCPS)_16-17.doc

LH_Series_Rev2014.pdf

1.ai

WWW PHP

Olav Lundström MicroSCADA Pro Marketing & Sales 2005 ABB - 1-1MRS755673

untitled

coverage2.ppt

epub83-1

Microsoft Word - Datastream5.1_使用說明201110

Preface This guide is intended to standardize the use of the WeChat brand and ensure the brand's integrity and consistency. The guide applies to all d

Microsoft Word - HSK使用手册.doc

HC50246_2009

錄...1 說...2 說 說...5 六 率 POST PAY PREPAY DEPOSIT 更

Microsoft Word - HC20138_2010.doc

Chn 116 Neh.d.01.nis

國家圖書館典藏電子全文

Bus Hound 5

CDWA Mapping. 22 Dublin Core Mapping

HC20131_2010

Fun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc

TX-NR3030_BAS_Cs_ indd

台灣地區同學

Collection of 2012 Examination Certificates

* RRB *

CANVIO_AEROCAST_CS_EN.indd

K301Q-D VRT中英文说明书141009

6-1 Table Column Data Type Row Record 1. DBMS 2. DBMS MySQL Microsoft Access SQL Server Oracle 3. ODBC SQL 1. Structured Query Language 2. IBM

Guide to Install SATA Hard Disks

2 SGML, XML Document Traditional WYSIWYG Document Content Presentation Content Presentation Structure Structure? XML/SGML 3 2 SGML SGML Standard Gener

C/C++ - 字符输入输出和字符确认

概述

Logitech Wireless Combo MK45 English

Microsoft Word

(Guangzhou) AIT Co, Ltd V 110V [ ]! 2

IP505SM_manual_cn.doc

UDC The Design and Implementation of a Specialized Search Engine Based on Robot Technology 厦门大学博硕士论文摘要库

声 明 本 人 郑 重 声 明 : 此 处 所 提 交 的 硕 士 学 位 论 文 基 于 等 级 工 鉴 定 的 远 程 考 试 系 统 客 户 端 开 发 与 实 现, 是 本 人 在 中 国 科 学 技 术 大 学 攻 读 硕 士 学 位 期 间, 在 导 师 指 导 下 进 行 的 研 究

停止混流接口 请注意 : 该功能需要联系 ZEGO 技术支持开通 1 接口调用说明 http 请求方式 : POST/FORM, 需使用 https 正式环境地址 access_token=access_token (http


untitled

「人名權威檔」資料庫欄位建置表

HC20093A_2008

HC70245_2008

untitled

gebook84-1

59 1 CSpace 2 CSpace CSpace URL CSpace 1 CSpace URL 2 Lucene 3 ID 4 ID Web 1. 2 CSpace LireSolr 3 LireSolr 3 Web LireSolr ID

第1章 簡介

Microsoft Word _4.doc

HC70044_2008

UDC Empirical Researches on Pricing of Corporate Bonds with Macro Factors 厦门大学博硕士论文摘要库

RUN_PC連載_8_.doc

Computer Architecture

目 录 目 录 1. 安 装 和 快 速 入 门 附 件 1.1 随 机 附 件 附 件 信 息... 3 连 接 和 设 定 1.3 连 接 记 录 纸... 4 快 速 入 门 1.5 发 送 传 真 / 复 印 接 收 传 真

Windows XP

Microsoft Word - Functional_Notes_3.90_CN.doc

通 用 申 请 填 写 流 程 简 图 首 次 登 陆 已 注 册 用 户 登 录 ( 最 终 提 交 前 可 无 限 次 登 录 修 改 ) 注 册 账 户 College Search 中 添 加 New York University Common App 填 写 ( 包 含 两 篇 写 作

( Version 0.4 ) 1

Go构建日请求千亿微服务最佳实践的副本

LSC操作说明

USPTO Academic research Corporate needs Global/International Inventors Libraries News Media/Publication Patent Attorney or Agent USPTO e (ebusiness Ce

WWW PHP Comments Literals Identifiers Keywords Variables Constants Data Types Operators & Expressions 2

Microsoft Word - P SDV series.DOC

Serial ATA ( Silicon Image SiI3114)...2 (1) SATA... 2 (2) B I O S S A T A... 3 (3) RAID BIOS RAID... 5 (4) S A T A... 8 (5) S A T A... 10

Microsoft PowerPoint ARIS_Platform_en.ppt

ebook140-8

AL-MX200 Series

3.1 num = 3 ch = 'C' 2

1. 請 先 檢 查 包 裝 內 容 物 AC750 多 模 式 無 線 分 享 器 安 裝 指 南 安 裝 指 南 CD 光 碟 BR-6208AC 電 源 供 應 器 網 路 線 2. 將 設 備 接 上 電 源, 即 可 使 用 智 慧 型 無 線 裝 置 進 行 設 定 A. 接 上 電 源

前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii

C/C++ - 文件IO

运动员治疗用药豁免申报审批办法

PKCS# PEM Erreur! Signet non défini

WFC40810

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile..

epub 61-2

QQGQ2.E Power Supplies, Information Technology Equipment Including Ele... 1/10

Form: RWPRR401-B

<4D F736F F D20B1B4BFCBA5D3BFECBBA1A9FA312E646F63>

幻灯片 1

AL-M200 Series

Improved Preimage Attacks on AES-like Hash Functions: Applications to Whirlpool and Grøstl

2 response personnel to speed up the rescue operations after various natural or man-made disasters. Keywords: SMS, Database, Disaster

RUPUML RUP RUP RUP RUP

Domain Management产品文档

PARTS LIST 零 FB 15/18/20/25/30 FB 15C/18C/20C/25C 勵福 7L 列 Tailift 7L Series Electric Forklift Trucks TAILIFT CO.,LTD. DEC039/

Microsoft Word - Lenovo_L15M3PB2 (Winbook)_3S1P_UN38.3 Test Report_SLEU

穨control.PDF

EJB-Programming-4-cn.doc

財金資訊-80期.indd

Some experiences in working with Madagascar: installa7on & development Tengfei Wang, Peng Zou Tongji university

Transcription:

目 录 1.背景说明... 2. API 调用方法... 2.1 调用流程... 2.2 调用说明... 2.3 签名算法... 2.4 请求入口地址... 2.5 授权 token 获取... 2.6 公共错误码... 3.签名生成示例... 3.1 参数... 3.2 排序... 3.3 拼接... 3.4 签名 java 示例代码... 4 商城业务 API 接口... 4.1 商品列表... 请求参数... 响应参数... 4.2 发货单同步... 请求参数... 响应参数... 4.3 商品库存更新... 请求参数... 响应参数... 4.4 订单列表... 请求参数... 响应参数... 4.5 订单详情... 请求参数... 响应参数...

4.7 修改商品 sku 价格... 请求参数... 响应参数... 4.8 类目查询... 请求参数... 响应参数... 4.9 商品详情... 请求参数... 响应参数... 4.10 物流公司查询... 请求参数... 响应参数... 4.11 分类品牌查询... 请求参数... 响应参数... 4.12 商品新增... 请求参数... 响应参数... 4.13 商品修改... 请求参数... 响应参数... 4.14 商品上下架... 请求参数... 响应参数... 5 TFTBOX 业务 API 接口... 5.1 TFTBOX 订单创建... 请求参数... 响应参数... 5.2 TFTBOX 打开收银台... 请求参数...

响应参数... 5.3 TFTBOX 订单支付校验查询... 请求参数... 响应参数... 6 图片上传接口... 请求参数... 响应参数... 7 业务错误码...

API 调用方法详解 API call method details 1.背景说明 Background notes 开放平台 thisshop 的 API 是基于 HTTPS 协议来调用的 开发 者可以直接使用 HTTPS 请求进行调用 以下主要是针对自行封装请求 进行 API 调用的原理进行详细解说 The API of the open platform (thisshop) is called based on the HTTPS protocol. Developers can directly use HTTPS requests to call. The following is a detailed explanation of the principle of API calls for self encapsulation requests. 2.API 调用方法 API call method 2.1 调用流程 Calling process 根据 POP 的协议 填充参数 > 生成签名 > 拼装 HTTP 请 求 > 发起 HTTP 请求> 得到 HTTP 响应 > 解释 json 结果 According to pop protocol: in parameters > generate signature > assemble HTTP request > initiate HTTP request > get HTTP response > interpret JSO result.

2.11 使用分配的 appid 和 appsecret 到服务器获取 token 有效 期 24 小时 Use the assigned appid and appsecret to get the token from the server (valid for 24 hours). 2.12 将所有参数 注意是所有参数 包括 token timestamp nonce 等 除去 sign 本身 MD5 加密 全部大写 生成 sign 签名 (参 考签名方法) Remove all parameters (note that it is all parameters, including token, timestamp, nonce, etc.) from sign itself, MD5 encryption, all uppercase, and generate sign signature. (refer to signature method). 2.13 参数带上 sign 请求服务器 Parameter with sign, request server. 2.2 调用说明 2.21 调用 API 时 必须传入系统级公共参数 系统级公共输入参数 字段 field 类型 type 是否必须 描述 describe Is it necessary appid 是 yes App_key of application token 是 yes See the following for the access method of

authorized token timestamp 是 yes Millisecond time stamp, format: 1564468040249, error within 6 minutes (same time zone) nonce 是 yes 业务流水号 保持唯一 便于跟踪查询 Business serial number (keep unique, easy to track and query) sign 是 yes Signature (see below for signature method) method 是 yes Business API interface name 2.22 应用级别输入参数 Application level input parameters API 调用除了必须包含公共参数外 如果 API 本身有业务级的参 数也必须传入 每个 API 的业务级参数请考 API 文档说明 API calls must contain public parameters. If the API itself has business level parameters, they must also be passed in. For

business level parameters of each API, please refer to the API documentation. 字段 field 类型 type 是否必须 Is it 描述 describe necessary? data 2.3 签名算法 signature algorithm 签名参数 sign 生成的方法 第 1 步: 将所有参数 注意是所有参数 除去值是空的参数和 sign 本身 按参数名首字母升序排序 第 2 步: 然后把排序后的参数按参数 1=值 1 参数 2=值 2 参数 n=值 n 这里的参数和值必须是采用 utf-8 进行 URL 编码 的方式拼 接成一个字符串 第 3 步: 把分配给接入方的签名密钥 secret 拼接在第 2 步得到 的字符串后面 第 4 步: 在上一步得到的字符串然后计算 md5 值 得到 32 位字 符串 然后转成大写,得到的字符串作为 sign 的值 The method of generating signature parameter sign Step 1: remove all parameters (note that they are all parameters), parameters whose value is null and sign itself,

and sort them in ascending order by the first letter of the parameter name. Step 2: then sort the parameters according to parameter 1 = value 1, parameter 2 = value 2 Parameter n = value n (in this case, the parameter and value must be URL encoded with UTF-8) is spliced into a. Step 3: splice the signature key secret assigned to the access party after the obtained in step 2. Step 4: get the in the previous step, then calculate the MD5 value, get the 32-bit, then convert it to uppercase, and the will be the value of sign 2.4 请求入口地址 Request entry address 正 式 环 境 https://open.thisshop.com 测 试 环 境 http://t.this.shop:8525 Official environment: https://open.thisshop.com Test environment:http://t.this.shop:8525

2.5 授权 token 获取 Authorized token acquisition 接口名称 授权 token 获取 Interface Authorized token acquisition name 功能描述 our application needs to be authorized by the Function user, that is, to obtain the authorization token description to access the user data 访问路径 /api/oauth/access/token Access path 数据格式 json data format 请求方式 Request mode post

请求参数 字段 类型 是 否 必 说明 Request field type 填 parameters Is Explain it necess ary to in? appid 是 yes 应用 ID Application of ID appsecret 是 yes 应用密钥 Application key timestamp 是 yes Millisecond time stamp, such as 1564468040249, within minutes 6 (the same time zone) 请求示例报 文 "appid": "your appid", Request "appsecret": "your appsecret",

sample "timestamp": "1564559078981" message 返回报文 Successful return Return message "transactionstatus": "errorcode": "0", "replycode": null, "replytext": null, "memo": null, "appame": "tft-api-server", "success": true, "token": "E8A7DF21B48D4877A31AA7667D23D965" Abnormal return "transactionstatus": "errorcode": "1", "replycode": "10004", "replytext": "appsecret is error!", "memo": null,

"appame": "tft-api-server", "success": false, "token": null 注意事项 token 有效期为 24 小时 每次请求获取 token 值 前一个 token 会失效 并刷新延长 token 的有效时间 matters needing attention: The valid period of the token is 24 hours. Each time the token value is obtained, the previous token will be invalid, and the valid time of the token will be extended by refreshing. 2.6 授权 token 有效性校验 Validation of authorization token Interface 授权 token 有效性校验 name Validation of authorization token Function 校验 token 是否有效 description Verify whether the token is valid Access path /api/oauth/token/check data format json

Request mode post Request 字段 类型 是 否 必 说明 parameters field type 填 Is Explain it necess ary to in? appid yes 应用 ID Application of ID appsecret yes 应用密钥 Application key timestamp yes 毫秒时间戳 如 1564468040249 误差 6 分钟内(相同时区) Millisecond time stamp, such as 1564468040249, within minutes 6 (the same time zone)

token yes Authorized token Return 字段 类型 说明 parameter field type Explain enabled : effective : invalid resttime Stirng Remaining effective time, in seconds, returned only when valid Request "appid": "your appid", "appsecret": "your appsecret", "timestamp": "1564559078981" "token":"xxxxxxxx" sample message it is

Return message 2.7 Common error code Error code 0 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 description Request succeeded Incomplete request parameters Request expired Invalid application ID Invalid key Request method is not supported IP address is in the blacklist IP is not in the specified whitelist Request interface is unauthorized Requests exceeded today Application ID is empty Business serial number is empty Signature is empty API name is empty

10014 10015 10016 10017 10018 19009 Timestamp is empty Timestamp expires Token is invalid Token expired Signature check failed System error, administrator please contact the 3. 签 名 生 成 示 例 Example of signature generation 3.1 参数 parameter 例如输入公共参数为 For example, enter the public parameter as 'token' = '46DE554983BA4E41BB591EA61FA50CCE ' 'appid' = TF10000, 'timestamp' = '1564630934531', 'nonce' ='8ds9a921', 'method' = 'thisshop.item.list.get'

3.2 排序 Sort 按首字母升序排列(ASCII 码)Ascending alphabetical order (ASCII code) appid = TF10000, method ='thisshop.item.list.get', nonce = 8ds9a921', timestamp = 1564630934531', token = 46DE554983BA4E41BB591EA61FA50CCE 3.3 拼接 splice 连接字符串 并在尾加上签名 signsecret 假设 signsecret 为 XXX 如下 Concatenate the, and add the signature signsecret at the end, assuming signsecret is XXX, as follows: Str = appid=tf00000method=thisshop.item.list.getnonce =8ds9a921timestamp=1564630934531token=46DE554983BA4E41BB591EA61FA50CC EXXX MD5 大写 32 位上面的字符串 生成签名 sign 转大写 Concatenate the, and add the signature signsecret at the end, assuming signsecret is XXX, as follows: MD5(appId=TF00000method= thisshop.item.list.get nonce =8ds9a921timestamp=1564630934531token=46DE554983BA4E41BB591EA61FA50CC EXXX) 注意事项 所有的请求和响应数据编码皆为 utf-8 格式 url 里的所有参数值请做 urlencode 编码

Precautions: All request and response data are encoded in UTF-8 format. Please use urlencode for all parameter values in the URL. 3.4 签名 java 示例代码 Signature java sample code /** * Remove null values and signature parameters from the array * @param sarray Parameter group for request signature * @return new signature parameter group after removing null values and signature parameters */ public static Map<, > paramfilter(map<, > sarray) Map<, > result = new HashMap<>(); if (sarray == null sarray.size() <= 0) return result; for ( key : sarray.keyset()) value = sarray.get(key); if (value == null value.equals("") key.equalsignorecase("sign")) continue; result.put(key, value); return result; /** * Sort all elements of the array and stitch them into s according to the pattern of "parameter = parameter value" * @param params Parameter groups that need to be sorted and participate in character splicing * @return after stitching */ public static createlink(map<, > params) throws Exception List<> keys = new ArrayList<>(params.keySet()); Collections.sort(keys); str = ""; for (int i = 0; i < keys.size(); i++) key = keys.get(i); value = params.get(key)+"";

value = URLEncoder.encode(value, "UTF-8"); str = str + key + "=" + value; return str; /** * Generate an array of signature parameters to request * @param parammap parameters to be signed * @param sessionkey signing key * md5 encryption method references org.apache.commons.codec.digest.digestutils * @return request signature parameter array */ public static Map<, > sign(map<, > parammap, sessionkey) // Remove null values and signature parameters from the array Map <, > spara = paramfilter (parammap); // Concatenate all elements of the array into a according to the pattern of "parameter = parameter value" str = createlink (spara); // Generate the signature result sign = DigestUtils.md5Hex (str + sessionkey); // The signature result is added to the request submission parameter group spara.put("sign", sign.touppercase()); return spara; 4 商城业务 API 接口 API interface of mall business 4.1 List of commodities ame Interface name thisshop.item.list.get Function description Query product list information.

Access path /api/shop/router/rest data format json Request mode Post Request message sample "method":"thisshop.item.list.get", "data": "skuid":"", "skuame":"", "qrcodes":"2208977,2196135", "startupdatetime": "", "endupdatetime": "", "pageum":1, "pagesize":10 Return data 错误 "transactionstatus": "errorcode": "1", "replycode": "10000", "replytext": "请求参数错误", "memo": null, "appame": "tft-shop-server", "success": false, "page": null, "result": null 成功

"transactionstatus": "errorcode": "0", "replycode": null, "replytext": null, "memo": null, "appame": "tft-shop-server", "success": true, "page": "count": 1, "pagesize": 10, "pageum": 1, "orderby": null, "returncount": true, "offset": 0, "limit": 10, "result": [ "spuid": "35667", "sputitle": "Fascination Series Protective Case", "ismoresku": 1, "classifyame": "Share for free", "itemlist": [ "skutitle": "Fascination Series Protective Case For iphone 6+,6s+ Black ", "marketprice": 199, "qrcode": "", "stockum": 50, "bolstatus": "2",

"itemprice": 199, "skuid": "3566701", "spec": "\"Color\":\"Black\",\"Model\":\"For iphone 6+,6s+\"", "skutitle": "Fascination Series Protective Case For iphone 7,8 Black ", "marketprice": 199, "qrcode": "", "stockum": -9949, "bolstatus": "2", "itemprice": 199, "skuid": "3566702", "spec": "\"Color\":\"Black\",\"Model\":\"For iphone 7,8\"" ] ] Request parameter skuid SKU number skuame SKU name barcode Current page qrcodes pageum Commodity barcode (external product code), supports multiple, separated by commas, up to 10 Default pageum = 1

number pagesize Articles page per time start Update range time time end Update range time startupdatetime endupdatetime Default pagesize = 10, maximum pagesize = 100 yyyy-mm-dd HH:mm:ss yyyy-mm-dd HH:mm:ss Response parameters transactionstatus Transaction Response page Page number object result List Collection object errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed count The total amount pagesize Articles page transactionstatus 0: correct; incorrect true: success false: failure page per 1:

pageum current page number orderby Sort fields Reserved field returncount boolean Whether to count the total number Reserved field offset Reserved field limit Reserved field result[]: spuid SPU number sputitle SPU title classifyame Category ame ismoresku Whether more goods skulist List SKU product list qrcode Merchant encoding skuid SKU encoding skutitle SKU title specinfo Specification information skuprice BigDecimal commodity price marketprice BigDecimal market price bolstatus Up and down status stockum Inventory quantity -1: o SKU 0: Single SKU 1: Multiple SKUs skulist[]: Product barcode is "external product code" For example: "Color": "Black", "Model": "For iphone 6 +, 6s +" 1: on the shelf 2: off the shelf Available stock

4.2 Shipment order synchronization ame Explain Interface name thisshop.erp.logistics.sync Function description This method provides the data synchronization function of third-party merchant's invoices. Access path /api/shop/router/rest data format json Request mode Post Request message sample "method":"thisshop.erp.logistics.sync", "data": "orderid":"345635700769742848", "flgmultipackage":"y", "packagelist":[ "expresscompanyid":"beexkk001", "expresso":"ship_o_003", "deliverytime":"2019-08-09 11:47:15", "skulist":[ "skuid":"2008903", "quantity":1, "skuid":"2402700", "quantity":1 ], "expresscompanyid":"beexkk001", "expresso":"ship_o_002", "deliverytime":"2019-08-09 11:47:15", "skulist":[ "skuid":"2008901", "quantity":1 ]

] Return data Request parameters data: orderid Order number flgmultipackage Whether more parcels packagelist List Parcel collection expresscompanyid Logistics company number expresso shipment number deliverytime Delivery time skulist List Logistics package contains y:多包裹 n:单包裹 packagelist[]: SKU 当 flgmultipackage="y"

information 时 skulist 必填 skulist[]: skuid SKU 编号 quantity SKU 数量 Response parameters transactionstatus Transaction Response page Page number object result Return object errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed transactionstatus 0: correct; 1: incorrect true: success failure false: 4.3 Product inventory update ame Interface name thisshop.erp.stock.update Function description This method provides third-party merchant product inventory updates. Access path /api/shop/router/rest

data format json Request mode Post Request message sample "method": "thisshop.erp.stock.update", "data": "spuid": "11055", "skuid": "1105501", "qrcode": "", "stockum": 8, "tradetype": 0 Return data Request parameter spuid SPU number skuid SKU number qrcode required qrcode barcode Product barcode is "external product code" stockum Stock quantity tradetype Transaction Type transactionstatus Transaction Response skuid 0: Full inventory 1: Incremental inventory Response parameters or

page Page number object result Return object errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed transactionstatus 0: correct; 1: incorrect true: success failure 4.4 Order List ame Interface name thisshop.order.list.get Function description Get order list data Access path /api/shop/router/rest data format json Request mode Post Request message sample "method": "thisshop.order.list.get", "data": "orderstatus": 8, "startcreatetime": "2019-08-01 12:30:22", "endcreatetime": "2019-08-02 12:30:22", "startpaytime": "", "endpaytime": "", "startupdatetime": "", false:

"endupdatetime": "", "pageum": 1, "pagesize": 10 Return data 成功 "transactionstatus": "errorcode":"0", "replycode":null, "replytext":null, "memo":null, "appame":"tft-shop-server", "success":true, "page": "count":1, "pagesize":10, "pageum":1, "orderby":null, "returncount":true, "offset":0, "limit":10, "result":[ "orderid":"354619924444397568", "ordertitle":"gigabyte H310M S2H (1151)(1 items)", "ordertotalamount":3940, "paymentamount":0, "discountamount":3940,

"expressamount":0, "submittime":"2019-08-02 10:54:00", "paytime":"2019-08-02 11:01:36", "orderstatus":8, "paystatus":4 ] Request parameter orderstatus Order Status Order Status( 0: deleted 1: canceled 2: pending payment 8: To be shipped 16: To be received 32: done 64: Partial delivery) startcreatetime endcreatetime Order creation start time Order creation end time Order payment start time Order payment end time Current page number Articles page startpaytime endpaytime pageum pagesize per yyyy-mm-dd HH:mm:ss yyyy-mm-dd HH:mm:ss yyyy-mm-dd HH:mm:ss yyyy-mm-dd HH:mm:ss Default pageum = 1 Default pagesize = 10, maximum pagesize = 100

time start Update range time time end Update range time startupdatetime endupdatetime yyyy-mm-dd hh:mm:ss yyyy-mm-dd hh:mm:ss Response parameters transactionstatus Transaction Response page Page number object result List Order List errorcode Error identification replycode error code replytext Error message memo ote appame service name success Boolean whether succeed count The total amount pagesize Articles page pageum current page number orderby Sort fields Reserved field returncount Boolean Whether to count the total Reserved field transactionstatus 0: correct; 1: incorrect true: success failure page per false:

number offset Reserved field limit Reserved field result[]: orderid Order number ordertitle Order title ordertotalamount BigDecimal Order total Undeducted promotional amount paymentamount BigDecimal Order paid Deduction of preferential amount discountamount BigDecimal Discounted price expressamount BigDecimal Courier fee submittime order time yyyy-mm-dd HH:mm:ss paytime Payment time yyyy-mm-dd HH:mm:ss orderstatus Order Status Order Status( 0: deleted 1: canceled 2: pending payment 8: To be shipped 16: To be received 32: done 64: Partial shipment)) paystatus Payment status payment status( 1: to be paid 2: paying 4: Payment successful 8: Payment failed) 4.5 order details ame

Interface name thisshop.order.detail.get Function description Get order details Access path /api/shop/router/rest data format json Request mode Post Request message sample "method": "thisshop.order.detail.get", "data": "orderid": "342884030243807232" Return data 成功 "transactionstatus": "errorcode": "0", "replycode": null, "replytext": null, "memo": null, "appame": "tft-shop-server", "success": true, "page": null, "result": "addressinfo": "consignee": "tony", "phone": "66-0643309638", "provinceame": "Thailand", "cityame": "Bangkok", "areaame": "Bangkok", "postid": "1005"

, "expressamount": 0, "orderid": "342884030243807232", "paytime": "2019-07-01 00:41:18", "orderstatus": 16, "discountamount": 35, "paymentamount": 375, "shiplist": [ "deliverytime": "2019-07-03 14:30:08", "expresso": "KOV1196629", "expresscompanyid": "Bee Express", "skuid": "2712401" ], "submittime": "2019-07-01 00:39:49", "ordertotalamount": 410, "itemlist": [ "skuame": "[konvy] /LLV DHC-Supplement Vitamin C 60 Days ( 60Days x 2)", "quantity": 1, "qrcode": "736", "itemprice": 410, "chargeamount": 375, "spuid": "27124", "skuid": "2712401" ], "ordertitle": "[konvy] /LLV DHC-Supplement Vitamin C 60 Days ( 60Days x 2)(1 items)", "paystatus": 4

Request parameter orderid Order number Response parameters transactionstatus Transaction Response page Page number object result Return object errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed transactionstatus 0: correct; 1: incorrect true: success failure result: orderid Order number ordertitle Order title false:

submittime order time expressamount BigDecimal Courier fee discountamount BigDecimal Discounted price paymentamount BigDecimal Order paid Deduction of preferential amount ordertotalamount BigDecimal Order total Undeducted promotional amount paytime Payment time orderstatus Order Status Order Status( 0: deleted 1: canceled 2: pending payment 8: To be shipped 16: To be received 32: done 64: Partial delivery) paystatus Payment status Payment status( 1: to be paid 2: paying 4: Payment successful 8: Payment failed) addressinfo delivery information ItemList List Product list shiplist List Shipping list provinceame Province name cityame city name areaame Area name postid Zip code addressinfo:

consignee Receiver phone phone spuid SPU number skuid SKU number skuame SKU name itemlist[] qrcode barcode Product barcode is "external product code" quantity umber Products itemprice Commodity price chargeamount BigDecimal Total goods of The amount actually paid shiplist[] skuid SKU number expresscompanyid Logistics company number expresso shipment number deliverytime Delivery time 4.7 Modify product sku price ame Interface name thisshop.goods.sku.price.update Function description Modify product sku price, Access path /api/shop/router/rest yyyy-mm-dd HH:mm:ss

data format json Request mode Post Request message sample "method": "thisshop.goods.sku.price.update", "data": "skupricelistitem": [ "isonsale": 0, "marketprice": 500, "singleprice": 1000, "skuid": "5081515" ], "spuid": "50815" Return data Request parameter Data type Length Mandatory spuid 32 SPU number skupricelistitem list sku price list skupricelistitem Data type Leng th Mandatory Descrip tion skuid 32 isonsale int 11 singleprice Long 11 Price marketprice Long 11 Market price SKU number sku status, 0-remains as it is, 1-up and down, 2-out 0 Response parameters

Transaction Response transactionstatus page Page number object result Return object errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed transactionstatus 4.8 Category query ame Interface name thisshop.goods.category.get Function description Category query API Access path /api/shop/router/rest data format json Request mode Post Request message sample "data": "parentid": "0" "querytype": "1", "method": "thisshop.goods.category.get" 0: correct; 1: incorrect true: success failure false:

Return data Request parameter Data type Length Mandatory parentid 32 Category number: 0 is the vertex cat_id, and the category tree is obtained through the top node of the tree querytype 1 Query types: full category the mall, authorized search merchant 1 of 2 Default is 1 by Response parameters transactionstatus Transaction Response page Page number object result Return object result Data type Length level ITEGER 11 Mandatory Category level 1-first category, 2-secondary category,

3-level category txtamelocal Product category local name txtameen Product Category English ame boltreeisleaf Tree-whether leaf node (es:, o: ) parentid Parent category number categoryid Classification number transactionstatus errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed 4.9 Product details ame 说明 Interface name thisshop.goods.details Function description product details Access path /api/shop/router/rest data format json Request mode Post 0: correct; 1: incorrect true: success failure false:

Request message sample "data": "spuid": "10902", "method": "thisshop.goods.details" Return data Request parameter Data type Length Mandatory spuid 32 Spu number Spu number Response parameters transactionstatus Transaction Response page Page number object result Return object errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed transactionstatus Data Length Mandato 0 正确 1 错误 true: 成 功 false: 失 败

type ry spuid 32 Spu number Spu number itemame 512 product name product name itemtitle 512 Product title Product title categoryid 32 Classification number Classification number brandname 128 brand name brand name pcdetails 500 Product description on pc Product description, word limit: 20-500 mobiledetails 500 product description Product description, word limit: 20-500 videourl STRIG 256 Product video url Product video url imageurl 256 SPU picture SPU main picture skulist list sku object list sku object list medialist list Product display chart Product chart main display skulist Data type itemid itemame itemtitle Product umber Product umber 512 product name product name 512 Product title Product title brandid 32 product brand product brand itemskuid Product SKU number Product SKU number itemspuid Product SPU number Product SPU number itemqrcode Product barcode Product barcode classid Product type number Product type number amtprice umber (11,2) Price Price amtpricemarket umber (11,2) market price market price typpickup 32 n Pickup method Pickup method Inventory count Inventory count 1 order less inventory 2 payment less inventory typstockcalc Length 32 32 32 512 32 Mand atory

isonsale sku status sku shelves status, 1-shelf, 2-shelf codvaliddays n Validity period (days) Validity period (days) attlist List Product attribu te list Product attribute list attlist Product specifications Data type Length Mandatory attame 128 Property name: color, size imgurl 256 n Specifications main picture attvalue 128 Attribute value 4.10 Logistics company query ame Interface name thisshop.logistics.companies.get Function description Logistics company query Access path /api/shop/router/rest data format json Request mode Post Request message sample "data": "pageum":"1","pagesize":"100" "appid": "TF09223", "token": "4D153A9B305B43E8ADD0709397C32BC8", "timestamp": "1576138212000", "nonce": "637117636541851358", "method": "thisshop.logistics.companies.get", "sign": "05FF398518B1AFEB5BC031286A09ED0A"

Return data success "transactionstatus": null, "page": "count": 0, "pagesize": 200, "pageum": 1, "orderby": "", "returncount": false, "offset": 0, "limit": 200, "result": [ "available": 1, "code": "Bee", "logisticscompanyen": "Bee", "logisticscompanylocal": "蜜蜂", "logisticscompanylogo": "www.thisshop.com", "available": 1, "code": "EMS", "logisticscompanyen": "EMS", "logisticscompanylocal": "邮政", "logisticscompanylogo": "www.thisshop.com",

"available": 1, "code": "STO", "logisticscompanyen": "STO", "logisticscompanylocal": "顺丰", "logisticscompanylogo": "www.thisshop.com" ] Request parameter Data type pageum pagesize Length Mandatory n which page n Pages Response parameters transactionstatus Transaction Response page Page number object result Return object result Data type available ITEGER Lengt h Mandatory is it effective Whether it is valid, 1currently supported courier companies,

2-unsupported courier companies, note: you must enter the supported courier company id when shipping, otherwise an error will be reported code Courier Company Code Courier Company Code logisticscompa nyen Express company name in English Courier company name logisticscompa nylocal Courier company name local language Courier company name local language logisticscompa nylogo Courier company logo Courier company logo transactionstatus errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed 4.11 Brand Search ame Explain 0: correct; 1: incorrect true: success failure false:

Interface name thisshop.category.brand.get Function description Category query API Access path /api/shop/router/rest data format json Request mode Post Request message sample "data": "categoryid": "01010303", "method": "thisshop.category.brand.get" Return data Success "transactionstatus": null, "page": null, "result": "datalist": [ "level": 1, "txtamelocal": "", "txtameen": "MOBILES", "boltreeisleaf": "n", "parentid": "0", "categoryid": "0101" ] Request parameters Data type Length Mandatory categoryid strin g 32 三级分类编号

Response parameter Data type transactionstatus Transaction Response page Page number object result Return object result Data type categoryid Length Mandatory Classification number Classification number brando Brand ID Brand ID namelocal Brand name local Brand name local nameen Brand English ame Brand ame English pcimageo Brand picture Brand picture mobileimageo Brand mobile picture pc pc Brand mobile picture transactionstatus errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed 0: correct; 1: incorrect true: success failure false:

4.12 Product added ame Interface name thisshop.goods.add Function description Product added Access path /api/shop/router/rest data format json Request mode Post Request message sample "data": "brandame": "HUAWEI", "categoryid": "01010301", "itemame": "HUAWEI mate20 手机", "itemtitle": "HUAWEI mate20 手机", "pcdetails": "HUAWEI text Desc 1", "mobiledetails": "HUAWEI text Desc 1", "videourl": "", "imageurl": "/shop/pop/2019112018391.jpg", "medialist": [ "/shop/pop/201911201839362.jpg", "/shop/pop/201911201839363.jpg" ], "skulist": [ "amtprice": 1000, "amtpricemarket": 1200, "attlist": [ "attame": "color", "imgurl": "/shop/pop/201911201839364.jpg", "attvalue": "black", "attame": "size", "imgurl": "", "attvalue": "12" ], "codvaliddays": 100, "isonsale": 1, "itemame": "mate20", "itemqrcode": "324333", "itemtitle": "mate20 手机",

"typstockcalc": 1 ] Return data Request parameter Data type Length Mandato ry itemame 256 product name product name itemtitle 512 Product title Product title categoryid 32 Classification number Classification number brandid 32 Brand ID Brand ID pcdetails 1000 Product description on pc limit 20-1000 word mobiledetai ls 1000 product description limit 20-1000 word videourl 256 Product url Product video url typpublish sku status imageurl SPU picture skulist OBJECT[] sku object list sku object list medialist List<Stri ng> Product display chart Obtained through the image upload interface 256 video sku shelves status, 1-up, 2-down main Obtained through the image upload interface skulist Data type Length Mandato ry itemame 256 product name product name

itemtitle itemqrcode amtprice BigDecimal amtpricemarket BigDecimal typpickup typstockcalc 512 512 (16,2) (16,2) 32 Product title Product title Product barcode Product barcode Price Buyout price, empty or <= 0 default 0 market price Market price, empty or <= 0 default 0 Pickup method Pickup method Inventory count Inventory count 1 order less inventory 2 payment less inventory Validity period (days) Validity period (days) 1 codvaliddays attlist List<Strin g> stockum 6 11 Product attribute list Product attribute list Inventory Inventory number, empty or <= 0 default 0 attlist product attributes Data type Length Mandatory attame 128 Property name: color, size imgurl 256 n Specifications main picture attvalue 128 Attribute value Response parameters Data type transactionstatus Transaction Response page Page number object result Return object Obtained through the image upload interface

result Data type spuid Length Mandatory Spu 编号 Spu 编号 transactionstatus errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed 0: correct; 1: incorrect true: success failure 4.13 Product modification ame Interface name thisshop.goods.update Function description Product modification Access path /api/shop/router/rest data format json Request mode Post Request message sample "method": "thisshop.goods.update" "data": "spuid": "5600", "brandid": "342423", "categoryid": "01010301", "typpublish": 1, "itemame": "HUAWEI mate20 手机", "itemtitle": "HUAWEI mate20 手机", "pcdetails": "HUAWEI text Desc 1", "mobiledetails": "HUAWEI text Desc 1", false:

"videourl": "/shop/pop/20191120183936.mp4", "imageurl": "/shop/pop/20191120183936.jpg", "medialist": [ "/shop/pop/20191120183936.jpg", "/shop/pop/20191120183936.jpg" ], "skulist": [ "itemid": "560001", "amtprice": 1000, "amtpricemarket": 1200, "attlist": [ "attame": "color", "imgurl": "/shop/pop/20191120183936.jpg", "attvalue": "black", "attame": "size", "imgurl": "", "attvalue": "12" ], "itemame": "mate20", "itemqrcode": "324333", "itemtitle": "mate20 手机", "typstockcalc": 1 ] Return data Request parameter Data type Length Mandatory spuid 32 Spu number Spu number itemame 512 product name product name itemtitle 512 Product title Product title pcdetails 500 Product description on pc Product description, word limit: 20-500 mobiledetai ls 500 product description Product description, word limit: 20-500 videourl STRIG 256 Product video Product video url

url imageurl 256 SPU picture main SPU main picture typpublish sku status sku status, 0-remains as it is, 1-up and down, 2-out skulist OBJECT[ ] sku object list sku object list medialist OBJECT[ ] Product display chart Product display chart skulist Data type itemid itemame itemtitle Length Manda tory Product umber Product umber 512 product name product name 512 Product title Product title brandid 32 product brand product brand itemskuid Product number Product SKU number itemqrcode Product barcode Product barcode amtprice umber (11,2) Price Price amtpricemarket umber (11,2) market price market price typpickup 32 Pickup method Pickup method 32 32 512 SKU typstockcalc Inventory count Inventory count 1 order less inventory 2 payment less inventory codvaliddays Validity period (days) Validity period (days) attlist List<> Product attribute list Product attribute list attlist product specifications Data type Length Mandatory Descri ption attame 128 Property color, size imgurl 256 Specifications picture attvalue 128 Attribute value name: main

Response parameters Data type transactionstatus Transaction Response page Page number object result Return object Data type errorcode Error identification 0: correct; 1: incorrect replycode error code replytext Error message memo ote appame service name success boolean whether succeed transactionstatus 4.14 Product Shelves ame Interface name thisshop.goods.publish.update Function description Category query API Access path /api/shop/router/rest data format json Request mode Post true: success failure false:

Request message sample "data": "spuid": "58841", "typpublish":1, "method": "thisshop.goods.publish.update" Return data Request parameter Data type typpublish int spuid Leng th 1 32 Mandatory spu shelves status, 1-shelf, 2-shelf spu number Response parameters transactionstatus Transaction Response result Return object errorcode Error identification replycode error code replytext Error message memo ote appame service name success boolean whether succeed transactionstatus 0: correct; 1: incorrect true: success failure false:

5 Image upload interface ame Interface name thisshop.goods.image.upload Function description Product image upload service Access path /api/image/upload data format form-data Request mode Post Request message Return data sample "transactionstatus": "errorcode": "0", "replycode": null, "replytext": null, "memo": null, "appame": "tft-api-server", "success": true, "imageurl": "tempshop/tf10000/20191224/0a1e3067208a41c3a3cc88e8e 08619C5.jpg"

Request parameter file file file Only the following picture types are supported and cannot exceed 1MB..jpg.png.jpeg.bmp.gif appid appid timestamp Timestamp token Token method Method name nonce serial number sign signature 除去 file 和 sign Response parameters transactionstatus Transaction Response imageurl Picture path errorcode Error identification replycode error code replytext Error message memo ote transactionstatus 0: correct; 1: incorrect

appame service name success Boolean whether succeed imageurl Picture path true: success failure false: 6 Picture path errorcode success 0 true 1 false replycode replytext Remark success 20000 20001 20002 API does not have a corresponding Failed business method (see the replytext Merchant is not authorized to bind error descriptio Barcode request parameters n when cannot exceed 10 at a time returning) 20003 Parameter check failed, parameter cannot be empty XX 20004 When the inventory is fully modified, the inventory quantity cannot be less than 0 20005 o corresponding data found (e.g. order or product does not exist) 20006 Request parameter check failed: xx time format is incorrect 20007 The number of skuid in the logistics package information must be greater than 0 20008 Order status is not in the scope of

delivery 20009 Paging parameter pagesize cannot exceed 100 20010 The SKU in the logistics package is not in the order