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

# CodeCouponAgreement

> The schema definition for the CodeCouponAgreement resource.

## Primary key

[Navigate to header](#param-commercial-activity)

document\_id

uuid

default:"Random UUID"

public

required

Unique identifier of the code coupon agreement.

## Specific attributes

[Navigate to header](#param-commercial-activity)

alert\_thresholds

PgArray

public

required

The alert thresholds of the code coupon agreement.

[Navigate to header](#param-commercial-activity)

commercial\_owner

varchar

public

The commercial owner of the code coupon agreement.

**Rules**: Max length: 150 characters

[Navigate to header](#param-commercial-activity)

document\_url

varchar

public

The document URL of the code coupon agreement.

**Rules**: Max length: 500 characters

[Navigate to header](#param-commercial-activity)

end\_policy

varchar

default:"honor\_until\_expiry"

public

required

The end policy of the code coupon agreement.

**Rules**: Possible values: honor\_until\_expiry, invalidate\_now. Max length: 30 characters

[Navigate to header](#param-commercial-activity)

ends\_on

date

public

required

The ends on of the code coupon agreement.

[Navigate to header](#param-commercial-activity)

name

varchar

public

required

The name of the code coupon agreement.

**Rules**: Max length: 150 characters

[Navigate to header](#param-commercial-activity)

notes

text

public

The notes of the code coupon agreement.

[Navigate to header](#param-commercial-activity)

reserved\_count

integer

default:"0"

public

required

The reserved count of the code coupon agreement.

[Navigate to header](#param-commercial-activity)

starts\_on

date

public

required

The starts on of the code coupon agreement.

[Navigate to header](#param-commercial-activity)

total\_quota

integer

public

The total quota of the code coupon agreement.

## Foreign keys

[Navigate to header](#param-commercial-activity)

code\_coupon\_merchant

uuid

public

required

Reference to the Code Coupon Merchant this code coupon agreement belongs to. [Ref: Code Coupon Merchant Schema](https://docs.bbrands.io/schemas/code/code-coupon-merchant.md)

## Tracking attributes

[Navigate to header](#param-commercial-activity)

created\_at

timestamp

public

required

Timestamp when the record was created.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

deleted\_at

timestamp

public

Timestamp when the record was soft-deleted, when applicable.

**Rules**: Precision: 6, with timezone

[Navigate to header](#param-commercial-activity)

is\_actived

boolean

default:"true"

public

required

Indicates whether the record is currently active.

[Navigate to header](#param-commercial-activity)

is\_deleted

boolean

default:"false"

public

required

Indicates whether the record has been soft-deleted.

[Navigate to header](#param-commercial-activity)

updated\_at

timestamp

public

Timestamp when the record was last updated.

**Rules**: Precision: 6, with timezone


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