Skip to content

Instantly share code, notes, and snippets.

@azlyth
Last active August 29, 2015 14:06
Show Gist options
  • Save azlyth/e6b89113025154192945 to your computer and use it in GitHub Desktop.
Save azlyth/e6b89113025154192945 to your computer and use it in GitHub Desktop.

When sending a new SignatureRequest based off a template (POST to /signature_request/create_embedded_with_template), the API response includes the following data for each individual signature:

{
  ...

  "signatures": [
    {
      "signature_id": "78caf2a1d01cd39cea2bc1cbb340dac3",
      "signer_email_address": "george@example.com",
      "signer_name": "George",
      "order": null,
      "status_code": "awaiting_signature",
      "signed_at": null,
      "last_viewed_at": null,
      "last_reminded_at": null,
      "has_pin" : false
    }
  ],

  ...
}

In a situation where there are multiple signatures with no ordering, the name and email are the only pieces of data that identify which signature this is. Since names and emails are subject to change, using this data to figure out who the signer is is less than ideal.

This can be solved by passing back the role_name that was originally submitted in the POST data.

{
  ...

  "signatures": [
    {
      "signature_id": "78caf2a1d01cd39cea2bc1cbb340dac3",
      "signer_email_address": "george@example.com",
      "signer_name": "George",
      "role_name": "investor",
      "order": null,
      "status_code": "awaiting_signature",
      "signed_at": null,
      "last_viewed_at": null,
      "last_reminded_at": null,
      "has_pin" : false
    }
  ],

  ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment