Tip of the day

Support tickets can be submitted directly from application

Archive

Estimated reading: 5 minutes 142 views

When a business processes is completed there are couple of options to send process products to your application. One way to do that is by using Archive webhook.

Archive is a standard Post request that includes all the process data. Among other bits of data, it includes:

  1. Data from the submitted form
  2. Attachments that were added to the process
  3. Signed and locked PDF document
  4. Information regards the client and more

Why do I need this?

Archive webhook can be very useful when you need a resilient method to accept session product. Other methods, such as storage or SMTP are typically a-synchronous and not as much resilient as an API because it provides a real time acknowledge. This method also includes a fail over and alert mechanism.

To add an archive webhook:

  1. follow Webhook guide to add new webhook.
  2. See below a guide for archive body request and expected response.
  3. See below Setting up an explicit archive connector

Archive request and response

This is a description for Body request posted from Cellosign to your API.

ElementWhat it’s for?
EventObject that includes Event type: WHP_ARCHIVE and time stamp
Session This object includes complete details on the session(s). Since business process may include number of sessions, all the sessions that has been taken place with this process are listed here. Each session includes the following elements:
  1. “id”: session token
  2. “author”: User who created the session
  3. “reference”: aggregator ID for business process.
  4. “transaction_number”: ID for transaction that can be located in cellosign UI application
  5. “recipient”: full disclosure on where invitation and OTP were posted as well as, also in case of a workflow this will indicate the recipient id in the process and it’s convention name
  6. “submission_details”: Client browser details, IP, User agent and Geo location details when collected and applicable
  7. “labels”: This is a key value object in reference to values injected to labels. See API documentation for details
  8. “created_at”: Time this session created
  9. “submitted_at”: Time this session submitted by client
  10. “template”: Template id
  11. “integrations”: List of integrations that were executed in this session
signaturesArray of each signatures. For each signature element
1. Field ID
2. When signature pad was signed
3. Signer details: id and convention
4. Key/value labels that are attached to signature pad, if any
dataList of all form elements , each form element includes:
1. element id
2. value
3. element type
4. visible on final pdf true or false
5. page and coordinates [top,left, width, height]: these values represents the absolute position of the element on the PDF file
attachmentsList of attachments being collected throughout the process. each element on the list includes:
1. Form element id
2. Filename
3. mime type
4. Base64 string of the file
signed_documentSigned and locked PDF document. includes: file name, mime type [application/pdf] and base64 string of the file
{
  "event": {
    "type": "WHP_ARCHIVE",
    "timestamp": "2022-12-21T22:29:17.603248"
  },
  "reference": "f51c66ba-d33a-4c59-b63a-aa270383fb9e",
  "sessions": [
    {
      "id": "wSYqmI4xsE",
      "author": "john@example.com",
      "reference": "f51c66ba-d33a-4c59-b63a-aa270383fb9e",
      "process_id": "f51c66ba-d33a-4c59-b63a-aa270383fb9e",
      "process_number": 100,
      "transaction_number": 30,
      "recipient": {
        "id": 1,
        "name": "client",
        "otp_destination": {
          "address": "client@example.com",
          "type": "email",
          "provider": null,
          "status": "sent"
        },
        "invitations": [
          {
            "address": "client@example.com",
            "type": "email",
            "provider": null,
            "status": "sent"
          }
        ]
      },
      "submission_details": {
        "ip": "127.0.0.1",
        "user_agent": "Best browser ever",
        "device": "mobile",
        "latitude": 33.196944,
        "longitude": 35.543705,
        "accuracy": 1000
      },
      "labels": {
        "CUSTOMER_TAG": "CUSTOMER_VALUE"
      },
      "created_at": "2022-12-21T22:29:17.603287",
      "submitted_at": "2022-12-21T22:29:17.603290",
      "template": {
        "id": "9fa70d4ccea84262b1ed2308a07a3fb4"
      },
      "integrations": [
        {
          "id": "861c85ff-ba57-4679-8a63-c731d4e7b10b",
          "type": "EF_CLIENT_LOGGED_IN",
          "status": "success",
          "executed_at": "2022-12-21T22:29:17.603312",
          "payload": null,
          "error": null
        }
      ]
    }
  ],
  "signatures": [
    {
      "id": "SIGNATURE1",
      "signed_at": "2022-12-21T22:29:17.603330",
      "signed_by": {
        "id": "1",
        "name": "client"
      },
      "labels": {
        "SOME_TAG": "SOME_VALUE"
      }
    }
  ],
  "data": [
    {
      "id": "SOMEFIELD1",
      "value": "SOMEVALUE1",
      "top": 65.91806722689076,
      "left": 8.194774346793352,
      "width": 28.8781512605042,
      "height": 2.048693586698337,
      "page": 1,
      "type": "text",
      "visible": true,
      "meta": {}
    },
    {
      "id": "SOMEFIELD2",
      "value": "SOMEVALUE2",
      "top": 65.91806722689076,
      "left": 8.194774346793352,
      "width": 28.8781512605042,
      "height": 2.048693586698337,
      "page": 3,
      "type": "text",
      "visible": true,
      "meta": {}
    },
    {
      "id": "SOMEFIELD3",
      "value": "SOMEVALUE3",
      "top": 65.91806722689076,
      "left": 8.194774346793352,
      "width": 28.8781512605042,
      "height": 2.048693586698337,
      "page": 0,
      "type": "select",
      "visible": true,
      "meta": {}
    },
    {
      "id": "SOMEFIELD4",
      "value": "4a45b2df-f7bd-48bf-a2b4-b8405eb51194",
      "top": 65.91806722689076,
      "left": 8.194774346793352,
      "width": 28.8781512605042,
      "height": 2.048693586698337,
      "page": 0,
      "type": "payment",
      "visible": true,
      "meta": {}
    },
    {
      "id": "SOMEFIELD5",
      "value": "32.001186,34.9413393",
      "top": 65.91806722689076,
      "left": 8.194774346793352,
      "width": 28.8781512605042,
      "height": 2.048693586698337,
      "page": 0,
      "type": "location",
      "visible": true,
      "meta": {
        "geocoder": "Arlozorov St 160, Tel Aviv-Yafo, Israel"
      }
    }
  ],
  "attachments": [
    {
      "id": "ATTACHMENT_FIELD_ID",
      "filename": "SOMEFILENAME1.png",
      "mimetype": "image/png",
      "content": "BASE64 file content"
    }
  ],
  "payments": [
    {
      "status": "success",
      "type": "verify_credit_card",
      "transaction_id": "4a45b2df-f7bd-48bf-a2b4-b8405eb51194",
      "session_id": "wSYqmI4xsE",
      "provider_transaction_reference": "4f33600c-34bf-4cb1-af3a-52237b1ecc5a",
      "provider_transaction_result": {
        "currency": "ILS",
        "card_mask": "458045******4580",
        "internal_transaction_id": "69703676",
        "club_code": "",
        "credit_company": "Visa",
        "club_id": "",
        "card_id": "1080131215624580",
        "session_cd": "414ecb3e88ac0148eaec9c5efbad68a8a3fb60674b4e5f92ec0c0d9a709d5039",
        "card_expiration": "0724",
        "card_brand": "Visa",
        "card_aquirer": "Alphacard",
        "total": "2100",
        "card_no": "xxxxxxxxxxxx4580",
        "life_style": "1",
        "cguid": "69796709",
        "auth_number": "1579133"
      },
      "amount": 2100
    }
  ],
  "signed_document": {
    "filename": "SIGNEDDOCUMENT.pdf",
    "mimetype": "application/pdf",
    "content": "BASE64 file content"
  }
}

Archive response

A response from the API should include:

  • status: “0” for success or “-1” for an error .
  • In case of an error, please provide enough details in “errordesc” key.
  • In case of success you may response with reference or/and a url to any object/file. This can be convenient for tracking or debugging in case an issue is raised
{
  "status": "0",
  "document": {
    "reference": "1bbc36dd-6e6b-4ab2-bb97-4ee46627bcab",
    "public_link": "https://mystorage.example.com/1bbc36dd-6e6b-4ab2-bb97-4ee46627bcab"
  },
  "errordesc": ""
}
{
  "status": "-1",
  "document": null,
  "errordesc": "Something goes wrong"
}

Leave a Comment

Share this Doc

Archive

Or copy link

CONTENTS