logo
Use this method to delete a single document from the extension document store.

Field
Type
Required
Description
method
String
Yes
"extensionDeleteDoc"
app_id
String
Conditional
The app the document belongs to. If omitted, the API's own chat id is used.
doc_type
String
Yes
Category of the document.
doc_id
String
Yes
Identifier of the document to delete.
ref
String
Optional
Correlation id, echoed in the response.

Response

extensionDeleteDocResponse

Field
Type
Returned
Description
method
String
Yes
"extensionDeleteDocResponse"
ack
Number
Yes
Number of documents deleted. 0 means nothing matched.
doc_id
String
Yes
Echoed from the request.
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 β€” extensionDeleteDoc

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

Example

Request

json
{ "method": "extensionDeleteDoc", "app_id": "90090684293000559", "doc_type": "cart", "doc_id": "user_9001", "ref": "111111151" }

Response

json
{ "method": "extensionDeleteDocResponse", "ack": 1, "doc_id": "user_9001", "doc_type": "cart", "app_id": "90090684293000559", "ref": "111111151" }

Powered by Notaku