Skip to main content

Explanation of terms

Output FieldDescription
job_guidUnique identifier for the job
environmentEnvironment in which the action was made
messageInstructions or explanations for the user
webhook_codeSame as JobCode
webhook_typeCategory of webhook
error_codeCode of the error
error_messageMessage related to the error

EnsureConnection

Connection Successful

Fired when EnsureConnection has completed.
{
  "job_guid": "55bba4ec-7242-4f52-b3c0-08de128283fc",
  "output": {
    "access_token": "access-development-2b566e6a-d404-4099-9cf4-08de1282be2b"
  },
  "webhook_type": "Job",
  "webhook_code": "EnsureConnection",
  "environment": "Sandbox"
}
Suggested action: Securely store the access token. You can now call jobs for these credentials.

Error

Fired when EnsureConnection fails unexpectedly.
{
  "job_guid": "55bba4ec-7242-4f52-b3c0-08de128283fc",
  "error": { 
    "error_code": "Unexpected", 
    "error_message": "" 
  },
  "webhook_type": "Job",
  "webhook_code": "EnsureConnection",
  "environment": "Sandbox"
}
Suggested action: Wait a moment and try again.

InvalidCredentials

Fired when EnsureConnection fails due to erroneous credentials.
{
  "job_guid": "8b7f2b93-3100-4415-b3c3-08de128283fc",
  "error": {
    "error_code": "InvalidCredentials",
    "error_message": "Invalid Credentials"
  },
  "webhook_type": "Job",
  "webhook_code": "EnsureConnection",
  "environment": "Sandbox"
}
Suggested action: Prompt the user to enter the correct credentials.

MfaRequired

Fired when an MFA code is required during sign-in.
{
  "job_guid": "1c7d53bf-df62-4864-39fd-08de127ffd4a",
  "question": "We just sent a code to your email. Enter it to confirm your identity and turn on two-step verification.",
  "method_selected": null,
  "answer_expected_digits": null,
  "webhook_type": "Job",
  "webhook_code": "MfaRequired",
  "environment": "Sandbox"
}
Suggested action: Call the jobs/mfa/answer endpoint with your answer.

MfaQuestionInvalidAnswer

Fired when the MFA code provided is invalid.
 {
   "job_guid": "45311d68-5092-4fe8-635b-08de14ef0c19",
   "error": { 
      "error_code": "MfaCodeInvalid", 
      "error_message": "Invalid mfa" 
   },
   "webhook_type": "Job",
   "webhook_code": "EnsureConnection",
   "environment": "Sandbox"
 }
Suggested action: Prompt the user again for their MFA code.

Jobs

Successful Job

Fired when a job completed successfully.
{
  "job_guid": "b35aa2af-41e4-4833-95c9-9efd2069e70c",
  "output": {
    "success": true,
    Rest of payload
  },
  "webhook_type": "Job",
  "webhook_code": "JobCode",
  "environment": "Production"
}
Suggested action: Call your next job or CloseConnection to finish the flow.

Unsuccessful Job

Fired when a job did not complete successfully.
{
  "job_guid": "b35aa2af-41e4-4833-95c9-9efd2069e70c",
  "output": {
    "success": false,
    "message": "Invalid inputs."
  },
  "webhook_type": "Job",
  "webhook_code": "JobCode",
  "environment": "Production"
}
Suggested action: Follow the message’s prompt to fix the error.

Documents

DocumentCreated

Fired when a document is fetched and stored on our server.
 {
   "connection_id": "30fe6fad-52c2-490e-f57b-08de15d052be",
   "document_id": "864ce2ed-78ce-4c5d-f4dc-08de1658e265",
   "webhook_type": "Document",
   "webhook_code": "DocumentCreated",
   "environment": "Production"
 }
Suggested action: Call the /storage/download-a-document endpoint to retrieve your document(s).

URL webhook

Fired when a document is ready to be fetched. It is essentially a Successful Job webhook that contains the URL to download your document(s).
 {
  "job_guid": "b35aa2af-41e4-4833-95c9-9efd2069e70c",
  "output": {
    "success": true,
    "message": "",
    "document_list_url": "https://live.deck.co/api/v1/jobs/documents/list?job_guid=b35aa2af-41e4-4833-95c9-9efd2069e70c",														//Where you can download your documents
  },
  "webhook_type": "Job",
  "webhook_code": "FetchTrialBalanceRillet",
  "environment": "Production"
 }
Suggested action: Call the /jobs/documents/list endpoint to get a list of documents related to the job that fetched them.