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

# Webhooks

> A reference for API-generated webhook payloads.

## Overview

Webhooks from our API allow developers to subscribe to real-time notifications for when an inspection report's status changes, or when the report is complete.

## How to Subscribe

You can add a webhook callback URL when [creating orders](/api-reference/endpoints/orders/create).

## Payload Structure

Each webhook event provides a structured payload with specific data in a [wrapped response](/developer-resources/essentials/common-conventions#wrapped-responses).

<CodeGroup>
  ```JSON Any Status Change
  {
    "status": "success",
    "code": 200,
    "data": {
        "order_id": "<string>",
        "old_status": "<string>",
        "new_status": "<string>",
        "state": "<string>"
    }
  }
  ```

  ```JSON Order Complete {9-13}
  {
    "status": "success",
    "code": 200,
    "data": {
        "order_id": "<string>",
        "old_status": "<string>",
        "new_status": "Complete",
        "state": "done",
        "reports": {
          "web": "<string>",  // URL
          "pdf": "<string>",  // URL
          "data": "<string>"  // URL
        }
    }
  }
  ```
</CodeGroup>

<Tip>
  **Pro Tip:** Completed orders include links to:

  * The interactive (web-based) inspection report
  * The PDF inspection report
  * All inspection report data as JSON
</Tip>

## Error Handling

We attempt to deliver webhook payloads three times after the 1st failure with each response attempt spaced five (5) minutes apart.

## Codes

### Order Status

| **Name**             | **Description**                                                                                             |
| :------------------- | :---------------------------------------------------------------------------------------------------------- |
| New                  | 🎉 Welcome aboard! Your order just landed in our system - we'll be reaching out to the property owner soon! |
| Scheduling           | 📞 We're playing phone tag with the borrower - stay tuned for appointment confirmation!                     |
| Scheduled            | 📅 Success! We've locked in the perfect time for the inspection. Mark your calendar!                        |
| Re-Scheduling        | 🔄 Oops! Minor setback - we're working on finding a new time that works for everyone!                       |
| Re-Scheduled         | ✨ Back on track! New appointment confirmed and ready to roll!                                               |
| In-progress          | 🔍 An inspector is on the scene, working their magic!                                                       |
| Inspected            | 📸 Inspector's done their detective work - now we're connecting all the dots!                               |
| QC                   | 🎯 Our quality ninjas are making sure everything's perfect!                                                 |
| Final QC             | 🏆 One last polish to make your report shine!                                                               |
| Prepare Final Report | 🎨 Putting on the finishing touches - almost there!                                                         |
| Stuck                | 🤔 Houston, we have a puzzle! Don't worry, our team's on it!                                                |
| Complete             | 🌟 Ta-da! Your inspection report is ready for its grand debut!                                              |
| Canceled             | 👋 This order's taking a rain check!                                                                        |
| Accepted             | 👍 High five! Client's given us their seal of approval!                                                     |

### Order State

| **Name** | **Description**             |
| :------- | :-------------------------- |
| new      | 🌱 Fresh and ready to grow! |
| done     | 🎊 Mission accomplished!    |
| canceled | 🎬 That's a wrap!           |
