Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 56 additions & 18 deletions docs/Webhooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,65 @@
Webhooks
========

All requests start with the following URL:
``https://webhook.api.printdeal.com``
Printdeal API supports webhooks, allowing you to receive real-time notifications about important events. Webhooks are HTTP callbacks triggered when a specific event occurs.

For example, to retrieve your webhooks, the following URL must be used:
``https://webhook.api.printdeal.com/webhooks``
## Base URL

.. toctree::
:hidden:
All webhook-related requests start with the following base URL:

Webhooks/Creating_subscription
Webhooks/Retrieving_your_webhooks
Webhooks/Deleting_a_webhook
```
https://webhook.api.printdeal.com
```

You can use regular HTTP methods to communicate with the API about webhooks:

- A ``POST`` request to ``/webhooks`` will allow you to create a new webhook subscription.
See :ref:`Creating subscription<Creating_subscription>` for more information.
## Managing Webhooks

- A ``GET`` request to ``/webhooks`` will return you a summary of all your webhooks and request to ``/webhooks/{uuid}`` will give you the information of a specific Webhook.
See :ref:`retrieving your webhooks<retrieving_your_webhooks>` for more information.
You can use standard HTTP methods to interact with the webhook API:

- Sending a ``DELETE`` request to ``/webhooks/{uuid}`` allows you to de-activate an existing webhook subscription.
See :ref:`Deleting a webhook<deleting_a_webhook>`. for more information.

### Create a Webhook Subscription

To create a new webhook subscription, send a `POST` request to:

```
POST https://webhook.api.printdeal.com/webhooks
```

Refer to [Creating a subscription](#creating-a-subscription) for more details.

### Retrieve Webhooks

To fetch all your webhooks, send a `GET` request:

```
GET https://webhook.api.printdeal.com/webhooks
```

To retrieve a specific webhook by its UUID, use:

```
GET https://webhook.api.printdeal.com/webhooks/{uuid}
```

Refer to [Retrieving your webhooks](#retrieving-your-webhooks) for more details.

### Delete a Webhook Subscription

To deactivate a webhook, send a `DELETE` request:

```
DELETE https://webhook.api.printdeal.com/webhooks/{uuid}
```

Refer to [Deleting a webhook](#deleting-a-webhook) for more details.

## Testing Webhooks

Before implementing webhooks in your application, you should test them to ensure correct event delivery. You can use webhook testing tools like:

- **[Beeceptor](https://beeceptor.com/)** – Set up a mock endpoint to inspect incoming webhook requests.
- **[Webhook.site](https://webhook.site/)** – Capture and debug webhook payloads in real time.

These tools help you verify the structure and content of webhook requests without writing any code.

---

For more details, visit [Printdeal API Webhooks Documentation](https://docs.api.printdeal.com/docs/Webhooks.html).