> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mayar.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Coupon Detail

> Endpoint used to view details and status of coupon that have been created

```bash Request Example theme={null}
curl --request GET 'https://api.mayar.id/hl/v1/coupon/c9aa143a-53f9-44e7-a9c6-83229ad7199b' \
--header 'Authorization: Bearer Paste-Your-API-Key-Here' \
--data ''
```

```json Response Example 200 theme={null}
{
    "statusCode": 200,
    "messages": "Success",
    "data": {
        "id": "c9aa143a-53f9-44e7-a9c6-83229ad7199b",
        "createdAt": 1755665561029,
        "expiredAt": 1893488774933,
        "productDiscount": [],
        "discountType": "monetary",
        "discountProductType": "all",
        "eligibleCustomerType": "all",
        "name": "Diskon Murmer",
        "minimumPurchase": 500000,
        "isLifeTime": null,
        "totalCoupons": 100,
        "value": 100000,
        "coupons": [
            {
                "id": "532858fe-3722-4cf4-a8eb-f7c6765aba17",
                "code": "haribaik",
                "createdAt": 1755665561256,
                "discountId": "c9aa143a-53f9-44e7-a9c6-83229ad7199b",
                "endMonthTrial": null,
                "expiredAt": 1893488774933,
                "isActive": true,
                "limit": 100,
                "type": "reusable",
                "updatedAt": 1755665561256,
                "userId": "348e083d-315a-4e5c-96b1-5a2a98c48413"
            }
        ]
    }
}
```

Endpoint:

```Production Production theme={null}
https://api.mayar.id/hl/v1/coupon/{id}
```

```Sandbox Sandbox theme={null}
https://api.mayar.io/hl/v1/coupon/{id}
```

## Authorization

**Authorization** `string` *required*

Example:

`Authorization | Bearer Paste-Your-API-Key-Here`

## Path Parameter

**id** `string` *required*

A unique identifier obtained when creating a discount. If accessed through the dashboard, it can be found at the URL on the discount details page.

Example:

`c9aa143a-53f9-44e7-a9c6-83229ad7199b`

## Response

Successful Response

### Main Structure (Root)

**statusCode** `integer`

Status code form API.

**messages** `string`

Status message that describes the status code.

**data** `array of object`

Main response data.

### data Structure (Array Of Object)

**id** `string`

Discount ID.

**createdAt** `integer`

Creation time (timestamp in ms).

**expiredAt** `integer`

Expiration time (timestamp in ms).

**productDiscount** `array of object`

Product-specific discount rules (empty if not applied).

**discountType** `string`

Discount type.

**discountProductType** `string`

Discount product scope.

**eligibleCustomerType** `string`

Eligible customer scope.

**name** `string`

Discount name.

**minimumPurchase** `integer`

Minimum purchase amount required to apply the discount.

**isLifeTime** `boolean | null`

Indicates if the discount is lifetime (`true`/`false`) or `null`.

**totalCoupons** `integer`

Total number of coupons available.

**value** `integer`

Discount value.

**coupons** `array of object`

List of coupons associated with this discount.

### coupons Structure (Array Of Object)

**id** `string\<uuid\>`

Coupon ID (UUID).

**code** `string`

Coupon code.

**createdAt** `integer`

Coupon creation time (timestamp in ms).

**discountId** `string\<uuid\>`

Related Discount ID.

**endMonthTrial** `string | null`

End of trial month (if applicable).

**expiredAt** `integer`

Coupon expiration time (timestamp in ms).

**isActive** `boolean`

Whether the coupon is active (`true` or `false`).

**limit** `integer`

Maximum usage limit for the coupon.

**type** `string`

Coupon type.

**updatedAt** `integer`

Last updated time (timestamp in ms).

**userId** `string\<uuid\>`

ID of the user who created/owns the coupon.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.