Created
May 28, 2024 15:12
-
-
Save cw6365/c2c00f3032f538a65ea620578e49ec80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## get webhooks | |
curl -X 'GET' \ | |
'https://sandbox.e-sign.co.uk/v3/webhooks' \ | |
-H 'accept: application/json' \ | |
-H 'Authorization: Bearer bearertoken' | |
## create webhook | |
``` | |
curl -X 'POST' \ | |
'https://sandbox.e-sign.co.uk/v3/webhooks' \ | |
-H 'accept: application/json' \ | |
-H 'Authorization: Bearer bearertoken' \ | |
-H 'Content-Type: application/json' \ | |
-d '{ | |
"webhook": { | |
"target_url": "https://example.com/my_request_uri", | |
"event": "envelope_completed" | |
} | |
}' | |
``` | |
## webhook response is just an envelope response | |
``` | |
{ | |
"envelope": { | |
"id": "YzJGr5ax3VCjvwQC9NnXkpw2XM_2uM", | |
"title": "Contract Signing Pack", | |
"subject": "you have a envelope to sign", | |
"description": "please sign the documents", | |
"envelope_status": "Pending", | |
"href": "string", | |
"language": "english", | |
"signer_redirect_uri": "string", | |
"thumbnail": "string", | |
"documents": [ | |
{ | |
"id": "YzJGr5ax3VCjvwQC9NnXkpw2XM_2uM", | |
"title": "Test Contract", | |
"document_status": "Pending", | |
"upload_file": { | |
"id": "TGfwudR87qbl701ZVgXd8oSoCNz-Zt", | |
"uri": "string", | |
"file_name": "string", | |
"file_size": 21334, | |
"processing": true, | |
"date_created": "string", | |
"pages": 9, | |
"thumbnail": "string", | |
"type": "document", | |
"href": "https://app.e-sign.co.uk/original_files/jTWRviKrb478465", | |
"images": [ | |
{ | |
"url": "string", | |
"thumb_url": "string" | |
} | |
], | |
"fields": [ | |
{ | |
"field_type": "request-text", | |
"field_required": false, | |
"field_value": "string", | |
"signer_idx": 0, | |
"document_position": { | |
"x": "10.5%", | |
"y": "55.8%", | |
"width": "10.5%", | |
"height": "10.5%", | |
"size": null, | |
"page": 1 | |
} | |
} | |
] | |
}, | |
"document_file": { | |
"uri": "string", | |
"pages": 15, | |
"signature_certificate_page": 16, | |
"images": [ | |
{ | |
"url": "string", | |
"thumb_url": "string" | |
} | |
] | |
}, | |
"attachment_files": [ | |
{ | |
"id": "f2f7639c-eefb-11ec-8ea0-0242ac120002", | |
"uri": "string", | |
"file_name": "string", | |
"file_size": 21334, | |
"processing": true, | |
"date_created": "string", | |
"pages": 9, | |
"thumbnail": "string", | |
"type": "document", | |
"href": "https://app.e-sign.co.uk/original_files/jTWRviKrb478465", | |
"images": [ | |
{ | |
"url": "string", | |
"thumb_url": "string" | |
} | |
] | |
} | |
], | |
"last_interaction": "2024-05-28T15:09:31.559Z", | |
"document_fields": [ | |
{ | |
"id": "TLy-ei78rET_Y342WE-Q", | |
"signer_email": "[email protected]", | |
"signer_idx": "string", | |
"signer_id": "CKgKmzZjp4r-0g_7IdcGkOFR8FyBeg", | |
"field_type": "request-text", | |
"field_required": false, | |
"field_placeholder": "string", | |
"field_amount": "99.00", | |
"field_value": "string", | |
"field_reference": "string", | |
"field_dropdown_options": [ | |
"string" | |
], | |
"field_signer_file": { | |
"filename": "string", | |
"url": "string" | |
}, | |
"document_position": { | |
"x": "10.5%", | |
"y": "55.8%", | |
"width": "10.5%", | |
"height": "10.5%", | |
"size": null, | |
"page": 1 | |
} | |
} | |
], | |
"carbon_copies": [ | |
{ | |
"name": "string", | |
"email": "[email protected]" | |
} | |
], | |
"audit_trail": [ | |
{ | |
"type": "string", | |
"datetime": "2024-05-28T15:09:31.559Z", | |
"action": "string", | |
"concern": { | |
"name": "string", | |
"id": "string", | |
"email_address": "string" | |
}, | |
"resource": { | |
"instance": "Document", | |
"name": "string", | |
"id": "string" | |
} | |
} | |
] | |
} | |
], | |
"signers": [ | |
{ | |
"id": "CKgKmzZjp4r-0g_7IdcGkOFR8FyBeg", | |
"name": "John Doe", | |
"email": "[email protected]", | |
"viewed": { | |
"last": "2024-05-28T15:09:31.559Z", | |
"amount_of_times": 0 | |
}, | |
"envelope_status": { | |
"status": "Signed", | |
"last_signed_at": "2024-05-28T15:09:31.559Z", | |
"last_declined_at": "2024-05-28T15:09:31.559Z" | |
}, | |
"envelope_authentication": { | |
"country_code": "44", | |
"phone": "12345678910", | |
"passcode": "r44ty6", | |
"two_step_email_verification": false | |
}, | |
"individual_document_status": [ | |
{ | |
"document_id": "CKgKmzZjp4r-0g_7IdcGkOFR8FyBeg", | |
"status": "Signed", | |
"signed_at": "2024-05-28T15:09:31.559Z", | |
"declined_at": "2024-05-28T15:09:31.559Z", | |
"declined_reason": "string" | |
} | |
], | |
"signer_details": { | |
"current_authenticated_user": true, | |
"current_signer": true, | |
"current_sequential_signer": true, | |
"primary_sequential_email": "string", | |
"registered_user": true, | |
"id_checker_document": "string" | |
}, | |
"custom_signature": { | |
"creation_method": "text", | |
"text": "John Doe", | |
"image": "string" | |
} | |
} | |
], | |
"envelope_options": { | |
"dont_send_signing_emails": false, | |
"sign_in_sequential_order": false, | |
"timezone": "London", | |
"signers_device_restriction": false, | |
"signers_ip_restriction": false | |
}, | |
"envelope_meta": { | |
"last_interaction": "2024-05-28T15:09:31.559Z", | |
"created_at": "2024-05-28T15:09:31.559Z", | |
"audit_trail": [ | |
{ | |
"type": "string", | |
"datetime": "2024-05-28T15:09:31.559Z", | |
"action": "string", | |
"concern": { | |
"name": "string", | |
"id": "string", | |
"email_address": "string" | |
}, | |
"resource": { | |
"instance": "Document", | |
"name": "string", | |
"id": "string" | |
} | |
} | |
], | |
"author": { | |
"name": "Foo Bar", | |
"email": "[email protected]", | |
"account": "72fc3ba7-d734-4299-bdcf-f3c3c020bde1" | |
} | |
}, | |
"carbon_copies": [ | |
{ | |
"name": "string", | |
"email": "[email protected]" | |
} | |
], | |
"tags": [ | |
{ | |
"id": "CKgKmzZjp4r-0g_7IdcGkOFR8FyBeg", | |
"name": "contracts" | |
} | |
] | |
}, | |
"transaction": { | |
"amount": 24, | |
"transaction_id": "string", | |
"product_id": "string", | |
"product_name": "string" | |
}, | |
"links": [ | |
{ | |
"method": "post", | |
"rel": "resource.subresource", | |
"uri": "/path/to/resource" | |
} | |
] | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment