logo
Use this method to list every document of a given type for an app.

Field
Type
Required
Description
method
String
Yes
"extensionListDoc"
app_id
String
Conditional
The app whose documents are listed. If omitted, the API's own chat id is used.
doc_type
String
Yes
Category of documents to list.
ref
String
Optional
Correlation id, echoed in the response.
Note there is no doc_id β€” this returns all documents of the type.

Response

extensionListDocResponse

Field
Type
Returned
Description
method
String
Yes
"extensionListDocResponse"
data
Array of String
Yes
The matching document bodies. Empty when nothing matched.
doc_type
String
Yes
Echoed from the request.
app_id
String
Yes
Echoed from the request.
ref
String
Optional
Echoed from the request.

SDK Mapping β€” extensionListDoc

SDK
Response Callback
Java
onExtensionDocResponse(ExtensionDocResponse response) β€” type is list
JavaScript
onExtensionDocResponse(response) β€” type is list
Python
on_extension_doc_response(self, response) β€” type is list

Example

Request

json
{ "method": "extensionListDoc", "app_id": "90090684293000559", "doc_type": "cart", "ref": "111111150" }

Response

json
{ "method": "extensionListDocResponse", "data": [ "{\"items\":[{\"sku\":\"A12\",\"qty\":2}]}", "{\"items\":[{\"sku\":\"B77\",\"qty\":1}]}" ], "doc_type": "cart", "app_id": "90090684293000559", "ref": "111111150" }