Skip to content

Latest commit

 

History

History
99 lines (77 loc) · 3.32 KB

File metadata and controls

99 lines (77 loc) · 3.32 KB

Document Deletion Event onCrmDocumentGeneratorDocumentDelete

{% note tip "" %}

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.

{% endnote %}

Scope: crm

Who can subscribe: any user

The event ONCRMDOCUMENTGENERATORDOCUMENTDELETE will be triggered upon the deletion of a document.

{% note info "" %}

Events will not be sent to the application until the installation is complete. Check the application installation

{% endnote %}

What the Handler Receives

Data is transmitted as a POST request {.b24-info}

{
    "event": "ONCRMDOCUMENTGENERATORDOCUMENTDELETE",
    "event_handler_id": "825",
    "data": {
        "FIELDS": {
            "ID": "1869",
            "ENTITY_TYPE_ID": "1",
            "ENTITY_ID": "1000993"
        }
    },
    "ts": "1749042237",
    "auth": {
        "access_token": "s6p6eclrvim6da22ft9ch94ekreb52lv",
        "expires_in": "3600",
        "scope": "crm, documentgenerator",
        "domain": "some-domain.bitrix24.com",
        "server_endpoint": "https://oauth.bitrix.info/rest/",
        "status": "L",
        "client_endpoint": "https://some-domain.bitrix24.com/rest/",
        "member_id": "a223c6b3710f85df22e9377d6c4f7553",
        "refresh_token": "4s386p3q0tr8dy89xvmt96234v3dljg8",
        "application_token": "51856fefc120afa4b628cc82d3935cce"
    }
}

#| || parameter type | Description || || event string | Symbolic code of the event.

In this case — ONCRMDOCUMENTGENERATORDOCUMENTDELETE || || event_handler_id integer | Identifier of the event handler || || data object | Object containing information about the deleted document.

Contains the key FIELDS || || data.FIELDS object | Object containing information about the fields of the deleted document.

The structure is described below || || ts timestamp | Date and time of the event sent from the event queue || || auth object | Object containing authorization parameters and information about the account where the event occurred.

The structure is described below || |#

Parameter FIELDS {#fields}

#| || parameter type | Description || || ID integer | Identifier of the deleted document || || ENTITY_TYPE_ID integer | Identifier of the object type to which the document belonged, for example 1 — lead || || ENTITY_ID integer | Identifier of the element to which the document was attached || |#

Parameter auth {#auth}

{% include notitle Auth parameters in events %}

Continue Learning