Hook

Generate hook payload

Users can use this endpoint to test the hook on a payload of specific events and actions.

The token used for calling the endpoint is returned as rossum_authorization_token regardless of the token_owner of the hook. Values in secrets are redacted for security reasons. The payload for email events from this endpoint may differ from the original hook payload in the file ids, height, width, and format of email addresses in headers.

post/api/v1/hooks/{hookID}/generate_payload

Path parameters

hookIDinteger required

A unique integer value identifying this hook.

Request body

actionstring required

Hook's action.

eventstring required

Hook's event.

annotationstring uri

URL of related Annotation object. Required for annotation_status and annotation_content events.

previous_statusstring

A previous status of the document. See Annotation Lifecycle for a list of supported values. Required for annotation_status and annotation_content events.

statusstring

Status of the document. See Annotation Lifecycle for a list of supported values. Required for annotation_status and annotation_content events.

emailstring uri

URL of the arriving email. Required for email event.

uploadstring uri

URL of an upload instance. Required for upload event.

Example request

{
  "action": "scheduled",
  "event": "invocation",
  "annotation": "https://example.rossum.app/api/v1/annotations/1",
  "previous_status": "to_review",
  "status": "confirmed",
  "email": "https://example.rossum.app/api/v1/emails/1234",
  "upload": "https://example.rossum.app/api/v1/uploads/1"
}

Response

OK

request_idstring

Request ID.

timestampstring date-time

Timestamp.

base_urlstring uri

Base URL.

rossum_authorization_tokenstring

Authorization token.

hookstring uri

Hook URL.

settingsobject

Hook settings.

secretsobject

Hook secrets (values redacted).

actionstring

Action.

eventstring

Event.

Example response

{
  "request_id": "ae7bc8dd-73bd-489b-a3d2-f5514b209591",
  "timestamp": "2020-01-01T00:00:00.000000Z",
  "base_url": "https://example.rossum.app",
  "rossum_authorization_token": "1024873d424a007d8eebff7b3684d283abdf7d0d",
  "hook": "https://example.rossum.app/api/v1/hooks/1500",
  "settings": {
    "example_target_service_type": "SFTP",
    "example_target_hostname": "sftp.elis.rossum.ai"
  },
  "secrets": {
    "username": "[redacted...]",
    "password": "[redacted...]"
  },
  "action": "scheduled",
  "event": "invocation"
}

Changes

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