Webhooks
Subscribe to real-time event notifications for orders and customers via the Enterprise API.
Webhooks let you receive real-time HTTP POST notifications when events occur in your PrintNow platform. Subscribe a target URL to specific events, and PrintNow will POST to that URL each time the event fires. Webhooks are scoped to the API token used to create them.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v2/hooks | List active webhook subscriptions |
POST | /api/v2/hooks | Subscribe a new webhook |
DELETE | /api/v2/hooks/{id} | Unsubscribe a webhook |
Event Types
| Event Name | Trigger |
|---|---|
order_created | A new order is placed through the storefront checkout. |
order_updated | An order's status is changed, it is marked as shipped, or its status is updated via the API. |
order_deleted | An order is deleted. |
customer_created | A new customer account is created, or a temporary user is converted to a permanent account via the API. |
customer_updated | A customer's profile is updated via the API. |
customer_deleted | A customer account is soft-deleted via the API. |
List Webhooks
Retrieve all active (non-deleted) webhook subscriptions for the current API token.
GET /api/v2/hooksExample Response
[
{
"id": 101,
"target_url": "https://example.com/webhooks/printnow",
"event": "order_created"
},
{
"id": 102,
"target_url": "https://example.com/webhooks/printnow",
"event": "customer_created"
}
]Hook Entry Fields
| Field | Type | Description |
|---|---|---|
id | integer | Unique webhook ID. Use this to unsubscribe. |
target_url | string | URL that receives the POST notifications. |
event | string | Event name this webhook is subscribed to. |
Subscribe Webhook
Create a new webhook subscription. Each target URL can only be registered once per API token -- attempting to register the same URL again returns 409 Conflict.
POST /api/v2/hooksRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
target_url | string | Yes | The URL to receive webhook POST notifications. |
event | string | Yes | Event name to subscribe to. Must be one of the valid event types. |
Example Request
curl -X POST https://api.printnow.com/api/v2/hooks \
-u "YOUR_TOKEN:YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"target_url": "https://example.com/webhooks/printnow",
"event": "order_created"
}'Example Response
{
"id": 101,
"target_url": "https://example.com/webhooks/printnow",
"event": "order_created"
}Returns 201 Created with the new hook entry on success.
Unsubscribe Webhook
Delete a webhook subscription. The webhook is soft-deleted and deactivated.
DELETE /api/v2/hooks/{id}Parameters
| Name | Type | Location | Description |
|---|---|---|---|
id | integer | path | Webhook ID from the List Webhooks response. |
Returns 204 No Content on success. Returns 404 Not Found if the webhook does not exist or belongs to a different API token.
Webhook Lifecycle
- Subscribe -- Register a target URL and event using the Subscribe endpoint.
- Receive -- Each time the event fires, PrintNow sends an HTTP POST to your target URL with event data in the request body.
- Respond -- Your endpoint should return a
2xxstatus code to acknowledge receipt. - Auto-deactivation -- If your endpoint responds with
410 Gone, the webhook is automatically deactivated. This is the standard mechanism for Zapier to clean up triggers when a user disconnects a Zap. - Unsubscribe -- When you no longer need notifications, call the Unsubscribe endpoint to remove the webhook.
Webhook Payload
When an event fires, PrintNow sends an HTTP POST to your target URL with Content-Type: application/json. The payload is a JSON array containing the full object associated with the event.
Order events (order_created, order_updated, order_deleted) send a single Order object wrapped in an array:
[
{
"storefront": "My Store",
"id": 1234,
"status": "New",
"customer": { ... },
"shipping_address": { ... },
"billing_address": { ... },
"items": [ ... ],
"sub_total": 49.99,
"tax_total": 4.25,
"shipping_total": 5.00,
"created_on": "2026-01-15T10:30:00"
}
]Customer events (customer_created, customer_updated, customer_deleted) send a single Customer object wrapped in an array:
[
{
"storefront": "My Store",
"id": 5678,
"first_name": "Jane",
"last_name": "Smith",
"email": "jane@example.com",
"username": "janesmith",
"organization": "Acme Corp"
}
]The payload structure matches the response format of the corresponding GET endpoints, so you can use the same deserialization logic for both API responses and webhook payloads.
Token Scope
Webhooks are tied to the specific API token used to create them. Each token maintains its own set of webhook subscriptions. Deleting an API token in Settings > API Keys also disables all webhooks associated with that token.
Error Responses
| Code | Message | Cause |
|---|---|---|
400 | Event name is invalid. | The event field does not match any valid event type. |
409 | Target url already exists. | This URL is already registered for the current API token. |
404 | Hook not found. | No webhook with this ID exists or it belongs to a different API token. |