Delete Promo API


The following endpoint deletes a promo

/merchants/promos/:id

Path parameters

Fieldis required?Description
idmandatoryinteger Unique identifier of the Promo to be deleted
curl -X DELETE \
  https://api.durianpay.id/v1/merchants/promos/prm_vnvN2Rp1tU7753 \
  -H 'authorization: [Base64({Your_Server_Key}:)]' \
  -H 'content-type: application/json' \

Response Code : 200

Here is an example of success response

{
    "message": "Promo deleted successfully"
}

Error Response Code : 401

Here is an example error response for unauthorized access

{
    "error": "invalid Authorization header in request",
    "error_code": "DPAY_UNAUTHORIZED_ACCESS"
}

Error Response Code : 500

Here is an example error response for internal server error

{
    "error": "error deleting promo",
    "error_code": "DPAY_INTERNAL_ERROR"
}