Constants

Document status

Status

Description

setup

Document is currently in a setup state

awaiting_signatures

Document is awaiting signatures

complete

Document has completed being signed

conversion_error

An error occurred when creating the document

var STATUS = {
  "setup":"setup",
  "awaiting_signatures":"awaiting_signatures",
  "complete":"complete",
  "conversion_error":"conversion_error"
};

Document type

type

Description

document

Document that can be signed

template

A special kind of document that can be copied and used to make new documents

var DOCUMENT_TYPE = {
   template:"template",
   document:"document"
};

DataField type

Type

Description

signature

Signature field, where a user can enter a signature

text

Any free form text

date

A special kind of text field that accepts date

initial

A signature field intended for initials

check

A checkbox field. Note: data for check field is either checked or unchecked

block

A field used for blocking out content e.g. a clause that doesn’t apply to the user

file

A Field used for upload files.

choice

A field used for allocating a set number of options for a field.

var DATA_FIELD_TYPE = {
    "signature":"signature",
    "text":"text",
    "date":"date",
    "initial":"initial",
    "check":"check",
    "block":"block",
    "file":"file",
    "choice": "choice"

};

Signatory status

Status

Description

setup

Signature request hasn’t been sent to the user

awaiting_signatures

Signature request has been sent

complete

User has and completed

var STATUS = {
  "setup":"setup",
  "awaiting_signatures":"awaiting_signatures",
  "complete":"complete"
  };

Error Codes

Error code

Description

bad_request

Generic error code if we don’t specify the error code. More information will be found in the error message.

unauthorised

Do not have permission to perform an operation or the credentials you supplied are invalid.

invalid_access_token

Access token is no longer valid or has been revoked.

conversion_failed

Document failed to convert. This can either be when creating the final pdf or when converting the initial pdf to images

status_change_denied

Returned when trying to update status of a document to another status

operation_denied

Returned when an entity is no longer allowed to be deleted or updated

signatory_detail_error

There could be missing contact details, name or duplicate details

conflict_error

Entity has been updated previously and QuicklySign can’t determine which version to use. This is based on date_updated

not_supported

The functionality currently isn’t supported.

insufficient_funds

Api client doesn’t have funds to perform the operation.

service_unavailable

This should never happen :) However, if it’s down for maintenance, we’ll return this code

not_found

Entity could not be found.

internal_server_error

Internal server error. Contact [email protected] if this happens.

var ERROR_CODES ={
    "bad_request" : "bad_request",
    "unauthorized" : "unauthorized",
    "invalid_access_token" : "invalid_access_token",
    "conversion_failed" : "conversion_failed",
    "status_change_denied" : "status_change_denied",
    "operation_denied" : "operation_denied",
    "signatory_detail_error" : "signatory_detail_error",
    "conflict_error" : "conflict_error",
    "not_supported" : "not_supported",

    "insufficient_funds" : "insufficient_funds",
    "service_unavailable" : "service_unavailable",

    "unknown_error" : "unknown_error",
    "not_found" : "not_found",
    "method_not_supported" : "method_not_supported",
    "internal_server_error" : "internal_server_error"
};

Subscription Callback events

Callback Event

Description

entity_updated

The entity you subscribed to has been updated

document_status_changed

The status of the document has changed

final_document_generated

The completed signed document has been generated.

audit_trail_updated

The audit trail has been updated

signatory_updated

Signatory details have been updated. E.g. email send count

data_field_updated

Data field has been updated.

final_document_generated

Event raised when final document has been generated

var CALLBACK_EVENT= {
  "entity_updated":"entity_updated",
  "document_status_changed":"document_status_changed",
  "final_document_generated":"final_document_generated",
  "audit_trail_updated":"audit_trail_updated"
  };

Audit Trail Entry types

Audit entry type

Description

signature_request_sent

Indicates a signature request was sent

signature_request_reminder_sent

Indicates a reminder to sign was sent.

user_details_changed

When details changed then this entry is inserted into the log. It indicates that name or email or mobile number changed.

sms_delivered

Otp was delivered

sms_sent

Otp was sent

sms_failure

Otp failed to deliver

email_failure

Email failed to deliver

email_tracking_info

General tracking info, where applicable, it will indicate that the mail arrived at server, was opened etc.

document_status_changed

Entry for when status changes. E.g. Complete, awaiting_signatures

document_created

Document created (when a user creates a document)

document_opened

Document opened (a user opens the document)

document_completed

Document has been signed and marked as complete.

document_uploaded

Document uploaded

document_deleted

Document deleted.

user_signed

a user completed signing

user_signed_in_person

A user signed in-person

user_opted_to_sign_later

A user opted to sign later

log

A generic entry for when none of the other audit log types will suffice

entered_incorrect_otp

Incorrect otp entered. Multiple of these in the audit trail could indicate brute force attack.

entered_correct_otp

Correct otp entered.

in_person_signing_link_generated

In person signing link generated

document_downloaded

Completed document is downloaded.

document_preview_generated

A preview of the final document was generated

document_preview_downloaded

A preview of the final document was downloaded

document_opened_via_in_person_signing_link

An in-person signing link was used to open the document.