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

# order.approval.status.changed

> [!TIP]
>
> Make sure to read the [Webhooks Overview](https://docs.salesbricks.com/api-reference/webhooks/overview.md) for important
> information about signature verification.

## Purpose

The `order.approval.status.changed` webhook is triggered whenever an **Order**'s approval status changes: when it is submitted for review, approved, rejected, or sent back to draft.

It is only sent for accounts that use [approval workflows](https://docs.salesbricks.com/orders/approval-workflows.md). Each transition sends an event, including a return to an earlier status, such as a second `submitted` after a rejection.

A new order starts as `approved`, and an event is sent only when the status changes. Saving a new order without submitting it sends `draft`. Submitting it then sends `approved` if it breaks no rules, or if the submitter can approve the violations themselves, and `submitted` otherwise.

## Payload format

Unlike the other order webhooks, this event does not send the full order. Use `order_id` to look the order up, or watch the `approval_status` field that every [Order](https://docs.salesbricks.com/api-reference/webhooks/order/payload.md) payload carries.

| Field | Description |
| - | - |
| `order_id` | Salesbricks ID of the order. |
| `approval_status` | The new status: `draft`, `submitted` (**Pending review** in the app), `approved` or `rejected`. See [Approval statuses](https://docs.salesbricks.com/orders/approval-workflows.md#approval-statuses). |
| `latest_request_id` | ID of the approval request, the review cycle, that produced this status. Present for `draft` too, because a request is created as soon as the order is saved under approval workflows. |
| `violation_summary` | How many of the latest request's rule violations are in each state: `needs_decision` (awaiting an approver), `approved` and `rejected`. All three keys are always present. An order that breaks no rules has zeros across the board. |
| `webhook_run_id` | Salesbricks ID of this webhook run. |

## Example

```json JSON theme={null}
{
  "event_type": "order.approval.status.changed",
  "approval_status": "submitted",
  "latest_request_id": "99999999-9999-9999-9999-999999999999",
  "order_id": "c9b23aec-b7b7-4d2e-865d-71e4743ba828",
  "violation_summary": {
    "approved": 0,
    "needs_decision": 2,
    "rejected": 0
  },
  "webhook_run_id": "00000000-0000-0000-0000-000000000000"
}
```


## Related topics

- [Approval Workflows](https://docs.salesbricks.com/orders/approval-workflows.md)
- [Your email notifications](https://docs.salesbricks.com/settings/notifications/your-email-notifications.md)
- [Slack](https://docs.salesbricks.com/integrations/slack.md)


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