Skip to content

Reserve coupon

POST
/api/v2.0/stores/{storeId}/members/{memberId}/coupons/{couponCode}/reserve
curl --request POST \
--url https://api.diller.app/api/v2.0/stores/your-store-id/members/m_nsr714RRBEHX/coupons/WELCOME15/reserve \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "channel": "example", "external_product_id": "example", "external_transaction_id": "example", "redeemed_value": 1 }'

This endpoint enables users to reserve a coupon for their pending orders, thereby ensuring that the coupon cannot be used for any other transactions.

Call the /cancel-reservation endpoint after completing or cancelling a transaction to release the coupon reservation and make it available for other transactions.

storeId
required
string

The storeId

Example
your-store-id
memberId
required
string

The memberId

Example
m_nsr714RRBEHX
couponCode
required
string

The coupon code

Example
WELCOME15

Details of the coupon reservation request

object
channel
string
nullable
external_product_id
string
nullable
external_transaction_id
string
nullable
redeemed_value
number format: double
Examplegenerated
{
"channel": "example",
"external_product_id": "example",
"external_transaction_id": "example",
"redeemed_value": 1
}

OK

Media typeapplication/json
object
is_ok
boolean
details
string
nullable
Examplegenerated
{
"is_ok": true,
"details": "example"
}

Bad Request

Media typeapplication/json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
errors
object
key
additional properties
Array<string>
key
additional properties
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example",
"errors": {
"additionalProperty": [
"example"
]
}
}