External Query

External Data Query

❗️ Important

This is not an endpoint provided by DealHub. This page present the endpoint definition you need to make available so DealHub can call it.

DealHub uses this endpoint to send requests that share data from the current quote’s playbook and product list. Your endpoint should process this data and return information that will be populated back into the quote’s playbook.

The specific URL for this endpoint is configured by the administrator in the DealHub UI.

📘 Authentication

When DealHub calls your endpoint, it will include an Authorization header based on the configuration set by an administrator in the DealHub UI. Your endpoint must be prepared to handle one of the following methods:

  • Token (Bearer): DealHub sends a secret bearer token. Your endpoint should validate this token.
  • Basic: DealHub sends a username and password for Basic Authentication.
  • None: No Authorization header is sent. This is used when the endpoint is unsecured or uses a different security method, such as a token embedded in the URL.
post/

Request

  • Base URL
    https://your-external-system.com/api/data-query
  • URL
    https://your-external-system.com/api/data-query/
  • Auth
    • HTTP bearer
    • or HTTP basic
    • or none

Request body

playbook_dataobject

A key-value map of playbook answers configured by the admin. The key is a string in the format <group_id>.<question_id>.

The value type depends on the question type:

  • Text: a plain string (e.g., "USD").
  • Numeric: an integer or floating-point number (e.g., 42.5).
  • Date (integer): a Unix timestamp in milliseconds as an integer (e.g., 1698418023000). This is not an ISO 8601 string.
  • Array: for repeatable questions; each element can be a string, number, or date timestamp.

Example request

{
  "playbook_data": {
    "general.currency": "USD",
    "general.cost_limit": 42.5,
    "general.created_at_ms": 1698418023000,
    "group5.repeatable_ids": [
      "op2",
      1698418023123
    ]
  },
  "product_data": [
    {
      "ITEM_NAME": "Junior Kit",
      "SKU": "B-56-TRIPLE",
      "bundle_line_items": [
        {
          "ITEM_NAME": "Pencil",
          "SKU": "sku-1",
          "attribute1": "9"
        }
      ]
    }
  ]
}

Response

Successful response containing the data to be populated into the DealHub playbook.

playbook_dataPlaybookResponseItem[]

An array of objects to be populated into the playbook. For a repeatable group, multiple objects can be returned. For a non-repeatable group, a single object should be returned in the array.

Example response

{
  "playbook_data": [
    {
      "id1": "id1_val",
      "id2": "A;B;C",
      "id3": "some_val"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.