船讯网API功能说明
海运系统及平台接口操作用户手册
海运系统与平台接口操作用户手册客户供应商客户供应商新增业务说明用于增加海运系统中对应的客户供应商资料。
菜单路径客户供应商/客户供应商新增功能说明●新增:填完相关信息,点新增;●业务引用:对于中文全称完全匹配的,会强制引用,如果有输入英文全称,则在中文全称或英文全称完全匹配就强制引用。
截图菜单:客户供应商→客户供应商新增新增页面和旧的方式一致,如下图:所有的操作都和原来一样,与之前的程序相比增加了公司级别的电话和传真两种联系方式,通常用于维护客户供应商的公司总机,而不是具体某个联系人的联系方式。
目前的查重机制是用中文全称进行查重,只要发现海运数据库(全局)里有完全重复的名字则不允许用户增加头信息,只可以做引用,如下图:客户供应商查询业务说明用于查询海运系统中对应的客户供应商信息。
并可在此界面查看客户供应商详细资料,同时也可在此界面删除客户供应商或“提交CDH”操作菜单路径客户供应商/查询客户供应商功能说明●查询:根据用户设置的查询条件,过滤对应的客户供应商数据。
●详细:以只读方式查看客户供应商的详细资料。
●删除:用于删除海运系统中的客户供应商信息,删除后的客户供应商资料将在业务中无法引用,但可根据“客户状态”为“无效”进行查询。
●提交CDH:将客户供应商资料提交到CDH平台审核,以申请相应的财务编码。
详细内容参见“客户供应商的CDH接口”。
截图客户供应商其他信息维护业务说明用于维护海运系统中对应的客户供应商详细信息。
菜单路径客户供应商/客户供应商其他信息维护功能说明●查询:点查找客户供应商,选择所需维护的客户供应商。
维护:进行各个TAB页的维护。
截图1、客户供应商基本信息修改如上图,除“创建人”、“最后修改人”外,其他信息可直接修改,修改之后,点击‘更新’按钮即可将更改后的内容提交到系统保存。
注意:此处的“更新”按钮仅提交基本信息。
2、分类信息新增/修改/删除以前在海运系统中,只有新增的客户供应商可进行分类信息的修改。
代理api使用方法
代理api使用方法代理API是一种允许应用程序通过代理服务器发送和接收数据的方法。
使用代理API可以隐藏真实的网络地址和身份,提高安全性和隐私保护。
下面将详细介绍代理API的使用方法。
1.了解代理API的基本概念和原理:代理API是通过代理服务器转发请求和响应来实现的。
代理服务器充当中介,将应用程序的请求发送给目标服务器,然后将目标服务器的响应返回给应用程序。
这样,目标服务器无法直接与应用程序通信,从而隐藏了应用程序的真实网络地址和身份。
2.选择合适的代理API服务提供商:目前有很多代理API服务提供商可供选择,如ProxyMesh、ScraperAPI、Luminati等。
这些服务提供商通常提供稳定可靠的代理服务器和相应的API接口,可以根据自己的需求选择合适的服务提供商。
3.注册和获取API密钥:在选择好代理API服务提供商后,需要进行注册并获取API密钥。
API密钥是访问代理API接口的凭证,用于身份验证和授权访问。
在注册过程中,可能需要提供一些个人信息和付费方式。
4.了解代理API的使用限制和费用:不同的代理API服务提供商可能有不同的使用限制和费用计算方式。
需要仔细阅读服务提供商的文档,了解每天或每月的请求限制、并发数限制、流量限制、流量限制等,并根据自己的需求选择合适的套餐和计费方式。
5.配置代理API的请求参数:在使用代理API之前,需要配置请求参数,包括目标URL、代理服务器地址、端口号、身份验证信息等。
一般来说,代理服务器地址和端口号是必填项,而身份验证信息可能是可选项。
6.发送请求并处理响应:配置好请求参数后,可以通过发送HTTP请求来调用代理API。
根据代理API的文档,选择合适的HTTP方法(如GET、POST、PUT、DELETE等)和相应的请求头(如User-Agent、Content-Type等),发送请求并获取响应。
7.处理代理API的错误和异常:在使用代理API的过程中,可能会出现错误和异常。
API的使用与实际应用
API的使用与实际应用API(Application Programming Interface)是指一组定义了应用程序之间的交互方式的协议和工具。
借助API,开发者可以将自己的应用程序与其他的应用程序相互连接,从而实现数据的传输、功能的共享等操作。
API的功能强大,应用广泛,是现代互联网技术中不可或缺的一部分。
API的使用具有很多的优点。
首先,API可以大大降低开发人员的负担。
因为应用程序通常包含大量的重复代码,而API可以轻松地让开发者复用已有的代码,从而加快开发速度。
其次,API可以提高应用程序的可维护性。
因为API是基于标准协议进行开发的,所以在需要对应用程序进行修改时,开发者只需要对API进行修改即可,而不需要修改整个应用程序,这样可以大大降低维护成本。
最后,API还可以提高应用程序的灵活性。
因为API是相对独立的,所以可以让不同的应用程序通过API相互连接,从而增加系统的可扩展性。
API的应用有很多方面。
下面将从Web应用、移动应用和物联网应用三个方面来分析API的使用与实际应用。
一、Web应用Web应用是指通过浏览器访问的应用程序,主要包括电商网站、社交网络、新闻媒体等。
在Web应用中,API的作用非常明显。
例如,电商网站的搜索功能,通常是基于API实现的。
当用户输入搜索关键词时,Web应用会通过API向数据库发起请求,获取商品信息,并将这些信息返回给用户。
此外,社交网络和新闻媒体也经常使用API来分享内容和数据。
例如,用户可以使用社交网络的API来分享自己的文章和图片,同时可以使用新闻媒体的API来获取最新的新闻和资讯。
二、移动应用移动应用是指安装在手机和平板电脑上的应用程序,主要包括社交网络、游戏、购物等。
在移动应用中,API的应用也非常广泛。
例如,社交网络应用程序可以使用API获取用户的好友列表和消息数据,同时可以使用第三方API来实现地图和定位功能。
游戏应用程序可以使用API来实现用户管理和联机对战等功能。
船讯网使用说明
船讯网使用说明
使用方法
1.登陆
1)打开网页,输入网址:
输入
2)进入船讯网首页,无需登录即可查询船舶位置:
输入“船名”,“呼号”
或者MMSI
点击“搜索”
3)船舶信息框中得其她扩展功能需登录后才能使用:
4)右上角点击登录,进入登录页面,输入“用户名"与“密码”,点击“登录”;
5)如果您就是第一次使用,需要注册,可点击右上角得注册,进入注册页面:
输入“用户名”与
“密码”
点击“登录”
填好基本资料以后,提交注册,等待客服人员得资料审核电话。
6) 基本功能演示: i. 船舶定位
ii. 轨迹查询:可以查询一个月得船舶轨迹
点击“定位”
点击“X ”,关掉该框
上下左右调
整 以及 放大缩小调整
点击“轨迹”
将出现一个时间选择框,选择查瞧得周期就可以瞧到相应时间段得船舶轨迹。
时间框
iii.船舶定制:定制得船舶就是紫色得,定制船舶得列表在左侧(最多可定制3条船),可点击“X"删除。
iv.我得船队:船队以红色显示,需要提供船舶国籍证书与船舶检验证书第7页,传真给客服人员,由客服人员后台添加上去。
v.到港提醒
或者:
7)
如果要查瞧某个港口得船舶,您可以点击“港口定位”框内得港口,如果没
有找到希望得港口,可以点击“更多”,将跳出另外一个框,从而进行港口选择。
港口定位 点击“更多” 设置到港提醒信息框。
点击“更多”后出现
得框
8)每个三角形都代表一条船,点击“船舶符号”,可以瞧到详细说明。
点击“船舶符号”
使用中有什么疑问都可以咨询她们得客服人员,电话就是。
船讯网卫星AIS_全球船位跟踪
北京亿海蓝科技有限公司卫星AIS船讯网2013-3-21船讯网卫星AIS1 船讯网发展自2007年以来,船讯网一直专注于基于互联网的船舶监控领域。
我们从最初的几个港口不断的发展,截止2012年底,我们已经拥有了全球超过1500多个基站、600多个港口的数据覆盖,在中国地区,这些数据完全免费提供。
在2012年,船讯网引入卫星AIS,卫星AIS则是把AIS接收机安装到卫星上,这样即可不受地域范围限制地接收到全球船舶的AIS信息。
尤其是对于大洋上的船舶监控来说,提供了一种革命性的技术手段。
图1 卫星AIS覆盖效果图当前卫星AIS服务已经具备商用价值,而在未来2年内,将有超过20颗新的卫星被陆续发射,届时船舶监控的范围和实时性将有更大的提升,这将彻底改写船位信息服务的历史!2 AIS信息来源在船讯网上提供的船舶动态数据,是通过两种不同的方式获得的,分别为建立在港口附近的岸基AIS和搭载在卫星上的卫星AIS。
2.1岸基AIS介绍由于AIS发送的信息中包含船舶位置信息,其在船舶监控领域有着非常广泛的应用。
2007年开始,船讯网利用AIS的这一特性,在全国主要港口部署AIS基站,获取全国港口的船舶动态。
截止今日,船讯网已经在全国部署200多个基站,覆盖100多个港口,拥有全国最大的AIS网络。
图2 船讯网岸基AIS基站2.1.1岸基AIS覆盖船讯网自2007年开始经营基于互联网的船位监控服务,时至今日,已经在全球范围内拥有超过1500个基站的数据,覆盖全球的主要港口。
但受岸基AIS通信能力的限制,只能提供港口附近30-50海里范围内的船舶动态。
图3 船讯网岸基AIS基站覆盖2.1.2岸基AIS更新船讯网岸基AIS的更新受到多重因素的影响,更新频率普遍在15秒到3分钟之间,基本上能够完全满足船位监控的需要。
岸基AIS,主要受以下因素的影响:(1)基站的位置船讯网的基站虽然尽量建在地域开阔、位置较高的地方,由于多种原因,并不是每个基站的位置都是最优的;(2)船舶AIS设备根据船舶自身AIS设备的型号不同、功率不同、天线位置/高度不同,其信号的强弱也不同;(3)船舶的位置当船舶航行到岸基AIS的覆盖边缘时,信号的容易变得时有时无,或者是信号丢失。
VAT_API 软体使用手册说明书
目录1. VAT_API软体介绍 (1)1.1 软体基本功能 (1)1.2 系统需求 (1)1.3 软体主界面 (1)1.3.1 菜单 (2)1.3.2 图像显示模块 (3)1.3.3 缺陷显示模块 (4)1.3.4 状态栏 (4)1.3.5一键测试模块 (4)1.3.6 相机信息模块 (5)1.3.7手动测试模块 (5)1.3.8检测模块 (6)1.3.9批量测试模块 (6)1.3.10 TT显示模块 (7)1.3.11 亮度测量模块 (7)1.4 机种设置 (7)1.4.1 机种设置界面 (7)1.4.2 机种列表 (8)1.4.3 相机pattern设置 (8)1.4.4 参数设置 (12)1.4.5 算法设置 (13)1.5 系统设置 (15)1.6 判片规则 (16)1.6.1 判片规则主界面 (16)1.6.2 单一规则设置 (16)1.7 批量检测 (18)1.7.1 “批量检测”界面 (18)1.8 端子测试 (19)1.8.1 “IO测试”主界面 (19)1.8.2 输出IO测试与配置 (19)1.8.3 输入IO测试与配置 (20)1.9 扫码测试 (20)1.9.1 “扫码测试”主界面 (20)1.9.2 串口配置 (20)1.9.3 扫码测试 (21)1.9.4 功能测试 (21)1.10 版本信息 (22)1.10.1 “版本显示”主界面 (22)1.10.2 软件版本号 (22)1.10.3 算法版本号 (22)1.11 除尘控制 (22)1.11.1 “除尘控制”主界面 (22)1.12 用户设置 (23)1.12.1 “用户设置”主界面 (23)1.13 上报设置 (24)1.13.1 “上报设置”主界面 (24)1.14 扫码查图 (24)1.14.1 “扫码查图”主界面 (24)1.15 设置不检区 (25)2 AOI程序升级介绍 (25)2.1 VAT_API软体升级 (26)2.2 PCIE驱动升级 (27)2.3 TFTP升级 (28)2.3.1 TFTP升级软件概述 (28)2.3.2 升级网络 (29)2.3.4 TFTP软体升级步骤 (29)2.4 RemoteLoad升级 (30)2.4.1 “RemoteLoad-读版本号”升级软件概述 (30)2.4.2 “RemoteLoad-读版本号”升级软件主界面 (30)2.4.3 “RemoteLoad-读版本号”升级操作步骤 (31)异常处理手册(待更新) (33)1. PC异常处理 (34)1.1 PC无法识别PCIE板卡 (34)1.2 PPC电脑不显示E盘或E盘容量变小 (34)2. 相机异常处理 (35)1.1相机连接状态异常 (35)1.2 MainCCD取像不清晰 (36)3. 图像采集器异常处理 (36)4.图像处理器异常处理 (36)5. 配置异常处理 (37)6. 系统升级异常处理 (37)6.1 PCIE驱动升级异常处理 (37)6.2 TFTP升级异常处理 (37)6.2.1没有找到连接的PCIE硬件设备 (37)API 软件使用手册1. V AT_API软体介绍1.1 软体基本功能V AT_API软体是控制AOI设备进行各项功能的主要软体。
webapi使用方法
webapi使用方法Web API(Web Application Programming Interface)是一种用于不同应用程序之间进行通信的技术,它可以使不同的应用程序之间共享数据和功能。
通过使用Web API,开发人员可以轻松地将应用程序的功能扩展到其他平台和设备上。
本文将介绍Web API的使用方法,以帮助开发人员更好地理解和应用这项技术。
一、Web API的基本概念Web API是一组定义了应用程序之间通信规范的接口。
它允许开发人员使用HTTP协议在不同的应用程序之间传递数据。
Web API可以接收HTTP请求,并返回相应的数据或执行相应的操作。
开发人员可以使用不同的编程语言和框架来创建Web API,例如Java、C#、Python等。
二、Web API的使用场景Web API广泛应用于各种场景,例如:1.移动应用程序开发:开发人员可以使用Web API将移动应用程序与服务器进行通信,实现数据的传递和功能的扩展。
2.跨平台应用程序开发:Web API可以使不同平台的应用程序共享数据和功能,实现跨平台应用程序的开发和部署。
3.第三方应用程序集成:通过使用Web API,开发人员可以将自己的应用程序集成到其他应用程序中,实现数据共享和功能交互。
三、Web API的使用步骤使用Web API一般需要经过以下步骤:1.确定API的功能和数据:首先,开发人员需要确定API的功能和需要共享的数据。
这可以根据应用程序的需求和业务逻辑来确定。
2.设计API的接口:接下来,开发人员需要设计API的接口,包括请求方法(GET、POST、PUT、DELETE等)、请求参数和响应数据格式等。
3.实现API的功能:根据设计的接口,开发人员需要实现API的功能,包括数据的获取、处理和返回等。
在实现过程中,开发人员可以使用各种编程语言和框架来实现API的功能。
4.测试API的功能:完成API的实现后,开发人员需要进行测试,确保API的功能和数据的正确性。
jetlinks api用法
jetlinks api用法JetLinks API的使用方法JetLinks是一个开源的物联网设备管理平台,提供了丰富的API以便开发者进行定制化的集成和扩展。
以下是JetLinks API的使用方法。
1. 身份验证:在使用JetLinks API之前,首先需要进行身份验证。
可以使用用户名和密码进行基本身份验证,或者使用令牌进行更安全的身份验证。
在请求头中提供身份验证信息可以确保API请求的安全性。
2. 设备管理:JetLinks API提供了设备管理的相关功能,包括设备的注册、删除、更新和查询等操作。
通过调用相应的API,您可以轻松地管理设备,并获取它们的状态和属性信息。
3. 设备控制:JetLinks API还允许您对设备进行控制操作。
您可以发送命令或配置参数到设备,以实现特定的功能或改变设备的状态。
通过调用相应的API,您可以与设备进行通信,并监控其状态和数据。
4. 数据上报和订阅:JetLinks API支持设备数据的上报和订阅功能。
您可以将设备的数据发送到平台,并通过API获取设备的最新数据。
您还可以订阅设备的数据流,以便在设备状态变化时及时收到通知。
5. 规则引擎:JetLinks API还提供了规则引擎的相关功能。
您可以创建和管理各种规则,以便根据设备数据触发自动化操作。
通过API,您可以创建规则、配置规则条件和动作,并监控规则的执行情况。
6. 安全性和权限管理:JetLinks API支持安全性和权限管理功能。
您可以为不同的用户和角色分配不同的权限,并控制对设备和数据的访问权限。
通过API,您可以创建用户、管理角色和权限,并确保系统的安全性。
通过以上简要介绍,您现在应该对JetLinks API的使用方法有了初步的了解。
通过使用JetLinks API,您可以根据自己的需求进行定制化的开发和集成,以实现更灵活和强大的物联网设备管理功能。
宝船网数据api开发接口
宝船网数据API开发接口目录宝船网数据API开发接口 (I)说明 (II)一、数据API (1)1船舶查询服务 (1)1.1接口功能介绍 (1)1.2接口参数说明 (1)1.3接口URL (1)1.4返回结果说明 (1)2船舶基本信息查询服务 (2)2.1接口功能介绍 (2)2.2接口参数说明 (2)2.3接口URL (2)2.4返回结果说明 (2)3船舶最新船位查询服务 (3)3.1接口功能介绍 (3)3.2接口参数说明 (3)3.3接口URL (4)3.4返回结果说明 (4)4船舶历史轨迹查询服务 (4)4.1接口功能介绍 (5)4.2接口参数说明 (5)4.3接口URL (5)4.4返回结果说明 (5)5获取指定区域船舶服务 (6)5.1接口功能介绍 (6)5.2接口参数说明 (6)5.3接口URL (6)5.4返回结果说明 (7)6获取加密种子 (8)6.1接口功能介绍 (8)6.2接口参数说明 (8)6.3接口URL (8)6.4返回结果说明 (8)二、调用示例Java版 (8)三、调用示例php版 (11)宝船网数据API 修订记录I说明API是Application Program Interface的缩写,即应用程序接口。
宝船网数据API由Http接口组成的。
使用这套数据API接口,宝船网会给每个API客户分配一个唯一key,调用数据api时先获取加密种子,然后使用md5算法加密该(加密种子+ key),调用每个数据api都需要当前加密后的报文(32位md5算法加密的字符串)当作请求参数传递,用户可以快捷的获取到船舶数据。
该文档主要面向项目经理、开发技术人员,便于了解API接口规范和调用。
本文中系统管理员指的是宝船网运营方,客户管理员指的是负责生成及管理API key的管理员,通常是使用API的机构的管理用户,可以登录宝船网到“账户”中管理API key。
一、数据API1船舶查询服务1.1接口功能介绍返回状态码说明:2.4返回结果说明{"result":[{"callsign":"413321","mmsi":"412704230","shipname":"FU YUAN YU 38","imo":" 9132961","shiptype":"渔船-Y","length":"136","breadth":"21","eta":"2015-03-26 15:00","dest_port":"QING DAO","draught":"6.0"}],"status":0}3.3接口URLURL请求地址:/DataApiServer/getShipLatest?shipid=420368290&key=5cdd7336161c4ce2a27a21d770b8aa53 3.4返回结果说明4船舶历史轨迹查询服务4.1接口功能介绍根据船舶ID查单船历史轨迹,最早可查时间和轨迹间隔作限制。
船讯网API
船讯网API
船讯网是全国最大的船位监控网站,提供免费实时的船位跟踪服务。
船讯网新版API,支持全球船位查询、船队监控、区域监控、轨迹查询、海图/地图显示、自定义标注等功能,可将船讯网便捷地把嵌入到您的系统或网站中。
本API使用简单、应用灵活,能够满足船东对自有船舶、港航单位对区域船舶、物流服务企业对任意船舶的监控需要。
1. 船队监控
主要是针对船东或者船舶服务企业,需要掌握一组船舶或者不固定船舶的运动状态。
船队监控主要提供以下功能:
- 通过船名、呼号、IMO、MMSI编号查询全球范围内的船;
- 只显示本船队的船;
- 自由更改船队中的船;
- 船队自由分组,船舶颜色自定义显示;
- 查看船舶历史轨迹。
2. 区域监控
主要是针对某些港口用户,需要掌握一片区域内所有船舶的运动状态。
区域监控主要提供以下功能:
- 通过船名、呼号、IMO、MMSI编号查询全球范围内的船;
- 全部显示本区域内的船舶;
- 根据船籍、船舶类型、货物类型、船舶状态、船长、船宽、吃水等条件筛选符合条件的船;
- 查看船舶历史轨迹。
3. 任意船监控
主要是针对物流服务企业,需要向自己的用户提供船位服务。
任意船监控主要提供以下功能:
- 查找全球范围内的任意船舶
- 将自身业务数据与船位数据相结合
- 船舶轨迹查询
综述,船讯网API是一个概念性的产品,每个人对API的理解有所不同。
更多的了解API,请联系我们。
API用户手册
4)省略婴儿标识I
SSR DOCO CA HK1出生地/类型V/VISA卡号码/发卡地区/发卡日期/卡有效国家或州//P1
如:
输入:
SSR DOCOCA HK1 BIRTHPLACE/V/VISANUMBER/ISSUEPLACE/10MAY04/USA/P1
输出:
5.SSR DOCO CA HK1 BIRTHPLACE/V/VISANUMBER/ISSUEPLACE/10MAY04/USA//P1
2.2.2
1.指令格式:
SSRDOCA航空公司代码HK1地址类型/国家/详细地址/城市/所在省市(州)信息/邮编/I婴儿标识/P1
注意:
前往美国旅行的旅客,目的地地址(SSR DOCA D/)的所有项必须输全(除了婴儿标识);
如:
SSR DOCOCA HK1 BIRTHPLACE/V/VISANUMBER/ISSUEPLACE/10MAY04/USA/I/P1
输出:
5.SSR DOCS CA HK1 P/USA/PASSPORTNUMBER/USA/10MAY79/M/10MAY10/SURNAME/
/FIRSENAME/MIDNAME/H/P1
有效期至Date of expiry
身份证号码Identity card No.
POCHNZHANG<<DALONG<<<<<<<<<<<<<<<<<<<<<<<<<<
9CHN6704241M020423
国际在线产品-新版国际在线发运系统API规范
国际在线产品-新版国际在线发运系统API规范1E邮宝、e包裹、e特快、e速宝API综述 (1)1.1业务简介 (1)1.2适用范围 (1)1.3API功能域分类 (1)1.4API开发说明 (1)2E邮宝、e包裹、e特快、e速宝API规范 (1)2.1SHIP(发运服务) (1)2.1.1运单信息接收服务 (2)2.1.2运单信息验证服务 (9)2.1.3运单信息取消服务 (10)2.1.4运单信息查询服务 (10)2.2TRACK(跟踪信息服务) (11)2.2.1实时跟踪信息查询 (11)2.3RATE(费率服务) (11)2.3.1国际E邮宝费率计算 (11)2.4Address(地址服务) (12)2.4.1国内地址行政区划查询 (12)2.5LABEL(标签服务) (13)2.5.1标签静态文件下载服务 (13)2.5.2批量获取标签服务 (14)2.5.3批量获取标签服务(增强版) (15)3附录 (16)3.1附录一:集成及用户权限验证方法 (16)3.2附录二:国家和地区名称以及邮编规则 (16)3.3附录三:澳大利亚-州列表 (17)3.4附录四:版本信息更新记录 (18)1E邮宝、e包裹、e特快、e速宝API综述1.1 业务简介E邮宝、E包裹、E特快、E速宝API提供在线的运单生成、标签打印、全程跟踪等信息服务,覆盖运单的完整生命周期。
1.2 适用范围具备一定软件开发能力并拥有自建订单系统的大中小型B2C、C2C商家,可根据自身情况,进行个性化的开发,以达到API系统对接的目的。
API基于HTTP协议实现,需要双方系统能够通过internet互联,并使用http方式进行通讯。
本文档描述不涉及具体的开发语言,集成过程可使用合适的编程技术,实现基于http的数据交换方式。
1.3 API功能域分类API数量较多,在后续建设过程中可能不断增加,但总体可划分几个域进行完善和扩充:SHIP(发运服务)、TRACK(跟踪信息服务)、RA TE(费率服务)、ADDRESS(地址服务)、LABEL(标签服务)。
腾讯云文本提取API v5说明书
PhilipsWireless noise cancelling headphones32mm drivers/closed-back On-earSoft ear cushionsFull foldingTABH305BK Big bold bass. No distractions. Tune in to your sounds with big, bold bass. Tune out distractions with Active Noise Canceling (ANC). These wireless on-ear headphones are all about the beats you love. A single charge gives you up to 15 hours play time, even with ANC on.Big bold bass. No distractions.•15 hours play time with Active Noise Canceling (ANC) on•18 hours play time with ANC off•Big bass. 32 mm neodymium acoustic drivers•2 hours charging time via USBEasy to carry. Easy to wear.•Lightweight, adjustable headband•Soft ear cups that can be angled for maximum comfort•Flat-fold design for easy storage in your pocket or bag•Weight is just 145.5 g. Feel light. Listen heavyVoice control. Music or calls.•Multi-function button. Easily control music and calls•A double button-press wakes your phone's voice assistantIssue date 2022-05-09Version: 4.1.512 NC: 8670 001 61263EAN: 48 95229 10059 6© 2022 Koninklijke Philips N.V.All Rights reserved.Specifications are subject to change without notice. Trademarks are the property of Koninklijke Philips N.V. or their respective SpecificationsWireless noise cancelling headphones32mm drivers/closed-back On-ear, Soft ear cushions, Full foldingHighlights15 hrs play time (ANC on)Active Noise Canceling (ANC) ensures the rumble of the train won't interfere with the boom of the beat. Want silence? Simply activate ANC without any music playing. You get up to 15 hours play time with ANC on, and 18 hours play time with ANC off. Charging time is just 2 hours via USB.Roll with the bassTake the dance floor with you. The 32 mmneodymium acoustic drivers keep the sound crisp and the bass big.Easy to wearWeighing just 145.5 g, these wireless on-earheadphones let you bring the bass in real comfort. The headband is easily adjustable and so light you’ll barely feel it. The ear cups are soft and can be angled until they feel just right.Easy to moveThe ear cups fold flat and swivel inward, for easy storage in your pocket or bag. Just fold them up and bring them with you.Multi-function buttonEasily control music and calls via the multi-function button. Don't like the current track? Skip it with a long press. Want to reject a call and keep listening? A simple button-press takes care of that.Hey Siri! Hey Google!Wake your phone's voice assistant with a double button-press. Ask Siri or Google Assistant to set up your next playlist, call or send messages to friends, check the weather, and more.18 hours play time (ANC off)18 hours play time with ANC off. Charging time is just 2 hours via USB.2 hours charging time via USB2 hours charging time via USBLightweigt adjustable headbandLightweight, adjustable headbandSoft ear cupsSoft ear cups that can be angled for maximum comfortSound•Acoustic system: Closed •Magnet type: NdFeB•Frequency response: 9 - 21 000 Hz •Impedance:32ohm•Speaker diameter: 32 mm•Maximum power input: 30 mW •Diaphragm: PET •Sensitivity: 92 dB •Type:dynamicConnectivity •Microphone: Built-in microphone•Bluetooth profiles: A2DP, AVRCP, HFP, HSP •Bluetooth version: 4.2•Maximum range: Up to 10 mConvenience•Volume control•Call Management: Call on Hold, Switch between 2 calls, Answer/End Call, Reject Call, Switch between call and musicAccessories•Quick start guide •USB cablePower•Battery type: Li-Polymer •Standby time: 200 hrs•Talk time:33*hr•Music play time: 15* hrDesign•Color: BlackProduct dimensions•Product dimensions (W x H x D): 16.5 x 18.5 x 4 cm •Weight: 0.1625 kgPackaging dimensions•Packaging type: Carton•Number of products included: 1•Type of shelf placement: Both•Packaging dimensions (W x H x D): 19.5 x 22.5 x 4.8 cm •Gross weight: 0.292 kg •Nett weight: 0.188 kg •Tare weight: 0.104 kg •EAN: 48 95229 10059 6Outer Carton•Number of consumer packagings: 3•Outer carton (L x W x H): 21.2 x 16.5 x 24 cm •Gross weight: 1.091 kg •Nett weight: 0.564 kg •Tare weight: 0.527 kg•GTIN: 1 48 95229 10059 3*Actual results may vary。
api使用流程
api使用流程API(应用程序接口)使用流程通常涉及以下步骤:1. 了解API:首先,你需要了解你要使用的API是什么,它的功能是什么,以及它提供哪些资源。
这通常可以通过查看API的文档或开发者指南来完成。
2. 注册和获取API密钥:大多数API需要注册账号并获取API密钥,以便进行身份验证和跟踪请求。
3. 选择请求方法:根据API的功能,你可能需要使用GET、POST、PUT、DELETE等HTTP请求方法。
GET通常用于获取数据,POST用于创建新资源,PUT和DELETE用于更新或删除资源。
4. 构建请求URL:根据API的文档,构建正确的请求URL。
这通常包括API的基础URL、端点(endpoint)和任何必要的查询参数。
5. 发送请求:使用你选择的编程语言或工具,发送HTTP请求到API。
这通常涉及到设置请求头(如Content-Type和Authorization),并发送请求体(如果是POST或PUT请求)。
6. 处理响应:接收API的响应,并根据需要处理数据。
响应可能是JSON、XML或其他格式,具体取决于API的文档。
7. 错误处理和日志记录:对于任何请求,都应该处理可能出现的错误,并记录日志以供将来参考。
8. 遵守使用限制和速率限制:大多数API都有使用限制和速率限制,以确保服务的稳定性和防止滥用。
确保你的应用程序遵守这些限制。
9. 测试和调试:在将应用程序部署到生产环境之前,应该在测试环境中测试API的使用,并调试任何问题。
10. 维护和更新:随着时间的推移,API可能会更新或更改。
定期查看API 的文档,确保你的应用程序与最新的API版本保持一致。
以上是一个大致的流程,具体细节可能因不同的API而异。
务必仔细阅读API的文档,以获得最准确的信息。
FedEx Ship Manager API 标记交易集解析器开发者指南说明书
Ship Manager APITagged Transaction ParserDeveloper’s GuideTable of ContentsTABLE OF CONTENTS (2)FEDEX SHIP MANAGER API TAGGED TRANSACTION SET PARSER (3)I NTRODUCTION (3)T HE S TANDARD DLL I NTERFACE (3)Functions (3)T HE COM I NTERFACE (6)Names and IDs (6)Functions (6)Usage (8)FedEx Ship Manager APITagged Transaction Set ParserIntroductionThe Tagged Transaction Set Parser can be used to build Tagged Transaction Set (TTS) requests for passing to the FedEx Ship Manager API, and to parse the TTS responses returned from the API. It eliminates the need for the client program developer to be aware of the specific syntax rules of the TTS language. Standard DLL and COM interfaces are provided for Windows. Both reside in the same DLL, FDXParser.dll. The Solaris UNIX and LINUX interfaces reside in libctsparser.so and libctsparser.a.The Standard Library InterfaceFunctionsOS Compatibility: Windows, Solaris UNIX, and LINUX.Parser Creation and Destructionvoid* WINAPI createParser();Creates an instance of the parser. Returns a pointer to that instance that must be passed into the other functions to work on that instance.void* WINAPI copyParser(void *parser);Creates a new instance of the parser with state equal to that of the given one.void WINAPI destroyParser(void *parser);Destroys the given parser. Must be called for every parser created, whether with createParser() or copyParser().Building/Parsingvoid WINAPI build(void *parser, char *transBuffer, long bufferSize, long *transLength);Constructs and returns a TTS request containing the fields (tag/value pairs) that have been set with the set functions. Places up to bufferSize bytes of the constructed request in the buffer at transBuffer. Places the total length of the request into thelong variable at transLength. If that total length exceeds bufferSize, then the buffer was not large enough.bool WINAPI parse(void *parser, const char *transaction, long *errorOffset);Parses characters in the buffer at transaction until a syntax error has been detected or a null character has been encountered. If a syntax error is found, returns false and places the offset into the buffer at which the error was found into the long variable at transLength. Otherwise, returns true. Note that the bool return type is a one-byte integral type.void WINAPI clear(void *parser);Removes all fields, whether gotten from set calls or from parsing a response.Accessing Transaction Typevoid WINAPI setTransactionType(void *parser, const char *type);Sets the TTS transaction type to the null-terminated string pointed to by the second argument. Note that TTS transactiontypes are NOT integers. All transaction types defined as of this writing happen to contain only the characters ‘0’ through ‘9’(some with leading ‘0’s), but there is no guarantee that that pattern will be maintained. The transaction type must be set with this function. It cannot be set by setting tag “0”.void WINAPI getTransactionType(void *parser, char *typeBuffer, long bufferSize, long *typeLength);Gets the currently set TTS transaction type. If called after parsing a response, that will be the transaction type of the response. Places up to bufferSize bytes of the transaction type in the buffer at typeBuffer. Places the total length of the transaction type into the long variable at typeLength. If that total length exceeds bufferSize, then the buffer was not large enough. If thetransaction type is not set, places a single null character in the buffer and sets the variable at typeLength to zero.Setting and Getting Text Valuesvoid WINAPI setField(void *parser, const char *tag, const char *value);Associates the given null-terminated text value with the given null-terminated tag.void WINAPI setFieldInstance(void *parser, const char *tag, const char *value, short index);Associates the given null-terminated text value with the instance of the given null-terminated multi-occurrence tag having the specified zero-based index. One would set the third instance, for example, by passing 2 as the index.void WINAPI getField(void *parser, const char *tag, char *valueBuffer, long bufferSize, long *valueLength);Gets up to bufferSize characters of the text value associated with the given tag into valueBuffer, and sets the variable atvalueLength to the total length of the value. If that length exceeds bufferSize, then the buffer was too small.void WINAPI getFieldInstance(void *parser, const char *tag, char *valueBuffer, long bufferSize, long *valueLength, short instance);As getField, but gets the instance having the specified zero-based index.Setting and Getting Binary Valuesvoid WINAPI setBinaryField(void *parser, const char *tag, const char *value, long valueLength);Associates the number of bytes specified in valueLength at the address given in value with the given null-terminated tag. This function must be used with tags that require binary data, including “188”, “411”, “1005”, “1367” and “1471”.void WINAPI setBinaryFieldInstance(void *parser, const char *tag, const char *value, long valueLength, short instance);As setBinaryField, but sets the instance having the specified zero-based index.void WINAPI getBinaryField(void *parser, const char *tag, char *valueBuffer, long bufferSize, long *valueLength);Gets up to bufferSize bytes of the stream of bytes associated with the given tag into valueBuffer, and sets the variable atvalueLength to the total length of the value. If that length exceeds bufferSize, then the buffer was too small. Must be usedwith tags that require binary data.void WINAPI getBinaryFieldInstance(void *parser, const char *tag, char *valueBuffer, long bufferSize, long *valueLength, short instance);As getBinaryField, but gets the instance having the specified zero-based index.Checking for Existence of Fieldsbool WINAPI fieldExists(void *parser, const char *tag);Returns true if and only if the given field (tag/value pair) exists. Note that the bool return type is a one-byte integral type.bool WINAPI fieldInstanceExists(void *parser, const char *tag, short instance);Returns true if and only if the instance of the given field having the specified zero-based index exists. Note that the bool return type is a one-byte integral type.short WINAPI getInstanceCount(void *parser, const char *tag);Returns the number of instances of the given field.Enumerating All Tagsvoid WINAPI enumerateTags(void *parser);Initializes a mechanism that will allow a sequence of calls to getNextTag() to be made to retrieve all of the tags that have been set (or parsed from a response).bool WINAPI getNextTag(void *parser, char *tagBuffer, long bufferSize, long *tagLength);Gets the next tag from the enumeration created by enumerateTags(). Returns false when there are no more tags to be gotten. Places no more than bufferSize characters of the tag into the buffer at tagBuffer. If the tag length placed into the variable at tagLength exceeds bufferSize, then the buffer was not large enough. Note that the bool return type is a one-byte integral type.UsageTypically, you would first call createParser(), which returns a handle that must be passed into the other functions. You then call setTransactionType(), passing the transaction type code of the transaction that you wish to construct, such as “021” for a shipping transaction (for those familiar with Tagged Transaction Set syntax: the transaction type is NOT set by setting tag “0”, nor should tag “99” ever be set). Then you call setField() to set the value for each TTS tag. You can find the tags appropriate for each type of transaction, and the valid values for them, in the most recent FedEx Tagged Transaction Guide. When you have set all the desired tags, call build() to create a request to send to FedEx via the FedEx Ship Manager API. After you receive a response from the API, pass it into the parse() function. Now you can call the get functions as needed to retrieve the values for the tags that you are expecting to find in the response. Finally, you need to destroy the parser by passing its handle to destroyParser().You can create multiple instances of the parser and use them concurrently. Because the parser is threadsafe, you can even use a single instance of it within multiple threads concurrently.The COM InterfaceNames and IDsClass Name – CTSParserProgID – Parser.CTSParser.1VersionIndependentProgID – Parser.CTSParserInterface Name – ICTSParserFunctionsOS Compatibility: Windows ONLY.Building/ParsingHRESULT Build([out,retval] BSTR *transaction);Constructs and returns a TTS request containing the fields that have been set with the set functions.HRESULT: S_OKHRESULT Parse([in] BSTR transaction, [out, retval] long *errorOffset);Parses the Unicode string in transaction, making values available for getting. If a syntax error is found, returns the offset at which the error occurred. If succeeds, returns offset of last character in transaction plus 1.HRESULT: E_FAIL if syntax error found, S_OK otherwiseHRESULT Clear();Removes all fields, whether gotten from set calls or from parsing a response.HRESULT: S_OKAccessing Transaction TypeHRESULT SetTransactionType([in] BSTR transactionType);Sets the TTS transaction. Note that TTS transaction types are NOT integers. All transaction types defined as of this writing happen to contain only the characters ‘0’ through ‘9’ (some with leading ‘0’s), but there is no guarantee that that pattern will be maintained. The transaction type must be set with this function. It cannot be set by setting tag “0”.HRESULT: S_OKHRESULT GetTransactionType([out,retval] BSTR *transactionType);Gets the currently set TTS transaction type. If called after parsing a response, that will be the transaction type of the response.If the transaction type is not set, returns an empty BSTR.HRESULT: S_OKSetting and Getting Text ValuesHRESULT SetField([in] BSTR tag, [in] BSTR value);Associates the given text value with the given tag.HRESULT: S_OKHRESULT SetFieldInstance([in] BSTR tag, [in] short index, [in] BSTR value);Associates the given text value with the instance of the given multi-occurrence tag having the specified zero-based index.One would set the third instance, for example, by passing 2 as the index.HRESULT: S_OKHRESULT GetField([in] BSTR tag, [out,retval] BSTR *value);Gets the text value associated with the given tag into the BSTR at value.HRESULT: S_OKHRESULT GetFieldInstance([in] BSTR tag, [in] short index, [out,retval] BSTR *value);Gets the text value associated with the instance of the given tag having the specified zero-based index into the BSTR at value.HRESULT: S_OKSetting and Getting BinaryValuesHRESULT SetBinaryField([in] BSTR tag, [in] BSTR value);Associates the given binary data value with the given tag.HRESULT: S_OKHRESULT SetBinaryFieldInstance([in] BSTR tag, [in] short index, [in] BSTR value);Associates the given binary data value with the instance of the given multi-occurrence tag having the specified zero-based index. One would set the third instance, for example, by passing 2 as the index.HRESULT: S_OKHRESULT GetBinaryField([in] BSTR tag, [out,retval] BSTR *value);Gets the binary data value associated with the given tag into the BSTR at value.HRESULT: E_POINTER if pointer value is NULL, otherwise S_OKHRESULT GetBinaryFieldInstance([in] BSTR tag, [in] short index, [out,retval] BSTR *value);Gets the binary data value associated with the instance of the given tag having the specified zero-based index into the BSTR at value.HRESULT: E_POINTER if pointer value is NULL, otherwise S_OKChecking for Existence of FieldsHRESULT FieldExists([in] BSTR tag, [out,retval] VARIANT_BOOL *result);Returns result of true if and only if the given field (tag/value pair) exists (has been set with a set function or has been parsed out of a response with parse()).HRESULT: S_OKHRESULT FieldInstanceExists([in] BSTR tag, [in] short index, [out,retval] VARIANT_BOOL *result);Returns result of true if and only if the instance of the given field having the specified zero-based index exists.HRESULT: S_OKHRESULT GetInstanceCount([in] BSTR tag, [out,retval] short *count);Returns the number of existing instances of the given field.HRESULT: S_OKEnumerating All TagsHRESULT EnumerateTags();Initializes a mechanism that will allow a sequence of calls to getNextTag() to be made to retrieve all of the tags that havebeen set (or parsed from a response).HRESULT: S_OKHRESULT GetNextTag([out, retval] BSTR *tag);Gets the next tag from the enumeration created by enumerateTags(). Returns an empty BSTR when there are no more tags to be gotten.HRESULT: S_FALSE if no tags remain to be gotten, S_OK otherwiseUsageThe usage of the COM interface is functionally equivalent to that of the standard DLL. However, there are of course nocreation/destruction functions, and no parser handle to be passed into the other functions. An instance of the COM class is created and its methods called.Function names are capitalized.Text strings are Unicode, passed as BSTRs. However, the BSTRs passed into and out of the binary versions of the set and get functions must NOT contain Unicode text strings or be treated as such. They contain raw binary data. Any binary data that you wish to pass into one of these functions must NOT be converted by the process whereby each ASCII character (byte) becomes a two-byte Unicode character, but rather, loaded directly into a BSTR using whatever facility the language being used offers for that purpose.The COM interface supports extended error information.。
综合交易平台API开发简介
综合交易平台API开发简介大纲•Api概述•通用规则•交易业务•行情业务•参考资料•综合交易平台Api包括交易Api和行情Api•交易Api建立在Tcp协议上,实现了客户端和综合交易平台之间的双向异步通讯。
行情Api可以运行在Tcp或者在Udp协议上。
•下面把综合交易平台简称为Thost,交易Api简称为TraderApi ,行情Api简称为MdUserApi。
上述2种Api统称为Api概述- 通讯模式Api有3种通讯模式:•对话通讯模式:由客户端主动发起请求。
Thost收到请求、处理请求后,返回1条或者多条响应纪录。
例如登入、各项查询、报单、撤单等操作。
•私有通讯模式:由Thost主动向客户端发出的相关信息。
例如委托回报、成交回报、错单回报等•广播通讯模式:由Thost主动向所有客户端发出的公共信息,例如行情等。
•有3种方式订阅公有流和私有流enum THOST_TE_RESUME_TYPE{// 从当天的第一条记录开始接收数据流THOST_TERT_RESTART = 0,// 接收上次断线以后的数据流THOST_TERT_RESUME,// 接收本次登入以后的数据流THOST_TERT_QUICK};概述- 初始化过程MdUserApi的初始化过程比较简单,默认按照Quick的方式订阅公有流和私有流。
概述- 样例代码•TraderApi样例代码:testTraderApi–初始化,登入,确认结算结果,查询合约,查询资金,查询持仓,报单,收委托回报,撤单•MdUserApi样例代码:testMdUserApi–初始化,登入,订阅,收行情概述- 接口文件TraderApi接口文件:•ThostFtdcTraderApi.h:定义了请求接口CThostFtdcUserApi,事件处理接口CThostFtdcUserSpi。
•ThostFtdcUserApiStruct.h:定义了接口方法中用到的数据结构。
KDS API用户手册说明书
111-38-URM-009KDS APIUser ManualEPSON is a registered trademark and EPSON Exceed Your Vision is a registered logomark of Seiko Epson Corporation. All other product and brand names are trademarks and/or registered trademarks of their respective companies. Epson disclaims any and all rights in these marks. Copyright 2022 Seiko Epson Corporation.Table of Contents1. Introduction (3)2. API Interface (3)3. API and POS Parser (4)4. Typical Order Receipt (4)4.1. JSON Schema (5)4.1.1 JSON Schema detailed description (5)4.2. Sample JSON payload (8)4.3. Response errorcode list (9)5. Order Types (10)5.1. “new” Order POS Request (10)5.2. “new” Order KDS Response (11)5.3. “append” Order KDS Response (11)5.4. “append” Order KDS response (11)5.5. “void” Order POS request (12)5.6. “void” Order KDS response (12)5.7. “status” Order POS request (12)5.8. “status” Order KDS Response (14)6. Callback Registration (17)6.1. “callback” POS Request (17)6.2. “callback” KDS Response (18)7. Callback Notifications (19)7.1. “onenter” Callback (19)7.2. “onbump” Callback (22)7.3. “onpriority” Callback (22)7.4. “onrush” Callback (23)7.5. “onunbump” Callback (23)7.6. “onrecall” Callback (23)7.7. POS/Server Response (23)8. Status of Callback (24)8.1. POS Request (24)8.2. KDS Response (24)9. Callback behavior in multistation mode (25)1. IntroductionThe Epson KDS traditionally parsed incoming “print” jobs from a Point of Sale System (POS) to an Epson POS printer. Each POS system that the Epson KDS supports requires a “parser” module to understand the format of the print job. This parser module is configured using the KDS Configuration Utility and the format must be followed from then on.This method has advantages in that it is very easy to have a working KDS system out of the box for POS systems that are already supported. There is no integration with the POS required. For a POS that is not supported it is not difficult for Epson to create a new parser module – typically within 1-2 weeks.Some disadvantages are that the POS may not have the flexibility to deliver all types of orders the Epson KDS is capable of handling -. Ie. Void orders or order Appends. Also, as the data is a print job there is no mechanism to provide feedback to the POS about the status of any given order.This document outlines a specification for an “API” or Application Programming Interface to the Epson KDS system. The API provides an alternative direct way of communicating with the Epson KDS that not only allows data to be sent to the Epson KDS but also for KDS data to be returned. This allows for better control and feedback from the Epson KDS system.2. API InterfaceData is exchanged between the POS and KDS using a JSON format which is described later in this document. The communication between POS and KDS is done using HTTP port 80:http://192.168.192.168/cgi-bin/kdsapi/service.cgiHTTP POST (MAIN DELIVERY OPTION) – JSON data will be the body of HTTP POST request and response, usingContent-Type: application/json.3. API and POS ParserTraditionally the Epson KDS allows a parser to be configured in order for the KDS to understand the particular POS data. A POS parser can still be selected and used in conjunction with the KDS API to provide flexibility for customers who wish to have multiple inputs to the POS system.The POS parser would still listen to the traditional port inputs -> Serial, USB, or Ethernet. The KDS API service is listening on port 80.A POS parser needs to be selected when configuring the KDS. If a traditional POS parser is not required there will be a “KDS API” parser that can be selected that w ill allow the system to be configured.4. Typical Order ReceiptA typical order receipt (printout) will look like the following:Server WilliamTable 7 CK# 0012--------------------1 Steak Burger 31 Fries 3No salt1 Coke 3RegularNo iceIt can be broken down into the following basic fields:•Server Name•Table Number•Check Number•Item Qty•Item Description•Seat Number•Modifier(s)The Epson KDS is capable of showing other miscellaneous information within the order such as course info, order types, customer name, customer phone number, customer email etc. This is described elsewhere within this specification.4.1. JSON SchemaThe interface to the KDS API will be based on the following JSON packet schema: {“seq” : number,“type” : “string”,“server” : “string”,“table” : “string”,“check” : “string”,“cust_name” : “string”,“cust_phone” : “string”,“cust_email” : “string”,“itemlist” :[{“itemid” : number,“item” : “string”,“header” : “string”,“label” :“string”,“qty” : number,“seat” : number,“modifierlist” :[{“modifier” : “string”,“colour” : “string”}]}]}4.1.1 JSON Schema detailed description•“seq”– JSON payload sequence number. Should be incremented by 1 for every API call to the Epson KDS. Range 0 – 1048575. Once the upper limit is reached it should roll back to 0.•“type”– Order type. Can be “new”, “void”, “append”, “status”, “callback”. Each order type is described later in this document.•“server”– Server name as it would be displayed in the KDS order header. It could be replaced with other text such as “Pickup”, or “Delivery”. While 0-40 ASCII characters are accepted the server name should be kept small so as to bedisplayed fully in the order header.•“table”– Table number as displayed in the KDS order header. 0-20 ASCII characters are accepted however the table number should be kept small so as to be displayed fully in the order header.•“check”– Check number for the order as displayed in the KDS order header. This check number should be unique for every new order entered into the system. 0-20 ASCII characters are accepted however the check number should be kept small so as to be displayed fully in the order header.•“cust_name”– Optional field indicating customer name. 0-40 ASCII characters are accepted.•“cust_phone”– Optional field indicating customer phone number. Must be in one of the following formats:(555)555-5555555-555-55555555555555•“cust_email”– Optional field indicating customer e-mail address. 0-40 ASCII characters are accepted.The “cust_name”, “cust_phone”, “cust_email” are all optional and can be included or not in any combination.Only 1 of the following 3 fields (item, header, label) should be sent: •“item”– Description of the item as displayed on the Epson KDS. Eg.“Hamburger”. 0-40 ASCII characters.•“header”– Any information that should be displayed at the top of the order (below the KDS Order Header). Eg. “Dine-In, Take-Out. There can be multiple header fields but each should correspond to its own itemid. 0-40 ASCII characters.•“label”– Any miscellaneous information to be displayed within the order. Eg.“Course 1”. 0-40 ASCII characters.•“itemid” –The unique identifier assigned to an item by the POS. The itemid needs to be unique within an order and is used by the KDS to easily associate to an item. The best practice is for the first item in the list to have an id of 1 and then increase for every item. Numbers 1-99 are supported.The following fields (qty and seat) are optional:•“qty”– Quantity of the item as displayed on the KDS. Numbers 1-99 are supported.•“seat”– Seat number for the respective item. This field is optional. If it is not there then no seat # will be displayed. Numbers 1-99 are supported.If “qty” field is sent and “seat” is not then the Epson KDS should be configured to show Quantity.If “seat” field is sent and “qty” is not then the Epson KDS should be configured to show Seat.If both “qty” and “seat” fields are sent then the Epson KDS should be configured to show Seat. The Quantity will be prepended to the Item Description.If neither “qty” or “seat” fields are sent then the Epson KDS will only show the item description regardless of the configuration.•“modifier” – Description of the modifier as displayed on the Epson KDS. 0-40 ASCII characters.•“colour” - can be “normal” (default) or “alert” to show the text in the alert color.4.2. Sample JSON payload{“seq” : 1,“type” : “new”,“server” : “William”,“table” : “7”,“check” : “12”,“cust_name” : “Robert”,“cust_phone” : “5555555555”,“cust_email” : “*****************”,“itemlist” :[{“itemid” : 1,“qty” : 1,“seat” : “3”,“item” : “Steak Burger”},{“itemid” : 2,“qty” : 1,“seat” : “3”,“item” : “Fries”,“modifierlist” :[{“modifier” : “No salt”,“colour” : “alert”}]},{“itemid” : 3,“qty” : 1,“seat” : “3”,“item” : “Coke”,“modifierlist” :[{“modifier” : “Regular”},{“modifier” : “No ice”}]}]}4.3. Response errorcode listThe KDS will send back a response indicating success or failure. If success, {“errorcode” : 0,“description” : “success”}If failure, an errorcode in the below list will be returned:• 1 – json syntax error• 2 – callback entry does not exist• 3 – no callbacks are registered• 4 – order does not exist• 5 –invalid ‘callbackid’• 6 –invalid callback ‘trigger’•7 –invalid callback ‘url’•8 – reached maximum order number•9 – invalid json parameter•10 – missing json parameter•101 – data format error•104 – timeout, no response from kds5. Order Types5.1. “new” Order POS RequestRequest for a brand new order to be sent to the KDS:{“seq” : 1,“type” : “new”,“server” : “William”,“table” : “7”,“check” : “12”,“cust_name” : “Robert”,“cust_phone” : “5555555555”,“cust_email” : “*****************”,“itemlist” :[{“itemid” : 1, Unique positive integer number within the order context“header” : “Dine-In” Will be displayed only once on screen},{“itemid” : 2,“header” : “Address: 185 Renfrew Dr.”},{“itemid” : 3,“label” : “--- Course 1 ---” ## will be displayed as a special notselectable item on the screenmultiple times},{“itemid” : 4,“qty” : 1,“seat” : “3”,“item” : “Steak Burger”},{“itemid” : 5,“qty” : 1,“seat” : “3”,“item” : “Fries”,“modifierlist” :[{ “modifier” : “No salt”, “colour” : “alert” }]},{“itemid” : 6,“label” : “--- Course 2 ---”},{“itemid” : 7,“qty” : 1,“seat” : “3”,“item” : “Coke”,“modifierlist” :[{ “modifier” : “Regular” },{ “modifier” : “No ice” }]}]}5.2. “new” Order KDS ResponseKDS will send back a response indicating success or failure. Response errorcodes are listed in Section 4.3.5.3. “append” Order KDS ResponseRequest for an addition to be sent to an already existing order. The check number should match a previous order:{“seq” : 2,“type” : “append”,“server” : “William”,“table” : “7”,“check” : “12”“itemlist” :[{“itemid” : 8, Unique positive number within an order“qty” : 1,“seat” : “2”,“item” : “Classic Burger”,“modifierlist” :[{ “modifier” : “No pickle” }]}]}The difference between “new” and “append” order is that appended orders will show the quantity column in a different background color on the KDS display to indicate the order was appended.5.4. “append” Order KDS responseKDS will send back a response indicating success or failure. Response errorcodes are listed in Section 4.3.5.5. “void” Order POS requestVoiding the order will be facilitated with ‘itemid’ field to un-ambiguously find the exact item within the order.When voiding “Fries” and “Coke” from above order, POS will send{“seq” : 3,“type” : “void”,“server” : “William”,“table” : “7”,“check” : “12”,“itemlist” :[{ “itemid” : 5 }, Fries{ “itemid” : 6 }Coke]}To void the whole order, POS will send request without item list.{“seq” : 3,“type” : “void”,“server” : “William”,“table” : “7”,“check” : “12”}5.6. “void” Order KDS responseKDS will send back a response indicating success or failure. Response errorcodes are listed in Section 4.3.5.7. “status” Order POS requestStatus of particular order(s) can be obtained from the KDS system by sending a status order request.5.7.1 Single OrderFor a single order,{“seq” : 4,“type” : “status”,“statusof” : “ordersonly”,“orderlist” :[{“table” : “7”,“check” : “12”}]}5.7.2 Multiple OrdersFor multiple orders, orderlist will contain multiple check numbers: {“seq” : 5,“type” : “status”,“statusof” : “ordersonly”,“orderlist” :[{“table” : “Table 7”,“check” : “12”},{“table” : “Table 8”,“check” : “14”},{“table” : “Table 9”,“check” : “15”}]}If orderslist is missing, then it implies all active orders and they will all be returned.The parameter statusof can be:•“ordersonly”– for the status of orders, and the counts of active, bumped, voided items.•“ordersanditems”– same as “ordersonly” (ie. order status and item counts), plus the status of all their items.5.8. “status” Order KDS ResponseThere are some extra fields in the Status Response:state of order can be:•“active”– still cooking. This means, at least one item is “active”.•“bumped”– the order has been completely bumped.•“voided”– the order has been completely voidedSimilarly, the state of item can be:•“active”– still cooking•“bumped”– the item has been bumped•“voided”– the item has been voidedFor “active” orders only, timeout of order will be one of•“normal”– normal timer•“priority”– the timer reached Priority Time•“rush”– the timer reached Rush TimeIf the order is “active”, then elapsedtime is the number of second since the order was created, and it would have different value when the next POS request is made. If the order is “bumped” or “voided”, then the elapsedtime is the number of second it took for the order to be bumped or voided, and it would remain the same for subsequent POS requests.There will be 4 item counts:•“activeitemcount”– the number of active items•“bumpeditemcount”– the number of bumped items•“voideditemcount”– the number of voided items•“totalitemcount”– the number of items in total, which is sum of above counts.5.8.1 “ordersonly” Status ResponseIf the request was “ordersonly”, then KDS will return order status and item counts.{“errorcode” : 0,“description” : “success”,“orderlist” :[{“check” : “15”,“table” : “Table 9”,“server” : “William”,“cust_name” : “Robert”,“cust_phone” : “5555555555”,“cust_email” : “*****************”,“state” : “active”,“elapsedtime” : 120,“timeout” : “normal”,“activeitemcount” : 2,“bumpeditemcount” : 1,“voideditemcount” : 1,“totalitemcount” : 4}]}5.8.2 “ordersanditems” Status ResponseIf the request was “ordersanditems”, then KDS will return order status, item counts, and item status.{“errorcode” : 0,“description” : “success”,“orderlist” :[{“check” : “15”,“table” : “Table 9”,“server” : “William”,“cust_name” : “Robert”,“cust_phone” : “5555555555”,“cust_email” : “*****************”,“state” : “active”,“elapsedtime” : 120,“timeout” : “normal”,“activeitemcount” : 2,“bumpeditemcount” : 1,“voideditemcount” : 1,“totalitemcount” : 4“itemlist” :[{“itemid” : 2,“state” : “active”,“qty” : 1,“seat” : “2”,“item” : “Classic Burger”,“modifierlist” :[{ “modifier” : “No pickle” }]},{“itemid” : 3,“state” : “bumped”“qty” : 1,“seat” : “3”,“item” : “Fries”,},{“itemid” : 4,“state” : “voided”“qty” : 1,“seat” : “4”,“item” : “Coke”,},{“itemid” : 5,“state” : “active”“qty” : 1,“seat” : “1”,“item” : “Classic Burger”,}]}]}5.8.3 Status Error ResponseKDS will send back a response indicating success or failure. Response errorcodes are listed in Section 4.3.6. Callback RegistrationCallbacks can be registered to have the KDS send information to the server for various events:6.1. “callback” POS Request{“seq” : 11,“type” : “callback”,“callbackid” : 1,“action” : “set”,“url” :“http://192.168.1.100:8080/kdsapi/callback_listener.cgi”,“trigger” : “onbump”}where•url can be standard HTTP POST, likeo“http://192.168.1.100:8080/kdsapi/callback_listener.cgi”•callbackid is unique identifier assigned to callback entry by POS. This identifier will be used to delete the entry later. Should start at 1 and increment by 1 for each new call back registration.•action can beo“set” – to create or overwrite a callback entry,o“clear” – to delete the entry,•trigger is the condition that causes KDS to call back. It can beo“onenter”– KDS will return both check, table and itemid(s) when an order is entered.o“onbump”– KDS will return both check, table and itemid(s) when a bump takes place.o“onpriority”– when the timer of order reaches Priority Time, KDS will return check, table.o“onrush”– when the timer of order reaches Rush Time, KDS will return check, table.o“onunbump” –KDS will return both check, table and itemid when an item is unbumped.o“onrecall” –KDS will return both check, table when an order recall takes place.6.2. “callback” KDS ResponseKDS will send back a response indicating success or failure. Response errorcodes are listed in Section 4.3.7. Callback Notifications7.1. “onenter” CallbackThe “new”, “append”, “void” requests will all generate “onenter” callback, with type “new”,”append”,”void” separately. If the trigger is “onenter” then the KDS will send the original print job to the callback URL in the following JSON format. Optional “cust_name”, “cust_phone” and “cust_name” will be included if these fields were included in “new” order request.•Callback for “new”{"type" : "new","check" : "0025","table" : "Table 15","server" : "Mark","cust_name" : "Robert",“cust_phone" : "5555555555","cust_email":"*****************","itemlist" :[{"itemid" : 1,"qty" : 1,"seat" : 3,"item" : "Meat Lover","modifierlist" :[{"modifier" : "> Olives","color" : "alert"},{"modifier" : "> NO Mushrooms"}]},{"itemid" : 2,"label" : "- Also sent to:Station 1"},{"itemid" : 3,"label" : "- Also sent to:Pizza Oven"}]}•Callback for “append”{"type" : "append","check" : "0025","table" : "Table 15","server" : "Mark",”"cust_name" : "Robert","cust_phone" : "5555555555","cust_email":"*****************",“itemlist” :[{“itemid” : 8,“qty” : 1,“seat” : “2”,“item” : “Classic Burger”,“modifierlist” :[{ “modifier” : “No pickle” }]}]}•Callback for “void”Callback generated by void item 1 of above example will be:{"type" : "void","check" : "0025","table" : "Table 15","server" : "Mark",”"cust_name" : "Robert","cust_phone" : "5555555555","cust_email":"*****************",“itemlist” :[{"itemid" : 1,"qty" : 1,"seat" : 3,"item" : "Meat Lover","modifierlist" :[{"modifier" : "> Olives","color" : "alert"},{"modifier" : "> NO Mushrooms"}]}]}Callback generated by void the whole order will not contain any item: {"type" : "void","check" : "0025","table" : "Table 15","server" : "Mark",”"cust_name" : "Robert","cust_phone" : "5555555555","cust_email" : *****************}If the trigger is “onbump” and an order is bumped, then KDS will send check, table of the bumped order.Optional “cust_name”, “cust_phone” and “cust_name” will be included if these fields were included in “new” order request.{“type” : “callback”,“callbackid” : 1,“trigger” : “onbump”,“check” : “12”,“table” : “Table 7”“cust_name” : “Robert”,“cust_phone” : “5555555555”,“cust_email”:“*****************”}If the trigger is “onbump” and an item is bumped (on SCROLL mode), then KDS will send the same content as order bump, together with itemid, itemname and modifiers for this item.{“type” : “callback”,“callbackid” : 1,“trigger” : “onbump”,“check” : “12”,“table” : “Table 7”,“cust_name” : “Robert”,“cust_phone” : “5555555555”,“cust_email” : “*****************”,“itemid” : 8“item” : “Classic Burger”,“modifierlist” :[{ “modifier” : “No pickle” }]}7.3. “onpriority” CallbackIf the trigger is “onpriority” or “onrush”, and an order becomes Priority or Rush, respectively, then KDS will send check, table of that order.{“type” : “callback”,“callbackid” : 2,“trigger” : “onpriority”,“check” : “12”,“table” : “Table 7”}{“type” : “callback”,“callbackid” : 3,“trigger” : “onrush”,“check” : “12”,“table” : “Table 7”}7.5. “onunbump” CallbackIf the trigger is “on un bump” and an order item is unbumped (on SCROLL mode or directly unbump from touch screen), then KDS will send check, table of the bumped order and the bumped item id, itemname and modifiers.{“type” : “callback”,“callback id” : 1,“trigger” : “onunbump”,“check” : “12”,“table” : “Table 7”,“cust_name” : “Robert”,“cust_phone” : “5555555555”,“cust_email” : “*****************”,“itemid” : 8,“item” : “Classic Burger”,“modifierlist” :[{ “modifier” : “No pickle” }]}7.6. “onrecall” CallbackIf the trigger is “on recall” and an order is recalled, then KDS will send check, table of the bumped order.{“type” : “callback”,“callback id” : 1,“trigger” : “onrecall”,“check” : “12”,“table” : “Table 7”,“cust_name” : “Robert”,“cust_phone” : “5555555555”,“cust_email” : “*****************”}7.7. POS/Server ResponseThe Epson KDS ignores the response from the POS or Server.8. Status of Callback8.1. POS Request{“type” : “status”,“seg” : 12,“statusof” : “callback”,“callbacklist” :[{ “callbackid” : 1 },{ “callbackid” : 2 },{ “callbackid” : 3 }]}If callbacklist is missing or empty, then it implies all existing callbacks.8.2. KDS Response{“errorcode” : 0,“description” : “success”,“callbacklist” :[{“callbackid” : 1,“url” :“http://192.168.1.100:8080/kdsapi/callback_listener.cgi”,“trigger” : “onbump”},{“callbackid” : 2,“url” :“http://192.168.1.100:8080/kdsapi/callback_listener1.cgi”,“trigger” : “onpriority”}{“callbackid” : 3,“url” : “”,“trigger” : “”}]}If there is an error, then errorcode will be non-zero with appropriate description. List of error conditions are in Section 4.3.9. Callback behavior in multistation modeIn single station mode the behavior here is simple: when a certain action occurs, and if the corresponding callback is registered, then the KDS station will send the callback to the registered URL.For multi-station mode, each KDS device will generate callbacks for actions related to its own display. However, the Master device (generally a TM-i printer) can generate callbacks for itself, as well as for certain callbacks on behalf of other displays too. This behavior is described in the table below:This page is purposely left blank.。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
船讯网API
功能说明文档
2012-9-24
船讯网是国内最专业的船舶位置监控网站,提供免费的全球船位追踪服务。
但随着市场变化和用户需要,越来越多客户希望能在自己的业务系统或者网站中集成船位追踪模块,达到船队安全管理和有效控制物流环节的目的。
船讯网API旨在解决这一问题。
船讯网API功能说明文档
1 API 是什么?
1.1API定义
API是Application Program Interface的缩写,即应用程序接口。
船讯网API是一组JavaScript函数,使用这些函数您可以回避专业而复杂的GIS技术而简单便捷地把船讯网的海图和船位服务嵌入到您自己的业务系统或网站中,在电子海图背景上展现船位并进行管理,甚至是与您自己的业务数据相融合。
1.2船讯网API的本质
船讯网API的本质是提供了一套如何获取船舶AIS数据的方法和一套如何在WebGis 上展示船舶的方法。
用户可以只获取船舶AIS数据,使用自己的方法显示船舶;也可以使用船讯网提供的WebGis方法展示船舶。
1.3船讯网API功能
(1)一套获取船舶AIS数据的接口和方法
- 获取单条或多条船舶最新AIS数据;
- 获取指定区域内的所有船舶最新AIS数据;
- 获取某船舶的历史轨迹;
- 通过船舶类型等属性查询船舶。
(2)一套基于WebGIS的展示船舶动态的方法
- 提供基于电子海图/地图的船位显示功能;
- 支持电子海图、谷歌地图、谷歌卫星图三种背景图的选择(使用海图需向海图出版商支付版权费用);
- 区域监控,提供一个或多个区域的全部船舶监控服务,支持多条件筛选;
- 船队监控,提供一组船舶在全球范围内的船位监控服务。
支持任意更改船舶、船
队分组,船舶自定义颜色显示等;
- 全球船舶搜索,支持通过船名、呼号、MMSI、IMO等条件搜索,结果返回在电子海图上;
- 支持在API中添加超链接,添加自有业务信息等;
- 支持船舶AIS信息显示,支持通过船名、呼号、IMO编号、区域范围等条件获取AIS原始数据;
- 支持查看船舶30天历史轨迹;
- 支持在海图/地图上添加文字、图片、线型等标注信息;
2 典型应用
综合多种用户的使用需求,我们开发了两种典型的应用。
使用这两种应用,原则上用户无需任何的开发,只需要将应用源码嵌入到自己的网站中就可以实现船位监控的目的。
2.1区域监控应用
区域监控应用适合港口、码头、口岸、拖轮、海事、引航等港口企事业单位,实现在海图上监控本地区船舶动态的需要。
船讯网则按照用户的需要,提供相应区域的AIS数据。
区域监控主要能够实现以下功能。
(1)搜索、定位全球范围内的任意船舶
除查询本区域的船舶位置之外,还可以查询全球范围内的船舶位置。
用户只要知道船名、呼号、MMSI、IMO编号中的任意一种,即可获得该船位的位置,如下图所示。
图1 全球范围内搜索船舶
图2 搜索结果展示
(2)显示本地区的所有船舶
全球范围内的船舶需要查询才能显示,但是本地区的船舶,不需要查询就可以全部显示,如下图所示。
图3 显示本地区船舶
(3)筛选符合条件的船舶
由于在一个港区船舶的数量众多,用户可以设定条件,只显示本港区的符合某一条件的船舶,如下图所示。
图4 筛选显示条件
(4)查看船舶的历史轨迹
无论船舶是否在本区域内,都可以查询任意船舶的历史轨迹,如下图所示。
图5 回放船舶历史轨迹
(5)区域监控应用样例
2.2船队监控的应用
船队监控的应用主要适合船东、船舶管理、货运代理、物流服务等用户,需要监控某些特定的船,或者监控一些数量的不特定的船。
船讯网按照用户的需要,开发完成船队监控
应用,主要提供以下功能。
(1)搜索、定位全球范围内的任意船舶
船队监控应用不仅可以监控本船队的船舶位置,还可以查询全球范围内的船舶位置。
你只要知道船名、呼号、MMSI、IMO编号中的任意一种,即可获得该船位的位置,如下图所示。
图6 查询全球船位
图7 船位查询显示结果
(2)船队分组、高亮、自定义颜色、自定义船名
用户可以根据自己的业务类型,进行对船队进行分组、高亮和自定义颜色、自定义船名等,如下图所示。
图8 船舶自定义分组
图9 船舶分组显示效果
(3)自由更改船队中的船舶
船讯网API中提供接口,用户可以根据自己的业务变化,随时添加、删除、变更船舶和分组。
(4)查询任意船轨迹
API提供数据请求接口,可调取任意船舶的30天的历史轨迹。
图10 船舶轨迹显示
(5)船队监控应用样例
3 自定义应用
如果上述两种典型应用仍旧不能满足您的需求,您可以使用自定义应用模式。
自定义模式,可以实现以下功能。
(1)选择默认显示的地图中心点和缩放比例
在船讯网的API中,我们提供三种背景显示:海图,Google地图,Google卫星图。
我们同时把地图的比例尺分成了18个等级,用户可以根据自定的需要自行设定显示的范围,如下图所示。
图11 海图/地图显示设置
(2)查询全球船舶位置
用户通过船名、呼号、MMSI、IMO编号等关键字,获取全球范围内的任意船舶的实施位置。
图12 查询全球船舶位置
(3)自由的获取船舶AIS数据
- 单船AIS数据获取,每次获取单条船的AIS数据;
- 船队AIS数据获取,每次获取一组船的AIS数据;
- 区域AIS数据获取,每次获取一个区域范围内的AIS数据;
(4)船队监控和区域监控组合使用
用户可以根据需要,将船队监控和区域监控相结合,实现对监控区域内船舶进行分组、高亮、自定义显示。
图13 船队监控与区域监控相结合
4 常见问题FAQ
(1) 我获得的船位是实时的吗?
- 船讯网API提供的船位是从部署在港口附近的AIS基站中获取的。
由于AIS基站的覆盖距离有限,一般只能接收到港口附近30-50海里的数据。
但是由于船讯网的
基站覆盖比较密集,已经完全覆盖了中国沿海的所有区域。
- 船讯网保证,用户通过API获得的船位与船讯网网站中的数据实时性是一致的。
(2) API 是如何收费的?
- AIS数据部分,按照船舶的数量收费;
- 海图费用,向海图出版商支付版权费用(不选择海图,免付费)
(3) 如何更改船队中的船舶
在API中,船队的船舶是以高亮的方式提供的。
API中已经预留了程序接口,用户可以根据自己的需要随时更改这些船舶。
(4) 如何更改区域
在API中,支持多个区域获取数据。
但是区域的更改需要通过船讯网协调更改。
(5) 如何监控船队船舶周围的其他船舶
API中接口,支持以本船为中心,获取本船周围的其他船舶数据,并显示出来。
(6) 如何自定义船舶信息框
在API中,船舶信息框是通过javascript(一种计算机语言)控制的,这个信息可以完全由用户自定义开发。
(7) 如何设定到港提醒
在API中是没有到港提醒功能的,由于船讯网已经将船舶的原始数据通过API提供给了客户,可以自己根据原始数据开发到港提醒。
根据船舶的地理位置信息,与设定目的地范围对比,符合条件的,给予提醒。