API overview

Updated at:

The Java software development kit (SDK) provides a set of service APIs. This document lists these APIs and outlines their functions.

Note:

  • Desensitize all data transmitted through API operations. Ensure that the transmitted data does not contain any personal information.

Robot management

API

Description

CreateRobot

Creates a robot instance. Call this operation to create a robot and get a RobotCode for each new customer.

UpdateRobot

Updates the configuration information of a robot.

DeleteRobot

Deletes a specified robot. After a robot is deleted, all related data, such as its configuration and knowledge, is also deleted. This data cannot be recovered.

RecognizeMessage

The core Q&A API operation for a robot. It inputs a user question and calls a specified robot to get an acknowledgement.

RecognizeMessageForTest

The Q&A test API operation for a robot. It simulates a user question to test the acknowledgement.

Industry package management

API

Description

ListIndustryPackages

Queries all knowledge packages that the system provides for developers. These packages include general packages and industry packages from retailbot, and custom industry packages from Independent Software Vendors (ISVs).

GetPackageVersion

Queries the list of valid versions for a single, specified industry package.

ListPackageVersions

Performs a batch query for the lists of valid versions for multiple industry packages.

ListPackageKnowledges

Queries the list of knowledge contained in a specified version of a specified package.

ListSubscriptionByPackage

Queries the list of subscription relationships for robots that have subscribed to a specified version of a specified industry package.

ListSubscriptionByRobot

Queries the list of industry package subscription relationships for a specified robot based on its RobotCode.

InstallPackage

Subscribes a specified robot to a specified industry package.

UninstallPackage

Unsubscribes a specified robot from a specified industry package. After you unsubscribe, you can no longer query the knowledge (including answers) related to that package for the robot. If you subscribe to the package again, the original answers are not recovered.

UpgradePackage

Upgrades a specified industry package for a specified robot from version A to version B. After the upgrade, answers for existing scenarios are automatically retained. Answers for scenarios that are not included in the new version are automatically deleted.

Knowledge management

API

Description

ListSubscribedPackageKnowledges

Queries the list of knowledge in the knowledge packages that a merchant has subscribed to.

GetKnowledge

Queries the details of specified knowledge.

EnableScene

Enables a specified scenario for a specified robot. After a scenario is enabled, it can be located in the real-time Q&A service.

DisableScene

Disables a specified scenario for a specified robot. After a scenario is disabled, it cannot be located in the real-time Q&A service.

Answer management

API

Description

AddSolution

Creates a new answer for specified knowledge.

UpdateSolution

Updates the content of an existing answer.

GetSolution

Queries the details of a specified answer.

DeleteSolution

Deletes a specified answer. The answer cannot be recovered after deletion, and you can no longer query for information about it.

Knowledge category tree management

API

Description

ListCategories

Gets the complete knowledge category tree. This is used for features such as displaying knowledge base scenarios.

Dialogue data management

API

Description

SyncRobotMessage

Streams complete human-machine dialogue logs back to retailbot.

SyncMessage

Streams complete human-to-human dialogue logs back to retailbot.

UploadLabelData

Uploads labeled corpus data to train the AI Q&A model.