To learn more about webhooks, please visit our standard API documentation. If you are unable to view, please reach out to support@sighten.io and they will provide access.
The Contract Webhook Statuses + DAL
The contract webhook is sent to the configured endpoint whenever a document is generated, sent, signed, and voided. Most commonly, integrated partners only consume the webhook when the status is SIGN, and then parse out the desired information. This ensure the homeowner has fully agreed to the proposal and is ready to move forward. With the automatic update from the webhook, you can now pull down all the homeowner, usage, project, and quote details that you need without any additional user interaction: simply fire off another request to pull down the data. You can learn more about the DAL here.
Fields in the Contract Webhook
- site (uuid) - this is the site UUID - this ID is 1:1 with a job in Sighten. You may want to use this to create a new record in your portal and maintain the job sync, or use the identifier to find a job that already existing in your portal.
- quote (uuid) - this is the quote UUID is similar to the site ID, except that it is not 1:1; there can be any number of quotes on a given job (or site). The quote ID is also important here because it signifies and helps access all the contracted details.
- sub_tasks > document_status - this will be SIGN when the contract is full executed
- sub_tasks > data > documents > uuid - you will need to store this information and make a GET request to: /api/v1/document/{uuid}/download/ to download the signed contract. You will take the document uuid where the "creation_type" is "UPLOADED".
- sub_tasks > data > envelopes > date_signed - this will populate with date of the signed contract. You can also pull this via the DAL or just use current day's date when you receive a signed webhook.
- Please note, depending on the configuration of your contract tasks, there may be multiple subtasks. To ensure you are pulling from the right subtask, you will want to identify the sub_task with category: DOCUMENT (there can only be one DOCUMENT subtask per task, so if you do the right logic, you will have the right subtask).
Sample Contract Webhook
{ 'status':'INPROG', 'name':'Installation Agreement', 'quote':'7cf8d5db-bb05-4a39-a40b-c83e17988c37', 'milestone':'8c884d2d-a84c-4376-be9c-d4f380828478', 'site':'b0c16879-5c5f-4dd9-8442-65cc594372ed', 'uuid':'060d5cb4-374a-4c31-8f41-9e530c71ffff', 'date_updated':'2019-11-26T20:24:59.613449Z', 'sub_tasks':[ { 'category':'DOCUMENT', 'required':False, 'status':'COMP', 'document_status':'SIGN', 'instructions':None, 'label':'Installation Agreement', 'data':{ 'documents':[ { 'date_created':'2019-11-26T20:25:27.275049Z', 'name':'Cash Installation Agreement.pdf', 'document_type':'HIC', 'creation_type':'GENERATED', 'document_group':'d397b480-6b52-4ee0-9ff9-9725fd91dbed', 'uuid':'451c2577-96b7-48dd-a7d0-eb2e47293e96' }, { 'date_created':'2019-11-26T20:25:43.659696Z', 'name':'Cash Installation Agreement (2).pdf', 'document_type':'OTH', 'creation_type':'UPLOADED', 'document_group':'d397b480-6b52-4ee0-9ff9-9725fd91dbed', 'uuid':'e24f5a7a-1d6d-4417-8af2-22da3d67d4cc' } ], 'envelopes':[ ] }, 'uuid':'161e657f-758d-4b54-83d3-7a019c41c5fa' } ], 'comments':[ { 'comment':'Sighten Admin generated Cash Installation Agreement.pdf for sub task Installation Agreement.', 'commentor':'sightenbot@sighten.io', 'thread':None, 'timestamp':'2019-11-26T20:25:27.328990Z', 'uuid':'5f3af19f-b637-467a-bba2-67acb2d55eaf', 'commentor_first_name':'Sighten', 'commentor_last_name':'Bot' }, { 'comment':'Sighten Admin uploaded a document Cash Installation Agreement (2).pdf to sub task Installation Agreement.', 'commentor':'sightenbot@sighten.io', 'thread':None, 'timestamp':'2019-11-26T20:25:45.366284Z', 'uuid':'8ef11d2c-60a0-4b9c-8854-d46f13ad5037', 'commentor_first_name':'Sighten', 'commentor_last_name':'Bot' } ], 'description':'Upload and review installation agreement', 'assigned_to':{ 'organization_name':'Solar Energy', 'first_name':'Generic', 'uuid':'12b70751-195d-4315-b8a6-a6c6076b3669', 'last_name':'Operations', 'email':'contracts@solar.com', 'organization':'b7534251-dd34-4ab2-994d-3cdd6d83ec8f' } }