IDpack WebhookIDpack Webhook

The IDpack Webhook feature in IDpack Cloud provide a mechanism to notify external servers in real time when specific events occur in the system. When configured, IDpack Cloud sends HTTP POST requests to a specified webhook URL, allowing seamless integration with third-party systems and enabling real-time data synchronization, workflow automation, and event-driven processing.

How Webhooks Work

  1. Event Trigger: A specific event is triggered in IDpack Cloud (e.g., a record is added or updated).
  2. Webhook Execution: IDpack Cloud sends a POST request to the configured webhook URL with event data in JSON format.
  3. Customer Response Validation: Your server must respond with an appropriate HTTP response code and a payload to confirm successful processing.
  4. External Processing: The webhook data can then be processed by your external system to perform specific actions, such as updating your database or triggering notifications.

Authorization and Security

  • Basic Authorization: IDpack Cloud supports Basic Authorization to secure webhook requests. You can provide a username and password to ensure only authorized requests are accepted by your server.
  • Payload Encryption: For additional security, the webhook payload can be encrypted using a key provided by IDpack Cloud. This ensures that sensitive data remains protected during transmission.

Cost of Webhooks

Each webhook trigger consumes 2 tokens from your account. Ensure you monitor your token balance to avoid interruptions in webhook functionality.

Required Customer Response

To ensure the webhook execution is successful, your server must adhere to the following response format:

  1. HTTP Response Code: 200 to confirm successful receipt of the webhook.
  2. JSON Response Format:
{
    "status": "success",
    "id": "b029277f-a19b-4601-b303-9a7d3c1be8d5"
}

Available Webhook Events

  • producer.record.added – Triggered when a new record is added.
  • producer.record.updated – Triggered when a record is updated.
  • producer.record.photo_id_taken – Triggered when a photo ID is captured for a record.
  • producer.record.status_changed – Triggered when a record’s status changes.
  • producer.record.deleted – Triggered when a record is deleted.
  • producer.record.print_preview – Triggered when a print preview is generated for a record.

For Enterprise Plan users, additional events include:

  • producer.record.added_queue – Triggered when a record is added to the print queue.
  • producer.record.cancel_queue – Triggered when a record is canceled in the queue.
  • producer.record.removed_queue – Triggered when a record is removed from the queue.
  • print_queue.record.print_preview – Triggered when a print preview is generated for a record in the queue.
  • print_queue.record.removed_queue – Triggered when a record is removed from the queue.

JSON Payload Structure

Webhook payloads include details about the event, the affected record, and metadata for processing.

{
    "id": "751dfc1d-a61a-4c72-b620-eb8975625f3d",
    "object": "event",
    "data": {
        "project_key": "t7e84e46-92d4-11rd-9167-u894daa10b54",
        "record": {
            "idc_key": "r2d3y9cf-1f1b-u9c3-a822-wc4c7k5e20f3",
            "idc_id_number": "679",
            "idc_rfid_csn": "7820706",
            "idc_active": "1",
            "idc_trash": "0",
            "idc_firstname": "Steve",
            "idc_lastname": "Smith",
            "idc_employee_id": "1234",
            "idc_title1": "Chief Executive Officer",
            "idc_birthdate": "1970-25-04",
            "idc_expirationdate": "1998-19-02",
            "idc_issuedate": "1996-18-02",
            "idc_function1": "Journalist",
            "idc_department": "Arts",
            "idc_url": "https://www.example.com/?id=234234",
            "idc_insdate": "2023-06-12 13:29",
            "idc_moddate": "2024-02-03 10:11",
            "idc_picturedate": "2024-02-03 10:05",
            "idc_printdate": "2024-03-14 13:10:03"
        }
    },
    "webhook": {
        "event": "producer.record.added",
        "token_price": 2,
        "remaining_tokens": 55724,
        "software": "IDpack Cloud",
        "output_format": "json",
        "version": "3.2.40",
        "request_date": "2025-01-27 11:23"
    }
}

Use Cases

  • Data Synchronization: Automatically update external systems when records are created or modified.
  • Notifications: Trigger alerts when specific events occur, such as photo ID capture or record deletion.
  • Audit Trails: Maintain detailed logs of actions for compliance and monitoring.
  • Workflow Automation: Streamline processes by integrating IDpack Cloud events into external systems.

By leveraging webhooks in IDpack Cloud with robust security measures, real-time notifications, and efficient token management, you can build powerful integrations to automate your workflows and enhance your system’s functionality.