Cancel Delivery Order CANCEL_DELIVERY_REQUEST_URL

The request is sent to the address specified in CANCEL_DELIVERY_REQUEST_URL when creating a delivery handler using the method sale.delivery.handler.add.

Request Parameters

Name
type

Description

DELIVERY_ID
sale_delivery_service.ID

Identifier of the delivery service.

You can obtain the identifiers of delivery services using the method sale.delivery.getlist

REQUEST_ID
string

Identifier of the transport request.

The identifier is assigned by the external system in response to the webhook for creating a delivery order (for more details, see the webhook description Create Delivery Request CREATE_DELIVERY_REQUEST_URL)

Example Request

{
            "DELIVERY_ID": 694,
            "REQUEST_ID": "4757aca4931a4f029f49c0db4374d13d"
        }
        

Response Parameters

Required parameters are marked with *

Name
type

Description

SUCCESS*
string

Indicator of the success of the delivery order cancellation. Possible values:

  • Y — order successfully canceled
  • N — an error occurred while attempting to cancel the order

REASON
object

Reason for the error. Provided in case of an unsuccessful attempt to cancel the delivery order (detailed description is provided below)

REASON

Name
type

Description

TEXT*
string

Description of the error

Example Response with Successful Delivery Order Cancellation

{
            "SUCCESS": "Y"
        }
        

Example Response with Error in Cost Calculation

{
            "SUCCESS": "N",
            "REASON": {
                "TEXT": "The order has been already delivered"
            }
        }
        

Continue Learning