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

# rejectProductWorkflow

> Reject a proposed product submission with an optional message to the vendor.

Rejects a product awaiting review: validates the product is in `proposed` status, sets it to `rejected`, and records a confirmed `STATUS_CHANGE` audit action whose `external_note` carries the rejection message. Triggered by `POST /admin/products/:id/reject`. Emits `product.rejected` with `{ id, message }`.

## Usage

```ts theme={null}
import { rejectProductWorkflow } from "@mercurjs/core/workflows"

await rejectProductWorkflow(container).run({
  input: {
    product_id: "prod_01H...",
    message: "Images do not meet marketplace guidelines",
    actor_id: "user_01H...",
  },
})
```

## Input

<ParamField body="product_id" type="string" required>
  Id of the product to reject. Must currently be in `proposed` status.
</ParamField>

<ParamField body="message" type="string">
  Vendor-facing rejection reason, stored as the audit change's `external_note` and included in the emitted event.
</ParamField>

<ParamField body="actor_id" type="string">
  Actor id recorded on the audit trail entry.
</ParamField>

## Result

<ResponseField name="result" type="void">
  Returns nothing; the product status is updated in place.
</ResponseField>

## Hooks

<ResponseField name="productRejected" type="hook">
  Runs after rejection with `{ product_id, message }`.
</ResponseField>
