Created
October 9, 2021 03:10
-
-
Save ghidinelli/186ea1b3797c0e73fe2511a532f14bdf 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
# send a waiver to a mobile phone for signing | |
curl -X POST https://speedwaiver.com/api/v1/waiver_invitations -H 'Content-Type: application/json' \ | |
-H 'X-Tenant-ID: ...' \ | |
-H 'x-api-key: ...' \ | |
-d '[{"family_name": "Alonso", \ | |
"given_name": "Fernando", \ | |
"waiver_template_group_id": "...", \ | |
"event_id": "...", \ | |
"send_notification_via": "sms". \ | |
"sms_number": "+1-415-555-1212", \ | |
"meta": { "custom-parameter": "here" } } \ | |
]' | |
# and receive back a webhook when the waiver is signed | |
{ | |
"event": "signed_waiver.create", | |
"id": "...", | |
"tenant_id": "...", | |
"data": { | |
"download_url": "https://url.to/....pdf", | |
"id": "...", | |
"tenant_id": "...", | |
"waiver_template_id": "...", | |
"insurance_provider_id": "...", | |
"waiver_invitation_id": "...", | |
"event_id": "...", | |
"pdf_metadata": { | |
"digest": { | |
"algorithm": "sha256", | |
"checksum": "02d5b928a4b42bac3aab65cacb7efe08735e5dce98303b260a19e32081bf02ff" | |
} | |
}, | |
"valid_from": "2021-07-26T04:00:00.000Z", | |
"valid_to": "2022-01-01T04:59:59.999Z", | |
"given_name": "Fernando", | |
"family_name": "Alonso", | |
"email": "fernando@alonso.com", | |
"phone": "4155551212", | |
"data": { | |
"photo": "https://url.to/photo.jpg", | |
"waiver": { | |
"raw": "https://url.to/signature.json", | |
"svg": "https://url.to/signature.svg" | |
} | |
}, | |
"signing_context": { | |
"userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Mobile/15E148 Safari/604.1", | |
"coordinates": {}, | |
"ipAddress": "123.123.123.123" | |
}, | |
"meta": null, | |
"created_at": "2021-07-26T16:59:50.018Z", | |
"updated_at": "2021-07-26T16:59:50.584Z", | |
"deleted_at": null, | |
"Event": { | |
"valid_from": "2021-07-26T04:00:00.000Z", | |
"valid_to": "2022-01-01T04:59:59.999Z", | |
"id": "...", | |
"tenant_id": "...", | |
"name": "Event Name", | |
"slug": "event-slug-here", | |
"external_id": null, | |
"is_unlisted": false, | |
"starts_at": "2020-11-19T08:00:00.000Z", | |
"ends_at": "2021-12-31T07:59:59.999Z", | |
"location_name": "Your Venue", | |
"location_address": "123 Main Street; Anytown, USA", | |
"location_lat_long": null, | |
"tz": "America/New_York", | |
"geocode": null, | |
"meta": null, | |
"valid_from_template": "YYYY-MM-DD 00:00:00.000", | |
"valid_to_template": "2021-12-31 23:59:59.999", | |
"waiver_template_group_id": "...", | |
"waiver_collection_id": null, | |
"waiver_type": "template", | |
"email_enabled": null, | |
"email_required": null, | |
"show_wants_email_marketing": null, | |
"created_at": "2020-11-19T18:40:11.915Z", | |
"updated_at": "2020-12-10T17:36:28.387Z", | |
"deleted_at": null | |
}, | |
"InsuranceProvider": { | |
"id": "...", | |
"name": "Your Insurance Provider", | |
"meta": null, | |
"created_at": "2020-08-19T20:02:31.927Z", | |
"updated_at": "2020-08-19T20:02:31.927Z", | |
"deleted_at": null | |
}, | |
"Tenant": { | |
"id": "...", | |
"name": "Your Tenant", | |
"domain": "your-domain.speedwaiver.com", | |
"slug": "your-domain", | |
"status": "active", | |
"datacenter": null, | |
"meta": null, | |
"external_id": "...", | |
"created_at": "2020-11-19T18:33:42.266Z", | |
"updated_at": "2021-01-11T15:48:34.438Z", | |
"deleted_at": null | |
}, | |
"WaiverTemplate": { | |
"id": "...", | |
"tenant_id": null, | |
"group_id": "...", | |
"insurance_provider_id": "...", | |
"name": "Waiver Template Name", | |
"status": "published", | |
"age_of_majority": 18, | |
"version": null, | |
"requires_sms_verification": true, | |
"pdf_template_settings": null, | |
"components": [ | |
{ | |
"type": "page", | |
"components": [ | |
{ | |
"key": "photo", | |
"type": "photo", | |
"label": "Take your photo", | |
"validations": [ | |
"required" | |
] | |
} | |
] | |
}, | |
{ | |
"type": "page", | |
"components": [ | |
{ | |
"key": "waiver", | |
"html": "<redacated>", | |
"type": "waiver", | |
"signature": true, | |
"validations": [ | |
"required" | |
] | |
} | |
] | |
} | |
], | |
"meta": null, | |
"download_email_subject": "<redacated>", | |
"download_email_html_body": "<redacated>", | |
"created_at": "2020-12-10T17:34:34.656Z", | |
"updated_at": "2021-03-16T18:47:31.087Z", | |
"deleted_at": null | |
}, | |
"WaiverInvitation": { | |
"url": "/s/slug-here", | |
"id": "...", | |
"tenant_id": "...", | |
"slug": "slug-here", | |
"status": "signed", | |
"send_notification_via": "sms", | |
"sms_number": "1235551234", | |
"family_name": "Alonso", | |
"given_name": "Fernando", | |
"birth_date": "1981-07-29T00:00:00.000Z", | |
"email": "fernando@alonso.com", | |
"wants_email_marketing": false, | |
"valid_from": "2021-07-26T16:58:24.356Z", | |
"valid_to": "2021-12-31T07:59:59.999Z", | |
"waiver_template_group_id": "...", | |
"role_id": null, | |
"group_id": null, | |
"waiver_collection_id": null, | |
"event_id": "...", | |
"signed_waiver_defaults": null, | |
"waiver_template_overrides": null, | |
"signed_waiver_id": "...", | |
"meta": { | |
"your-meta-field": "here" | |
}, | |
"created_at": "2021-07-26T16:58:24.358Z", | |
"updated_at": "2021-07-26T16:59:50.030Z", | |
"deleted_at": null | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment