> ## 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.

# PaymentDebtOriginationAction

> The audit of debt creation: every action on a request or one of its items, with its actor and reason. Append-only: a trigger rejects every update and delete.

## Primary key

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

document\_id

uuid

default:"Random UUID"

public

required

Unique identifier of the debt origination action.

## Specific attributes

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

action

varchar

public

required

The action of the debt origination action. `validate` and `complete` are
recorded by the system (no actor, «Sistema») when validation and the upload
end.

**Rules**: Possible values: cancel, complete, correct, discard, expire, generate\_now, mark\_external\_invoice, psp\_retry, replace, restore, retry, revalidate, revert, submit, upload, validate. Max length: 30 characters

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

actor

uuid

public

The authenticated user, taken from the session; null for the system.

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

actor\_label

varchar

public

required

The user's name, or «Sistema».

**Rules**: Max length: 255 characters

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

after

jsonb

public

Only the fields that changed, after the action.

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

before

jsonb

public

Only the fields that changed, before the action.

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

correlation\_id

uuid

public

required

The correlation ID of the debt origination action.

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

group\_id

uuid

public

Shared by the actions of one bulk action or send.

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

item\_version

integer

public

The item version the action produced.

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

reason

text

public

Required for correct, discard, restore, replace and mark\_external\_invoice.

## Foreign keys

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

payment\_debt\_origination

uuid

public

required

Reference to the Payment Debt Origination this debt origination action belongs to. [Ref: Payment Debt Origination Schema](https://docs.bbrands.io/schemas/payment/payment-debt-origination.md)

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

payment\_debt\_origination\_item

uuid

public

Optional reference to the Payment Debt Origination Item associated with the debt origination action. [Ref: Payment Debt Origination Item Schema](https://docs.bbrands.io/schemas/payment/payment-debt-origination-item.md)

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

queue\_event

uuid

public

Optional reference to the Queue Event associated with the debt origination action. [Ref: Queue Event Schema](https://docs.bbrands.io/schemas/queue/queue-event.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.