Cancel Delivery Order CANCEL_DELIVERY_REQUEST_URL
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Bitrix24 sends an HTTP POST request to the address from the CANCEL_DELIVERY_REQUEST_URL parameter passed when creating a delivery handler using sale.delivery.handler.add. The external system must cancel the delivery order and return the result in JSON format.
Request Parameters
|
Name |
Description |
|
DELIVERY_ID |
Identifier of the delivery service. You can obtain the identifiers of delivery services using the method sale.delivery.getlist |
|
REQUEST_ID |
Identifier of the transport request. The identifier is assigned by the external system in response to creating a delivery order |
Example Request
{
"DELIVERY_ID": 694,
"REQUEST_ID": "4757aca4931a4f029f49c0db4374d13d"
}
Response Parameters
The handler must return HTTP status 200 and a JSON object.
Required parameters are marked with *
|
Name |
Description |
|
SUCCESS* |
Indicator of the success of the delivery order cancellation. Possible values:
|
|
REASON |
Reason for the error. Provided in case of an unsuccessful attempt to cancel the delivery order (detailed description is provided below) |
REASON Object
|
Name |
Description |
|
TEXT* |
Description of the error |
Example Response with Successful Delivery Order Cancellation
{
"SUCCESS": "Y"
}
Example Response with Delivery Order Cancellation Error
{
"SUCCESS": "N",
"REASON": {
"TEXT": "The order has been already delivered"
}
}
Error Handling
If SUCCESS is absent or differs from Y, Bitrix24 considers the order cancellation unsuccessful. Provide an explanation in REASON.TEXT. If REASON.TEXT is absent or empty, Bitrix24 uses the standard error message.