Hook Template

Retrieve hook template

Get a hook template object.

get/api/v1/hook_templates/{hookTemplateID}

Path parameters

hookTemplateIDinteger required

A unique integer value identifying this hook template.

Response

OK

idinteger required

ID of the hook template.

type'webhook' | 'function' required

Hook type.

namestring required

Name of the hook template.

urlstring uri required

URL of the hook template.

eventsstring[] required

List of events, when the hook should be notified. For the list of events see Webhook events.

sideloadstring[] required

List of related objects that should be included in hook request. For the list of possible sideloads see Webhook events.

metadataMetadata required

Client data. May be used to store e.g. external system object IDs. See Metadata for more details.

configobject required

Configuration of the hook.

testobject required

Input saved for hook testing purposes, see Test a hook.

descriptionstring required

Hook description text.

extension_sourcestring required

Import source of the extension. For more, see Extension sources.

settingsobject required

Specific settings that will be included in the payload when executing the hook.

settings_schemaobject nullable required

JSON schema for settings field, specifying the JSON structure of this field.

secrets_schemaobject nullable required

JSON schema for secrets field, specifying the JSON structure of this field.

guidestring required

Description how to use the extension.

read_more_urlstring uri required

URL address leading to more info page.

extension_image_urlstring uri required

URL address of extension picture.

store_descriptionstring required

Description of hook displayed in Rossum store.

external_urlstring required

External URL to be called (relates to webhook type).

use_token_ownerboolean required

Whether the hook should use token owner.

install_action'copy' | 'request_access' required

Whether the hook is added directly via application (copy) or on customer's request (request_access).

token_lifetime_sinteger nullable required

Lifetime number of seconds for rossum_authorization_token (min=0, max=7200). This setting will ensure the token will be valid after hook response is returned. If null, default lifetime of 600 is used.

orderinteger required

Hook templates can be ordered or grouped by this parameter.

Example response

{
  "id": 1,
  "type": "function",
  "name": "Document sorting",
  "url": "https://example.rossum.app/api/v1/hook_templates/1",
  "events": [
    "annotation_status.changed"
  ],
  "sideload": [
    "queues"
  ],
  "metadata": {
    "some_key": "some_value"
  },
  "config": {
    "runtime": "nodejs22.x",
    "code": "exports.rossum_hook_request_handler = () => {\nconst messages = [{\"type\": \"info\", \"content\": \"Yup!\"}];\nconst operations = [];\nreturn {\nmessages,\noperations\n};\n};",
    "schedule": {
      "cron": "*/10 * * * *"
    }
  },
  "description": "Automatically sort documents into specific queues based on document type (i.e. invoice, bill, PO etc.), POs, vendor, total amount, due date, product or locale.",
  "extension_source": "rossum_store",
  "guide": "Here we explain how the extension should be used.",
  "read_more_url": "https://github.com/rossumai/simple-vendor-matching-webhook-python",
  "extension_image_url": "https://rossum.ai/wp-content/themes/rossum/static/img/logo.svg",
  "store_description": "<p>Automatically sort documents into specific queues based on document type (i.e. invoice, bill, PO etc.), POs, vendor, total amount, due date, product or locale.</p>",
  "use_token_owner": true,
  "install_action": "copy"
}

Changes

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