Update Promos API

Create an order

The following endpoint updates an Promo:


Path parameters

Fieldis required?Description
idmandatoryinteger Unique identifier of the Promo to be retrieved

Request parameters

Following are the parameters to be sent in the request body:

Fieldis required?Description
amountmandatorystring The amount for which the Promo was created
currencymandatorystring The currency associated with the Promo's amount
labelmandatorystring The label you want to attach with the promotion, has to be unique
descriptionoptionalstring Description of the promotion
typemandatorystring valid values are "card_promos", "ewallet_promos", "va_promos"
sub_typemandatorystring valid values are "direct_discount", "cashback"
min_order_amountmandatorystring denoting minimum order amount on which promo should apply
max_discount_amountmandatorystring denoting maximum discount amount which promo should generate
discountmandatorystring Depending on discount_type, value is either %discount or flat discount
discount_typemandatorystring valid values are "percentage", "flat"
limit_typemandatorystring valid values are "quota", "budget"
price_deduction_typemandatorystring valid values are "total_price", "product_price", "shipping_price"
promo_detailsmandatoryobject Denoting the metdata specific to promo type

Note: Please note that out of bin_list and bank_codes at-least one should be present if promo includes card_promo


curl -X PATCH \
  https://api.durianpay.id/v1/merchants/promos/prm_JaQGjzJDdz0460 \
  -H 'authorization: [Base64({Your_Server_Key}:)]' \
  -H 'content-type: application/json' \
  -d '{

Response Code : 200

Here is an example of success response

  "id": "prm_XXXXXXXX",
  "currency": "IDR",
  "label": "PROMO1",
  "description": "",
  "code": "PROMO1",
  "status": "expired",
  "starts_at": "2015-05-05T12:30:00",
  "ends_at": "2015-05-08T12:30:00",
  "min_order_amount": "0",
  "max_discount_amount": "75",
  "type": "card_promos",
  "promo_details": {
      "bin_list": [12, 23],
      "bank_codes": ["BCA"]
  "discount": 30,
  "discount_type": "percentage",
  "limit_type": "quota",
  "limit": 50,
  "sub_type": "direct_discount",
  "price_deduction_type": "total_price"

Error Response Code : 400

Here is an example error response for invalid request

    "error": "error reading request body",
    "error_code": "DPAY_INVALID_REQUEST"

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 updating promo",
    "error_code": "DPAY_INTERNAL_ERROR"